/* Night-blue stage, Inter type, pill header with a slide-out menu shelf. */
:root { --bg: #0e0f14; --fg: #f2f0ea; --paper: #f2f0ea; --muted: #8b8d97; --line: rgba(242,240,234,.16); --tile: #15171e; --key: #00d26a;
  --display: "Inter", "Helvetica Neue", Arial, sans-serif; --serif: "Inter", "Helvetica Neue", Arial, sans-serif; --sans: "Inter", "Helvetica Neue", Arial, sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--key); color: var(--bg); }
section, footer { max-width: 1320px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

.label, .meta, .num { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.label { color: var(--muted); margin: 0; }

/* CoSA-style corner triangle after headings */
.mark::after, .head h2::after, article h2::after { content: ""; display: inline-block; margin-left: .3em; border-left: .32em solid transparent; border-bottom: .32em solid var(--key); }

/* floating pill header; difference blend keeps it readable on paper and on night */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; mix-blend-mode: difference; color: #fff; }
.brand { display: flex; gap: 4px; text-decoration: none; }
.pill { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid currentColor; border-radius: 99px; font: 500 13px var(--display); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.pill.dot { width: 38px; padding: 0; justify-content: center; }
.pill.dot img { width: 18px; height: 18px; object-fit: contain; }
nav { display: flex; align-items: center; gap: 6px; }
nav .pill:hover, nav .pill[aria-current] { background: #fff; color: #000; }


/* Zajno-style reveal: a word over a disc that grows to fill the screen as you scroll */
.reveal { height: 200vh; max-width: none; padding: 0; --p: 0; }
.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--paper); isolation: isolate; }
.disc, .word, .hint { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.disc { width: 64vmin; aspect-ratio: 1; border-radius: 50%; background: var(--bg); transform: scale(calc(1 + var(--p) * 3)); will-change: transform; }
.word { font: 800 clamp(3rem, 12vw, 11rem)/1 var(--display); letter-spacing: -.04em; color: #fff; mix-blend-mode: difference; transform: scale(calc(1 + var(--p) * .5)); white-space: nowrap; }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1; mix-blend-mode: difference; vector-effect: non-scaling-stroke; }
.hint { top: auto; bottom: 32px; translate: -50% 0; color: #fff; mix-blend-mode: difference; opacity: calc(1 - var(--p) * 5); }

/* intro */
.intro { padding-top: 120px; padding-bottom: 120px; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.intro > :not(.label) { grid-column: 2; }
.intro .label { padding-top: 16px; }
.intro h1 { font: 600 clamp(2.2rem, 5.4vw, 4.6rem)/1.04 var(--display); letter-spacing: -.04em; margin: 0; }
.intro h1 em, .page-head h1 em { display: block; font: italic 400 1.08em/1.05 var(--serif); letter-spacing: -.02em; color: var(--key); }
.intro .lead { font: 400 1.35rem/1.5 var(--serif); color: #c9c8c2; max-width: 46ch; margin: 28px 0 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 22px; border-radius: 99px; background: var(--fg); color: var(--bg); text-decoration: none; font: 500 14px var(--display); transition: background .2s, color .2s; }

.btn:hover { background: var(--key); color: var(--bg); }

.btn.ghost { background: none; color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); }

/* Motionographer-style front page: wide main column, quickies, news */
.front { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 48px; padding-bottom: 140px; align-items: start; }
.col { display: grid; gap: 28px; }
.mark { font: 600 1.7rem/1 var(--display); letter-spacing: -.03em; margin: 0; }
.mark.ruled { margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--key); }
.feature { display: grid; gap: 14px; text-decoration: none; }
.feature img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: opacity .3s; }
.feature b { display: block; font: 600 1.5rem/1.15 var(--display); letter-spacing: -.03em; }
.feature p { margin: 6px 0 0; font: 1.05rem var(--serif); color: var(--muted); }
.feature.small { grid-template-columns: 140px 1fr; align-items: center; padding-top: 24px; border-top: 1px solid var(--line); }
.feature.small b { font-size: 1.05rem; }
.feature:hover img { opacity: .8; }
.feature:hover b, .quick:hover b, .news:hover b { color: var(--key); }
.quick { display: grid; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: 28px; text-decoration: none; transition: border-color .2s; }
.quick:hover { border-color: var(--fg); }
.quick b { font: 600 1.25rem/1.15 var(--display); letter-spacing: -.03em; transition: color .2s; }
.quick p { margin: 0; font: 1.05rem/1.45 var(--serif); color: #c9c8c2; }
.news { display: grid; gap: 4px; text-decoration: none; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.news b { font: 600 1rem/1.25 var(--sans); transition: color .2s; }
.news p { margin: 0; font: .98rem/1.4 var(--serif); color: var(--muted); }
.news .label { margin-top: 6px; }
.more { justify-self: start; font: 500 13px var(--display); text-decoration: none; }
.more::after { content: " →"; }
.more:hover { color: var(--key); }

/* section pages */
.page-head { padding-top: 150px; padding-bottom: 72px; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.page-head .label { padding-top: 14px; }
.page-head > :not(.label) { grid-column: 2; }
.page-head h1 { font: 800 clamp(2.6rem, 7vw, 6rem)/1 var(--display); letter-spacing: -.05em; margin: 0 0 24px; }
.page-head .lead { font: 1.3rem/1.5 var(--serif); color: #c9c8c2; max-width: 46ch; margin: 0; }

section { padding-bottom: 120px; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 2px solid var(--key); margin-bottom: 36px; }
.head h2 { font: 600 1.7rem/1 var(--display); letter-spacing: -.03em; margin: 0; }
.head a.label, .head p.label { text-decoration: none; }
.head a.label:hover { color: var(--fg); }

/* project cards (Work page) */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 32px; }
.card { display: block; text-decoration: none; }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: opacity .3s; }
.card:hover img { opacity: .8; }
.card .info { display: grid; grid-template-columns: 44px 1fr; gap: 2px 10px; padding-top: 16px; }
.card .num { grid-row: span 2; color: var(--key); padding-top: 6px; }
.card b { font: 600 1.4rem/1.15 var(--display); letter-spacing: -.03em; }
.card:hover b { color: var(--key); }
.card small { font: 1.05rem var(--serif); color: var(--muted); }

.index { width: 100%; border-collapse: collapse; }
.index th { text-align: left; font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 16px 12px 0; border-bottom: 1px solid var(--fg); }
.index td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.index td:first-child { color: var(--key); width: 64px; font: 12px var(--mono); }
.index td a { text-decoration: none; font: 600 1.05rem var(--display); letter-spacing: -.02em; }
.index tr:hover td a { color: var(--key); }
.index td.dim { color: var(--muted); font: 1rem var(--serif); }
.index td.dim a { font: 500 12px var(--display); color: var(--fg); }

/* notes / lab lists */
.list a { display: grid; grid-template-columns: 1fr 2fr 24px; gap: 32px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.list .meta { color: var(--muted); }
.list b { font: 600 1.3rem/1.2 var(--display); letter-spacing: -.03em; transition: color .2s; }
.list a:hover b { color: var(--key); }
.list p { margin: 6px 0 0; font: 1.05rem var(--serif); color: var(--muted); }
.list .arrow { color: var(--key); text-align: right; }

/* about */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.about > div:first-child { grid-column: 2; grid-row: 1; font: 1.3rem/1.55 var(--serif); }
.about > .facts { grid-column: 1; grid-row: 1; }
.about p { margin-top: 0; }
.about a:not(.btn) { text-decoration-color: var(--key); text-underline-offset: 4px; }
.facts { display: grid; gap: 22px; align-content: start; }
.facts div { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.facts .label { margin-bottom: 6px; }
.facts.cols { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.facts a { text-decoration-color: var(--key); text-underline-offset: 3px; }

/* experience */
.job { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; padding: 36px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 2px solid var(--key); }
.job-head h2 { font: 600 1.2rem/1.3 var(--display); letter-spacing: -.03em; margin: 0 0 8px; }
.job .meta { color: var(--muted); margin: 0; }
.role + .role { margin-top: 32px; }
.role-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.role-head b { font-weight: 600; font-size: 1.05rem; }
.role ul { margin: 12px 0 0; padding-left: 18px; font: 1.08rem/1.55 var(--serif); color: #d4d3cd; }
.role li { margin-bottom: 8px; }
.role li::marker { content: "◢  "; color: var(--key); font-size: .6em; }

footer { padding-top: 40px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.sign { margin: 0 0 32px; font: 800 clamp(3rem, 12vw, 10rem)/.95 var(--display); letter-spacing: -.05em; color: var(--fg); }
.sign i { font: italic 400 1em var(--serif); color: var(--key); }
footer > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
footer a { text-decoration: none; } footer a:hover { color: var(--fg); }
footer nav { gap: 24px; }

/* article pages (projects, notes, lab) */
article { max-width: 860px; margin: 0 auto; padding: 150px 32px 120px; overflow-wrap: anywhere; font: 1.15rem/1.65 var(--serif); }
article h1 { font: 800 clamp(2.3rem, 5.5vw, 4.4rem)/1.02 var(--display); letter-spacing: -.05em; margin: 16px 0 40px; }
article h2 { font: 600 1.5rem/1.1 var(--display); letter-spacing: -.03em; margin: 72px 0 20px; padding-top: 18px; border-top: 2px solid var(--key); }
article h3 { font: 600 1rem var(--sans); margin-top: 32px; }
article img { display: block; margin: 32px auto; }
article a:not(.btn) { text-decoration-color: var(--key); text-underline-offset: 4px; }
article pre, article pre[class*="language-"] { background: var(--tile); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; overflow-x: auto; font-size: 13.5px; text-shadow: none; }
article code, article code[class*="language-"] { font-family: var(--mono); text-shadow: none; }
article :not(pre) > code { background: var(--tile); padding: 2px 7px; border-radius: 6px; font-size: .8em; }
article blockquote { margin: 0; padding-left: 18px; border-left: 2px solid var(--key); color: var(--muted); font-style: italic; }
article .btn { margin-bottom: 16px; }
.video { position: relative; aspect-ratio: 16/9; margin: 32px 0; background: var(--tile); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* lab demos */
.lab { display: grid; grid-template-columns: minmax(0, 440px) 1fr; gap: 40px; align-items: start; margin-bottom: 40px; font-family: var(--sans); font-size: 1rem; }
.lab canvas { width: 100%; aspect-ratio: 1; background: #000; display: block; border-radius: 28px; box-shadow: 0 0 0 1px var(--line), 0 0 0 12px var(--bg), 0 0 0 13px var(--line); }
.lab label { display: block; margin-bottom: 18px; font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lab input[type=range] { width: 100%; accent-color: var(--key); }
.lab button { font: 500 13px var(--display); background: none; color: var(--fg); border: 1px solid var(--fg); border-radius: 99px; padding: 10px 18px; cursor: pointer; }
.lab button:hover { background: var(--fg); color: var(--bg); }
.lab .readout { font: 12px var(--mono); color: var(--fg); min-height: 1.5em; }

@media (max-width: 960px) {
  .front { grid-template-columns: 1fr 1fr; }
  .front .col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  section, footer { padding-left: 16px; padding-right: 16px; }
  header { padding: 12px 16px; }
  .brand-home .pill:not(.dot) { display: none; }
  .intro, .page-head, .about, .job, .list a { grid-template-columns: 1fr; gap: 12px; }
  .intro > *, .page-head > *, .about > * { grid-column: 1 !important; grid-row: auto !important; }
  .intro, .intro.home { padding-top: 96px; }
  .page-head { padding-top: 110px; }
  .front, .grid, .lab { grid-template-columns: 1fr; gap: 48px; }
  .feature.small { grid-template-columns: 100px 1fr; }
  .list .arrow, .index th:nth-child(3), .index td:nth-child(3) { display: none; }
  article { padding: 110px 16px 72px; }
}
@media (prefers-reduced-motion: reduce) {
}

/* home: straight to the work */
.intro.home { padding-top: 72px; padding-bottom: 48px; }
.reel .video { margin: 0 0 72px; }

/* header: menu + name on the left, icons on the right */
.menu-btn { gap: 10px; background: none; color: inherit; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 14px; height: 1.5px; background: currentColor; }
.bars { position: relative; } .bars::before, .bars::after { content: ""; position: absolute; left: 0; } .bars::before { top: -4.5px; } .bars::after { top: 4.5px; }
.icons { gap: 4px; }
.ico { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid currentColor; border-radius: 50%; text-decoration: none; transition: background .2s, color .2s; }
.ico svg { width: 16px; height: 16px; }
.ico .txt { font: 700 10px var(--sans); letter-spacing: -.02em; }
.ico:hover, .ico:focus-visible { background: #fff; color: #000; }

/* shelf: the menu slides out from the left */
.shelf { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(360px, 86vw); padding: 24px; background: var(--tile); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .35s cubic-bezier(.2,.7,.2,1); overflow-y: auto; }
.shelf ol { list-style: none; margin: 56px 0 0; padding: 0; }
.shelf li a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font: 600 1.9rem/1.1 var(--sans); letter-spacing: -.03em; text-decoration: none; transition: color .2s, padding .2s; }
.shelf li a:hover, .shelf li a:focus-visible, .shelf li a[aria-current] { color: var(--key); padding-left: 6px; }
.shelf .num { color: var(--muted); }
.shelf-close { background: none; color: var(--fg); cursor: pointer; }
.shelf-close:hover { background: var(--fg); color: var(--bg); }
.shelf-veil { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .3s; }
.shelf-open .shelf { transform: none; }
.shelf-open .shelf-veil { opacity: 1; pointer-events: auto; }
.intro.home { padding-top: 140px; }
@media (max-width: 520px) { header { padding: 14px 16px; } .icons { gap: 2px; } .ico { width: 32px; height: 32px; } }

/* greenscreen: tracking-marker crosses behind the page heads */
.home, .page-head { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath d='M80 72v16M72 80h16' stroke='%2300d26a' stroke-width='1.5' opacity='.35'/%3E%3C/svg%3E"); background-position: center; }

/* about: everything at a glance */
.about-head { padding-bottom: 48px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); padding: 0; margin-bottom: 48px; }
.tile { background: var(--bg); padding: 22px 24px; }
.tile .label { color: var(--key); margin-bottom: 8px; }
.tile p:last-child { margin: 0; font-size: 1.02rem; line-height: 1.5; }
.tile a { text-decoration-color: var(--key); text-underline-offset: 3px; }
.about-cta { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; margin-left: 16px; margin-right: 16px; } }
.brand-home { display: flex; gap: 4px; text-decoration: none; }
.tiles { width: min(1256px, calc(100% - 64px)); }
@media (max-width: 860px) { .tiles { width: auto; } .brand-home .pill:not(.dot) { display: none; } }

/* home: one screen at 100% */
.home { min-height: 600px; height: 100svh; padding-top: 92px; padding-bottom: 28px; display: grid; grid-template-rows: 1fr auto; gap: 28px; }
.home-top { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; min-height: 0; }
.hello h1 { font: 600 clamp(2.4rem, 5vw, 4.4rem)/1.02 var(--display); letter-spacing: -.04em; margin: 12px 0 0; }
.hello .lead { font: 1.15rem/1.5 var(--serif); color: #c9c8c2; max-width: 40ch; margin: 18px 0 0; }
.hello .actions { margin-top: 24px; }
.tiles.mini { width: auto; grid-template-columns: repeat(2, 1fr); margin: 0; }
.tiles.mini .tile { padding: 14px 18px; }
.tiles.mini .tile p:last-child { font-size: .94rem; line-height: 1.4; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tab { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: clamp(110px, 20vh, 190px); padding: 16px 18px; border: 1px solid var(--line); text-decoration: none; overflow: hidden; isolation: isolate; }
.tab::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(14,15,20,.92), rgba(14,15,20,.35)), var(--img) center / cover; transition: transform .4s, filter .4s; filter: saturate(.7); }
.tab:hover::before, .tab:focus-visible::before { transform: scale(1.05); filter: saturate(1); }
.tab:hover, .tab:focus-visible { border-color: var(--key); }
.tab b { font: 600 1.35rem/1.1 var(--display); letter-spacing: -.02em; }
.tab span { color: #c9c8c2; font-size: .9rem; margin-top: 4px; }
@media (max-width: 860px) {
  .home { height: auto; min-height: 0; padding-top: 88px; }
  .home-top { grid-template-columns: 1fr; gap: 28px; }
  .tabs { grid-template-columns: 1fr 1fr; }
  .tiles.mini { grid-template-columns: 1fr; }
}

/* code-style section tags and emphasis */
.tile .label { text-transform: lowercase; letter-spacing: .02em; font-size: 12px; }
.tile .label::before { content: "<"; opacity: .6; } .tile .label::after { content: ">"; opacity: .6; }
.tile b, .lead b { color: #fff; font-weight: 600; }
.lead i { font-style: italic; color: var(--key); }
