:root {
  --paper: #f4f8fc;
  --paper-bright: #ffffff;
  --ink: #10243a;
  --muted: #53697d;
  --plum: #1f5f99;
  --plum-dark: #123b63;
  --coral: #f28c28;
  --line: rgba(23, 74, 126, 0.18);
  --radius: 1.5rem;
  --shadow: 0 28px 80px rgba(18, 59, 99, 0.14);
  --sans: Inter, "Segoe UI", Arial, sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { color: inherit; font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.045em; line-height: 0.98; }
h1 { margin-bottom: 1.2rem; font-size: clamp(4rem, 8.4vw, 8.2rem); }
h2 { margin-bottom: 0; max-width: 15ch; font-size: clamp(2.8rem, 5.4vw, 5.4rem); }
h3 { line-height: 1.2; }
.container { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.section { padding-block: clamp(6rem, 10vw, 10rem); scroll-margin-top: 5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 0.75rem; left: 0.75rem; z-index: 1000; padding: 0.7rem 1rem; background: var(--paper-bright); color: var(--plum); transform: translateY(-150%); transition: transform 180ms ease; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 100; border-bottom: 1px solid transparent; transition: background 200ms ease, border-color 200ms ease; }
.site-header.is-scrolled { border-color: var(--line); background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(16px); }
.header-inner { display: flex; min-height: 5rem; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--ink); font-size: 0.86rem; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; text-transform: uppercase; }
.brand-mark { display: grid; width: 2.2rem; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--plum); color: var(--paper-bright); font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 1.7rem; }
.site-nav a { color: #29445f; font-size: 0.84rem; font-weight: 600; text-decoration: none; }
.site-nav a:hover { color: var(--plum); }
.site-nav .nav-contact { padding: 0.55rem 1rem; border: 1px solid var(--plum); border-radius: 99rem; color: var(--plum); }
.menu-toggle { display: none; width: 2.8rem; height: 2.8rem; padding: 0.7rem; border: 0; border-radius: 50%; background: var(--plum); }
.menu-toggle > span:not(.sr-only) { display: block; width: 100%; height: 1px; margin: 0.3rem 0; background: white; transition: transform 180ms ease; }

.hero { min-height: 100svh; padding: 8.5rem 0 3rem; overflow: hidden; background: radial-gradient(circle at 76% 32%, rgba(242,140,40,.16), transparent 23rem), var(--paper); }
.hero-grid { display: grid; min-height: calc(100svh - 11.5rem); grid-template-columns: 1.15fr .85fr; align-items: center; gap: 3rem; }
.eyebrow { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 2rem; color: var(--plum); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow span { width: 2rem; height: 1px; background: currentColor; }
.eyebrow-light { color: #cfe5f7; }
.hero-role { max-width: 27ch; margin-bottom: 1rem; color: var(--plum); font-size: clamp(1.3rem, 2.1vw, 1.9rem); font-weight: 650; line-height: 1.25; }
.hero-lead { max-width: 39rem; margin-bottom: 2.2rem; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.hero-actions { display: flex; align-items: center; gap: 1.7rem; }
.button { display: inline-flex; min-height: 3.4rem; align-items: center; justify-content: center; gap: 0.8rem; padding: 0.85rem 1.4rem; border-radius: 99rem; font-size: 0.84rem; font-weight: 750; text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--plum); color: white; box-shadow: 0 12px 30px rgba(31, 95, 153, 0.22); }
.button-primary:hover { background: var(--plum-dark); box-shadow: 0 16px 34px rgba(18, 59, 99, 0.3); }
.button svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.text-link { color: var(--plum); font-size: 0.84rem; font-weight: 750; text-decoration-color: rgba(31,95,153,.35); text-underline-offset: 0.3rem; }
.hero-facts { display: grid; margin: 3.4rem 0 0; padding: 1.4rem 0 0; border-top: 1px solid var(--line); grid-template-columns: repeat(3, 1fr); gap: 1rem; list-style: none; }
.hero-facts li { display: grid; gap: 0.2rem; }
.hero-facts strong { color: var(--plum); font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.hero-facts span { color: var(--muted); font-size: 0.72rem; line-height: 1.4; }
.hero-visual { position: relative; display: grid; min-height: 42rem; place-items: center; }
.illustration-frame { position: relative; z-index: 2; display: grid; width: min(100%, 32rem); aspect-ratio: 1; place-items: center; border: 1px solid rgba(31,95,153,.18); border-radius: 50%; background: rgba(255,255,255,.72); box-shadow: var(--shadow); }
.illustration-frame::after { position: absolute; inset: 1rem; border: 1px dashed rgba(31,95,153,.18); border-radius: inherit; content: ""; }
.illustration-frame img { position: relative; z-index: 1; width: 90%; height: auto; }
.hero-orbit { position: absolute; z-index: 1; border: 1px solid rgba(31,95,153,.16); border-radius: 50%; }
.hero-orbit-one { width: 39rem; height: 26rem; transform: rotate(35deg); }
.hero-orbit-two { width: 26rem; height: 39rem; transform: rotate(35deg); }
.visual-note { position: absolute; right: -1rem; bottom: 12%; z-index: 3; margin: 0; padding: 0.9rem 1.1rem; border-left: 3px solid var(--coral); background: var(--paper-bright); box-shadow: 0 14px 35px rgba(18,59,99,.12); color: var(--plum); font-family: var(--serif); font-size: 1rem; line-height: 1.35; }

.section-heading { display: grid; gap: 1rem; }
.section-heading-row { grid-template-columns: 1fr minmax(18rem, 28rem); align-items: end; gap: 3rem; }
.section-heading-row > p { margin: 0; color: var(--muted); }
.card-index, .competency > span { color: var(--coral); font-family: var(--serif); font-size: 0.9rem; }

.experience-section { background: var(--plum-dark); color: var(--paper-bright); }
.experience-section .section-heading-row { margin-bottom: 4rem; }
.experience-section .section-heading-row > p { color: #bfd3e4; }
.timeline { border-top: 1px solid rgba(255,255,255,.18); }
.timeline-item { display: grid; padding: 2.5rem 0; border-bottom: 1px solid rgba(255,255,255,.18); grid-template-columns: 10rem 1fr 15rem; gap: 2rem; }
.timeline-date { color: #cfe5f7; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.timeline-item h3 { margin-bottom: 0.4rem; font-family: var(--serif); font-size: clamp(1.45rem, 2.3vw, 2rem); font-weight: 500; }
.timeline-place { margin-bottom: 1rem; color: var(--coral); font-size: 0.84rem; font-weight: 700; }
.timeline-item div > p:last-child { max-width: 42rem; margin: 0; color: #bfd3e4; font-size: 0.9rem; }
.tags { display: flex; align-content: flex-start; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 0.3rem 0.65rem; border: 1px solid rgba(255,255,255,.22); border-radius: 99rem; color: #e4f2fc; font-size: 0.68rem; }
.timeline-secondary { opacity: 0.78; }

.education-section { background: var(--paper); }
.education-section .section-heading { margin-bottom: 4rem; }
.education-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.education-card { min-height: 26rem; padding: clamp(2rem, 4vw, 3.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-bright); }
.education-primary { background: var(--plum); color: white; }
.education-card .card-date { margin: 4rem 0 1rem; color: var(--coral); font-size: 0.78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.education-card h3 { margin-bottom: .6rem; font-family: var(--serif); font-size: clamp(2rem, 3vw, 3rem); font-weight: 500; }
.education-card .card-place { font-size: .86rem; font-weight: 750; }
.education-card > p:last-child { max-width: 33rem; margin-top: 2rem; color: var(--muted); font-size: .9rem; }
.education-primary > p:last-child { color: #d8eafa; }
.residency-note { display: flex; align-items: center; gap: 1rem; margin: 1.2rem 0 0; padding: 1.3rem 1.6rem; border-radius: 1rem; background: #e2eef8; color: var(--plum); font-family: var(--serif); font-size: 1.25rem; }
.residency-note span { padding: .3rem .7rem; border-radius: 99rem; background: var(--coral); color: white; font-family: var(--sans); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.science-section { background: var(--paper-bright); }
.science-grid { display: grid; grid-template-columns: .75fr 1.25fr; align-items: start; gap: clamp(3rem, 7vw, 7rem); }
.science-visual { position: sticky; top: 7rem; overflow: hidden; border-radius: var(--radius); background: var(--plum); }
.science-visual img { width: 100%; height: 32rem; opacity: .8; object-fit: cover; filter: saturate(.7); }
.science-visual p { position: absolute; right: 1.5rem; bottom: 1.5rem; left: 1.5rem; margin: 0; color: white; font-family: var(--serif); font-size: 1.3rem; }
.science-copy .section-heading { margin-bottom: 3rem; }
.publication { display: grid; padding: 1.7rem 0; border-block: 1px solid var(--line); grid-template-columns: 4rem 1fr 2rem; gap: 1rem; text-decoration: none; }
.publication-year { color: var(--coral); font-size: .8rem; font-weight: 800; }
.publication strong { display: block; margin-bottom: .6rem; font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 500; line-height: 1.25; }
.publication small { color: var(--muted); }
.publication-arrow { color: var(--plum); font-size: 1.4rem; }
.achievement-grid { display: grid; margin-top: 2rem; grid-template-columns: 1fr 1fr; gap: 1rem; }
.achievement-grid article { padding: 1.4rem; border-radius: 1rem; background: var(--paper); }
.achievement-grid strong { color: var(--plum); font-family: var(--serif); font-size: 1.5rem; }
.achievement-grid p { margin: .8rem 0 0; color: var(--muted); font-size: .82rem; }

.competencies-section .section-heading-row { margin-bottom: 3.5rem; }
.competency-grid { display: grid; border-top: 1px solid var(--line); grid-template-columns: repeat(4, 1fr); }
.competency { min-height: 19rem; padding: 1.8rem 1.4rem; border-right: 1px solid var(--line); }
.competency:first-child { border-left: 1px solid var(--line); }
.competency h3 { margin: 5rem 0 1rem; color: var(--plum); font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.competency p { margin: 0; color: var(--muted); font-size: .83rem; }

.contact-section { padding-block: clamp(6rem, 10vw, 10rem); scroll-margin-top: 5rem; background: var(--plum); color: white; }
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: clamp(3rem, 8vw, 8rem); }
.contact-copy h2 { max-width: 11ch; }
.contact-copy > p:not(.eyebrow) { max-width: 38rem; margin: 2rem 0; color: #d3e5f4; }
.button-accent { background: var(--coral); color: white; }
.button-accent:hover { background: #d9700c; }
.contact-list { display: grid; margin: 0; font-style: normal; }
.contact-list a { display: grid; padding: 1.3rem 0; border-bottom: 1px solid rgba(255,255,255,.2); grid-template-columns: 7rem 1fr; text-decoration: none; }
.contact-list span { color: #c1d8ea; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contact-list strong { font-size: clamp(1rem, 2vw, 1.3rem); overflow-wrap: anywhere; }
.site-footer { padding: 1.5rem 0; background: var(--plum-dark); color: #c1d8ea; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; font-size: .75rem; }
.footer-inner p { margin: 0; }
.footer-inner a { text-decoration: none; }

.reveal { opacity: 0; transform: translateY(1.3rem); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.error-page { display: grid; min-height: 100svh; place-items: center; padding: 2rem; background: radial-gradient(circle at 50% 20%, rgba(242,140,40,.2), transparent 22rem), var(--paper); text-align: center; }
.error-page main { max-width: 34rem; }
.error-page h1 { font-size: clamp(3rem, 8vw, 6rem); }
.error-page main > p:not(.error-code) { margin-bottom: 2rem; color: var(--muted); }
.error-code { margin-bottom: 1rem; color: var(--coral); font-size: .85rem; font-weight: 800; letter-spacing: .2em; }

@media (max-width: 960px) {
  .hero-grid, .science-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 8rem; }
  .hero-visual { min-height: 34rem; }
  .illustration-frame { width: min(80vw, 29rem); }
  .education-grid { grid-template-columns: 1fr 1fr; }
  .timeline-item { grid-template-columns: 8rem 1fr; }
  .timeline-item .tags { grid-column: 2; }
  .science-visual { position: relative; top: auto; }
  .science-visual img { height: 24rem; }
  .competency-grid { grid-template-columns: 1fr 1fr; }
  .competency:nth-child(3) { border-left: 1px solid var(--line); }
  .competency { border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .container { width: min(100% - 2rem, 76rem); }
  .section { padding-block: 5.5rem; }
  h1 { font-size: clamp(3.7rem, 17vw, 5.5rem); }
  h2 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .menu-toggle { position: relative; z-index: 2; display: block; }
  .menu-toggle[aria-expanded="true"] > span:nth-last-child(2) { transform: translateY(.18rem) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:last-child { transform: translateY(-.18rem) rotate(-45deg); }
  .site-nav { position: fixed; inset: 0; display: flex; visibility: hidden; padding: 7rem 1.5rem 2rem; flex-direction: column; align-items: flex-start; background: var(--paper); opacity: 0; transform: translateY(-1rem); transition: opacity 180ms ease, transform 180ms ease, visibility 180ms; }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .site-nav a { font-family: var(--serif); font-size: 2.2rem; font-weight: 500; }
  .site-nav .nav-contact { margin-top: 1rem; font-family: var(--sans); font-size: .9rem; font-weight: 700; }
  .hero-grid { display: flex; min-height: auto; flex-direction: column; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; width: 100%; min-height: 28rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts li:last-child { grid-column: span 2; }
  .hero-orbit-one { width: 31rem; height: 19rem; }
  .hero-orbit-two { width: 19rem; height: 31rem; }
  .visual-note { right: 0; bottom: 5%; }
  .section-heading-row { grid-template-columns: 1fr; align-items: start; gap: 1.5rem; }
  .timeline-item { grid-template-columns: 1fr; gap: 1rem; }
  .timeline-item .tags { grid-column: auto; }
  .education-grid, .achievement-grid { grid-template-columns: 1fr; }
  .education-card { min-height: 23rem; }
  .residency-note { align-items: flex-start; flex-direction: column; }
  .competency-grid { grid-template-columns: 1fr; }
  .competency, .competency:nth-child(3) { min-height: auto; border-left: 1px solid var(--line); }
  .competency h3 { margin-top: 2.5rem; }
  .contact-list a { grid-template-columns: 1fr; gap: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
