:root {
  color-scheme: light;
  --bg: oklch(1 0 0);
  --ink: oklch(.22 0 0);
  --muted: oklch(.43 0 0);
  --line: oklch(.64 0 0);
  --hover: oklch(.95 0 0);
  --space-small: .75rem;
  --space: 1.5rem;
  --space-section: 3rem;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Courier New', Courier, monospace; font-size: 1rem; line-height: 1.6; }
.page { max-width: 72ch; margin: 0 auto; padding: var(--space) var(--space) 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; transition: background-color 140ms ease-out, color 140ms ease-out; }
a:hover, summary:hover { background: var(--hover); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.skip { position: absolute; top: .5rem; left: 1rem; padding: .5rem; background: var(--bg); transform: translateY(-200%); }
.skip:focus { transform: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--ink); gap: 1rem; }
.topbar p { margin: 0; }
.languages { display: flex; gap: .5rem; }
.languages a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.languages [aria-current] { font-weight: bold; text-decoration: none; }
.languages [aria-current]::before { content: '['; }
.languages [aria-current]::after { content: ']'; }
h1, h2, h3 { text-wrap: balance; }
h1 { margin: var(--space-section) 0 var(--space); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; letter-spacing: -.03em; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 var(--space); }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0 0 var(--space); text-wrap: pretty; }
.intro { margin-top: var(--space); }
.actions, .contact-links { display: flex; flex-wrap: wrap; gap: .5rem var(--space); }
.actions a, .contact-links a { min-height: 44px; display: inline-flex; align-items: center; }
.actions a:first-child { font-weight: bold; }
.contents { display: flex; flex-wrap: wrap; gap: 0 var(--space); margin-top: var(--space); padding: .75rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.contents a { display: inline-flex; align-items: center; min-height: 44px; }
section { margin-top: var(--space-section); }
.project-intro { max-width: 44ch; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.project-section { margin-top: clamp(2rem, 5vw, 3.5rem); }
.project-intro h3 { margin: 0; font-size: 1rem; line-height: 1.5; }
.project-reel { display: flex; flex-direction: column; }
.project-stage { order: 2; min-width: 0; margin: 0; border-top: 1px solid var(--ink); }
.project-stage-head { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .625rem 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .75rem; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
.project-stage-code { color: var(--ink); font-weight: bold; }
.project-stage-status { justify-self: center; }
.project-video-frame { position: relative; aspect-ratio: var(--project-ratio, 16 / 9); overflow: hidden; background: var(--hover); border-bottom: 1px solid var(--line); }
.project-poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; background: var(--hover); object-fit: contain; transition: opacity 180ms ease-out; }
.project-video { position: relative; z-index: 1; display: block; width: 100%; height: 100%; background: var(--hover); object-fit: contain; transition: opacity 180ms ease-out; }
html.motion-ready .project-video { opacity: 0; }
html.motion-ready .project-video-frame[data-loaded] .project-poster { opacity: 0; pointer-events: none; }
html.motion-ready .project-video-frame[data-loaded] .project-video { opacity: 1; }
.project-video-frame:not([data-playing]) .project-video { filter: grayscale(1); }
.project-missing { position: absolute; right: .75rem; bottom: .75rem; left: .75rem; margin: 0; padding: .5rem .625rem; border: 1px solid var(--line); background: var(--bg); font-size: .75rem; line-height: 1.4; }
.project-stage figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; padding: var(--space) 0; border-bottom: 1px solid var(--ink); }
.project-stage h3 { grid-column: 1; grid-row: 1; margin-bottom: .5rem; font-size: 1.1rem; }
.project-stage figcaption p { grid-column: 1; margin-bottom: .5rem; }
.project-stage figcaption p[data-stage-description] { grid-row: 2; }
.project-stage figcaption p:last-child { margin-bottom: 0; }
.project-stage figcaption p.project-stage-meta { grid-column: 2; grid-row: 1 / span 2; align-self: end; max-width: 24ch; margin: 0 !important; color: var(--muted); font-size: .875rem; text-align: right; }
.project-choice-panel { order: 1; margin: 0 0 clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--ink); }
.project-choice-label { margin: .625rem 0; color: var(--muted); font-size: .75rem; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
.project-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; list-style: none; margin: 0; padding: 1px; background: var(--line); }
.project-choices li { min-width: 0; background: var(--bg); }
.project-choice { display: grid; grid-template-rows: auto 1fr; gap: .75rem; width: 100%; min-height: 100%; padding: .75rem; border: 0; color: inherit; background: var(--bg); cursor: pointer; font: inherit; text-align: left; transition: background-color 140ms ease-out, transform 160ms ease-out; }
.project-choice[aria-pressed="true"] { background: var(--hover); outline: 1px solid var(--ink); outline-offset: -1px; }
.project-choice-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--hover); }
.project-choice-media img { display: block; width: 100%; height: 100%; object-fit: contain; filter: grayscale(1); transition: filter 180ms ease-out, transform 180ms ease-out; }
.project-choice-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: .3rem .75rem; min-width: 0; }
.project-choice-head { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; min-height: 1.3rem; }
.project-choice-code { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.project-choice[aria-pressed="true"] .project-choice-code { color: var(--ink); font-weight: bold; }
.project-choice-title, .project-choice-description, .project-choice-meta { display: block; }
.project-choice-title { font-weight: bold; line-height: 1.35; }
.project-choice-title, .project-choice-description, .project-choice-meta { grid-column: 1 / -1; }
.project-choice-description { margin-top: .3rem; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.project-choice-meta { margin-top: .35rem; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.project-choice:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.project-choice:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .project-choice:hover { background: var(--hover); }
  .project-choice:hover .project-choice-media img { transform: scale(1.02); }
}
/* Fixed logo and caption tracks keep the visual baseline identical. */
.tool-icons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; list-style: none; margin: 0 0 1.5rem; padding: 1px; background: var(--line); }
.tool-icons li { display: grid; grid-template-rows: 5rem 2.5rem; min-width: 0; background: var(--bg); text-align: center; }
.tool-symbol { display: grid; place-items: center; }
.tool-icons img { display: block; width: 2rem; height: 2rem; object-fit: contain; filter: grayscale(1) brightness(0); }
.tool-icons span { display: grid; place-items: center; border-top: 1px solid var(--line); font-size: .875rem; line-height: 1; white-space: nowrap; }
.tool-note { color: var(--muted); }
.publications { padding: 0; margin: 0; list-style: none; }
.publications li { padding: var(--space) 0; border-top: 1px solid var(--line); }
.publications a { display: block; font-weight: bold; }
.publication-meta { color: var(--muted); margin: .5rem 0 0; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: .75rem 0; min-height: 44px; }
#contact { padding: var(--space) 0; border-top: 1px solid var(--ink); }
.email { display: inline-block; font-weight: bold; margin-bottom: .5rem; overflow-wrap: anywhere; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--ink); margin-top: var(--space); padding: var(--space) 0; color: var(--muted); font-size: .875rem; }
footer p { margin: 0; }
@media (max-width: 540px) {
  .page { padding: .75rem 1rem 0; }
  .topbar { gap: .25rem; }
  .topbar p { font-size: .875rem; }
  h1 { margin-top: 2.25rem; }
  .contents { column-gap: 1rem; }
  .tool-icons { grid-template-columns: repeat(3, minmax(0, 1fr)); }

}
@media (max-width: 700px) {
  .project-stage { order: 1; }
  .project-choice-panel { order: 2; margin-top: clamp(2rem, 5vw, 3.5rem); margin-bottom: 0; }
  .project-choices { grid-template-columns: 1fr; }
  .project-choice { grid-template-columns: minmax(7.5rem, 36%) minmax(0, 1fr); grid-template-rows: 1fr; gap: var(--space-small); align-items: start; }
  .project-choice-media { grid-row: 1; }
  .project-choice-body { min-height: 100%; }
}
@media (max-width: 540px) {
  .project-stage figcaption { display: block; }
  .project-stage-meta { max-width: none; margin-top: .75rem !important; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { a { transition: none; } }
@media (prefers-reduced-motion: reduce) {
  .project-choice, .project-poster, .project-video { transition: none; }
}
@media print {
  .page { max-width: none; padding: 0; }
  .skip, .topbar, .contents, .actions, footer { display: none; }
  section { margin-top: 1.5rem; }
  a { text-decoration: none; }
}

/* The native disclosure stays usable without JavaScript. */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '›'; display: inline-block; width: 1ch; margin-right: .75rem; transform-origin: center; }
details[open] > summary::before { transform: rotate(90deg); }
details.pointer-toggle > summary::before { transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1); }
@media (prefers-reduced-motion: reduce) {
  details.pointer-toggle > summary::before { transition: none; }
}

.profile-title { font-size: 1.25rem; line-height: 1.5; margin-bottom: 1.5rem; }
