:root {
  color-scheme: dark;
  --bg: #171b17;
  --panel: #202620;
  --text: #f1f4eb;
  --muted: #b3beb0;
  --line: #394238;
  --accent: #c8f36b;
  --button: #1a2410;
  --mono: ui-monospace, "DejaVu Sans Mono", monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f0;
  --panel: #e8eee2;
  --text: #1e281b;
  --muted: #495b46;
  --line: #becbbb;
  --accent: #40631e;
  --button: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.65 system-ui, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: fixed; z-index: 2; transform: translateY(-150%); background: var(--bg); padding: .75rem; }
.skip:focus { transform: translateY(0); }
.site-head, footer { border-bottom: 1px solid var(--line); }
.top, .foot { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.12rem; font-weight: 750; letter-spacing: -.03em; white-space: nowrap; }
.top nav, .foot nav, .top-actions { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.9rem); }
header a, footer a { color: var(--text); text-decoration: none; }
nav a { color: var(--muted); font-size: .9rem; }
nav a:hover, nav a[aria-current] { color: var(--text); text-decoration: underline; }
.top-resume { font-size: .9rem; }
#theme { display: grid; place-items: center; width: 42px; height: 42px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: clamp(3.6rem, 7vw, 7rem) 0 3.15rem; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
.eyebrow { color: var(--accent); font: .875rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .065em; }
.small-line { display: inline-block; width: 1.25rem; height: 2px; margin-right: .5rem; background: var(--accent); vertical-align: middle; }
h1 { font-size: clamp(2.9rem, 7vw, 6.2rem); font-weight: 760; line-height: .98; letter-spacing: -.07em; overflow-wrap: anywhere; }
.hero h1 { margin: 1.25rem 0 .7rem; font-size: clamp(3.2rem, 6.9vw, 6.4rem); }
.period { color: var(--accent); }
.hero-role { font-size: clamp(1.5rem, 3vw, 2.65rem); line-height: 1.12; letter-spacing: -.045em; font-weight: 630; }
.intro { max-width: 58ch; color: var(--muted); font-size: clamp(1.05rem, 1.45vw, 1.2rem); margin-top: 1.25rem; }
.intro:empty { display: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.65rem; }
.profile-links { margin-top: .75rem; }
.primary, .outline { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .6rem 1.1rem; border-radius: 7px; border: 1px solid var(--line); text-decoration: none; font-weight: 650; font-size: .9rem; color: var(--text); }
.primary { background: var(--accent); color: var(--button); border-color: transparent; }
.primary:hover { filter: brightness(1.07); }
.outline:hover { background: var(--panel); border-color: var(--accent); }
.lab-visual { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.lab-visual img { width: 100%; }
.lab-visual figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem .9rem; padding: .75rem 1rem; color: var(--muted); font: .875rem/1.65 var(--mono); border-top: 1px solid var(--line); }
.lab-visual a { color: var(--text); text-decoration: none; }
.status-dot { display: inline-block; width: .48rem; height: .48rem; margin-right: .5rem; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.status-dot[data-state="live"] { background: var(--accent); }
.facts { display: grid; grid-template-columns: .9fr 1.15fr 1fr; border-block: 1px solid var(--line); }
.facts > div { padding: 1.1rem clamp(.65rem, 2vw, 1.75rem); }
.facts > div + div { border-left: 1px solid var(--line); }
.facts > div:first-child { padding-left: 0; }
.facts small { display: block; color: var(--muted); font: .875rem/1.45 var(--mono); letter-spacing: .04em; margin-bottom: .35rem; }
.facts strong { font-weight: 615; }
.featured { padding-top: clamp(3rem, 7vw, 5.5rem); }
.section-heading, .split { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; }
.section-heading { padding-bottom: 1.35rem; }
h2 { font-size: clamp(1.65rem, 4vw, 3.15rem); letter-spacing: -.045em; line-height: 1.12; }
.section-heading h2, .split h2 { margin-top: .42rem; }
.project-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: 1.55rem; align-items: center; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.project-row:last-child { border-bottom: 1px solid var(--line); }
.project-row :is(h2, h3) { font-size: clamp(1.15rem, 2vw, 1.62rem); line-height: 1.22; letter-spacing: -.032em; margin-top: .3rem; }
.project-row :is(h2, h3) a { color: var(--text); text-decoration: none; }
.project-row :is(h2, h3) a:hover { text-decoration: underline; }
.project-row > div:nth-child(2) { color: var(--muted); }
.tags { font: .875rem/1.55 var(--mono); color: var(--muted); margin-top: .55rem; }
.split { align-items: start; padding: 2rem 0; margin-top: 2.8rem; border-top: 1px solid var(--line); }
.split > div:last-child { max-width: 54ch; }
.split p:not(.eyebrow) { color: var(--muted); }
.text-link { display: inline-block; margin-top: .75rem; }
.contact-band { align-items: center; margin-bottom: 1rem; }
.contact-band p { margin-top: .65rem; }
footer { border-block: 1px solid var(--line) 0; margin-top: 4rem; }
.foot span { color: var(--muted); font-size: .9rem; }
.page-intro { max-width: 880px; padding: clamp(3.2rem, 7vw, 6rem) 0 2.2rem; }
.page-intro h1 { font-size: clamp(2.55rem, 6.8vw, 5rem); margin-top: .6rem; }
.prose-section { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.prose-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .75rem; }
.prose-section p { max-width: 76ch; margin-bottom: .7rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; color: var(--muted); padding-block: 0 1.5rem; font: .9rem/1.6 var(--mono); }
.flow { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.flow li { padding: .6rem .85rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.flow li + li::before { content: "→"; color: var(--accent); margin-right: .55rem; }
.filters { display: flex; flex-wrap: wrap; gap: .9rem; padding-bottom: .75rem; }
.filters label { display: grid; gap: .3rem; min-width: min(100%, 245px); }
input, select { padding: .55rem .8rem; min-height: 44px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
select { appearance: none; padding-right: 2.2rem; background: var(--panel) url("/assets/chevron.svg") no-repeat right .8rem center; }
#results { padding-bottom: .8rem; }
.skill-list > div { display: grid; grid-template-columns: minmax(7rem, 1fr) 3fr; gap: 1rem; border-top: 1px solid var(--line); padding: .8rem 0; }
.skill-list dt { font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: .8rem; margin: .8rem 0; }
.metrics > div { padding: .85rem; background: var(--panel); border: 1px solid var(--line); }
.metrics dd { font-size: 1.7rem; font-weight: 700; }
meter { width: 100%; accent-color: var(--accent); }
.history-chart { display: flex; align-items: end; gap: 3px; min-height: 96px; max-width: 44rem; margin: .7rem 0; border-bottom: 1px solid var(--line); }
.history-chart meter { appearance: none; width: 100%; min-width: 0; height: 96px; writing-mode: vertical-rl; direction: rtl; }
.history-chart meter::-webkit-meter-bar { background: var(--panel); border: 0; border-radius: 0; }
.history-chart meter::-webkit-meter-optimum-value { background: var(--accent); }
details { margin-bottom: 1rem; }
pre { padding: 1rem; overflow: auto; background: var(--panel); }
@media (max-width: 920px) {
  .wrap { width: calc(100% - 48px); }
  .top { flex-wrap: wrap; padding: .75rem 0; gap: .7rem; }
  .top nav { order: 1; width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .hero { gap: 1.65rem; }
}
@media (max-width: 660px) {
  .wrap { width: calc(100% - 36px); }
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .lab-visual { max-width: 440px; }
  .facts { grid-template-columns: 1fr; }
  .facts > div, .facts > div:first-child { padding: .75rem 0; }
  .facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .project-row { grid-template-columns: 1fr; gap: .6rem; }
  .case-link { justify-self: start; }
  .section-heading { align-items: start; }
  .split, .foot { align-items: start; flex-direction: column; }
  .foot { padding: 1rem 0; gap: .65rem; }
}

.project-media { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

.resource-links { display: flex; flex-wrap: wrap; gap: .7rem 1.35rem; margin-top: 1rem; }
.demo-controls { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.demo-controls label { display: grid; gap: .3rem; min-width: min(100%, 13rem); }
.demo-controls label, .demo-controls select { max-width: 100%; }
.demo-stages { margin-top: 1.25rem; }
.demo-stages [aria-current] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
#demo-result { margin-top: 1rem; }
button.primary, button.outline { cursor: pointer; font-family: inherit; }
button:disabled { cursor: default; opacity: .65; }
.foot, .foot nav { flex-wrap: wrap; }
.foot nav { gap: .5rem 1rem; }
