:root {
  --bg: #0A1A1F;
  --bg-elev: #0E252C;
  --surface: #112A32;
  --surface-hi: #163740;
  --line: rgba(236, 228, 215, 0.13);
  --line-strong: rgba(236, 228, 215, 0.26);
  --text: #ECE4D7;
  --text-muted: #9BB0B4;
  --gold: #DBA54A;
  --gold-dim: rgba(219, 165, 74, 0.16);
  --azure: #6FB9E0;
  --focus: #F2C878;
  --on-gold: #0A1A1F;
  --shell: 1120px;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2vw, 2.4rem);
  --step-4: clamp(2.4rem, 1.4rem + 4vw, 4rem);
  --step-5: clamp(3.2rem, 1.5rem + 8.5vw, 7.5rem);
  --sp-section: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="light"] {
  --bg: #EFF2F1;
  --bg-elev: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hi: #E3EAE9;
  --line: rgba(10, 26, 31, 0.14);
  --line-strong: rgba(10, 26, 31, 0.3);
  --text: #0A1A1F;
  --text-muted: #4C6168;
  --gold: #8A5D10;
  --gold-dim: rgba(138, 93, 16, 0.1);
  --azure: #14648F;
  --focus: #8A5D10;
  --on-gold: #FFFFFF;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

h1,
h2,
h3 {
  font-family: "Bricolage Grotesque", "Public Sans", sans-serif;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0 0 1.15em;
  max-width: 68ch;
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: var(--gold);
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

abbr[title] {
  text-decoration: none;
  cursor: help;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 60;
  background: var(--gold);
  color: var(--on-gold);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 50;
  background: transparent;
  pointer-events: none;
}

.progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 600;
}

.mark-initials {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.mark-name {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-list {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.nav-list a {
  display: inline-block;
  padding: 0.35rem 0;
  font-size: 0.94rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--text);
}

.menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  position: absolute;
  left: 50%;
  width: 1.1rem;
  height: 1.5px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}

.menu-bars {
  top: 50%;
  margin-top: -0.75px;
}

.menu-bars::before,
.menu-bars::after {
  content: "";
  left: 0;
  transform: none;
}

.menu-bars::before {
  top: -0.36rem;
}

.menu-bars::after {
  top: 0.36rem;
}

.menu-toggle[aria-expanded="true"] .menu-bars {
  background: transparent;
}

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

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

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
}

.hero-field {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, var(--line-strong) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(120% 80% at 18% 12%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(120% 80% at 18% 12%, #000 0%, transparent 68%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  position: relative;
}

.hero-place {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
  padding-left: 1.6rem;
  position: relative;
}

.hero-place::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 1rem;
  height: 1px;
  background: var(--gold);
}

.hero-name {
  font-size: var(--step-5);
  letter-spacing: -0.035em;
  margin-bottom: 1.1rem;
}

.hero-role {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 500;
  font-size: var(--step-2);
  color: var(--gold);
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
  max-width: 30ch;
}

.hero-lede {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: var(--on-gold);
}

.btn-primary:hover {
  background: var(--gold);
  filter: brightness(1.12);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.roster {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.roster-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.roster-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0;
}

.roster-list li {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  padding: 0.1rem 1.1rem;
  border-left: 1px solid var(--line);
  color: var(--text);
}

.roster-list li:first-child {
  border-left: 0;
  padding-left: 0;
}

.section {
  padding-block: var(--sp-section);
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.section-title {
  font-size: var(--step-3);
  margin-bottom: 0.85rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.reveal .section-title::after {
  transform: scaleX(0);
}

.reveal.is-visible .section-title::after {
  transform: scaleX(1);
}

.section-lede {
  color: var(--text-muted);
  font-size: var(--step-1);
  max-width: 60ch;
  margin: 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.profile-portrait {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.profile-portrait img {
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.5s var(--ease);
}

.profile-portrait:hover img {
  filter: grayscale(0) contrast(1);
}

.profile-body p {
  color: var(--text-muted);
}

.profile-body p:first-of-type {
  color: var(--text);
  font-size: var(--step-1);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem 1.75rem;
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.fact-value {
  display: block;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.fact-label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.expertise-card {
  background: var(--bg);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  transition: background-color 0.3s var(--ease);
}

.expertise-card:hover {
  background: var(--bg-elev);
}

.expertise-card h3 {
  font-size: var(--step-1);
  margin-bottom: 0.7rem;
}

.expertise-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chips li {
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
}

.chips-sm li {
  font-size: 0.75rem;
  color: var(--azure);
  border-color: var(--line-strong);
  border-color: color-mix(in srgb, var(--azure) 40%, transparent);
}

.featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.featured-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

.featured-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.featured-card:hover::before {
  transform: scaleY(1);
}

.featured-client {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.featured-name {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--gold);
  letter-spacing: -0.03em;
}

.featured-sub {
  font-size: 1rem;
  margin: 0 0 0.9rem;
}

.featured-detail {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.featured-detail dt {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.featured-detail dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.featured-card .chips-sm {
  margin-top: 1rem;
}

.ledger-title,
.studies-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.ledger-list {
  border-top: 1px solid var(--line);
}

.ledger-item {
  border-bottom: 1px solid var(--line);
}

.ledger-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr) 1.5rem;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.15rem 0.25rem;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: padding-left 0.3s var(--ease), color 0.2s var(--ease);
}

.ledger-head:hover {
  padding-left: 0.75rem;
  color: var(--gold);
}

.ledger-client {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.ledger-head:hover .ledger-client {
  color: var(--gold);
}

.ledger-name {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  letter-spacing: -0.01em;
}

.ledger-sign {
  position: relative;
  justify-self: end;
  align-self: center;
  width: 0.9rem;
  height: 0.9rem;
}

.ledger-sign::before,
.ledger-sign::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.ledger-sign::after {
  transform: rotate(90deg);
}

.ledger-head[aria-expanded="true"] .ledger-sign::after {
  transform: rotate(0deg);
}

.ledger-panel {
  padding: 0 0.25rem 1.5rem;
  max-width: 62ch;
}

.ledger-panel p {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 0.9rem;
}

.ledger-panel p:last-child {
  margin-bottom: 0;
}

.studies {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.studies-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.studies-list li {
  background: var(--bg);
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  padding: 1.1rem 0.25rem;
}

.studies-client {
  font-size: 0.85rem;
  color: var(--gold);
}

.studies-text {
  color: var(--text-muted);
  font-size: 0.97rem;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: 0.5rem 2.5rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.timeline-period {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.timeline-role {
  font-size: var(--step-2);
  margin-bottom: 0.25rem;
}

.timeline-org {
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.timeline-body p:last-child {
  color: var(--text-muted);
  margin-bottom: 0;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.path-title {
  font-size: var(--step-1);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.path-list li {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.path-list li:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.path-year {
  font-size: 0.82rem;
  color: var(--gold);
}

.path-main {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.path-org {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.path-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.path-more {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.path-italic {
  font-style: italic;
}

.section-contact {
  background: var(--bg-elev);
}

.contact-inner {
  max-width: 900px;
}

.contact-lede {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 3rem;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.contact-key {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.contact-list a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.site-footer {
  padding-block: 2.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}

.footer-inner p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero-intro > * {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.75s var(--ease) forwards;
}

.hero-intro > *:nth-child(1) { animation-delay: 0.05s; }
.hero-intro > *:nth-child(2) { animation-delay: 0.14s; }
.hero-intro > *:nth-child(3) { animation-delay: 0.23s; }
.hero-intro > *:nth-child(4) { animation-delay: 0.32s; }
.hero-intro > *:nth-child(5) { animation-delay: 0.41s; }
.hero-intro > *:nth-child(6) { animation-delay: 0.52s; }

.featured-card.reveal { transition-delay: calc(var(--i, 0) * 90ms); }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-portrait {
    max-width: 220px;
  }

  .timeline-item,
  .studies-list li,
  .ledger-head {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .ledger-head {
    position: relative;
    padding-right: 2rem;
  }

  .ledger-sign {
    position: absolute;
    right: 0.25rem;
    top: 1.35rem;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .mark-name {
    display: none;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem clamp(1.25rem, 5vw, 3rem) 1.25rem;
  }

  .nav-list a {
    display: block;
    padding: 0.8rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-list a:hover,
  .nav-list a.is-active {
    border-bottom-color: var(--line);
    color: var(--gold);
  }

  .theme-toggle {
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
  }

  .hero-name {
    letter-spacing: -0.03em;
  }

  .roster-list li {
    padding: 0.1rem 0.7rem;
    font-size: 0.9rem;
  }

  .btn {
    flex: 1 1 auto;
  }
}

@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;
  }

  .reveal,
  .hero-intro > * {
    opacity: 1;
    transform: none;
  }

  .section-title::after {
    transform: scaleX(1);
  }
}

@media print {
  .site-header,
  .progress,
  .hero-field,
  .contact-actions,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
