:root {
  --bg: #171513;
  --bg-soft: #201d1a;
  --panel: rgba(39, 35, 31, .78);
  --panel-solid: #29241f;
  --text: #f3eee5;
  --muted: #b8afa3;
  --line: rgba(243, 238, 229, .13);
  --gold: #d6a64a;
  --gold-soft: #f0d69b;
  --maroon: #8e3c51;
  --sage: #77816c;
  --shadow: 0 30px 80px rgba(0, 0, 0, .35);
  --radius: 28px;
  --shell: min(1180px, calc(100vw - 40px));
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f3efe7;
  --bg-soft: #e9e3d9;
  --panel: rgba(255, 255, 255, .72);
  --panel-solid: #fffdf9;
  --text: #1d1916;
  --muted: #685f56;
  --line: rgba(29, 25, 22, .14);
  --gold: #a67524;
  --gold-soft: #7f5a1e;
  --maroon: #7d2d43;
  --sage: #65705b;
  --shadow: 0 30px 80px rgba(74, 56, 37, .14);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
::selection { background: var(--gold); color: #171513; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-150%); background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { transform: translateY(0); }
.ambient { position: fixed; border-radius: 999px; filter: blur(120px); opacity: .13; pointer-events: none; }
.ambient-one { width: 480px; height: 480px; background: var(--maroon); top: -180px; right: -140px; }
.ambient-two { width: 360px; height: 360px; background: var(--gold); bottom: -180px; left: -120px; opacity: .08; }
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(18px); background: color-mix(in srgb, var(--bg) 75%, transparent); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-color: var(--line); }
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 13px; letter-spacing: .04em; }
.desktop-nav { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 14px; }
.desktop-nav a, .site-footer a, .text-link { transition: color .2s ease; }
.desktop-nav a:hover, .site-footer a:hover, .text-link:hover { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--text); border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 750; font-size: 14px; transition: transform .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.button-small { min-height: 42px; padding-inline: 17px; }
.hero { min-height: calc(100vh - 78px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); align-items: center; gap: clamp(50px, 8vw, 110px); padding-block: 78px 110px; }
.eyebrow { margin: 0 0 18px; color: var(--gold); text-transform: uppercase; letter-spacing: .15em; font-weight: 800; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: #73a975; margin-right: 8px; box-shadow: 0 0 0 5px rgba(115,169,117,.12); }
h1, h2, h3, h4, p { text-wrap: pretty; }
h1 { margin: 0; max-width: 760px; font-size: clamp(58px, 7.2vw, 104px); line-height: .92; letter-spacing: -.065em; font-weight: 720; }
h1 em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: var(--gold-soft); }
.hero-lede { max-width: 650px; margin: 30px 0 0; font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: var(--muted); }
.hero-actions { margin-top: 36px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.text-link { font-weight: 720; font-size: 14px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 52px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-facts div { min-width: 0; }
.hero-facts dt { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: .13em; font-weight: 800; }
.hero-facts dd { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.portrait-wrap { position: relative; justify-self: end; width: min(430px, 100%); }
.portrait-frame { position: relative; overflow: hidden; border-radius: 230px 230px 28px 28px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel-solid); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); pointer-events: none; border-radius: inherit; }
.portrait-frame img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.portrait-caption { position: absolute; left: 18px; right: 18px; bottom: 18px; padding: 15px 17px; border-radius: 17px; background: rgba(23,21,19,.78); color: #f3eee5; backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.15); }
.portrait-caption span, .portrait-caption strong { display: block; }
.portrait-caption span { font-size: 11px; color: #d6a64a; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.portrait-caption strong { font-size: 13px; margin-top: 3px; }
.orbit-card { position: absolute; width: 88px; height: 88px; display: grid; place-content: center; text-align: center; border-radius: 50%; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow); }
.orbit-card span { font-family: Georgia, serif; font-size: 25px; color: var(--gold); line-height: 1; }
.orbit-card small { font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 3px; }
.orbit-card-one { top: 18%; left: -45px; }
.orbit-card-two { right: -32px; bottom: 20%; }
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg-soft) 72%, transparent); }
.marquee-track { width: max-content; display: flex; align-items: center; gap: 24px; padding: 17px 0; animation: marquee 38s linear infinite; color: var(--muted); text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; }
.marquee-track i { color: var(--gold); font-style: normal; font-size: 8px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.section { padding-block: 130px; }
.section-heading { display: grid; grid-template-columns: 1.15fr .85fr; gap: 80px; align-items: end; margin-bottom: 68px; }
.section-heading.compact { grid-template-columns: 1fr; }
.section-heading h2, .about-intro h2, .skills-grid h2, .contact-inner h2 { margin: 0; font-size: clamp(42px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.052em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 17px; max-width: 520px; }
.featured-grid { display: grid; gap: 26px; }
.project { position: relative; min-height: 540px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); gap: 38px; align-items: center; overflow: hidden; padding: clamp(30px, 5vw, 64px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(14px); }
.project.reverse .project-content { order: 2; }
.project.reverse .project-visual { order: 1; }
.project-index { position: absolute; top: 24px; right: 28px; font-family: Georgia, serif; color: var(--gold); opacity: .58; }
.project-kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800; }
.project h3 { margin: 10px 0 18px; font-size: clamp(38px, 4.2vw, 58px); line-height: 1; letter-spacing: -.045em; }
.project-content > p:not(.project-kicker) { color: var(--muted); font-size: 17px; max-width: 650px; }
.project-points { padding: 0; margin: 26px 0; list-style: none; color: var(--muted); }
.project-points li { position: relative; padding-left: 20px; margin: 9px 0; }
.project-points li::before { content: "↳"; position: absolute; left: 0; color: var(--gold); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 25px 0; }
.tags span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; font-size: 11px; color: var(--muted); }
.project-link, .small-project a { display: inline-flex; gap: 7px; align-items: center; font-weight: 800; font-size: 13px; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.project-link:hover, .small-project a:hover { color: var(--gold); }
.project-visual { min-height: 350px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--bg) 72%, transparent); overflow: hidden; }
.spectral-visual { position: relative; }
.spectral-visual svg { width: 92%; }
.grid-lines path { stroke: var(--line); stroke-width: 1; }
.spectrum { fill: none; stroke: url(#wave); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(214,166,74,.25)); }
.spectral-visual circle { fill: var(--bg); stroke: var(--gold); stroke-width: 3; }
.visual-label { position: absolute; bottom: 18px; display: flex; gap: 8px; }
.visual-label span { padding: 6px 9px; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; border-radius: 999px; background: var(--panel-solid); color: var(--muted); }
.pipeline-visual { grid-template-columns: 1fr auto 1fr; padding: 40px; gap: 22px; }
.paper-stack { position: relative; width: 145px; height: 190px; }
.paper-stack span { position: absolute; inset: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-solid); }
.paper-stack span:nth-child(1){ transform: rotate(-9deg) translate(-10px,4px); }
.paper-stack span:nth-child(2){ transform: rotate(6deg) translate(10px,5px); }
.paper-stack span:nth-child(3){ background: linear-gradient(180deg, var(--panel-solid), color-mix(in srgb, var(--panel-solid) 80%, var(--maroon))); }
.paper-stack span:nth-child(3)::before { content:"PDF"; position:absolute; left:18px; top:18px; color:var(--gold); font-weight:900; font-size:12px; letter-spacing:.12em; }
.paper-stack span:nth-child(3)::after { content:""; position:absolute; left:18px; right:18px; top:55px; height:80px; background:repeating-linear-gradient(to bottom, var(--line) 0 2px, transparent 2px 15px); }
.pipeline-arrow { color: var(--gold); font-size: 34px; }
.record-card { width: 155px; min-height: 190px; display: flex; flex-direction: column; gap: 10px; padding: 19px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-solid); }
.record-card b { color: var(--gold); font-size: 28px; }
.record-card span { padding: 8px 9px; border-radius: 8px; background: color-mix(in srgb, var(--bg) 65%, transparent); color: var(--muted); font-size: 11px; }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.metric-row div { border: 1px solid var(--line); border-radius: 15px; padding: 16px; }
.metric-row strong { display: block; color: var(--gold); font-family: Georgia, serif; font-size: 28px; }
.metric-row span { color: var(--muted); font-size: 11px; }
.benchmark-visual { grid-template-columns: 100px 100px; align-items: end; gap: 28px; padding: 50px; position: relative; }
.benchmark-column { height: 220px; display: flex; flex-direction: column; justify-content: end; gap: 10px; text-align: center; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.benchmark-column span { display: block; height: var(--h); border-radius: 12px 12px 4px 4px; background: var(--muted); opacity: .4; }
.benchmark-column.accent span { background: linear-gradient(var(--gold), var(--maroon)); opacity: 1; }
.benchmark-note { position: absolute; top: 28px; right: 30px; color: var(--gold); font-family: Georgia, serif; font-size: 18px; text-align: right; }
.lab-heading { margin: 100px 0 30px; }
.lab-heading h3 { margin: 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.04em; }
.project-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.small-project { min-height: 350px; display: flex; flex-direction: column; padding: 27px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); transition: transform .2s ease, border-color .2s ease; }
.small-project:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.small-project-top { display: flex; justify-content: space-between; align-items: center; color: var(--gold); text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 800; }
.small-project-top b { font-family: Georgia, serif; font-size: 15px; }
.small-project h4 { margin: 48px 0 15px; font-size: 26px; letter-spacing: -.035em; }
.small-project p { margin: 0; color: var(--muted); font-size: 14px; }
.small-project .tags { margin-top: auto; }
.small-project a { align-self: flex-start; }
.about-section { background: var(--bg-soft); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 9vw, 130px); }
.about-intro { position: sticky; top: 120px; align-self: start; }
.about-copy > p { margin: 0 0 24px; color: var(--muted); font-size: 21px; line-height: 1.65; }
.principles { margin-top: 58px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.principles > div { display: grid; grid-template-columns: 50px 160px 1fr; gap: 22px; padding: 27px 0; border-bottom: 1px solid var(--line); align-items: start; }
.principles span { color: var(--gold); font-family: Georgia, serif; }
.principles h3 { margin: 0; font-size: 17px; }
.principles p { margin: 0; color: var(--muted); font-size: 13px; }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 220px 1fr; gap: 50px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: .13em; font-weight: 800; padding-top: 4px; }
.timeline-item h3 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.timeline-item h3 span { display: block; color: var(--muted); font-size: 14px; font-weight: 550; letter-spacing: 0; margin-top: 4px; }
.timeline-item p { margin: 13px 0 0; color: var(--muted); max-width: 720px; }
.skills-section { border-top: 1px solid var(--line); }
.skills-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 9vw, 130px); }
.skills-lede { color: var(--muted); font-size: 17px; max-width: 430px; }
.skills-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: 22px 0; }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; font-weight: 750; font-size: 19px; }
summary::-webkit-details-marker { display:none; }
summary span { color: var(--gold); transition: transform .2s ease; }
details[open] summary span { transform: rotate(45deg); }
details p { color: var(--muted); max-width: 760px; margin: 14px 0 4px; }
.contact-section { background: var(--maroon); color: #f7f0e8; }
.contact-inner { padding-block: 115px; }
.contact-inner .eyebrow { color: #f0d69b; }
.contact-inner h2 { max-width: 920px; }
.contact-inner > p:not(.eyebrow) { color: rgba(255,255,255,.72); font-size: 18px; max-width: 700px; margin-top: 24px; }
.contact-actions { display: flex; align-items: center; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.button-light { border-color: #f7f0e8; background: #f7f0e8; color: #511a2a; }
.text-link.light:hover { color: #f0d69b; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: var(--muted); font-size: 12px; }
.footer-inner div { display: flex; gap: 22px; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s ease var(--delay, 0s), transform .75s ease var(--delay, 0s); }
.reveal.visible { opacity: 1; transform: none; }
@media (max-width: 980px) {
  .desktop-nav { display:none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .portrait-wrap { justify-self: start; width: min(500px, calc(100% - 24px)); margin-left: 24px; }
  .hero-facts { max-width: 760px; }
  .section-heading, .about-grid, .skills-grid { grid-template-columns: 1fr; gap: 42px; }
  .about-intro { position: static; }
  .project { grid-template-columns: 1fr; }
  .project.reverse .project-content, .project.reverse .project-visual { order: initial; }
  .project-visual { min-height: 320px; }
  .project-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  :root { --shell: min(100% - 28px, 1180px); --radius: 22px; }
  .site-header .brand-text, .nav-actions .button { display:none; }
  .nav-wrap { min-height: 68px; }
  .hero { padding-block: 58px 78px; gap: 58px; }
  h1 { font-size: clamp(50px, 16vw, 72px); }
  .hero-actions { align-items: flex-start; }
  .hero-facts { grid-template-columns: 1fr; gap: 16px; }
  .portrait-wrap { margin-left: 0; width: calc(100% - 14px); }
  .orbit-card { width: 72px; height: 72px; }
  .orbit-card-one { left: -10px; }
  .orbit-card-two { right: -12px; }
  .section { padding-block: 88px; }
  .section-heading { margin-bottom: 42px; }
  .section-heading h2, .about-intro h2, .skills-grid h2, .contact-inner h2 { font-size: clamp(38px, 12vw, 52px); }
  .project { padding: 28px 22px; min-height: 0; }
  .project h3 { font-size: 38px; }
  .project-visual { min-height: 260px; }
  .pipeline-visual { padding: 25px 15px; gap: 12px; }
  .paper-stack { width: 100px; height: 145px; }
  .record-card { width: 110px; min-height: 150px; padding: 12px; }
  .record-card span { font-size: 9px; }
  .metric-row { grid-template-columns: 1fr; }
  .benchmark-visual { grid-template-columns: 72px 72px; gap: 18px; padding: 38px 20px; }
  .project-cards { grid-template-columns: 1fr; }
  .principles > div { grid-template-columns: 40px 1fr; }
  .principles p { grid-column: 2; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .contact-inner { padding-block: 88px; }
  .footer-inner { padding-block: 28px; align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Flagship portfolio emphasis */
.project-featured { border-color: color-mix(in srgb, var(--gold) 24%, var(--line)); }
.project-featured:first-child {
  background:
    radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 36%),
    var(--panel);
}
.project-featured:nth-child(2) {
  background:
    radial-gradient(circle at 18% 78%, color-mix(in srgb, var(--maroon) 20%, transparent), transparent 38%),
    var(--panel);
}
.project-index { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-family: inherit; font-weight: 800; }
@media (min-width: 1080px) {
  .project-featured:first-child { min-height: 610px; }
  .project-featured:first-child h3 { font-size: clamp(48px, 5.1vw, 70px); }
}
