/* =====================================================
   IncludeMe A11y - Stylesheet
   Responsive, Accessible Portfolio (Final - Smooth & Stable Hamburger)
   ===================================================== */

/* ---------- Base Reset ---------- */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-size: 16px;
}
*, *::before, *::after { box-sizing: inherit; }

body {
  font-family: 'Roboto', sans-serif;
  color: #222;
  background: #fafafa;
  margin: 0;
  line-height: 1.6;
}

a {
  color: #004aad; 
  text-decoration: none;
}
a:hover,
a:focus { text-decoration: underline; outline-offset: 2px; }

img { max-width: 100%; height: auto; }

/* Skip Link (visible on keyboard focus) */
.skip-link {
  position: absolute;
  left: -999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  background: #000;
  color: #fff;
  padding: 0.5rem;
  z-index: 1000;
}

/* ---------- Layout Containers ---------- */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 900px) {
  .layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* =====================================================
   HEADER & NAVIGATION
   ===================================================== */

.site-header {
  background-color: #004aad;
  color: #fff;
  padding: 0.75rem 0;
}

/* Place logo left, hamburger right */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* logo left, hamburger right */
  gap: 20px;
  flex-wrap: wrap;                /* allows nav below logo in mobile */
}

.brand img {
  display: block;
}

/* ---------- HAMBURGER BUTTON ---------- */
.nav-toggle {
  background: transparent;
  border: 2px solid transparent;
  color: #fff;
  font-size: 2rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  /* Smooth 1s transition for both border thickness and color */
  transition: border-color 1s ease, border-width 1s ease;
  /* Prevents layout jump when border grows */
  box-sizing: border-box;
}

/* Smooth border expansion on hover/focus */
.nav-toggle:hover,
.nav-toggle:focus {
  border-width: 3px;
  border-color: #fff;
  outline: none;
}

/* Keep same look when menu is expanded ("active") */
.nav-toggle[aria-expanded="true"] {
  border-width: 3px;
  border-color: #fff;
}

/* ---------- MOBILE NAVIGATION ---------- */
.primary-nav {
  display: none;              /* initially hidden */
  width: 100%;
  flex-direction: column;
  background: #004aad;
  animation: slideDown 0.4s ease forwards;
}

/* When menu expands, it appears BELOW header content */
.primary-nav.is-open {
  display: flex;
  position: relative;
  order: 3; /* ensures nav comes after logo and button in flex flow */
  margin-top: 0.5rem;
}

/* Menu list styling */
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: #fff;
  padding: 0.75rem 1rem;
  display: block;
}

.primary-nav a:hover,
.primary-nav a:focus {
  background: #0060d1;
  text-decoration: none;
}

/* Simple keyframe for gentle downward appearance */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- DESKTOP NAVIGATION ---------- */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;   /* hidden on large screens */
  }

  .header-inner {
    justify-content: flex-start; 
    gap: 20px;
    flex-wrap: nowrap;
  }

  .primary-nav {
    display: flex;
    flex-direction: row;
    background: none;
    width: auto;
    position: static;
    order: initial;
  }

  .nav-list {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }

  .primary-nav a {
    color: #fff;
    padding: 0.5rem 0;
  }

  .primary-nav a:hover,
  .primary-nav a:focus {
    text-decoration: underline;
    background: none;
  }
}

/* =====================================================
   SIDEBAR
   ===================================================== */

.sidebar {
  flex: 0 0 25%;
  background: #fff;
  border: 1px solid #eee;
  padding: 1rem;
  border-radius: 4px;
}

.profile-media img {
  border-radius: 6px;
  max-width: 200px;
  display: block;
  margin: 0 auto 1rem auto;
}

.page-title {
  margin: 0.5rem 0;
  font-size: 1.5rem;
}

.subtitle {
  color: #555;
  margin-bottom: 1rem;
  font-weight: 500;
}

.meta {
  list-style: none;
  padding-left: 0;
}
.meta li { margin: 0.4rem 0; }

.divider {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

/* =====================================================
   MAIN CONTENT CARDS
   ===================================================== */
.content { flex: 1; }

.card {
  background-color: #fff;
  border: 1px solid #eee;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.card-title {
  margin-top: 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.muted { color: #777; }
.soft  { border-color: #eee; }

/* =====================================================
   ACCORDION SECTIONS
   ===================================================== */

details summary {
  position: relative;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
}

details summary::-webkit-details-marker { display: none; }

/* Rotating arrow */
details summary::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 0;
  color: #004aad;
  transition: transform 1s ease;
  transform-origin: center;
}
details[open] summary::before {
  transform: rotate(90deg);
}

/* Smooth open/close animation */
details .accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease;
}
details[open] .accordion-panel {
  max-height: 2000px;
}

/* =====================================================
   MEDIA (Images Inside Accordion)
   ===================================================== */

.media {
  display: block;
  clear: both;
  margin: 1rem 0;
  text-align: center;
}

.media img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 420px; /* slightly larger but safe */
  height: auto;
  border-radius: 4px;
}

.media figcaption {
  text-align: center;
  color: #777;
  margin-top: 0.5rem;
}

/* =====================================================
   CONTACT FORM
   ===================================================== */

.contact-form {
  display: grid;
  gap: 1rem;
}

.field label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

.button {
  background: #004aad;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
.button:hover,
.button:focus { background: #003070; }

/* =====================================================
   FOOTER
   ===================================================== */

.site-footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
}
.site-footer a { color: #fff; }
.footer-heading { font-weight: 600; margin-right: 0.5rem; }
.small { font-size: 0.85rem; color: #aaa; }
.social { list-style: none; padding-left: 0; margin: 0; }

/* =====================================================
   RESPONSIVE ORDER CHANGES FOR MOBILE
   ===================================================== */

@media (max-width: 767px) {
  .sidebar { order: 2; }
  .content { order: 1; }
  .media img { max-width: 100%; }
}
