/* ============ Tokens ============ */
:root {
  --olive-950: #141a0b;
  --olive-900: #1b220f;
  --olive-800: #212a13;
  --olive-700: #2b3618;
  --olive-600: #38451f;
  --olive-500: #4a5a28;
  --olive-400: #647a37;
  --cream: #f6f2e6;
  --cream-2: #e6e0cb;
  --paper: #fffcf6;
  --ink: #21260f;
  --ink-soft: #454f2c;
  --line: rgba(38, 44, 20, 0.12);
  --line-dark: rgba(246, 242, 230, 0.1);
  --shadow: 0 30px 60px -25px rgba(10, 13, 4, 0.5);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-pill: 999px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pad-x: clamp(20px, 6vw, 80px);
  --ease: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--olive-800);
  -webkit-font-smoothing: antialiased;
  opacity: 0;
}
body.is-ready {
  opacity: 1;
  transition: opacity .6s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); margin: 0; font-weight: 500; }
p { margin: 0; }

.page {
  background: var(--olive-800);
  padding: 14px;
}

/* ============ Reveal-on-scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body { opacity: 1; }
  .marquee__track { animation: none; }
  .orbit, .orbit-item .tag { animation: none; }
  .orbit-item .tag { transform: translate(-50%, -50%); }
}

/* ============ Lift / hover ============ */
.lift { transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease); }
.lift:hover { transform: translateY(-6px); border-color: rgba(246,242,230,.24); }

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad-x) 0;
}

.nav-pills {
  display: flex;
  gap: 4px;
  background: var(--cream);
  padding: 6px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}

.pill {
  position: relative;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--olive-600);
  transition: background .3s var(--ease), color .3s var(--ease);
  white-space: nowrap;
}
.pill:hover { background: rgba(43, 54, 24, .08); }
.pill--active, .pill--active:hover {
  background: var(--olive-800);
  color: var(--cream);
}

.nav-toggle { display: none; }

/* ============ Hero ============ */
.hero {
  background: var(--cream);
  border-radius: var(--radius-lg);
  margin-top: 14px;
  padding: 110px var(--pad-x) 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: .95fr 1.1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.hero-intro p {
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.6;
  color: var(--olive-800);
  max-width: 42ch;
  font-weight: 500;
}

.hero-visual {
  position: relative;
  background: radial-gradient(120% 140% at 20% 15%, var(--olive-600) 0%, var(--olive-800) 70%);
  border-radius: var(--radius-md);
  min-height: clamp(340px, 34vw, 440px);
  overflow: hidden;
}

.hero-visual__label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-style: italic;
  color: var(--cream);
  font-size: clamp(28px, 3.4vw, 42px);
  text-align: center;
  z-index: 1;
}

.hero-visual__hint {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(246,242,230,.5);
  z-index: 2;
}

/* Orbit: tags revolve around the "Expertise" label, staying upright */
.orbit {
  --radius: clamp(92px, 13vw, 168px);
  position: absolute;
  inset: 0;
  animation: orbit-spin 26s linear infinite;
}
.hero-visual:hover .orbit { animation-play-state: paused; }

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(-1 * var(--angle)));
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes counter-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

.orbit-item .tag {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--paper);
  color: var(--olive-800);
  font-weight: 600;
  font-size: clamp(12px, 1vw, 15px);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 14px 26px -14px rgba(0,0,0,.45);
  white-space: nowrap;
  transition: box-shadow .3s ease;
  animation: counter-spin 26s linear infinite;
}
.hero-visual:hover .orbit-item .tag { animation-play-state: paused; }
.orbit-item .tag:hover { box-shadow: 0 18px 32px -14px rgba(0,0,0,.5); }

.giant-name {
  font-family: var(--serif);
  color: var(--olive-800);
  font-size: clamp(60px, 12.5vw, 190px);
  line-height: .92;
  text-align: center;
  padding: clamp(28px, 7vw, 72px) 0 clamp(18px, 4vw, 44px);
  letter-spacing: -.02em;
  will-change: transform;
}

/* ============ Intro photo ============ */
.intro-photo {
  float: right;
  width: clamp(100px, 12vw, 136px);
  margin: 0 0 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.intro-photo__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  border: 5px solid var(--paper);
  box-shadow: 0 16px 30px -14px rgba(0,0,0,.4);
  transform: rotate(5deg);
}
.intro-photo__arrow {
  width: 38px;
  height: 28px;
  margin-top: 2px;
  color: var(--olive-500);
  opacity: .75;
}
.intro-photo__caption {
  margin-top: -4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--olive-700);
}

@media (max-width: 480px) {
  .intro-photo { width: 88px; margin: 0 0 10px 16px; }
  .intro-photo__arrow { width: 32px; height: 24px; }
}

/* ============ Marquee ============ */
.marquee {
  overflow: hidden;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-dark);
}
.marquee__track {
  display: flex;
  gap: 32px;
  width: max-content;
  animation: scroll-left 36s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.8vw, 20px);
  color: var(--cream);
  opacity: .8;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span:nth-child(even) { opacity: .45; }
@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ Section shell ============ */
.section {
  padding: clamp(64px, 10vw, 128px) var(--pad-x);
}
.section--tight { padding-top: 0; }

.section-head { max-width: 620px; }
.section-head + * { margin-top: clamp(40px, 6vw, 64px); }

.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--olive-400);
  margin-bottom: 16px;
}
.kicker--dark { color: var(--olive-500); }
.section-head h2 {
  color: var(--cream);
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.14;
}
.section-head p {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream-2);
  max-width: 56ch;
}

.section, .page-hero-section { color: var(--cream); }

/* ============ Page hero (Projects / Archive headers) ============ */
.page-hero {
  background: var(--cream);
  border-radius: var(--radius-lg);
  margin-top: 14px;
  padding: clamp(120px, 16vw, 170px) var(--pad-x) clamp(56px, 8vw, 80px);
}
.page-hero .kicker { color: var(--olive-500); }
.page-hero h1 {
  color: var(--olive-800);
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -.01em;
}
.page-hero p {
  margin-top: 22px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ============ Stats ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 4vw, 32px);
}
.stat {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
}
.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  color: var(--cream);
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--cream-2);
  line-height: 1.5;
  max-width: 22ch;
}

@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ About / bio block ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about-copy p {
  font-size: clamp(19px, 2.1vw, 26px);
  line-height: 1.5;
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 400;
}
.post-nominals {
  margin-top: 22px;
  font-size: 13px;
  color: var(--olive-400);
  letter-spacing: .02em;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 13px;
  color: var(--cream-2);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--cream);
  border-bottom: 1px solid var(--olive-400);
  padding-bottom: 3px;
  transition: gap .3s var(--ease), color .3s ease, border-color .3s ease;
}
.text-link:hover { gap: 13px; color: var(--olive-400); border-color: var(--olive-400); }

.current-card {
  background: var(--olive-700);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  padding: clamp(24px, 3vw, 34px);
}
.current-card .kicker { margin-bottom: 10px; }
.current-card h3 { font-size: clamp(19px, 2vw, 24px); color: var(--cream); line-height: 1.3; }
.current-card p { margin-top: 14px; font-size: 14.5px; line-height: 1.6; color: var(--cream-2); }

/* ============ Timeline ============ */
.timeline { position: relative; padding-left: 30px; }
.timeline__line {
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line-dark);
}
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-dark);
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -30px; top: 28px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--olive-500);
}
.timeline__item--current::before { background: var(--cream); }
.timeline__years { font-weight: 700; color: var(--olive-400); font-size: 13.5px; }
.timeline__company { font-family: var(--serif); font-size: clamp(19px, 2vw, 25px); color: var(--cream); }
.timeline__role { font-size: 13.5px; color: var(--cream-2); text-align: right; }
.timeline__item--current .timeline__company { color: #ffffff; }

@media (max-width: 720px) {
  .timeline__item { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .timeline__role { text-align: left; }
}

/* ============ Competencies ============ */
.competency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.competency {
  background: var(--olive-800);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .35s var(--ease);
}
.competency:hover { background: var(--olive-700); }
.competency-num { font-size: 13px; color: var(--olive-400); font-weight: 700; }
.competency h3 { font-size: 17px; color: var(--cream); line-height: 1.35; }

@media (max-width: 900px) {
  .competency-grid { grid-template-columns: repeat(2, 1fr); }
  .competency-grid > *:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .competency-grid { grid-template-columns: 1fr; }
  .competency-grid > *:last-child { grid-column: auto; }
}

/* ============ Current role highlight (index teaser) ============ */
.highlight-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.highlight-row .chip { text-align: center; padding: 14px 10px; }
@media (max-width: 640px) { .highlight-row { grid-template-columns: 1fr; } }

/* ============ Projects ============ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.4vw, 26px);
}
.project-card {
  background: var(--olive-700);
  border-radius: var(--radius-md);
  padding: clamp(28px, 3.4vw, 40px);
  border: 1px solid transparent;
}
.project-card__index { font-size: 13px; color: var(--olive-400); font-weight: 700; display: block; margin-bottom: 14px; }
.project-card h3 { font-size: clamp(20px, 2.2vw, 25px); color: var(--cream); line-height: 1.3; margin-bottom: 18px; }
.project-card .chip-row { margin-top: 0; }

.project-card--wide { grid-column: 1 / -1; }
.project-card--wide .chip-row { max-width: 640px; }

@media (max-width: 860px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card--wide { grid-column: auto; }
}

.capabilities {
  margin-top: clamp(18px, 2.4vw, 26px);
  background: var(--olive-900);
  border-radius: var(--radius-md);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.capabilities__col h3 { font-size: 14.5px; color: var(--cream); margin-bottom: 10px; font-family: var(--sans); font-weight: 600; }
.capabilities__col p { font-size: 13.5px; line-height: 1.65; color: var(--cream-2); }

@media (max-width: 900px) {
  .capabilities { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .capabilities { grid-template-columns: 1fr; }
}

.domain-detail { margin-top: clamp(56px, 8vw, 90px); }
.domain-detail__item { padding: 28px 0; border-top: 1px solid var(--line-dark); }
.domain-detail__item:last-child { border-bottom: 1px solid var(--line-dark); }
.domain-detail__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.domain-detail__head h3 { font-size: 19px; color: var(--cream); }
.domain-detail__item .chip-row { margin-top: 0; }

/* ============ Archive: experience ============ */
.exp-list { display: flex; flex-direction: column; gap: 10px; }
.exp-item {
  background: var(--olive-700);
  border-radius: var(--radius-md);
  padding: 4px 26px;
  border: 1px solid transparent;
}
.exp-item summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 34px 20px 0;
}
.exp-item summary::-webkit-details-marker { display: none; }
.exp-item summary::after {
  content: "+";
  position: absolute;
  top: 24px;
  right: 2px;
  line-height: 1;
  font-size: 22px;
  color: var(--olive-400);
  transition: transform .3s var(--ease);
}
.exp-item[open] summary::after { transform: rotate(45deg); }
.exp-dates { font-size: 13px; font-weight: 700; color: var(--olive-400); }
.exp-role { font-family: var(--serif); font-size: 17.5px; color: var(--cream); }
.exp-company { font-size: 13px; color: var(--cream-2); }
.exp-body { padding: 0 0 24px; border-top: 1px solid var(--line-dark); }
.exp-body p { font-size: 14.5px; line-height: 1.7; color: var(--cream-2); padding-top: 18px; }
.exp-projects { margin-top: 12px !important; }

@media (max-width: 720px) {
  .exp-item summary { grid-template-columns: 1fr; gap: 6px; align-items: start; }
  .exp-company { grid-column: auto; }
}

.archive-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
}
@media (max-width: 900px) {
  .archive-columns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .archive-columns { grid-template-columns: 1fr; }
}

.archive-subhead {
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--cream);
  margin-bottom: 26px;
}
.patent-list li, .credential-list li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cream-2);
  padding: 14px 0;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.patent-list li:first-child, .credential-list li:first-child { border-top: none; }
.patent-list li strong { color: var(--cream); font-family: var(--serif); font-size: 15.5px; }
.patent-list li span { font-size: 12.5px; opacity: .7; }

.paper-list li {
  padding: 16px 0;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.paper-list li:first-child { border-top: none; }
.paper-list a, .paper-noLink {
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--cream);
  line-height: 1.4;
}
.paper-list a:hover { color: var(--olive-400); }
.paper-list li span:last-child { font-size: 12.5px; color: var(--cream-2); opacity: .75; }

/* ============ Contact ============ */
.contact {
  margin: 14px 0;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(64px, 11vw, 140px) var(--pad-x);
  text-align: center;
}
.contact .kicker { color: var(--olive-500); }
.contact h2 {
  color: var(--olive-800);
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 1.05;
  margin: 18px 0 36px;
}
.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 30px);
  color: var(--olive-700);
  border-bottom: 2px solid var(--olive-700);
  padding-bottom: 4px;
  margin-bottom: 32px;
  transition: color .3s ease, border-color .3s ease;
}
.contact-email:hover { color: var(--olive-400); border-color: var(--olive-400); }
.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.contact-details a { transition: color .3s ease; }
.contact-details a:hover { color: var(--olive-700); }

/* ============ Footer ============ */
.footer { padding: 64px var(--pad-x) 32px; text-align: center; }
.footer-nav { display: flex; justify-content: center; gap: 30px; margin-bottom: 46px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; font-weight: 600; color: var(--cream-2); transition: color .3s ease; }
.footer-nav a:hover { color: var(--cream); }
.footer-name {
  font-size: clamp(46px, 9vw, 140px);
  color: var(--cream);
  line-height: 1;
  margin-bottom: 26px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--cream-2);
  opacity: .65;
  border-top: 1px solid var(--line-dark);
  padding-top: 22px;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 90px; }
  .hero-visual { min-height: 320px; }
}

@media (max-width: 640px) {
  .nav { padding: 14px 14px 0; }
  .nav-pills {
    position: fixed;
    inset: 72px 14px auto 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border-radius: 26px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .nav-pills.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .pill { text-align: center; border-radius: 18px; padding: 14px 20px; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: var(--cream);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
  }
  .nav-toggle span {
    width: 18px; height: 2px;
    background: var(--olive-800);
    margin: 0 auto;
    transition: transform .3s var(--ease), opacity .3s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .orbit { --radius: clamp(64px, 20vw, 118px); }
  .orbit-item .tag { font-size: 11.5px; padding: 9px 14px; }
  .hero-visual__hint { display: none; }

  .footer-nav a, .contact-details a { display: inline-block; padding: 6px 0; }
  .contact-email { padding: 6px 0; }
}
