:root {
  --white: #ffffff;
  --bg-color: #faf9f6;
  --card-bg: #ffffff;
  --black: #1a1a1a;
  --caramel: #b56a45;
  --text-primary: #1a1a1a;
  --text-muted: #444444;
  --text-subtle: #777777;
  --rule: rgba(26, 26, 26, 0.12);
  --header-bg: rgba(250, 249, 246, 0.85);
  --footer-bg: #1a1a1a;
  --footer-text: #ffffff;
  --tag-bg: #faf9f6;
  --svg-pattern-color: #2c2a29;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="dark"] {
  --white: #ffffff;
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --black: #f0efed;
  --caramel: #d88359;
  --text-primary: #f0efed;
  --text-muted: #b0afac;
  --text-subtle: #8e8c87;
  --rule: rgba(240, 239, 237, 0.12);
  --header-bg: rgba(18, 18, 18, 0.88);
  --footer-bg: #0a0a0a;
  --footer-text: #f0efed;
  --tag-bg: #262626;
  --svg-pattern-color: #888888;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text-primary);
  background: var(--bg-color);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 4px;
}

::selection {
  color: var(--white);
  background: var(--caramel);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: #1a1a1a;
  border: 2px solid var(--white);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(100% - 48px, 1200px);
  margin: 0 auto;
}

/* --- HEADER & NAVIGATION --- */
.site-header {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.15s;
}

.reveal-delay-2 {
  transition-delay: 0.3s;
}

.site-header.is-scrolled,
.site-header[data-menu-open="true"] {
  border-color: var(--rule);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-wrap {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: none;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.desktop-nav a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--caramel);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* Theme Toggle Button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  color: var(--text-primary);
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--caramel);
  color: var(--caramel);
  transform: translateY(-2px);
}

.sun-icon {
  display: none;
}

.moon-icon {
  display: block;
}

[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--text-primary);
  border-radius: 4px;
  position: relative;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  content: "";
  background: var(--text-primary);
  transition: transform 0.2s ease;
}

.menu-toggle::before {
  transform: translateY(-4px);
}

.menu-toggle::after {
  transform: translateY(4px);
}

.menu-toggle[aria-expanded="true"] span {
  visibility: hidden;
}

.menu-toggle[aria-expanded="true"]::before {
  transform: translateY(1px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"]::after {
  transform: translateY(-1px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 100px 32px 40px;
  color: var(--white);
  background: #1a1a1a;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    visibility 0.3s;
}

.mobile-nav[data-open="true"] {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.mobile-nav a {
  font-family: var(--display);
  font-size: clamp(2.5rem, 10vw, 4rem);
  line-height: 1;
}

.mobile-nav .mobile-actions {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav .mobile-connect {
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--caramel);
}

.mobile-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
}

/* --- TYPOGRAPHY & HEADINGS --- */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  margin: 0;
}

h1 em,
h2 em,
h3 em {
  color: var(--caramel);
  font-style: italic;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--caramel);
}

.eyebrow::before,
.section-kicker::before {
  width: 30px;
  height: 1px;
  content: "";
  background: var(--caramel);
}

.section-kicker svg {
  flex-shrink: 0;
}

/* --- BUTTONS --- */
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 28px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 4px;
  transition: var(--transition);
}

.button-primary {
  color: var(--bg-color);
  background: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.button-primary:hover {
  background: var(--caramel);
  border-color: var(--caramel);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(181, 106, 69, 0.2);
}

.button-secondary {
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--rule);
}

.button-secondary:hover {
  border-color: var(--text-primary);
  background: var(--card-bg);
}

.button svg {
  width: 16px;
  height: 16px;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: max(720px, 90svh);
  padding: clamp(120px, 15vh, 160px) 0 clamp(60px, 10vh, 80px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(40px, 5vw, 60px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 400px;
  }
}

.hero h1 {
  max-width: 850px;
  margin: 24px 0;
  font-size: clamp(3rem, 9vw, 7.5rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.hero-copy {
  max-width: 600px;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.8;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero-note {
  max-width: 725px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-note strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.hero-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

/* --- SECTIONS COMMON --- */
.section {
  padding: clamp(60px, 10vw, 120px) 0;
  border-top: 1px solid var(--rule);
  overflow: hidden;
}

.section-heading,
.aside-heading h2,
.personal h2,
.focus h2 {
  margin: 16px 0 0;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1;
  max-width: 800px;
}

.section-lede,
.aside-heading p {
  max-width: 550px;
  margin-top: 24px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.focus-copy {
  max-width: 750px;
  margin-top: 24px;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.section-intro {
  margin-bottom: clamp(40px, 8vw, 80px);
}

/* --- EXPERTISE --- */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.strength-card {
  padding: clamp(24px, 5vw, 40px);
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  transition: var(--transition);
  counter-increment: strength;
}

.strength-card::before {
  display: block;
  margin-bottom: 24px;
  color: var(--caramel);
  content: "0" counter(strength);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.strength-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--caramel);
}

.strength-card h3 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.strength-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- CREDENTIALS & PERSONAL LAYOUTS --- */
.credentials-layout,
.personal-layout {
  display: grid;
  gap: 60px;
}

@media (min-width: 900px) {
  .credentials-layout {
    grid-template-columns: 350px 1fr;
  }

  .personal-layout {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

/* --- CREDENTIALS LIST --- */
.credential-list {
  border-top: 1px solid var(--rule);
}

.credential {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.credential-index,
.credential-year,
.credential-status {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-subtle);
  padding-top: 8px;
}

.credential-meta {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 12px;
}

.credential h3 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
}

.credential h3 + p {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- SYSTEMS BLOCK --- */
.systems-block {
  margin-top: clamp(40px, 8vw, 60px);
  padding: clamp(24px, 5vw, 40px);
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--rule);
}

.systems-block h3 {
  font-size: 2rem;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.systems-group + .systems-group {
  margin-top: 32px;
}

.systems-group p {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 16px 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  padding: 8px 16px;
  background: var(--tag-bg);
  border: 1px solid var(--rule);
  border-radius: 40px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.tag.is-filled {
  background: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
}

/* --- TIMELINE (LEADERSHIP) --- */
.timeline {
  border-top: 1px solid var(--rule);
}

.timeline-entry {
  display: grid;
  gap: 16px;
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 900px) {
  .timeline-entry {
    grid-template-columns: 150px 1fr 350px;
    gap: 40px;
    align-items: start;
  }
}

.timeline-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  padding-top: 8px;
}

.timeline-entry h3 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.timeline-org {
  display: block;
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--caramel);
}

.timeline-entry > p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- PERSONAL LIST --- */
.personal-list {
  border-top: 1px solid var(--rule);
}

.personal-list > div {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}

.personal-list span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--caramel);
  padding-top: 4px;
}

.personal-list p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.personal-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- FOOTER / CONTACT --- */
.contact {
  padding: clamp(80px, 10vw, 120px) 0 60px;
  background: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  transition: background-color 0.3s ease;
  overflow: hidden;
}

.contact .section-kicker {
  color: #aaa;
}

.contact .section-kicker::before {
  background: #aaa;
}

.contact h2 {
  font-size: clamp(2.5rem, 8vw, 6rem);
  margin: 24px auto;
  max-width: 900px;
}

.contact h2 em {
  color: var(--caramel);
}

.contact p {
  max-width: 600px;
  margin: 0 auto 48px;
  color: #ccc;
  font-size: 1.1rem;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact .button-primary {
  background: var(--white);
  color: #1a1a1a;
  border-color: var(--white);
}

.contact .button-primary:hover {
  background: var(--caramel);
  border-color: var(--caramel);
  color: var(--white);
}

.contact .button-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
}

.contact .button-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(60px, 10vw, 100px);
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #888;
}

.footer-bottom a:hover {
  color: var(--white);
}

/* --- ANIMATIONS --- */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal-delay-1 {
  transition-delay: 0.15s;
}

.js .reveal-delay-2 {
  transition-delay: 0.3s;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .credential {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .credential-index {
    display: none;
  }

  .credential-year,
  .credential-status {
    padding-top: 0;
    color: var(--caramel);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .mobile-nav,
  .hero-actions,
  .contact-actions,
  .skip-link,
  .theme-toggle {
    display: none !important;
  }

  body,
  .contact,
  .section {
    background: #ffffff !important;
    color: #1a1a1a !important;
  }

  .section,
  .contact {
    padding: 40px 0;
    border-top: 1px solid #1a1a1a;
  }

  .strength-card {
    border: none;
    padding: 20px 0;
    border-bottom: 1px solid #1a1a1a;
    border-radius: 0;
  }

  .contact h2 em {
    color: #1a1a1a;
  }
}
