/* One Man Studio, v6 "The Studio Zine".
   Layout: a magazine. Full-bleed colour blocks per page, a masthead, folios, a horizontal contents page,
   and one feature spread per project in its brand colour. Instrument Serif for display, Schibsted Grotesk for text. */

:root {
  --paper: #fbf8f1;
  --ink: #14110d;
  --coral: #ff5a4e;
  --cobalt: #1f3cff;
  --mustard: #f2b705;
  --mint: #64e3b2;

  --bg: var(--paper);
  --fg: var(--ink);
  --rule: var(--ink);
  --mute: #6b655a;
  --field: #f1ece1;
  /* Fixed values for text on colour blocks, which stay the same in both schemes */
  --black: #14110d;
  --white: #fbf8f1;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: .95; letter-spacing: -.02em; text-wrap: balance; }
h1 em, h2 em, h3 em { font-style: italic; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
::selection { background: var(--mustard); color: var(--black); }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.folio { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.folio em { font-style: normal; opacity: .5; padding-inline: .3em; }
.dek { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.45; max-width: 52ch; }
.note { font-size: 14px; color: var(--mute); }
.note.hint { margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
  background: var(--black); color: var(--white); border: 3px solid var(--black); border-radius: 0;
  font: 800 14px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn[disabled] { opacity: .6; cursor: progress; }
.paper .btn { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- Masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 50; background: var(--bg); color: var(--fg); border-bottom: 3px solid var(--rule); }
.masthead .wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px; min-height: 88px; }
.masthead .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--serif); font-size: 34px; letter-spacing: -.01em; white-space: nowrap; }
.masthead .brand img { height: 38px; width: auto; }
.masthead nav { display: flex; align-items: center; gap: 4px 22px; flex-wrap: wrap; justify-content: flex-end; }
.masthead nav a { font-size: 16px; font-weight: 600; text-decoration: none; padding: 4px 0; border-bottom: 3px solid transparent; }
.masthead nav a:hover, .masthead nav a.hot { border-bottom-color: var(--coral); }
@media (max-width: 960px) {
  .masthead .wrap { grid-template-columns: 1fr; gap: 8px; padding-block: 14px; min-height: 0; }
  .masthead .brand { font-size: 28px; }
  .masthead .brand img { height: 32px; }
  .masthead nav { justify-content: flex-start; gap: 4px 16px; }
  .masthead nav a { font-size: 15px; }
}

/* ---------- Colour blocks ---------- */
.block { padding-block: clamp(56px, 8vw, 120px); }
.block + .block { border-top: 3px solid var(--rule); }
.coral { background: var(--coral); color: var(--black); --rule: var(--black); }
.cobalt { background: var(--cobalt); color: var(--white); --rule: var(--white); }
.mustard { background: var(--mustard); color: var(--black); --rule: var(--black); }
.mint { background: var(--mint); color: var(--black); --rule: var(--black); }
.paper { background: var(--bg); color: var(--fg); }
.brand.block, .block.brand { background: var(--brand); color: var(--on-brand); --rule: var(--on-brand); }
.page-head { margin-bottom: clamp(32px, 5vw, 64px); display: grid; gap: 14px; }
.page-head h2 { font-size: clamp(42px, 7vw, 108px); }
.page-head.split { grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 700px) { .page-head.split { grid-template-columns: 1fr; } }

/* ---------- Cover ---------- */
.cover { padding-block: clamp(40px, 6vw, 80px) clamp(32px, 5vw, 64px); position: relative; overflow: hidden; }
.cover .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); grid-template-rows: auto auto; gap: clamp(24px, 4vw, 56px) clamp(24px, 4vw, 64px); align-items: start; }
.cover-copy { display: grid; gap: 24px; align-content: start; }
.cover h1 { font-size: clamp(56px, 9vw, 150px); }
.cover-art { grid-column: 2; grid-row: 1 / 3; margin: 0; position: relative; background: var(--paper); border: 3px solid var(--black); aspect-ratio: 4 / 5; max-width: 480px; justify-self: end; width: 100%; }
.cover-art img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.cover-art figcaption { position: absolute; left: -3px; bottom: 28px; background: var(--mustard); color: var(--black); border: 3px solid var(--black); padding: 8px 12px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.cover-art .dot { position: absolute; right: -14px; top: -14px; width: 104px; height: 104px; border-radius: 50%; background: var(--mint); color: var(--black); border: 3px solid var(--black); display: grid; place-items: center; text-align: center; font-family: var(--serif); font-size: 24px; line-height: .95; transform: rotate(8deg); }
.cover-lines { list-style: none; margin: 0; padding: 20px 0 0; border-top: 3px solid var(--black); display: grid; gap: 8px; font-size: 15px; }
.cover-lines a { text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .2s; }
.cover-lines a span { display: inline-block; transition: transform .2s ease; }
.cover-lines a:hover { border-bottom-color: currentColor; }
.cover-lines a:hover span { transform: translateX(4px); }
.price { grid-column: 1 / -1; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; border-top: 3px solid var(--black); padding-top: 14px; }
.price em { font-style: normal; opacity: .5; padding-inline: .3em; }
@media (max-width: 860px) {
  .cover .wrap { grid-template-columns: 1fr; }
  .cover-art { grid-column: 1; grid-row: auto; justify-self: start; max-width: 360px; }
}

/* ---------- The editor ---------- */
.interview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 64px); }
.qa { display: grid; gap: 10px; border-top: 3px solid var(--rule); padding-top: 18px; }
.q { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.05; letter-spacing: -.01em; }
.q::before { content: "Q. "; color: var(--coral); }
.a { font-size: 17px; max-width: 60ch; }
.a::before { content: "A. "; font-weight: 800; }
.figures { list-style: none; margin: clamp(40px, 6vw, 80px) 0 32px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 3px solid var(--rule); border-bottom: 3px solid var(--rule); }
.figures li { padding: 20px 20px 18px 0; display: grid; gap: 4px; }
.figures li + li { border-left: 3px solid var(--rule); padding-left: 20px; }
.figures b { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 8vw, 128px); line-height: .85; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.figures sup { font-size: .4em; vertical-align: top; color: var(--coral); }
.figures li > span { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
@media (max-width: 700px) { .figures li:nth-child(3) { border-left: 0; padding-left: 0; border-top: 3px solid var(--rule); } .figures li:nth-child(4) { border-top: 3px solid var(--rule); } }

/* ---------- Features ---------- */
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0; border-top: 3px solid var(--rule); }
.columns article { padding: 24px 24px 28px 0; display: grid; gap: 14px; align-content: start; }
.columns article + article { border-left: 3px solid var(--rule); padding-left: 24px; }
.columns h3 { font-size: clamp(30px, 3vw, 44px); }
.columns p { font-size: 16px; }
.columns p::first-letter { font-family: var(--serif); font-size: 3.2em; float: left; line-height: .8; padding: .08em .12em 0 0; }
@media (max-width: 1040px) { .columns article:nth-child(3) { border-left: 0; padding-left: 0; } .columns article:nth-child(n+3) { border-top: 3px solid var(--rule); } }
@media (max-width: 540px) { .columns article + article { border-left: 0; padding-left: 0; border-top: 3px solid var(--rule); } }
.clients { margin-top: clamp(40px, 6vw, 80px); display: grid; gap: 14px; }
.clients ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.2em; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 34px); line-height: 1.3; }
.clients li::after { content: ","; }
.clients li:last-child::after { content: "."; }

/* ---------- Contents ---------- */
.sections { display: flex; flex-wrap: wrap; gap: 0 22px; border-top: 3px solid var(--black); border-bottom: 3px solid var(--black); padding: 10px 0; margin-bottom: 32px; }
.sections button { background: none; border: 0; padding: 6px 0; font: 800 13px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--black); cursor: pointer; border-bottom: 3px solid transparent; }
.sections button sup { font-weight: 600; font-size: 10px; opacity: .6; margin-left: 2px; }
.sections button:hover, .sections button[aria-pressed="true"] { border-bottom-color: var(--black); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--paper); color: var(--black); text-decoration: none; border: 3px solid var(--black); border-top: 10px solid var(--brand); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 6px 6px 0 var(--black); }
.card .shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand); border-bottom: 3px solid var(--black); }
.card .shot img:first-child { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .shot img:first-child { transform: scale(1.03); }
.card .badge { position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; object-fit: cover; border: 3px solid var(--black); background: #fff; }
.card-body { padding: 16px 18px 20px; display: grid; gap: 8px; flex: 1; align-content: start; }
.card h3 { font-size: 34px; }
.card .meta { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6b655a; }
.card .meta em { font-style: normal; opacity: .6; padding-inline: .2em; }
.card .story { font-size: 15px; line-height: 1.5; }
.card .more { margin-top: auto; padding-top: 12px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 3px; text-decoration-color: var(--brand); }
.card[hidden] { display: none; }
.more-wrap { display: flex; justify-content: center; margin-top: clamp(28px, 4vw, 44px); }
.more-wrap[hidden] { display: none; }

/* ---------- The Lab ---------- */
#lab .page-head .dek { margin-top: 4px; }
.lab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 32px); }
@media (max-width: 1000px) { .lab { grid-template-columns: 1fr; } }
.lab-card.rent { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; grid-template-rows: auto; align-items: center; column-gap: clamp(20px, 3vw, 40px); }
.lab-card.rent .folio { grid-column: 1 / -1; }
.lab-card.rent h3 { font-size: clamp(36px, 3.4vw, 48px); }
@media (max-width: 760px) { .lab-card.rent { grid-template-columns: 1fr; } }
.lab-card { display: grid; gap: 14px; align-content: start; grid-template-rows: auto auto 1fr auto; padding: clamp(22px, 2.6vw, 32px); text-decoration: none; border: 3px solid var(--black); box-shadow: 8px 8px 0 var(--black); transition: transform .2s ease, box-shadow .2s ease; }
.lab-card:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 12px 12px 0 var(--black); }
.lab-card h3 { font-size: clamp(42px, 4.4vw, 64px); }
.lab-card p { font-size: 15.5px; }
.lab-card .btn { justify-self: start; pointer-events: none; }
.lab-card.coral .btn, .lab-card.paper .btn { background: var(--black); color: var(--white); border-color: var(--black); }
.lab-card.cobalt .btn { background: var(--white); color: var(--black); border-color: var(--white); }
.lab-card.rent { background: transparent; color: var(--black); border-style: dashed; box-shadow: none; }
.lab-card.rent:hover { background: var(--paper); box-shadow: 8px 8px 0 var(--black); }
.lab-card.rent .btn { background: transparent; color: var(--black); border-color: var(--black); }

/* ---------- Letters ---------- */
.letters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.letters h2 { font-size: clamp(64px, 10vw, 160px); margin: 10px 0 18px; }
.directory { margin: 32px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 15px; border-top: 3px solid var(--rule); padding-top: 18px; }
.directory dt { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding-top: 3px; }
.directory dd { margin: 0; }
.directory a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
.form { display: grid; gap: 20px; border-top: 3px solid var(--rule); padding-top: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field span { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fg); }
.field input, .field textarea { width: 100%; font: 400 17px/1.4 var(--sans); padding: 12px 14px; color: var(--fg); background: var(--field); border: 3px solid var(--rule); border-radius: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
.field input::placeholder, .field textarea::placeholder { color: var(--mute); opacity: 1; }
.field input:hover, .field textarea:hover { background: #fff; }
.field input:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--coral); box-shadow: 5px 5px 0 var(--coral); }
.field textarea { resize: vertical; min-height: 160px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { font-size: 14px; padding: 10px 12px; border: 3px solid var(--rule); }
.status.ok { background: var(--mint); color: var(--black); border-color: var(--black); }
.status.err { background: var(--coral); color: var(--black); border-color: var(--black); }
@media (max-width: 860px) { .letters { grid-template-columns: 1fr; } .row2 { grid-template-columns: 1fr; } }

/* ---------- Footer animation ---------- */
.finale { border-top: 3px solid var(--rule); overflow: hidden; }
.finale [hidden] { display: none !important; }
.finale-caption { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; text-align: center; padding: 0 16px 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.finale-caption em { font-style: normal; opacity: .5; padding-inline: .3em; }
/* The night shift */
.night { background: radial-gradient(1px 1px at 12% 22%, #fff8 50%, transparent), radial-gradient(1px 1px at 82% 30%, #fff8 50%, transparent), radial-gradient(1.5px 1.5px at 64% 12%, #fff9 50%, transparent), radial-gradient(1px 1px at 30% 60%, #fff6 50%, transparent), radial-gradient(1px 1px at 92% 70%, #fff6 50%, transparent), #14110d; color: var(--white); padding-top: 24px; }
.night-scene { position: relative; width: min(560px, 100%); margin-inline: auto; aspect-ratio: 2 / 1; }
.night-scene svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bulb-glow { animation: flicker 6s infinite steps(1); transform-origin: 150px 36px; }
@keyframes flicker { 0%, 61%, 64%, 66%, 100% { opacity: 1; } 62%, 65% { opacity: .15; } 63% { opacity: .7; } }
.screen-light { animation: screen 2.4s ease-in-out infinite alternate; }
@keyframes screen { from { opacity: .6; } to { opacity: 1; } }
.arm-a { animation: type .32s ease-in-out infinite alternate; }
.arm-b { animation: type .32s ease-in-out infinite alternate-reverse; }
@keyframes type { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.head { animation: nod 4s ease-in-out infinite; transform-origin: 126px 100px; }
@keyframes nod { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(6deg); } 90% { transform: rotate(-2deg); } }
.steam { animation: steam 3s ease-in-out infinite; opacity: 0; }
.steam.s2 { animation-delay: 1.5s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .7; } 100% { opacity: 0; transform: translateY(-10px); } }
.finale:not(.on) .night-scene * { animation-play-state: paused; }
.tokens { position: absolute; inset: 0; pointer-events: none; }
.token { position: absolute; left: 70%; top: 50%; display: grid; place-items: center; animation: rise 3.6s cubic-bezier(.3,.6,.4,1) forwards; }
.token > * { grid-area: 1 / 1; }
.token code { font: 700 13px/1 ui-monospace, "SF Mono", Menlo, monospace; color: #9fd8ff; white-space: nowrap; animation: out 3.6s linear forwards; }
.token img { width: 36px; height: 36px; border: 2px solid var(--white); background: #fff; opacity: 0; animation: in 3.6s linear forwards; }
@keyframes rise { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(var(--dx), -190px) rotate(var(--rot)) scale(1); opacity: 0; } }
@keyframes out { 0%, 40% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes in { 0%, 42% { opacity: 0; transform: scale(.4); } 54% { opacity: 1; transform: scale(1.15); } 62%, 100% { opacity: 1; transform: scale(1); } }
/* Bug hunt */
.bugs { background: var(--mustard); color: var(--black); }
.bug-field { position: relative; height: 220px; }
.bug { position: absolute; left: 0; top: 0; width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: crosshair; will-change: transform; }
.bug svg { width: 100%; height: 100%; display: block; transition: transform .25s cubic-bezier(.3,1.6,.5,1), opacity .4s; }
.finale.on .bug:not(.fixed) .legs { animation: legs .18s steps(2) infinite; }
@keyframes legs { to { transform: translateY(1.2px); } }
.bug:hover svg { transform: scale(1.15); }
.bug.fixed { cursor: default; }
.bug.fixed svg { transform: scale(1.4, .25); opacity: 0; }
.bug .tick { position: absolute; inset: 0; display: grid; place-items: center; font: 800 30px/1 var(--sans); color: #0e7a4a; animation: tick 1.4s ease forwards; }
@keyframes tick { 0% { transform: scale(0) rotate(-30deg); } 20% { transform: scale(1.3) rotate(0); } 35%, 75% { transform: scale(1); opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }
.spark { position: absolute; width: 8px; height: 8px; background: var(--coral); border: 2px solid var(--black); pointer-events: none; }
.spark:nth-child(odd) { background: var(--mint); border-radius: 50%; }
.bug-count b { font-variant-numeric: tabular-nums; }

/* ---------- Colophon ---------- */
.colophon { border-top: 3px solid var(--rule); background: var(--bg); color: var(--fg); padding-block: 40px 56px; }
.colophon .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 24px 48px; align-items: start; }
.colophon h2 { font-size: 30px; margin-bottom: 8px; }
.colophon p { font-size: 15px; max-width: 60ch; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.colophon .fine { grid-column: 1 / -1; font-size: 12px; color: var(--mute); border-top: 3px solid var(--rule); padding-top: 14px; }
@media (max-width: 700px) { .colophon .wrap { grid-template-columns: 1fr; } }

/* ---------- Project page ---------- */
.proj-head { padding-block: clamp(28px, 4vw, 48px) clamp(32px, 4vw, 56px); }
.back { text-decoration: none; margin-bottom: 24px; display: inline-block; border-bottom: 2px solid currentColor; }
.proj-head h1 { font-size: clamp(52px, 8vw, 128px); }
.proj-head .meta { margin-top: 18px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.proj-head .meta em { font-style: normal; opacity: .55; padding-inline: .3em; }
.proj-body .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.proj-shot { margin: 0; padding: clamp(14px, 2vw, 24px); background: var(--brand); border: 3px solid var(--black); box-shadow: 8px 8px 0 var(--black); }
.proj-shot img { width: 100%; border: 3px solid var(--black); background: #fff; }
.proj-info { display: grid; gap: 32px; }
.prose { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; max-width: 62ch; }
.prose p + p { margin-top: 1em; }
.prose p:first-child::first-letter { font-family: var(--serif); font-size: 4.2em; float: left; line-height: .78; padding: .1em .14em 0 0; color: var(--brand); }
.factbox { border-top: 3px solid var(--rule); padding-top: 20px; display: grid; gap: 20px; }
.factbox img { width: 72px; aspect-ratio: 1; object-fit: cover; border: 3px solid var(--rule); background: #fff; }
.factbox dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 15px; }
.factbox dt { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding-top: 3px; }
.factbox dd { margin: 0; }
.factbox .btn { justify-self: start; }
@media (max-width: 860px) { .proj-body .wrap { grid-template-columns: 1fr; } }
.turns { border-top: 3px solid var(--rule); }
.turns .wrap { display: grid; grid-template-columns: 1fr 1fr; }
.turn { position: relative; display: grid; gap: 8px; padding: clamp(24px, 4vw, 40px) 24px clamp(24px, 4vw, 40px) 0; text-decoration: none; min-width: 0; }
.turn + .turn { border-left: 3px solid var(--rule); padding-left: 24px; padding-right: 0; text-align: right; }
.turn small { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.turn b { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.6vw, 52px); line-height: .95; overflow-wrap: anywhere; }
.turn:hover b { font-style: italic; }
.turn .swatch { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--brand); }
.turn + .turn .swatch { left: 0; }
@media (max-width: 560px) { .turns .wrap { grid-template-columns: 1fr; } .turn + .turn { border-left: 0; border-top: 3px solid var(--rule); padding-left: 0; text-align: left; } }

/* ---------- Micro-animations ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.particle { position: absolute; left: 0; top: 0; will-change: transform; }
.spark-p { width: 9px; height: 9px; border: 2px solid var(--black); }
.spark-p:nth-child(3n) { border-radius: 50%; }
.confetti { width: 30px; height: 30px; object-fit: cover; border: 2px solid var(--black); background: #fff; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 210; max-width: calc(100vw - 32px); transform: translate(-50%, 160%); padding: 12px 18px; background: var(--black); color: var(--white); border: 3px solid var(--black); box-shadow: 5px 5px 0 var(--coral); font: 800 13px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; text-align: center; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.toast.in { transform: translate(-50%, 0); }
/* Bulb pop */
.masthead .brand img { cursor: pointer; transform-origin: 50% 20%; }
.masthead .brand img.flash { animation: bulbflash .35s ease; }
@keyframes bulbflash { 30% { filter: brightness(1.6) drop-shadow(0 0 10px #ffd76a); transform: scale(1.25) rotate(-10deg); } }
.blackout { position: fixed; inset: 0; z-index: 190; background: #0b0907; opacity: 0; pointer-events: none; transition: opacity .12s; }
.blackout.on { opacity: .94; }
.blackout.flicker { animation: relight .7s steps(1) forwards; }
@keyframes relight { 0% { opacity: .94; } 20% { opacity: .15; } 35% { opacity: .9; } 55% { opacity: 0; } 70% { opacity: .55; } 100% { opacity: 0; } }
/* Odometer stats */
.odo-wrap { display: inline-flex; }
.odo { display: inline-block; height: 1em; line-height: 1; overflow: hidden; }
.odo-strip { display: block; transition: transform 1.8s cubic-bezier(.2, .8, .2, 1); }
.odo-strip span { display: block; height: 1em; line-height: 1; }
[data-oops].corrected > span::after { content: " (so far)"; color: var(--coral); }
/* Photo: wobble, captions, sunglasses */
.cover-art.wobble { animation: wobble .4s ease; }
@keyframes wobble { 30% { transform: rotate(-1.5deg); } 60% { transform: rotate(1deg); } }
.cover-art .shades { position: absolute; left: 42%; top: 49%; width: 27%; height: auto; z-index: 2; pointer-events: none; opacity: 0; transform: translateY(-900%); transition: transform .75s cubic-bezier(.3, 1.3, .5, 1), opacity .2s; }
.cover-art.shades-on .shades { opacity: 1; transform: none; }
/* Rubber stamp */
.qa { position: relative; padding-bottom: 40px; }
.stamp { position: absolute; right: 0; bottom: 4px; padding: 6px 10px; border: 3px solid var(--coral); border-radius: 4px; color: var(--coral); background: rgba(251, 248, 241, .75); font: 800 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; pointer-events: none; transform: rotate(var(--r)); animation: stamp .35s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes stamp { from { transform: rotate(var(--r)) scale(2.6); opacity: 0; } to { transform: rotate(var(--r)) scale(1); opacity: .92; } }
/* Paper plane */
.plane { width: 60px; }
.plane svg { display: block; width: 100%; }
/* Secret words */
:is(h1, h2, h3, .q, .figures b) { transition: color .5s; }
html.kotlin :is(h1, h2, h3, .q, .figures b) { font-style: italic; color: #7f52ff; }
html.java :is(h1, h2, h3, .q, .figures b) { color: #c9b48a; }

/* ---------- 404 ---------- */
.lost .wrap { display: grid; gap: 18px; justify-items: start; }
.lost h1 { font-size: clamp(120px, 28vw, 360px); line-height: .8; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; } }

.epitaph { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.3; color: var(--fg); max-width: 30ch; }
