/* Shared skeleton for round 5. Layout and motion follow Lusion (framed live hero,
   statement, a line drawn by scroll, work in large frames that open in place).
   Each direction sets the tokens below; screens use only these tokens. */
@font-face { font-family: "Shoulders"; src: url(fonts/big-shoulders-display-latin-300-normal.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Shoulders"; src: url(fonts/big-shoulders-display-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Shoulders"; src: url(fonts/big-shoulders-display-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Mono"; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* tokens: set per direction */
  --ground: #0f3b2c; --ink: #e9f2df; --soft: rgba(233,242,223,.62); --rule: rgba(233,242,223,.22);
  --accent: #e9f2df; --frame: #0b2f23; --duo-from: #e9f2df; --duo-to: #0b2f23;
  --display: "Shoulders", "Arial Narrow", sans-serif; --body: "Instrument", Georgia, serif; --mono: "Mono", ui-monospace, monospace;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 72px; --s6: 128px;
  --r-frame: 20px; --r-media: 14px;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --gutter: 24px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font: 400 16px/1.55 var(--body); background: var(--ground); color: var(--ink); overflow-x: clip; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--ground); }

/* top bar: wordmark, one line about him, two controls */
.top { position: fixed; inset: 0 0 auto 0; z-index: 30; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: start; padding: 22px var(--gutter) 0; pointer-events: none; color: var(--ink); }
.top > * { pointer-events: auto; }
.top { transition: transform .6s var(--ease-out), background-color .4s; }
.top.away { transform: translateY(-110%); }
.top.solid { background: linear-gradient(var(--ground) 70%, transparent); padding-bottom: 18px; }
.top.solid .line { opacity: 0; }
.top .line { transition: opacity .4s; }
.mark { font: 800 22px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.line { font: 400 15px/1.35 var(--body); max-width: 34ch; margin: 0; }
.controls { display: flex; gap: var(--s3); font: 500 15px/1 var(--body); }
.controls a, .controls button { all: unset; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.controls .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.controls button[aria-pressed="false"] .dot { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

/* hero: one framed live scene; the frame has its own slim bar (world switcher), the scene sits below it */
.hero { position: relative; height: 100svh; padding: 82px var(--gutter) 16px; display: flex; flex-direction: column; gap: 14px; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: var(--r-frame); overflow: hidden; background: var(--frame); transform-origin: 50% 0; }
.bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); height: 52px; padding: 0 var(--s3); border-bottom: 1px solid var(--rule); position: relative; z-index: 3; }
.bar-label { font: 400 13px/1 var(--mono); color: var(--soft); }
.view { position: relative; flex: 1; min-height: 0; }
.hero-posters { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-posters svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-posters .poster-harvest { display: none; }
html[data-world="harvest"] .poster-engraved { display: none; }
html[data-world="harvest"] .poster-harvest { display: block; }
.stage[data-scene="ready"] .hero-posters { visibility: hidden; }
.stage[data-scene="loading"] :is(canvas, .readout, .hint) { visibility: hidden; }
.stage[data-scene="loading"] :is(canvas, .readout) { opacity: 0; }
.stage[data-scene="still"] .readout { z-index: 2; padding: 8px 12px; border-radius: 6px; background: var(--frame); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.readout { position: absolute; left: var(--s3); bottom: var(--s3); font: 400 13px/1.5 var(--mono); color: var(--soft); pointer-events: none; }
.readout b { font-weight: 400; color: var(--ink); }
.readout i { font-style: normal; }
.hint { position: absolute; right: var(--s3); bottom: var(--s3); font: 400 13px/1.5 var(--mono); color: var(--soft); pointer-events: none; transition: opacity .6s; }
.now { flex: none; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: baseline; padding: 4px 4px 0; }
.now[hidden] { display: none; }
.now .tag, .now .cue { font: 400 13px/1.5 var(--mono); color: var(--soft); }
.now .cue { justify-self: end; }
.now p { margin: 0; font-size: 16px; line-height: 1.45; max-width: 90ch; }
.skip { position: fixed; left: var(--gutter); top: -60px; z-index: 60; padding: 10px 0; font: 500 15px/1 var(--body); transition: top .2s; }
.skip:focus { top: 14px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* the line scroll draws */
.thread { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.thread path { fill: none; stroke: var(--accent); stroke-linecap: round; }

/* statement */
.statement { position: relative; z-index: 2; padding: calc(var(--s6) * .6) var(--gutter) var(--s4); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s3); }
.statement h2 { grid-column: 2 / span 8; margin: 0; font: 300 clamp(40px, 5.4vw, 80px)/.98 var(--display); letter-spacing: -.005em; text-transform: uppercase; }
.statement h2 .w { display: inline-block; overflow: hidden; vertical-align: top; }
.statement h2 .w > span { display: inline-block; }
.statement p { grid-column: 2 / span 5; margin: var(--s3) 0 0; font-size: 17px; color: var(--soft); max-width: 46ch; }

/* work */
.work { position: relative; z-index: 2; padding: var(--s5) var(--gutter) var(--s6); }
.work-head span { background: var(--ground); }
.work-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--rule); padding-top: var(--s2); margin-bottom: var(--s5); font: 400 13px/1 var(--mono); color: var(--soft); }
.work-finder { position: relative; margin: calc(var(--s5) * -.45) 0 var(--s5); background: var(--ground); }
.search-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px var(--s3); align-items: center; }
.search-line label { grid-column: 1 / -1; font-size: 15px; }
.search-line input { min-width: 0; width: 100%; border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; background: var(--frame); color: var(--ink); font: 400 16px/1.4 var(--body); appearance: none; }
.search-line input::placeholder { color: var(--soft); opacity: 1; }
.clear-search, .work-empty button { font: 500 14px/1.4 var(--body); color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 12px 0; min-height: 44px; cursor: pointer; }
.filter-line { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s2); }
.work-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.work-filters button { min-height: 44px; border: 1px solid var(--rule); border-radius: 24px; padding: 10px 16px; background: var(--ground); color: var(--ink); font: 400 14px/1.4 var(--body); cursor: pointer; }
.work-filters button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.work-filters button:hover { border-color: var(--ink); }
.work-count { margin: 0; font: 400 13px/1.5 var(--mono); color: var(--soft); }
.work-empty { padding: var(--s4) 0 var(--s5); border-top: 1px solid var(--rule); }
.work-empty p { margin: 0 0 var(--s2); }
.work-list[hidden] + .more { margin-top: 0; }
.project { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s3); align-items: end; margin-bottom: var(--s6); cursor: pointer; }
.project .media { grid-column: 1 / span 8; position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-media); overflow: hidden; background: var(--frame); }
.project:nth-child(even) .media { grid-column: 5 / span 8; order: 2; }
.project:nth-child(even) .text { grid-column: 1 / span 4; order: 1; }
.project .text { grid-column: 9 / span 4; padding-bottom: var(--s1); }
.media img, .media canvas { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; object-position: top center; display: block; will-change: transform; }
.media .duo { filter: contrast(1.2) url(#duo); }
.media.portrait img { object-fit: contain; object-position: center; inset: 6% 0; height: 88%; }
.media .tint { position: absolute; inset: 0; background: var(--duo-dark); mix-blend-mode: screen; pointer-events: none; }
.media .tint2 { position: absolute; inset: 0; background: var(--duo-light); mix-blend-mode: multiply; pointer-events: none; }
.media .true { clip-path: circle(0% at var(--mx, 50%) var(--my, 50%)); transition: clip-path .9s var(--ease-out); z-index: 2; }
.project:hover .media .true { clip-path: circle(150% at var(--mx, 50%) var(--my, 50%)); }
.project .num { font: 400 13px/1 var(--mono); color: var(--soft); }
.project h3 { margin: var(--s2) 0 var(--s2); font: 500 clamp(32px, 3.2vw, 46px)/1 var(--display); text-transform: uppercase; letter-spacing: .005em; }
.project p { margin: 0 0 var(--s2); color: var(--soft); max-width: 40ch; }
.project .meta { font: 400 14px/1.5 var(--mono); color: var(--soft); }
.project .open { all: unset; cursor: pointer; display: inline-flex; gap: 10px; align-items: center; margin-top: var(--s2); font: 500 15px/1 var(--body); color: var(--ink); }
.project .open i { width: 22px; height: 1px; background: currentColor; transition: width .5s var(--ease-out); }
.project:hover .open i { width: 44px; }
.project:focus-within .media .true { clip-path: circle(150% at 50% 50%); }
.project .open:focus-visible, .row .open:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.project .meta.stack { color: var(--soft); opacity: .85; }

/* project opened in place: a case study, full width, hairlines only */
.sheet { position: fixed; inset: 0; z-index: 40; pointer-events: none; visibility: hidden; }
.sheet.on { pointer-events: auto; visibility: visible; }
.sheet .bg { position: absolute; background: var(--frame); border-radius: var(--r-media); overflow: hidden; }
.sheet .body { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 96px var(--gutter) var(--s5); opacity: 0; outline: none; }
.sheet .back { all: unset; cursor: pointer; position: fixed; top: 20px; right: var(--gutter); z-index: 2; font: 500 15px/1 var(--body); display: inline-flex; gap: 10px; align-items: center; padding: 6px 0; }
.sheet .back:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.sheet .back i { width: 22px; height: 1px; background: currentColor; transition: width .5s var(--ease-out); }
.sheet .back:hover i { width: 44px; }
.sheet .crumbs { font: 400 13px/1.5 var(--mono); color: var(--soft); margin-bottom: var(--s2); }
.sheet h2 { margin: 0; font: 300 clamp(48px, 7vw, 104px)/.95 var(--display); text-transform: uppercase; max-width: 16ch; }
.sheet .sum { font-size: 18px; line-height: 1.5; max-width: 52ch; margin: var(--s3) 0 var(--s4); }
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s3) var(--s4); margin: 0; padding-top: var(--s2); border-top: 1px solid var(--rule); }
.facts-row div { min-width: 0; }
.facts-row dt, .sheet h4 { margin: 0 0 var(--s1); font: 400 13px/1.4 var(--mono); color: var(--soft); }
.facts-row dd { margin: 0; font-size: 15px; line-height: 1.5; }
.gallery { margin: var(--s5) 0 0; display: grid; gap: var(--s4); }
.gallery figure { margin: 0; }
.gallery figcaption, .phone figcaption { margin-top: var(--s1); font: 400 13px/1.5 var(--mono); color: var(--soft); max-width: 60ch; }
.shots { display: grid; gap: var(--s3); align-items: start; }
.shots.n1 { grid-template-columns: minmax(0, 1100px); }
.shots.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot img, .shot video { display: block; width: 100%; height: auto; border-radius: var(--r-media); background: var(--ground); }
.shot.plate canvas { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-media); max-width: 1100px; }
.phones { display: flex; gap: var(--s3); align-items: flex-start; overflow-x: auto; padding-bottom: var(--s1); scroll-snap-type: x proximity; }
.phone { flex: none; scroll-snap-align: start; margin: 0; }
.phone figcaption { width: 0; min-width: 100%; margin-top: var(--s1); font: 400 13px/1.5 var(--mono); color: var(--soft); }
.phone img { display: block; height: clamp(380px, 58vh, 640px); width: auto; border-radius: 30px; box-shadow: 0 0 0 1px var(--rule); }
.case { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s3); margin-top: var(--s5); border-top: 1px solid var(--rule); padding-top: var(--s3); }
.case aside { grid-column: 1 / span 4; align-self: start; position: sticky; top: 88px; padding-right: var(--s3); }
.case aside > div + div { margin-top: var(--s4); }
.case .phones { grid-column: 9 / span 4; flex-wrap: wrap; align-self: start; position: sticky; top: 88px; overflow: visible; }
.case.phonecase .sections { grid-column: 5 / span 4; }
.case .phone img { height: clamp(300px, 46vh, 460px); }
.case aside h4 { margin-bottom: var(--s1); }
.hl { list-style: none; margin: 0; padding: 0; display: grid; }
.hl li { padding: 10px 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.45; }
.hl li:first-child { border-top: 0; padding-top: 0; }
.skills { margin: 0; color: var(--soft); font-size: 15px; }
.sections { grid-column: 5 / span 7; display: grid; gap: var(--s4); align-content: start; align-self: start; }
.sections section { max-width: 64ch; }
.sections p, .sections li { margin: 0 0 var(--s2); font-size: 16px; line-height: 1.6; }
.sections ul { margin: 0 0 var(--s2); padding-left: 1.1em; }
.sections code { font: 400 14px/1 var(--mono); color: var(--ink); }
.out { margin-top: var(--s5); border-top: 1px solid var(--rule); }
.live { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--rule); text-decoration: none; font: 500 clamp(24px, 2.8vw, 40px)/1.05 var(--display); text-transform: uppercase; }
.live i { font-style: normal; transition: transform .5s var(--ease-out); }
.live:hover i { transform: translate(6px, -6px); }
.live:focus-visible { outline-offset: -2px; }
.nolive { display: block; padding: var(--s2) 0; color: var(--soft); border-bottom: 1px solid var(--rule); }
.next { all: unset; cursor: pointer; box-sizing: border-box; display: grid; grid-template-columns: 1fr auto; gap: 0 var(--s3); align-items: end; width: 100%; margin-top: var(--s6); padding: var(--s3) 0 0; }
.next span { grid-column: 1; font: 400 13px/1 var(--mono); color: var(--soft); margin-bottom: var(--s1); }
.next b { grid-column: 1; font: 300 clamp(36px, 5.5vw, 80px)/1 var(--display); text-transform: uppercase; transition: transform .6s var(--ease-out); }
.next i { grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 1px; background: currentColor; margin-bottom: 18px; transition: width .5s var(--ease-out); }
.next:hover b { transform: translateX(10px); } .next:hover i { width: 88px; }
.next:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }

/* about + contact */
.about { position: relative; z-index: 2; padding: var(--s5) var(--gutter); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s5) var(--s4); border-top: 1px solid var(--rule); }
.about .label { grid-column: 1 / -1; font: 400 13px/1.5 var(--mono); color: var(--soft); margin-bottom: calc(var(--s3) * -1); }
.about .story { grid-column: 1 / span 6; grid-row: 2; }
.about .story p { margin: 0 0 var(--s2); font-size: 17px; line-height: 1.55; max-width: 58ch; }
.about .story p:first-child { font-size: 22px; line-height: 1.4; max-width: 40ch; }
.about h4 { margin: 0 0 var(--s1); font: 400 13px/1.4 var(--mono); color: var(--soft); }
.about .facts { grid-column: 8 / -1; grid-row: 2; display: grid; gap: var(--s3); align-self: start; }
.about .facts p { margin: 0; font-size: 15px; line-height: 1.55; }
.about .elsewhere { grid-column: 8 / span 5; grid-row: 3; align-self: start; }
.about .elsewhere a { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--rule); text-decoration: none; font-size: 15px; }
.about .elsewhere a:last-child { border-bottom: 1px solid var(--rule); }
.about .elsewhere i { font-style: normal; transition: transform .4s var(--ease-out); }
.about .elsewhere a:hover i { transform: translate(4px, -4px); }
.contact { position: relative; z-index: 2; padding: var(--s6) var(--gutter) var(--s4); }
.contact .ask { font: 400 13px/1 var(--mono); color: var(--soft); }
.contact a.email { display: inline-block; margin-top: var(--s2); font: 300 clamp(40px, 7.5vw, 112px)/1 var(--display); text-transform: lowercase; text-decoration: none; }
.contact a.email span { display: inline-block; transition: transform .6s var(--ease-out); }
.contact a.email:hover span { transform: translateY(-6%); }
.reach { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s3); font-size: 15px; }
.reach a { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.reach a:hover { border-color: currentColor; }
.colophon { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; border-top: 1px solid var(--rule); margin-top: var(--s5); padding-top: var(--s2); font: 400 12.5px/1.6 var(--mono); color: var(--soft); }
.colophon a { color: var(--soft); }

/* reveal */
.motion-ready [data-rise] { opacity: 0; transform: translateY(28px); }

/* two worlds, one page: the switcher is the frame's own bar; the ink follows it */
.worlds { display: flex; gap: var(--s4); font: 500 15px/1 var(--body); color: var(--ink); }
.worlds button { all: unset; cursor: pointer; display: inline-flex; gap: 10px; align-items: center; padding: 14px 0; min-height: 20px; border-bottom: 1px solid transparent; margin-bottom: -1px; }
.worlds button .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; transition: background-color .3s, box-shadow .3s; }
.worlds button[aria-pressed="false"] { color: var(--soft); }
.worlds button[aria-pressed="false"] .dot { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.worlds button[aria-pressed="true"] { border-bottom-color: var(--ink); }
.worlds button:hover { color: var(--ink); }
.worlds button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 2px; }
.stage canvas { transition: opacity .38s var(--ease-inout); }
.readout { transition: opacity .38s var(--ease-inout); }
html[data-world], html[data-world] body { transition: background-color .8s var(--ease-inout), color .8s var(--ease-inout); }
html[data-world] .stage { transition: background-color .8s var(--ease-inout); }
html[data-world="engraved"] { --ground: #0d3a2a; --frame: #0a3021; --ink: #e8f0dc; --soft: rgba(232,240,220,.7); --rule: rgba(232,240,220,.2); --accent: #e8f0dc; --duo-from: #e8f0dc; --duo-to: #0a3021; --mark: #e8f0dc; }
html[data-world="harvest"] { --ground: #141412; --frame: #1d1c1a; --ink: #efe9de; --soft: rgba(239,233,222,.68); --rule: rgba(239,233,222,.16); --accent: #ff5b1f; --duo-from: #e6dfd2; --duo-to: #1d1c1a; --mark: #ff5b1f; }
html[data-world] .mark { color: var(--mark); transition: color .8s var(--ease-inout); }
@media (max-width: 760px) { .worlds { gap: var(--s3); font-size: 15px; } .worlds button { padding: 16px 0; } }
@media (prefers-reduced-motion: reduce) {
  .stage canvas, .readout, html[data-world], html[data-world] body, html[data-world] .stage, .skip { transition: none; }
  html[data-world] .mark, html[data-world] .row, .row h4, .next b, .live i, .project .open i, .row .open i { transition: none; }
  .row:hover h4, .next:hover b { transform: none; }
}

/* the rest of the work: index rows, so the list scales past a handful of frames */
.more { position: relative; z-index: 2; margin: calc(var(--s5) * -.4) 0 0; }
.more-head { background: var(--ground); display: flex; justify-content: space-between; padding: 0 0 var(--s2); font: 400 13px/1 var(--mono); color: var(--soft); }
.row { background: var(--ground); transition: background-color .8s var(--ease-inout); display: grid; grid-template-columns: 176px minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr) 56px; gap: var(--s3); align-items: center; padding: 16px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.row:last-child { border-bottom: 1px solid var(--rule); }
.row .cat { font: 400 13px/1.6 var(--mono); color: var(--soft); }
.row .thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--frame); }
.row .thumb img, .row .thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.row .thumb img { filter: contrast(1.2) url(#duo); transition: filter .5s var(--ease-out), transform .8s var(--ease-out); }
.row:hover .thumb img { filter: none; transform: scale(1.04); }
.row h4 { margin: 0; font: 500 clamp(26px, 2.6vw, 38px)/1 var(--display); text-transform: uppercase; transition: transform .6s var(--ease-out); }
.row:hover h4 { transform: translateX(10px); }
.row p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); }
.row .open { all: unset; cursor: pointer; justify-self: end; align-self: center; padding: 8px 0; }
.row .open i { display: block; width: 22px; height: 1px; background: var(--ink); transition: width .5s var(--ease-out); }
.row:hover .open i { width: 44px; }
.row .open:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

@media (max-width: 760px) {
  .search-line { grid-template-columns: 1fr; }
  .search-line .clear-search { justify-self: start; }
  .hint { display: none; }
  .thread { display: none; }
  :root { --gutter: 16px; --s5: 48px; --s6: 88px; }
  .top { grid-template-columns: 1fr auto; padding-top: 16px; gap: var(--s2); }
  .top .line { display: none; }
  .mark { font-size: 20px; }
  .controls { gap: var(--s2); font-size: 14px; }
  .hero { padding-top: 56px; height: auto; gap: 12px; padding-bottom: 8px; }
  .stage { flex: none; height: min(calc(100svh - 56px - 110px), 640px); min-height: 440px; border-radius: 16px; }
  .bar { height: 48px; padding: 0 var(--s2); }
  .now { grid-template-columns: 1fr; gap: 4px; padding-top: 0; }
  .now .cue { display: none; }
  .statement { grid-template-columns: 1fr; padding-top: var(--s5); }
  .statement h2, .statement p { grid-column: 1; }
  .project, .project:nth-child(even) { grid-template-columns: 1fr; margin-bottom: var(--s5); }
  .project .media, .project:nth-child(even) .media, .project .text, .project:nth-child(even) .text { grid-column: 1; order: 0; }
  .project .media .true { display: none; }
  .row { grid-template-columns: 112px minmax(0, 1fr) 28px; gap: 6px var(--s2); padding: 14px 0; align-items: start; }
  .row .thumb { grid-row: 1 / span 3; }
  .row h4, .row .cat { grid-column: 2; }
  .row p { grid-column: 2 / -1; }
  .row .open { grid-column: 3; grid-row: 1; }
  .row h4 { font-size: 26px; }
  .sheet .body { padding-top: 80px; }
  .facts-row { grid-template-columns: 1fr 1fr; gap: var(--s2); }
  .shots.n2 { grid-template-columns: 1fr; }
  .phone img { height: min(56vh, 460px); border-radius: 24px; }
  .case { grid-template-columns: 1fr; gap: var(--s4); }
  .case aside, .sections, .case .phones, .case.phonecase .sections { grid-column: 1; position: static; padding-right: 0; }
  .case .phones { flex-wrap: wrap; overflow-x: visible; }
  .about { grid-template-columns: 1fr; gap: var(--s4); }
  .about .label, .about .story, .about .elsewhere, .about .facts { grid-column: 1; grid-row: auto; }
  .about .label { margin-bottom: 0; }
  .about .story p:first-child { font-size: 19px; }
  .about .facts { grid-template-columns: 1fr; gap: var(--s3); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .case aside { grid-column: 1 / span 12; position: static; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .case aside > div + div { margin-top: 0; }
  .case .phones, .case.phonecase .sections { grid-column: 1 / span 12; position: static; }
  .sections { grid-column: 1 / span 12; }
  .about .story, .about .facts, .about .elsewhere { grid-column: 1 / span 12; grid-row: auto; }
  .row { grid-template-columns: 140px 1fr 1fr 40px; } .row .cat { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-rise] { opacity: 1; transform: none; }
  .media .true { transition: none; }
}

.sheet .num { line-height: 1.5; margin-bottom: var(--s2); }


/* The page index and chapters follow the grain and type of the two worlds. */
.portfolio-nav {
  position: relative;
  z-index: 2;
  margin: 0 var(--gutter) var(--s3);
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(16px, 3vw, 50px);
  border-block: 1px solid var(--rule);
}
.portfolio-nav a, .work-head a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
}
.work-head { align-items: center; column-gap: 16px; }
.work-head > span:nth-child(2) { margin-left: auto; }
.work-head a { color: var(--ink); }
.more-head, .chapter > h2 {
  margin: 0;
  color: var(--ink);
  font: 500 clamp(32px, 4vw, 54px)/.99 var(--display);
  text-transform: uppercase;
}
.work-group { margin-top: var(--s4); }
.work-group > h3 {
  margin: 0 0 var(--s2);
  color: var(--ink);
  font: 500 23px/1.1 var(--display);
  text-transform: uppercase;
}
.work-group .row:last-child { border-bottom: 0; }
.now .tag time { display: block; }

.chapter {
  position: relative;
  z-index: 2;
  margin: 0 var(--gutter);
  padding: var(--s4) 0 var(--s5);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(0, 3fr);
  gap: var(--s4);
}
.chapter h3, .chapter h4 { margin: 0; line-height: 1.2; }
.chapter h3 { font-size: 21px; font-weight: 500; }
.chapter h4 { font-size: 16px; font-weight: 500; }
.chapter p { max-width: 58ch; margin: .35em 0 0; }
.chapter .dates, .chapter time, .course-code {
  color: var(--soft);
  font: 400 13px/1.5 var(--mono);
}
.chapter time { display: block; margin-bottom: 6px; }
.chapter :is(article, .term ol > li), #more-results, #work, #about { scroll-margin-top: 86px; }
.chapter, .skill-index details { scroll-margin-top: 86px; }
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  list-style: none;
  margin: 5px 0 0;
  padding: 0;
}
.related li { min-width: 0; max-width: 100%; }
.related :is(a, button) {
  display: inline-flex;
  max-width: 100%;
  box-sizing: border-box;
  align-items: center;
  min-height: 34px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 14px/1.35 var(--body);
  text-align: left;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: .24em;
  cursor: pointer;
}
.related :is(a, button):hover { color: var(--accent); }
.related :is(a, button):focus-visible, .portfolio-nav a:focus-visible, .skill-index summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.goals-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4) clamp(20px, 5vw, 76px);
}
.goals-list article:first-child { grid-column: 1 / -1; padding-bottom: var(--s3); border-bottom: 1px solid var(--rule); }
.goals-list article:first-child h3 { font: 500 clamp(26px, 3vw, 42px)/1 var(--display); text-transform: uppercase; }
.timeline, .term ol { margin: 0; padding: 0; list-style: none; }
.timeline > li { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 4px var(--s3); padding: 0 0 var(--s3); }
.timeline > li + li { border-top: 1px solid var(--rule); padding-top: var(--s3); }
.timeline .affiliation { margin-top: 3px; color: var(--soft); }
.timeline .progression { margin-top: .65em; font-size: 14px; }
.learning-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: var(--s4); }
.schools { display: grid; align-content: start; gap: var(--s3); }
.term { padding-left: var(--s3); border-left: 1px solid var(--rule); }
.term ol { margin-top: var(--s2); }
.term ol > li { display: grid; grid-template-columns: 7.25em minmax(0, 1fr); gap: 3px 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.term ol > li p { color: var(--soft); font-size: 14px; }
.connections-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) clamp(20px, 4vw, 64px); }
.connections-list article:first-child { grid-column: 1 / -1; }
.curiosity-list { columns: 2; column-gap: clamp(20px, 5vw, 76px); }
.curiosity-list article { break-inside: avoid; margin: 0 0 var(--s3); }
.skill-index { column-count: 2; column-gap: var(--s4); }
.skill-index details { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.skill-index summary { padding: 10px 0; cursor: pointer; }
.skill-index .related { margin: 0 0 8px; padding-left: 14px; }
.sheet .related { margin-top: 0; gap: 0 12px; }
.sheet .related :is(a, button) { min-height: 36px; }

@media (min-width: 761px) and (max-width: 1050px) {
  .learning-body { grid-template-columns: minmax(0, 1fr); }
  .term { border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  .portfolio-nav { gap: 0 20px; }
  .work-head { flex-wrap: wrap; }
  .now .tag time { display: inline; margin-left: .5em; }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .chapter > h2 { font-size: 38px; }
  .goals-list, .learning-body, .connections-list, .timeline > li { grid-template-columns: minmax(0, 1fr); }
  .goals-list, .connections-list { gap: var(--s3); }
  .curiosity-list, .skill-index { columns: auto; }
  .term { border-left: 0; padding-left: 0; }
  .term ol > li { grid-template-columns: 88px minmax(0, 1fr); }
  .related :is(a, button), .sheet .related :is(a, button) { min-height: 44px; }
}

/* Source-backed course completions alongside education. */
.completed-courses ul { list-style: none; margin: 8px 0 0; padding: 0; }
.completed-courses li { padding: 12px 0; border-top: 1px solid var(--rule); }
.completed-courses a { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); text-underline-offset: .24em; overflow-wrap: anywhere; }
.completed-courses p { color: var(--soft); font: 400 13px/1.6 var(--mono); }
.completed-courses time { display: inline; }
.row .text-thumb { display: grid; place-items: center; height: 100%; padding: 5px; color: var(--soft); font: 400 10px/1.4 var(--mono); text-align: center; overflow-wrap: anywhere; }
.project-status { display: grid; place-items: center; height: 100%; color: var(--soft); font: 400 18px/1.5 var(--mono); }

/* A compact entry through questions complements the dated goals below. */
.explorations { position: relative; z-index: 2; padding: var(--s4) var(--gutter) var(--s3); scroll-margin-top: 86px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); background: var(--ground); }
.section-heading h2 { margin: 0; font: 500 28px/1.15 var(--display); }
.section-heading > p { margin: 0; font: 400 13px/1.5 var(--mono); color: var(--soft); }
.direction-layout { display: grid; grid-template-columns: minmax(200px, 3fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); max-width: 1320px; background: var(--ground); }
.direction-picker { align-self: start; display: grid; }
.direction-picker button { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); width: 100%; min-height: 54px; padding: 14px 12px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--soft); cursor: pointer; font: 500 16px/1.35 var(--body); text-align: left; }
.direction-picker button > .diagonal-arrow { opacity: 0; }
.direction-picker button:hover { color: var(--ink); }
.direction-picker button[aria-pressed="true"] { color: var(--ground); background: var(--ink); border-radius: 6px; }
.direction-picker button[aria-pressed="true"] > .diagonal-arrow { opacity: 1; }
.direction-panel { min-width: 0; min-height: 360px; max-width: 800px; }
.eyebrow, .direction-panel h4, .related-work h3, .project-invitation h3 { display: block; margin: 0 0 10px; font: 400 13px/1.5 var(--mono); color: var(--soft); }
.direction-panel h3 { margin: 0; font: 500 clamp(28px, 3vw, 40px)/1.12 var(--display); max-width: 33ch; }
.direction-summary { margin: var(--s2) 0 var(--s3); max-width: 65ch; color: var(--soft); }
.direction-goal { border-left: 2px solid var(--accent); padding-left: var(--s2); margin: 0 0 var(--s3); }
.direction-goal p { margin: 0; max-width: 62ch; }
.direction-work { margin-bottom: var(--s2); }
.direction-work .related { gap: 0 var(--s2); }
.related button { gap: 7px; }
.related button > span:first-child { min-width: 0; }
.conversation-link, .project-invitation a { display: inline-block; max-width: 100%; font: 500 15px/1.5 var(--body); text-decoration-thickness: 1px; text-underline-offset: 5px; padding: 8px 0; }
.related-work, .project-invitation { margin-top: var(--s4); max-width: 80ch; }
.project-invitation { border-top: 1px solid var(--rule); padding-top: var(--s3); }
.project-invitation p { margin: 0 0 var(--s1); font-size: 16px; line-height: 1.6; }
.about .building-note { border-top: 1px solid var(--rule); padding-top: var(--s3); margin-top: var(--s3); }
.about .building-note p { font-size: 15px; color: var(--soft); }
.timeline .experience-connection { margin-top: .8em; font-size: 15px; color: var(--soft); }
.contact .ask { max-width: 72ch; font: 400 16px/1.55 var(--body); color: var(--soft); }
.controls a:focus-visible, .controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* Unpictured work has a text entry, never an invented activity graphic. */
.row.text-only { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr) 56px; }
.project-note { display: flex; flex-direction: column; justify-content: center; height: 100%; padding: clamp(24px, 5vw, 64px); }
.project-note > span { font: 400 14px/1.5 var(--mono); color: var(--soft); }
.project-note > p { color: var(--ink); font: 500 clamp(32px, 4vw, 60px)/1.1 var(--display); margin: var(--s2) 0; }
/* The current ink draws these decorative arrows independently of font coverage. */
.diagonal-arrow { position: relative; display: inline-block; flex: 0 0 14px; width: 14px; height: 14px; font-size: 0; vertical-align: middle; }
.diagonal-arrow::before { content: ''; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; }
.diagonal-arrow::after { content: ''; position: absolute; top: 2px; right: 2px; width: 14px; height: 1px; background: currentColor; transform: rotate(-45deg); transform-origin: right center; }
@media (max-width: 760px) {
  .section-heading { display: block; }
  .section-heading > p { margin-top: 10px; }
  .direction-layout { grid-template-columns: 1fr; gap: var(--s3); }
  .direction-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .direction-picker button { min-height: 56px; border: 1px solid var(--rule); border-radius: 6px; font-size: 14px; padding: 12px; }
  .direction-picker button > .diagonal-arrow { display: none; }
  .direction-panel { min-height: 0; }
  .row.text-only { grid-template-columns: minmax(0, 1fr) 28px; }
  .row.text-only h4, .row.text-only .cat { grid-column: 1; }
  .row.text-only p { grid-column: 1 / -1; }
  .row.text-only .open { grid-column: 2; grid-row: 1; }
  .facts-row > div:first-child { grid-column: 1 / -1; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .row.text-only { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; }
  .direction-layout { grid-template-columns: minmax(180px, 3fr) minmax(0, 7fr); gap: var(--s4); }
}
