/* =======================================================================
   layout.css — Section layouts, components, responsive
   ======================================================================= */

/* Navigation
----------------------------------------------------------------------- */
#nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

#nav-wrap.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  letter-spacing: -0.01em;
  transition: color var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}

#nav-wrap.scrolled .nav-logo {
  color: var(--text);
}

#nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

#nav li a {
  display: block;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

#nav li a:hover,
#nav li.current a {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

#nav-wrap.scrolled #nav li a {
  color: var(--text-muted);
}

#nav-wrap.scrolled #nav li a:hover,
#nav-wrap.scrolled #nav li.current a {
  color: var(--accent);
  background: rgba(37,99,235,0.07);
}

/* Hamburger
----------------------------------------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

#nav-wrap.scrolled .nav-toggle span {
  background: var(--text);
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero
----------------------------------------------------------------------- */
header#home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('../images/background.jpg') center/cover no-repeat;
}

header#home::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(10,18,40,0.75) 0%, rgba(10,18,40,0.60) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 800px;
  padding: 0 24px;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(3rem, 8vw, 5.5rem);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: rgba(255,255,255,0.78);
  font-weight: 400;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-tagline span {
  color: rgba(255,255,255,0.95);
  font-weight: 500;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 0.875rem;
}

.hero-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255,255,255,0.65);
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  text-decoration: none;
}

.hero-social a:hover {
  background: rgba(255,255,255,0.2);
  border-color: #fff;
  color: #fff;
}

.scroll-down {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 1.25rem;
  text-decoration: none;
  animation: bounce 2.4s ease-in-out infinite;
  z-index: 1;
  transition: color var(--transition);
}

.scroll-down:hover {
  color: rgba(255,255,255,0.9);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* About
----------------------------------------------------------------------- */
#about {
  background: var(--bg-alt);
  padding: var(--section-pad) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

.profile-pic {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg);
  box-shadow: var(--shadow-md);
}

.about-text h2 {
  margin-bottom: 1.25rem;
}

.about-text p {
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* Resume
----------------------------------------------------------------------- */
#resume {
  background: var(--bg);
  padding: var(--section-pad) 0;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.resume-col > h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  position: relative;
  padding: 0 0 2.25rem 1.5rem;
  border-left: 2px solid var(--border);
}

.timeline-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline-item h4 {
  font-size: 1.0625rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.timeline-item .role {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.timeline-item .date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.timeline-item > p:not(.role):not(.date) {
  font-size: 0.9375rem;
  margin-top: 0.625rem;
  color: var(--text-muted);
}

/* Portfolio / Past Experience
----------------------------------------------------------------------- */
#portfolio {
  background: var(--bg-alt);
  padding: var(--section-pad) 0;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.portfolio-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  min-height: 110px;
}

.portfolio-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.portfolio-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.portfolio-card img {
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.65);
  transition: filter var(--transition);
  margin: 0 auto;
}

.portfolio-card:hover img {
  filter: grayscale(0%) opacity(1);
}

/* Modal
----------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,15,30,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: var(--bg);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 580px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s;
}

.modal-backdrop.is-open .modal-panel {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: background var(--transition), color var(--transition);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-logo {
  max-height: 52px;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

.modal-company {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.modal-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.modal-body p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-meta {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-location {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Publications
----------------------------------------------------------------------- */
#publications {
  background: var(--bg);
  padding: var(--section-pad) 0;
}

.book-feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.book-icon {
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
}

.book-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.book-info p {
  margin-bottom: 1.25rem;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.pub-item {
  padding: 1.25rem 1.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
}

.pub-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.pub-item i {
  color: var(--accent);
  font-size: 1.125rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.pub-item h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.45;
}

.pub-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* Consulting / CTA
----------------------------------------------------------------------- */
#call-to-action {
  background: var(--accent);
  padding: var(--section-pad) 0;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

#call-to-action .section-label {
  color: rgba(255,255,255,0.65);
}

#call-to-action h2 {
  color: #fff;
  margin-bottom: 1.5rem;
}

.cta-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cta-list li {
  color: rgba(255,255,255,0.82);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.cta-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

/* Testimonials
----------------------------------------------------------------------- */
#testimonials {
  background: var(--bg-alt);
  padding: var(--section-pad) 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.testimonial-card blockquote {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
  position: relative;
  padding-top: 1.25rem;
}

.testimonial-card blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.75rem;
  left: -0.25rem;
  font-size: 3.5rem;
  color: var(--accent);
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.35;
}

.testimonial-cite {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: auto;
}

/* Footer
----------------------------------------------------------------------- */
footer {
  background: var(--text);
  padding: 3rem 0;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 50%;
  color: rgba(255,255,255,0.85);
  font-size: 0.9375rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  text-decoration: none;
}

.footer-social a:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

.footer-copy {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.35);
  margin: 0;
}

/* Leadership & Advisory
----------------------------------------------------------------------- */
.resume-leadership {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.resume-leadership > h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.leadership-item {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.leadership-item h4 {
  font-size: 1.0625rem;
  margin-bottom: 0.2rem;
}

.leadership-item .role {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.leadership-item .date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

.leadership-item > p:not(.role):not(.date) {
  font-size: 0.9375rem;
  margin-top: 0.625rem;
}

/* Skills & Certifications
----------------------------------------------------------------------- */
.skills-section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.skills-section > h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.skill-category h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.875rem;
  letter-spacing: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.5;
}

/* =====================================================================
   Responsive — mobile-first overrides
   ===================================================================== */

/* Tablet: ≤ 960px */
@media (max-width: 960px) {
  :root {
    --section-pad: 72px;
  }

  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .resume-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .cta-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .book-feature {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .book-icon {
    text-align: center;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: ≤ 600px — leadership and skills */
@media (max-width: 600px) {
  .leadership-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile: ≤ 768px */
@media (max-width: 768px) {
  :root {
    --section-pad: 56px;
  }

  /* Nav */
  .nav-toggle {
    display: flex;
  }

  #nav {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15,23,42,0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.5rem 0;
    gap: 0;
    display: none;
  }

  body.nav-open #nav {
    display: flex;
  }

  #nav li a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    color: rgba(255,255,255,0.82);
    font-size: 0.9375rem;
  }

  #nav li a:hover,
  #nav li.current a {
    color: #fff;
    background: rgba(255,255,255,0.08);
  }

  #nav-wrap.scrolled #nav li a {
    color: rgba(255,255,255,0.82);
  }

  #nav-wrap.scrolled #nav li a:hover,
  #nav-wrap.scrolled #nav li.current a {
    color: #fff;
    background: rgba(255,255,255,0.08);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .profile-pic {
    margin: 0 auto;
  }

  /* Portfolio */
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Modal */
  .modal-panel {
    padding: 1.75rem 1.5rem;
  }
}

/* Small mobile: ≤ 480px */
@media (max-width: 480px) {
  :root {
    --section-pad: 48px;
  }

  .logo-grid {
    gap: 0.75rem;
  }

  .portfolio-card {
    padding: 1.25rem 1rem;
    min-height: 90px;
  }

  .book-feature {
    padding: 1.5rem;
  }

  .pub-item {
    padding: 1rem 1.125rem;
  }
}
