:root {
    color-scheme: light;
    --paper: #f7f8f3;
    --ink: #15241c;
    --muted: #4a5950;
    --accent: #236545;
    --line: #cbd5cc;
    font-family: system-ui, sans-serif;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(100% - 3rem, 66rem); margin-inline: auto; }
[id] { scroll-margin-top: 1rem; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-block: 1.15rem;
}
.monogram {
    display: grid;
    place-items: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 1px solid var(--accent);
    letter-spacing: .08em;
    text-decoration: none;
    font-weight: 700;
}
nav { display: flex; flex-wrap: wrap; gap: clamp(.75rem, 3vw, 2rem); }
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { text-decoration: underline; }

.hero {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: end;
    gap: 2rem;
    padding-block: clamp(3.25rem, 9vw, 7.5rem) clamp(2.5rem, 7vw, 5rem);
    border-bottom: 1px solid var(--line);
}
.eyebrow {
    margin: 0 0 1rem;
    color: var(--accent);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.05; }
h1 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(3.7rem, 10vw, 8.5rem);
    font-weight: 400;
    letter-spacing: -.075em;
}
h1 span { color: var(--accent); }
.intro p {
    max-width: 27ch;
    margin: 0 0 1.35rem;
    color: var(--muted);
    font-size: clamp(1.12rem, 2vw, 1.45rem);
}
.print-button {
    padding: .7rem 1rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
}
.print-button:hover { background: var(--accent); color: white; }

.section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    padding-block: clamp(1.8rem, 4vw, 3.2rem);
    border-bottom: 1px solid var(--line);
}
h2 { margin: 0; font: 400 clamp(1.9rem, 3vw, 2.75rem)/1.08 Georgia, serif; }
h3 { margin: 0 0 .6rem; font-size: 1.2rem; }
.entries { display: grid; gap: 1.5rem; }
article + article { border-top: 1px solid var(--line); padding-top: 1.5rem; }
article p { max-width: 65ch; margin: 0; color: var(--muted); }
article p + p { margin-top: .65rem; }
article a { display: inline-block; margin-top: .55rem; }
article .entry-meta { margin-bottom: .4rem; color: var(--accent); font-size: .875rem; }
.current { border-bottom: 2px solid var(--accent); }
.contributions { max-width: 68ch; margin: 0; padding-inline-start: 1.15rem; color: var(--muted); }
.contributions li + li { margin-top: .45rem; }
.profile-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .8rem 1.2rem;
}
.primary-link {
    color: white;
    background: var(--accent);
    padding: .68rem .95rem;
    text-decoration: none;
}
.primary-link:hover { color: white; background: #194933; }
#experience .print-button { margin-top: 1rem; }

.journey {
    margin-block: clamp(2rem, 5vw, 4rem);
    color: #e8eee9;
    background: #111c22;
    padding: clamp(1.35rem, 4vw, 2.85rem);
    border-radius: .35rem;
}
.journey a { color: #a6eac7; }
.journey :focus-visible { outline-color: #a6eac7; }
.journey-heading {
    border-bottom: 1px solid #35474b;
    padding-bottom: 1.25rem;
}
.journey-heading h2 { font-size: clamp(2rem, 5vw, 3.8rem); }
.journey-heading nav { margin-top: 1.05rem; gap: .55rem 1rem; }
.journey-heading a { color: #bccbc8; text-decoration: none; }
.journey-heading a:hover, .journey-heading a[aria-current] {
    color: #a6eac7;
    text-decoration: underline;
}
.chapter { padding-block: 2.2rem; border-top: 0; }
.chapter + .chapter { border-top: 1px solid #35474b; padding-top: 2.2rem; }
.chapter h3 { font: 400 clamp(1.55rem, 3vw, 2.5rem)/1.12 Georgia, serif; }
.chapter p { color: #c2cecd; }
.chapter .entry-meta { color: #a6eac7; }
.chapter-scene:empty, .journey:not(.enhanced) .chapter-scene { display: none; }
.chapter-scene { margin-top: 1.25rem; }
.demo {
    --demo-line: #435b5e;
    --demo-accent: #a6eac7;
    padding: clamp(.9rem, 2.4vw, 1.35rem);
    border: 1px solid #435b5e;
    background: #1a292e;
    border-radius: .35rem;
}
.demo-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem 1rem;
    justify-content: space-between;
}
.demo h4 { margin: 0; color: #f1f7f4; font-size: 1.15rem; line-height: 1.25; }
.demo .demo-context { margin: .35rem 0 .7rem; font-size: .875rem; color: #bdcbc9; }
.demo-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem; }
.demo button {
    border: 1px solid var(--demo-line);
    border-radius: .2rem;
    background: transparent;
    padding: .48rem .72rem;
    min-height: 2.75rem;
    color: #e8eee9;
    font: inherit;
    cursor: pointer;
}
.demo button:hover { border-color: var(--demo-accent); }
.demo button[aria-pressed="true"] { border-color: var(--demo-accent); color: #0c2317; background: var(--demo-accent); }
.batch-flow { display: grid; gap: .5rem; }
.batch-flow span {
    border: 1px solid var(--demo-line);
    padding: .6rem;
    color: var(--demo-accent);
}
.pipeline {
    display: grid;
    gap: .45rem;
    padding: 0;
    margin: 1rem 0;
    list-style: none;
    counter-reset: step;
}
.pipeline li { counter-increment: step; }
.pipeline button { display: block; width: 100%; text-align: left; }
.pipeline button::before { content: counter(step, decimal-leading-zero); margin-inline-end: .7rem; font-variant-numeric: tabular-nums; }
.demo .demo-detail { margin: .85rem 0 0; color: #c2cecd; font-size: .93rem; }
.demo blockquote {
    margin: .85rem 0;
    padding: .5rem .75rem;
    border-inline-start: .15rem solid var(--demo-accent);
    background: #111c22;
}
.demo canvas { display: block; width: 100%; height: auto; border: 1px solid var(--demo-line); }
.plot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .8rem;
    padding: 0;
    margin: .75rem 0;
    list-style: none;
    color: #d2dddd;
    font-size: .83rem;
}
.plot-legend li::before {
    content: "";
    display: inline-block;
    width: .62rem;
    height: .62rem;
    margin-inline-end: .3rem;
    background: #e5b868;
}
.plot-legend li:nth-child(2)::before { background: #8299a8; }
.plot-legend li:nth-child(3)::before { background: #94e5be; }
.slider-label { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.slider-label output { color: #a6eac7; }
.demo input[type="range"] { width: 100%; min-height: 2.75rem; margin: 0; accent-color: #a6eac7; }

@media (min-width: 62rem) {
    .journey.enhanced .journey-grid {
        display: grid;
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
        gap: clamp(1.4rem, 3vw, 3rem);
        align-items: start;
    }
    .journey.enhanced .chapter {
        min-height: min(60vh, 34rem);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }
    .journey-stage { position: sticky; top: 2rem; margin-top: 1.35rem; }
    @media (max-height: 42rem) {
        .journey-stage { top: .6rem; max-height: calc(100vh - 1.2rem); overflow: auto; }
    }
}
.footer { color: var(--muted); font-size: .9rem; }

@media (max-width: 42rem) {
    .wrap { width: calc(100% - 2rem); }
    .hero, .section { grid-template-columns: 1fr; }
}

@media (max-width: 32rem) {
    .skills { grid-template-columns: 1fr; }
    .skills dd + dt { margin-top: .6rem; }
}

@media print {
    :root { background: white; color: black; }
    .wrap { width: 100%; }
    .site-header, .print-button, .journey { display: none; }
    .hero, .section { padding-block: 1rem; }
    h1 { font-size: 42pt; }
    article { break-inside: avoid; }
}
