/* Liam Cloete — portfolio. Blueprint system carried over from v2 (Jul–Aug 2026):
   blueprint paper #2c5182 + paper texture + drafting grid, brass accent, Satoshi + IBM Plex Mono
   (v2 also named Cabinet Grotesk, but its Fontshare link never served it, so the live site always rendered Satoshi). */
:root {
  --paper: #2c5182;
  --paper-deep: #22436f;
  --surface: rgba(53, 89, 138, 0.72);
  --ink: #f4f7fb;
  --muted: #d5e0ee;
  --blueprint: #cfdcec;
  --brass: #f0d493;
  --online: #62dc9b;
  --border: rgba(244, 247, 251, 0.26);
  --border-strong: rgba(244, 247, 251, 0.62);
  --display: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  --sans: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --gutter: clamp(16px, 3.2vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 48px -32px rgba(10, 26, 48, 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.015em; }
ul { padding: 0; list-style: none; }
::selection { background: var(--brass); color: var(--paper); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* Paper + drafting grid (fixed behind everything) */
.paper, .grid-lines { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.paper { background: url("paper.webp") center / cover; opacity: 0.9; mix-blend-mode: multiply; }
.grid-lines {
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 85%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 85%);
}
main, .bar, .foot { position: relative; z-index: 1; }
.bar { position: sticky; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.meta {
  font-family: var(--mono);
  font-size: 0.79rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--blueprint);
}
.kicker { font-family: var(--mono); font-size: 0.79rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); }
.dot { color: var(--brass); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 99; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---- Top bar ---- */
.bar {
  top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.bar.scrolled { background: rgba(44, 81, 130, 0.92); border-bottom-color: var(--border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1px 24px -18px rgba(10, 26, 48, 0.6); }
.bar-inner { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.bar-name { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; padding: 0.7rem 0; }
.bar-links { margin-left: auto; display: flex; align-items: center; }
.bar-links a {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; padding: 0.85rem 0.6rem;
  background: linear-gradient(currentColor, currentColor) no-repeat 0.6rem calc(100% - 0.6rem) / 0 1px;
  transition: color 0.3s, background-size 0.4s var(--ease);
}
.bar-links a:hover { color: var(--ink); background-size: calc(100% - 1.2rem) 1px; }
.bar-social { display: flex; gap: 0.5rem; margin-left: 0.6rem; }
.social { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); transition: color 0.3s, border-color 0.3s, transform 0.3s; }
.social:hover { color: var(--brass); border-color: var(--brass); transform: translateY(-2px); }
.social svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .bar-social { display: none; }
  .bar-links a { padding: 0.9rem 0.45rem; letter-spacing: 0.08em; }
}

/* ---- Hero ---- */
.hero { padding-top: clamp(2rem, 6vw, 5.5rem); padding-bottom: clamp(2rem, 4vw, 3.25rem); }
.title-block { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.5rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border); }
.title-block .live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--online); margin-right: 0.55rem; vertical-align: 0.1em; animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(98, 220, 155, 0.6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(98, 220, 155, 0); } }
@media (max-width: 560px) { .title-block span:nth-child(2) { display: none; } }
.hero .kicker { display: block; margin-top: clamp(2rem, 5vw, 3.5rem); }
.hero-row { display: grid; gap: 1.75rem; }
.name {
  margin-top: 1.1rem;
  margin-left: -0.05em;
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(3.5rem, 18vw, 11.5rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
}
.name > span { display: block; }
.intro { max-width: 36rem; font-size: clamp(1.02rem, 1.3vw, 1.15rem); line-height: 1.7; color: var(--muted); }
@media (min-width: 1000px) {
  .hero-row { grid-template-columns: 1fr minmax(18rem, 25rem); align-items: end; }
  .intro { padding-bottom: 0.9rem; }
  /* the name shares the row with the intro here: size it to its column so "Cloete." never splits */
  .name { font-size: min(11.5rem, calc((100vw - 31rem) / 3.7)); }
}
.name .w { white-space: nowrap; }

/* ---- Material ledger (signature) ---- */
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 0.8rem; }
.hint-touch { display: none; }
.ledger {
  display: flex;
  height: clamp(420px, 66vh, 720px);
  gap: 2px;
  margin: 0 auto;
  max-width: 1280px;
  padding: 0 var(--gutter);
}
.band {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  background: var(--paper-deep);
  color: #fff;
  text-decoration: none;
  transition: flex-grow 0.7s var(--ease);
  animation: rise 0.9s var(--ease) both;
  animation-delay: calc(var(--i) * 60ms + 150ms);
}
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.6s; filter: saturate(0.85) brightness(0.92); }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 40, 70, 0) 45%, rgba(20, 40, 70, 0.8)); pointer-events: none; }
.band-num { position: absolute; z-index: 2; top: 0.6rem; left: 0.6rem; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--brass); background: rgba(34, 67, 111, 0.85); border: 1px solid var(--border); padding: 0.12rem 0.35rem 0.06rem; }
.band-mat {
  position: absolute; z-index: 2; left: 0.7rem; bottom: 0.8rem;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap; transition: opacity 0.3s;
}
.band-proj { position: absolute; z-index: 2; left: 1.1rem; right: 1.1rem; bottom: 1.1rem; display: grid; gap: 0.25rem; opacity: 0; transform: translateY(8px); transition: opacity 0.35s, transform 0.5s var(--ease); }
.band-proj b { font-family: var(--display); font-size: clamp(1.5rem, 2.3vw, 2.2rem); line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
.band-proj span { font-size: 0.92rem; color: var(--muted); }

@media (hover: hover) and (min-width: 761px) {
  .ledger:hover .band, .ledger:focus-within .band { flex-grow: 0.7; }
  .ledger .band:hover, .ledger .band:focus-visible { flex-grow: 5.5; }
  .band:hover img, .band:focus-visible img { transform: scale(1.03); filter: none; }
  .band:hover .band-mat, .band:focus-visible .band-mat { opacity: 0; }
  .band:hover .band-proj, .band:focus-visible .band-proj { opacity: 1; transform: none; transition-delay: 0.18s; }
  .band:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }
}
.ledger-dots { display: none; }
@media (hover: none), (max-width: 760px) {
  .hint-fine { display: none; }
  .hint-touch { display: inline; }
  .ledger {
    height: auto; gap: 10px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .ledger::-webkit-scrollbar { display: none; }
  .ledger::after { content: ""; flex: 0 0 1px; }
  .band { flex: 0 0 min(74vw, 330px); aspect-ratio: 3 / 4; scroll-snap-align: start; animation: none; }
  .band-mat { writing-mode: horizontal-tb; transform: none; top: 0.6rem; bottom: auto; left: auto; right: 0.6rem; background: rgba(34, 67, 111, 0.85); border: 1px solid var(--border); padding: 0.12rem 0.4rem 0.06rem; font-size: 0.75rem; }
  .band-proj { opacity: 1; transform: none; }
  .ledger-dots { display: flex; gap: 6px; justify-content: center; padding-top: 1rem; }
  .ledger-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--border-strong); transition: background 0.3s, width 0.3s; }
  .ledger-dots i.on { background: var(--brass); width: 18px; }
}
@keyframes rise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---- Section heads (drawing-sheet sections) ---- */
.sec-head { padding-top: clamp(4.5rem, 9vw, 7.5rem); margin-bottom: 2rem; }
.sec-line { display: flex; align-items: center; gap: 1.1rem; }
.sec-num { font-family: var(--mono); font-size: 0.875rem; color: var(--brass); }
.sec-head h2 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.sec-rule { height: 1px; flex: 1; background: var(--border); }
.sec-head p { margin-top: 1rem; color: var(--muted); max-width: 34rem; font-size: 0.97rem; }

/* ---- Work grid ---- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2.25rem, 3.5vw, 3rem) clamp(1rem, 2vw, 1.75rem); }
.card { grid-column: span 12; text-decoration: none; display: grid; gap: 1rem; align-content: start; }
@media (min-width: 761px) {
  .c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; } .c-7 { grid-column: span 7; } .c-8 { grid-column: span 8; }
  .c-4, .c-5 { padding-top: clamp(2rem, 6vw, 5rem); }
}
.card-img { position: relative; overflow: hidden; background: var(--paper-deep); aspect-ratio: 4 / 3; border: 1px solid var(--border); transition: box-shadow 0.5s, border-color 0.5s; }
/* Covers keep their own proportions: a full-product shot is never cropped (Liam's rule: never cut the clock).
   Cards in a row sit on a common baseline, so the titles line up and the pictures rise to their own heights. */
.card-img { aspect-ratio: auto; }
@media (min-width: 761px) { .grid { align-items: end; } .c-4, .c-5 { padding-top: 0; } }
.card-img img { width: 100%; height: auto; transition: transform 0.9s var(--ease); }
.card:hover .card-img { box-shadow: var(--shadow); border-color: var(--border-strong); }
.card:hover .card-img img { transform: scale(1.025); }
.card-txt { display: grid; gap: 0.45rem; max-width: 36rem; }
.card-txt .meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: center; }
.card-txt h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.02; font-weight: 800; }
.card-txt h3 { text-decoration: underline 2px transparent; text-underline-offset: 0.14em; transition: text-decoration-color 0.3s; }
.card:hover h3 { text-decoration-color: var(--brass); }
.card-txt p:last-child { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--online); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--online); }
.stage { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--brass); }
.stage::before { content: ""; width: 6px; height: 6px; background: var(--brass); transform: rotate(45deg); }

.kind {
  position: absolute; z-index: 2; top: 0.6rem; left: 0.6rem;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(34, 67, 111, 0.85); color: var(--ink); border: 1px solid var(--border); padding: 0.18rem 0.45rem 0.12rem;
}

/* ---- Other work ---- */
.other { display: grid; grid-template-columns: minmax(110px, 0.6fr) 2fr; gap: clamp(1rem, 2.5vw, 2.25rem); padding: 1.4rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.other-list .other:first-child { border-top: 1px solid var(--border); }
.o-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-deep); border: 1px solid var(--border); }
.o-img img { width: 100%; height: 100%; object-fit: cover; }
.o-img .kind { top: 0.35rem; left: 0.35rem; }
.o-none { background: none; border: 0; aspect-ratio: auto; }
.other h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); font-weight: 800; margin: 0.25rem 0 0.4rem; }
.other h3 span { font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 0.66em; margin-left: 0.35rem; letter-spacing: 0; }
.other p:last-child { max-width: 44rem; color: var(--muted); font-size: 0.97rem; }
@media (min-width: 900px) { .other { grid-template-columns: 220px 1fr; } }
@media (max-width: 899px) { .o-none { display: none; } .other:has(.o-none) { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .other { grid-template-columns: 1fr; gap: 0.8rem; }
  .o-img { aspect-ratio: 16 / 9; }
}

/* ---- About ---- */
.about-grid { display: grid; gap: 2.5rem; }
.about-lead p { font-size: clamp(1.12rem, 1.6vw, 1.35rem); line-height: 1.55; max-width: 38rem; }
.about-lead p + p { margin-top: 1.1rem; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.1rem); }
.col-h { padding-bottom: 0.6rem; border-bottom: 1px solid var(--border-strong); }
.col-h + .rows { margin-bottom: 2.2rem; }
.rows li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.rows .meta { padding-top: 0.2rem; }
.rows h3 { font-size: 1.08rem; font-weight: 700; }
.rows .org { font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); margin-top: 0.2rem; }
.rows p:not(.org) { font-size: 0.93rem; margin-top: 0.4rem; color: var(--muted); }
@media (max-width: 480px) { .rows li { grid-template-columns: 1fr; gap: 0.3rem; } }
@media (min-width: 1000px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.skills { display: grid; gap: 1px; margin-top: 3rem; border: 1px solid var(--border); background: var(--border); border-radius: 0.375rem; overflow: hidden; }
.skills > div { background: var(--paper); padding: 1.6rem; }
.skills h3 { color: var(--brass); padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.skills li { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px solid rgba(244, 247, 251, 0.12); font-size: 0.93rem; }
.skills li:last-child { border-bottom: 0; }
.skills li::before { content: "\25C6"; font-size: 0.45rem; color: var(--brass); transform: translateY(-0.15em); }
@media (min-width: 761px) { .skills { grid-template-columns: repeat(3, 1fr); } }

/* ---- Footer ---- */
.foot { margin-top: clamp(5rem, 10vw, 8rem); border-top: 1px solid var(--border); background: rgba(26, 52, 88, 0.55); padding-top: clamp(3rem, 7vw, 5.5rem); }
.foot-grid > * { min-width: 0; }
.foot-grid { display: grid; gap: 2.5rem; padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.foot-cta { font-family: var(--sans); font-weight: 900; font-size: clamp(3rem, 14vw, 8.5rem); line-height: 0.86; letter-spacing: -0.045em; }
.foot-links li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.foot-links li:first-child { border-top: 1px solid var(--border); }
.foot-links .meta { padding-top: 0.3rem; }
.foot-links a { text-decoration: none; font-size: clamp(1rem, 1.5vw, 1.2rem); display: inline-block; padding: 0.55rem 0; margin: -0.55rem 0; }
.foot-links a:hover { color: var(--brass); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-top: 1.1rem; padding-bottom: 1.5rem; border-top: 1px solid var(--border); }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: 1.2fr 1fr; align-items: end; gap: 4rem; } }

/* ---- Project page ---- */
.p-head { padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 0.7rem; }
.p-head > * { min-width: 0; }
.back { text-decoration: none; width: max-content; padding: 0.8rem 0; margin-bottom: clamp(0.5rem, 3vw, 2rem); }
.back:hover { color: var(--brass); }
.p-title { font-family: var(--sans); font-weight: 900; font-size: clamp(2.3rem, 13vw, 8.5rem); line-height: 0.88; letter-spacing: -0.045em; hyphens: manual; }
.p-kicker { font-size: clamp(1.1rem, 1.9vw, 1.45rem); color: var(--muted); margin-top: 0.5rem; }
.p-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1px; margin-top: 1.25rem; border: 1px solid var(--border); background: var(--border); border-radius: 0.375rem; overflow: hidden; }
.p-meta div { background: var(--paper); padding: 0.85rem 1rem; }
.p-meta dd { font-size: 0.95rem; font-weight: 500; margin-top: 0.3rem; }
.p-meta .live { color: var(--online); }
.p-meta div:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) { .p-meta { display: flex; } .p-meta div { flex: 1 1 0; } }
.p-cover { position: relative; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.p-cover img { width: 100%; max-height: 84vh; object-fit: cover; background: var(--paper-deep); border: 1px solid var(--border); }
.p-cover .kind { left: calc(var(--gutter) + 0.6rem); }
.p-body { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.p-summary { font-family: var(--display); font-size: clamp(1.4rem, 2.7vw, 2.3rem); line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; max-width: 52rem; padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.p-cols { display: grid; gap: 2.5rem; }
.p-cols > * { min-width: 0; }
.txt { display: grid; gap: 0.5rem; padding: 1.3rem 0; border-top: 1px solid var(--border); }
.txt h2 { font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); font-weight: 400; }
.txt p { max-width: 40rem; color: var(--muted); }
.p-specs { align-self: start; border: 1px solid var(--border); border-radius: 0.375rem; overflow: hidden; background: var(--surface); }
.p-specs h2 { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); }
.p-specs dl div { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); }
.p-specs dl div:last-child { border-bottom: 0; }
.p-specs dd { font-size: 0.95rem; font-weight: 500; margin-top: 0.2rem; }
@media (min-width: 1000px) {
  .p-cols { grid-template-columns: 1fr 21rem; gap: 4.5rem; }
  .txt { grid-template-columns: 9.5rem 1fr; gap: 2rem; }
  .txt h2 { padding-top: 0.4rem; }
  .p-specs { position: sticky; top: 5.5rem; }
}
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(0.75rem, 1.6vw, 1.25rem); padding-top: clamp(3rem, 7vw, 5.5rem); }
.g { grid-column: span 6; position: relative; }
.g img { width: 100%; height: auto; background: var(--paper-deep); border: 1px solid var(--border); }
.g figcaption { font-size: 0.85rem; color: var(--muted); padding-top: 0.55rem; }
@media (min-width: 761px) {
  .g-half { grid-column: span 3; } .g-third { grid-column: span 2; }
  .g-half img, .g-third img { aspect-ratio: 4 / 5; object-fit: cover; }
  .g-land img { aspect-ratio: var(--ar, 1.5); }
  .g-wide img { max-height: none; }
}
.p-next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: clamp(4rem, 8vw, 6rem); border-top: 1px solid var(--border-strong); }
.p-next a { display: grid; gap: 0.35rem; padding: 1.4rem 0; text-decoration: none; }
.p-next .nx { text-align: right; }
.p-next b { font-family: var(--display); overflow-wrap: anywhere; font-size: clamp(1.15rem, 3.2vw, 2.6rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; }
.p-next a:hover b { color: var(--brass); }

/* ---- Where Tomorrow: "How it tells the time" diagram ---- */
.wt-demo { display: grid; gap: 1.5rem 3rem; align-items: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: 0.375rem; background: var(--surface); }
.wt-copy { display: grid; gap: 0.9rem; max-width: 34rem; }
.wt-copy h2 { color: var(--brass); }
.wt-copy p:not(.meta) { color: var(--ink); }
.wt-controls { display: grid; gap: 0.9rem; }
.wt-controls[hidden] { display: none; }
.wt-time { display: grid; grid-template-columns: auto 1fr 3.4rem; align-items: center; gap: 0.9rem; }
.wt-time output { font-family: var(--mono); font-size: 1.05rem; color: var(--brass); text-align: right; }
.wt-time input { accent-color: var(--brass); width: 100%; height: 44px; cursor: grab; }
.wt-time input:active { cursor: grabbing; }
.wt-toggle { display: inline-flex; align-items: center; gap: 0.6rem; width: max-content; min-height: 44px; cursor: pointer; }
.wt-toggle input { accent-color: var(--brass); width: 18px; height: 18px; }
.wt-note { color: var(--muted); }
.wt-svg { width: 100%; max-width: 420px; justify-self: center; overflow: visible; }
.wt-svg .face { fill: #9c5b3f; }
.wt-svg .tk { stroke: #3a2a20; stroke-width: 1.4; } .wt-svg .tk-h { stroke-width: 2.6; }
.wt-svg .veil path { fill: rgba(225, 230, 234, 0.62); stroke: rgba(244, 247, 251, 0.85); stroke-width: 0.8; }
.wt-svg .ball circle { fill: #d9dee4; stroke: #8b949c; stroke-width: 1; }
.wt-svg .hub { fill: #2a2f35; }
.wt-svg .arm { opacity: 0; transition: opacity 0.4s; }
.wt-svg .arm line { stroke: var(--brass); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1 9; }
.wt-svg .arm .mag { fill: var(--brass); } .wt-svg .arm .cw { fill: none; stroke: var(--brass); stroke-width: 2; }
.wt-svg .arm text { fill: var(--brass); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
.wt-demo.show-arm .arm { opacity: 1; }
.wt-demo.show-arm .veil path { fill: rgba(225, 230, 234, 0.35); }
.wt-svg .arm, .wt-svg .veil, .wt-svg .ball { transition: transform 0.18s linear, opacity 0.4s; }
@media (min-width: 900px) { .wt-demo { grid-template-columns: 1fr minmax(260px, 420px); } }

/* ---- Motion layer (29 Oct 2026) ----
   Everything starts visible. The hidden starting states only apply when the page script has run (.js)
   and the visitor has not asked for reduced motion, so nothing can get stuck invisible. */

/* Name load-in: letters rise out of their own line, a brass dimension line is drawn under the name,
   then the dot drops in. Starts when Satoshi has loaded (site.js adds .ready). */
.name { justify-self: start; width: fit-content; position: relative; }
.name .w { overflow: hidden; padding: 0.1em 0.05em 0.12em 0; margin: -0.1em 0 -0.12em 0; }
.name .ch, .name .dot { display: inline-block; }
.name::after {
  content: ""; position: absolute; left: 0; right: 0.12em; bottom: -0.16em; height: 14px;
  background:
    linear-gradient(var(--brass), var(--brass)) left center / 100% 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) left center / 2px 100% no-repeat,
    linear-gradient(var(--brass), var(--brass)) right center / 2px 100% no-repeat;
  opacity: 0.55; transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
  .js:not(.seen) .name .ch { transform: translateY(115%); }
  .js:not(.seen) .name .dot { transform: translateY(-120%); opacity: 0; }
  .js:not(.seen) .name::after { transform: scaleX(0); }
  .js:not(.seen) .hero .title-block, .js:not(.seen) .hero .kicker, .js:not(.seen) .intro, .js:not(.seen) .ledger-head { opacity: 0; transform: translateY(14px); }
  .js:not(.seen) .band { animation-play-state: paused; }

  .js.ready:not(.seen) .name .ch { animation: ch-rise 0.95s var(--ease) both; animation-delay: calc(var(--c) * 42ms + 60ms); }
  .js.ready:not(.seen) .name::after { animation: dim-draw 0.9s var(--ease) both; animation-delay: calc(var(--n) * 42ms + 160ms); }
  .js.ready:not(.seen) .name .dot { animation: dot-drop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(var(--n) * 42ms + 420ms); }
  .js.ready:not(.seen) .hero .title-block { animation: fade-up 0.8s var(--ease) both 0.05s; }
  .js.ready:not(.seen) .hero .kicker { animation: fade-up 0.8s var(--ease) both 0.15s; }
  .js.ready:not(.seen) .intro { animation: fade-up 0.9s var(--ease) both 0.55s; }
  .js.ready:not(.seen) .ledger-head { animation: fade-up 0.8s var(--ease) both 0.7s; }
  .js.ready:not(.seen) .band { animation-play-state: running; animation-delay: calc(var(--i) * 70ms + 0.75s); }

  /* Project page headers are the first screen: shown straight away, no entrance (23 Nov critique). */

  /* Section entrances (site.js adds .rv, then .in as each part enters the screen). */
  .rv { opacity: 0; transform: translateY(24px); }
  .rv.in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }

  html { scroll-behavior: smooth; }
}
@keyframes ch-rise { from { transform: translateY(115%); } to { transform: none; } }
@keyframes dot-drop { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dim-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes title-up { from { opacity: 0; transform: translateY(0.35em); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(-10% 0 -20% 0); } }

/* Card hover: the picture lifts, a brass chip says where the click goes. */
.go {
  position: absolute; z-index: 2; right: 0.75rem; bottom: 0.75rem;
  font-family: var(--mono); font-size: 0.79rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--brass); color: var(--paper-deep); padding: 0.45rem 0.7rem 0.38rem;
  opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.45s var(--ease);
}
.card:hover .go, .card:focus-visible .go { opacity: 1; transform: none; }
.card:focus-visible { outline: none; }
.card:focus-visible .card-img { outline: 2px solid var(--brass); outline-offset: 3px; }
.card:active .card-img img { transform: scale(1.01); transition-duration: 0.15s; }
@media (hover: none) { .go { opacity: 1; transform: none; } }

/* Headlines keep to two lines: balance the wrap, and set narrow cards a step smaller. */
h1, h2, h3, .band-proj b, .p-next b { text-wrap: balance; }
@media (min-width: 761px) { .c-4 .card-txt h3, .c-5 .card-txt h3 { font-size: clamp(1.45rem, 2.05vw, 2rem); } }

/* Page-to-page: the card's picture grows into the project's cover (Chrome and Edge; others just load). */
@view-transition { navigation: auto; }
.bar { view-transition-name: bar; }
::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

/* availability line (hero + footer) */
.intro-col { display: grid; gap: 1.1rem; align-content: end; }
.avail { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--brass); }
.avail::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--online); flex: none; }
.foot-cta + .avail { margin-top: 1.25rem; }

/* ---- Reports and portfolio (12 Nov 2026) ---- */
.doc-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: clamp(1rem, 2.4vw, 1.75rem); }
.doc { display: block; text-decoration: none; }
.doc-img { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: clamp(0.8rem, 2vw, 1.2rem); background: var(--paper-deep); border: 1px solid var(--border); transition: transform 0.5s var(--ease), border-color 0.5s; }
.doc-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: var(--shadow); }
.doc:hover .doc-img, .doc:focus-visible .doc-img { transform: translateY(-4px); border-color: var(--border-strong); }
.doc .meta { margin-top: 0.8rem; color: var(--brass); }
.doc h3 { font-size: 1.15rem; font-weight: 800; margin: 0.2rem 0 0.15rem; line-height: 1.25; }
.doc .doc-size { margin-top: 0; color: var(--muted); }
.doc-link { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 1.4rem; padding: 0.9rem 1rem; border: 1px solid var(--border-strong); text-decoration: none; transition: background 0.3s, border-color 0.3s; }
.doc-link > span:first-child { font-weight: 700; }
.doc-link > span:first-child::after { content: " ↗"; color: var(--brass); }
.doc-link .meta { color: var(--muted); }
.doc-link:hover, .doc-link:focus-visible { background: rgba(244, 247, 251, 0.08); border-color: var(--brass); }
.doc-btn { display: inline-flex; align-items: center; gap: 0.7rem; width: max-content; min-height: 44px; padding: 0.55rem 1rem; border: 1px solid var(--brass); color: var(--ink); text-decoration: none; font-weight: 700; transition: background 0.3s; }
.doc-btn::after { content: "↗"; color: var(--brass); }
.doc-btn .meta { color: var(--muted); }
.doc-btn:hover, .doc-btn:focus-visible { background: rgba(240, 212, 147, 0.12); }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--paper-deep); border: 1px solid var(--border); }

/* ---- Also built: creative computing / team project cards (12 Nov 2026) ---- */
.cc-grid { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 761px) { .cc-card { grid-column: span 6; } }
.cc-card .card-img { aspect-ratio: 16 / 10; }
.cc-card .card-img img { height: 100%; object-fit: cover; }
/* phone videos: keep them upright and no taller than the screen */
.film-tall video { aspect-ratio: var(--var); width: auto; max-width: 100%; max-height: 82vh; margin-inline: auto; background: #000; }
/* small sources (phone-video stills) are capped so no screen shows them past 1.5x their pixels */
.cap { max-width: var(--c1); margin-inline: auto; width: 100%; }
@media (min-resolution: 1.5dppx) { .cap { max-width: var(--c2); } }
@media (min-resolution: 2.5dppx) { .cap { max-width: var(--c3); } }

/* ---- 3D CAD viewer (12 Nov 2026) ---- */
.m3d { margin-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem); }
.m3d-copy { max-width: 46rem; margin-bottom: 1.25rem; }
.m3d-copy p { margin-top: .6rem; }
.m3d-stage { position: relative; aspect-ratio: 16 / 10; max-height: 78vh; width: 100%;
  background: radial-gradient(120% 90% at 50% 40%, rgba(255,255,255,.10), rgba(0,0,0,.18));
  border: 1px solid rgba(240,212,147,.35); overflow: hidden; }
@media (max-width: 760px) { .m3d-stage { aspect-ratio: 4 / 5; max-height: 70vh; } }
.m3d-poster { display: block; width: 100%; height: 100%; object-fit: contain; }
.m3d-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.m3d-canvas:active { cursor: grabbing; }
.m3d-stage .kind { position: absolute; left: .75rem; top: .75rem; }
.m3d-open { position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); min-height: 48px;
  padding: .8rem 1.4rem; background: #f0d493; color: #1d3557; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.m3d-open small { margin-left: .5rem; opacity: .75; color: inherit; }
.m3d-open:disabled { opacity: .8; cursor: progress; }
.m3d-label { position: absolute; right: .75rem; bottom: .75rem; padding: .35rem .6rem; background: rgba(20,36,62,.8); color: #f0d493; pointer-events: none; }
.m3d-label:empty { display: none; }
.m3d-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1rem; }
.m3d-controls[hidden] { display: none; }
.m3d-explode { display: flex; align-items: center; gap: .75rem; flex: 1 1 18rem; }
.m3d-explode input { flex: 1; accent-color: #f0d493; min-height: 44px; }
.m3d-reset { min-height: 44px; padding: .5rem 1rem; background: transparent; color: inherit; border: 1px solid rgba(240,212,147,.6); font: inherit; cursor: pointer; }
.m3d-parts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.m3d-parts[hidden] { display: none; }
.m3d-parts button { min-height: 44px; padding: .4rem .8rem; background: rgba(255,255,255,.06); color: inherit;
  border: 1px solid rgba(255,255,255,.25); font: inherit; font-size: .9rem; cursor: pointer; }
.m3d-parts button[aria-pressed="true"] { background: #f0d493; color: #1d3557; border-color: #f0d493; }

.doc-btn + .doc-btn { margin-top: 0.6rem; }
