/* Portfolio layout and styling, tuned against a 1440×900 reference. */
:root {
  --ink: #1c1c1c;
  --grey: #5f5f5f;
  --c-about: #e6ebed;
  --c-works: #d5dde6;
  --c-intro: #cbcfc6;
  --c-contact: #c2b6c0;
  --sheet: var(--c-about);
  --sans: "Switzer", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --ui: "Geist", "Inter", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  --hand-thin: "Waiting for the Sunrise", "Bradley Hand", cursive;
  --wine: #6b1616;
}
body[data-page="works"] { --sheet: var(--c-works); }
body[data-page="intro"] { --sheet: var(--c-intro); }
body[data-page="contact"] { --sheet: var(--c-contact); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #000; color: var(--ink); }
body { overflow: hidden; font-family: var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; color: inherit; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
html.zoom-lock body { overflow: hidden; }

/* Shared type: uppercase mono label (12px / 1.3, weight 500) */
.label {
  margin: 0;
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
  font-feature-settings: "cv03", "cv04", "cv09", "cv11";
  white-space: pre;
}
mark { color: inherit; }

/* ---------------- frame ---------------- */
.stage {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}
.side { position: relative; flex: none; width: 24%; }
.sheet {
  position: relative;
  z-index: 10;
  flex: 1 1 0;
  min-width: 0;
  background: var(--sheet);
  box-shadow: 0 0 2px #00000040;
}
.navcol { z-index: 9; padding-top: 4px; }
.page { position: absolute; inset: 0; padding: 10px; }

/* ---------------- tabs ---------------- */
.tabs { display: flex; flex-direction: column; align-items: flex-start; }
.tab { position: relative; display: block; flex: none; cursor: pointer; }
.tab + .tab { margin-top: -20px; }
.tab-shape { display: block; overflow: visible; }
.tab-label {
  position: absolute;
  z-index: 1;
  left: 46%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  font: 500 12px/1.3 var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.tab.fade-top {
  -webkit-mask: linear-gradient(0deg, #000 0%, #000 85%, rgba(0, 0, 0, 0.5) 100%);
  mask: linear-gradient(0deg, #000 0%, #000 85%, rgba(0, 0, 0, 0.5) 100%);
}
.tab.fade-bot {
  -webkit-mask: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, #000 15%, #000 100%);
  mask: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, #000 15%, #000 100%);
}

/* ---------------- chrome ---------------- */
.chrome { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.grain-sheet { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.grain-desk { position: fixed; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: difference; }

/* ---------------- preloader ---------------- */
.preloader { position: fixed; inset: 0; z-index: 100; overflow: hidden; isolation: isolate; }
.preloader-backdrop { position: absolute; inset: 0; }
.preloader-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.preloader-word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 24px/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink);
  filter: blur(0.8px);
  pointer-events: none;
  white-space: pre;
}
.preloader-word span { display: inline-block; }

/* ---------------- shared page pieces ---------------- */
.page-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font: 600 80px/1 var(--sans);
  letter-spacing: -0.06em;
  color: var(--ink);
}
.melt-char { display: inline-block; transform-origin: center top; white-space: pre; will-change: transform; }
.ulink { position: relative; display: inline-flex; align-items: center; gap: 2px; padding-bottom: 1px; }
.ulink-text, .ulink-arrow { position: relative; z-index: 1; font: 500 12px/1.3 var(--mono); text-transform: uppercase; transition: color 0.2s; }
.ulink-bg {
  position: absolute;
  left: -1px;
  top: 0;
  height: 13.6px;
  width: 1px;
  background: var(--ink);
  opacity: 0;
  transition: width 0.3s cubic-bezier(0.3, 1.2, 0.5, 1), opacity 0.15s;
}
.ulink-line { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--grey); }
.ulink:hover .ulink-bg { width: calc(100% + 2px); opacity: 1; }
.ulink:hover .ulink-text, .ulink:hover .ulink-arrow { color: var(--c-about); }

.emboss-box { position: absolute; pointer-events: none; display: flex; align-items: flex-end; justify-content: center; }
.emboss { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; overflow: visible; }
.emboss-inner { position: relative; display: inline-block; white-space: pre; font-size: 0; line-height: 0; }
.emboss-layer { color: #000; text-align: center; }
.emboss-layer span { font-family: var(--script); font-weight: 400; white-space: pre; }
.emboss-shadow { position: relative; mix-blend-mode: multiply; }
.emboss-light { position: absolute; inset: 0; mix-blend-mode: screen; }
.flip-stack { position: absolute; inset: 0; overflow: hidden; }
.flip-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; pointer-events: none; }
.note canvas, .note-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* ---------------- About ---------------- */
.about { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.about-head { position: relative; z-index: 1; height: 33%; display: flex; justify-content: flex-end; gap: 10px; }
.about-namebio { width: 67%; height: 100%; padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.about-name { flex: none; padding-bottom: 10px; }
.about-h1 { margin: 0; font: inherit; }
.about-biocontact { flex: 1 0 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 20px; }
.bio { margin: 0; max-width: 75%; font: 400 14px/1.3 var(--sans); color: var(--ink); }
.bio b { font-weight: 400; }
.about .label { font-weight: 400; }
.about-contact { display: flex; align-items: center; justify-content: space-between; }
.about-profile { position: relative; z-index: 1; height: 50%; display: flex; flex-direction: column; align-items: flex-start; }
.stamp-wrap { position: relative; width: 33%; height: 64%; margin-left: calc(33% + 4px); }
.stamp { position: absolute; inset: 0; }
/* About photos: full colour plus a coarser grain of their own (animated noise over the stamp) */
.stamp .flip-stack img { filter: saturate(1.15) contrast(1.03); }
.stamp .flip-stack::after, .grainy::after, .decor-photo::after, .case-bgrow::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: stamp-grain 0.6s steps(1) infinite;
}
/* poster covers: toned down and grainier, so they sit in the paper grain of the site */
.grainy::after { opacity: 0.8; }
.grainy img { filter: saturate(0.82) contrast(0.94) brightness(0.97); }
.case-fig.grainy { position: relative; }
@keyframes stamp-grain {
  0% { background-position: 0 0; }
  25% { background-position: -47px 31px; }
  50% { background-position: 63px -22px; }
  75% { background-position: -18px -55px; }
}
.note { position: absolute; }
.note-create { right: -26%; bottom: -12%; width: 80%; aspect-ratio: 3; z-index: 3; pointer-events: none; }


.about-bottom { position: relative; z-index: 1; height: 16%; display: flex; flex-direction: column; justify-content: space-between; }
.scope { display: flex; align-items: flex-end; justify-content: space-between; }
.scope-rows { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: 24%; }
.scope-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.scope-title { flex: none; }
.scope-title mark { padding: 4.2px 4px; }
.based { display: flex; align-items: center; justify-content: space-between; }
.based-loc { display: flex; align-items: center; gap: 6px; }
.based-dot { width: 3px; height: 3px; border-radius: 99px; background: var(--ink); }
.clock { font: 500 11px/1.1 var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: 0; }
/* emboss boxes sit in the page wrapper (10px inside the sheet); offsets below are sheet-relative minus that padding */
.emboss-about { left: 0; right: 0; bottom: 14px; height: 180px; }
.note-myworks { left: calc(100% + 50px); top: 133px; width: 100px; height: 61.3px; }
.note-aboutme { right: calc(100% + 10px); top: -8px; width: 200px; height: 100px; pointer-events: none; }
.tag.is-open + .note-aboutme { display: none; }

/* tag */
.tag {
  position: absolute;
  z-index: 5;
  left: 5px;
  top: -5px;
  width: 110px;
  height: 60px;
  cursor: pointer;
  transform: rotate(2deg);
  transition: transform 0.25s cubic-bezier(0.3, 1.3, 0.5, 1), width 0.3s cubic-bezier(0.3, 1.1, 0.5, 1), height 0.3s cubic-bezier(0.3, 1.1, 0.5, 1);
  outline: none;
}
.tag:hover, .tag:focus-visible, .tag.is-open { transform: rotate(0deg); }
.tag-paper { position: absolute; inset: 0; overflow: hidden; background: rgba(240, 239, 237, 0.9); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.08); }
.tag-texture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tag-title { position: absolute; z-index: 1; left: 40px; top: 30px; }
.tag-clip { position: absolute; z-index: 2; left: 4px; top: -5px; width: 32px; height: auto; pointer-events: none; }
.tag-card { position: absolute; inset: 0; z-index: 1; padding: 80px 40px 40px; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s; }
.tag.is-open { width: min(600px, calc(100% - 10px)); height: 90vh; }
.tag.is-open .tag-card { opacity: 1; visibility: visible; transition: opacity 0.3s 0.1s; }
.tag-card { overflow-y: auto; scrollbar-width: none; }
.tag-card::-webkit-scrollbar { display: none; }
.tag-intro { max-width: 470px; font: 400 18px/1.28 var(--sans); color: #000; }
.tag-intro p { margin: 0 0 12px; }
.tag-intro p:last-child { margin-bottom: 0; }
.tag-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.tag-sign { position: relative; width: 70px; height: 32px; }
.tag-lists { flex: 1 1 0; min-width: 0; max-width: 82%; display: flex; flex-direction: column; gap: 26px; }
.tag-comp { margin: 0 0 7px; font: 400 13px/1.3 var(--sans); white-space: normal; }
.tag-comp b { font-weight: 500; }
.tag-list { display: flex; flex-direction: column; gap: 20px; }
.tag-list h2 mark { background: var(--ink); color: var(--c-about); padding: 0; }
.tag-items { display: flex; flex-direction: column; }

/* ---------------- Works ---------------- */
.works, .intro, .contact { position: relative; height: 100%; display: flex; flex-direction: column; }
.works-head, .intro-head, .contact-head { position: relative; z-index: 1; height: 17%; flex: none; display: flex; align-items: flex-start; }
.works .page-title, .intro .page-title, .contact .page-title { font-size: 64px; padding-bottom: 10px; }
.about .page-title { font-size: 64px; }
.works-body { position: relative; z-index: 1; flex: 1 0 0; min-height: 0; padding: 4px; }
.works-scroll { position: absolute; inset: 4px; overflow: hidden; }
.loop-viewport { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.loop-viewport.is-dragging { cursor: grabbing; }
.loop-track { display: flex; will-change: transform; }
.loop-track.is-y { flex-direction: column; width: 100%; }
.loop-track.is-x { flex-direction: row; height: 100%; width: max-content; }
.loop-track > * { flex: none; }
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(50px, 1fr)); gap: 40px 8px; width: 100%; justify-items: center; }
.card { display: flex; flex-direction: column; gap: 4px; width: 202px; height: 310px; }
.card--wide { width: 240px; }
.card--landscape .card-media { flex: none; height: auto; aspect-ratio: var(--ratio); }
.card-info .label { white-space: normal; }
.card--fixed { height: 400px; justify-content: flex-end; }
.card-media { position: relative; flex: 1 0 0; min-height: 0; width: 100%; overflow: hidden; }
.card--fixed .card-media { flex: none; height: 200px; }
.card-info { padding-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.card-title { margin: 0; font: 500 11px/1.3 var(--mono); text-transform: uppercase; }
.card-title mark { background: var(--ink); color: var(--c-about); padding: 0; }
.emboss-works { left: -10px; right: -10px; bottom: -10px; height: 147px; z-index: 0; }

/* ---------------- Intro ---------------- */
.intro-stage { position: relative; z-index: 1; flex: 1 0 0; min-height: 0; padding-bottom: 8px; container-type: size; }
.intro-player { position: absolute; inset: 0 0 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.vp-frame { position: relative; width: min(100cqw, calc((100cqh - 40px) * 16 / 9)); aspect-ratio: var(--ratio); background: var(--ink); overflow: hidden; }
.vp-video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.25); }
.vp-bar-fill { display: block; height: 100%; background: var(--c-about); transform: scaleX(0); transform-origin: 0 50%; }
.vp-controls { display: flex; gap: 10px; }
.intro-placeholder { display: block; width: min(100cqw, calc(100cqh * var(--ratio))); height: auto; aspect-ratio: var(--ratio); }
.seg { padding: 0; border: 0; background: none; cursor: pointer; }
.seg.is-active { background: var(--ink); color: var(--c-about); }
.intro-note { position: absolute; z-index: 2; top: 0; right: 40px; width: 150px; height: 92px; }
.emboss-intro { left: -10px; right: 30px; bottom: -12px; height: 147px; z-index: 0; }

/* zoom */
.zoom-overlay { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 40px; background: rgba(0, 0, 0, 0.8); opacity: 0; transition: opacity 0.3s; cursor: none; }
.zoom-overlay.is-open { opacity: 1; }
.zoom-frame { overflow: hidden; display: flex; }
.zoom-frame img { max-width: 90vw; max-height: 90vh; object-fit: contain; transform-origin: 0 0; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); will-change: transform; }
.zoom-cursor { position: fixed; left: 0; top: 0; z-index: 1; display: flex; padding: 11px; border-radius: 100px; background: #fff; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.zoom-cursor.is-visible { opacity: 1; }

/* ---------------- Contact ---------------- */
.contact-title { position: relative; z-index: 1; min-height: 17%; flex: none; padding: 4px 4px 80px; }
.contact-title h2 { margin: 0; max-width: 600px; font: 400 24px/1.2 var(--sans); color: #000; }
.contact-title h2 { text-wrap: balance; }
.contact-title .dare { display: block; }
.contact-wrap { position: relative; z-index: 1; display: flex; justify-content: flex-end; }
.contact-table { width: 67%; display: flex; flex-direction: column; }
/* rules are painted (inset shadows), not borders, so they take no layout space */
.crow { display: flex; align-items: center; min-height: 37px; box-shadow: inset 0 1px 0 var(--grey), inset 0 -1px 0 var(--grey); }
.crow + .crow { box-shadow: inset 0 -1px 0 var(--grey); }
.crow > h2 { flex: none; width: 25%; }
.crow-links { flex: 1 0 0; display: flex; align-items: center; justify-content: space-between; align-self: stretch; }
.plink { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.plink .label { position: relative; z-index: 1; transition: color 0.2s; }
.plink-bg { position: absolute; left: -1px; top: 0; width: 1px; height: 13.6px; background: var(--ink); opacity: 0; transition: width 0.3s cubic-bezier(0.3, 1.2, 0.5, 1), opacity 0.15s; }
.plink:hover .plink-bg { width: calc(100% + 2px); opacity: 1; }
.plink:hover .label { color: var(--c-about); }
.copy { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font: 500 11px/1 var(--mono); letter-spacing: -0.01em; transition: background-color 0.2s, color 0.2s; }
.copy:hover { background: var(--ink); color: var(--c-about); }
.emboss-contact { left: -10px; right: 30px; bottom: -10px; height: 147px; z-index: 0; }

/* ---------------- case page ---------------- */
/* sizes are px at the 899px-wide reference sheet, as in the case-page reference */
.case { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; outline: none; }
.case::-webkit-scrollbar { display: none; }
.case-inner { position: relative; padding: 0 13px 64px; font: 400 14px/16.8px var(--sans); }
.case-inner p { margin: 0 0 12px; }
.case-back { position: absolute; right: 13px; top: 14px; text-decoration: underline; text-underline-offset: 3px; }
.case-title { margin: 0; padding-top: 46px; font: 600 48px/52px var(--sans); letter-spacing: -0.04em; }
.case-inner .case-sub { margin: 6px 0 0; color: #4a4a4a; }
.case-row { display: grid; grid-template-columns: 293px 1fr; align-items: start; margin-top: 64px; }
.case-row.is-about { margin-top: 72px; }
.case-row.is-cont { margin-top: 24px; }
.case-inner .case-thanks { margin: 64px 0 0; text-align: center; font: italic 400 20px/24px var(--sans); }
.case-prt { margin-top: 20px; border-top: 1px solid rgba(28, 28, 28, 0.7); }
.case-prt-row { display: grid; grid-template-columns: 1.05fr 1.35fr 14px 1.5fr 14px 1.1fr; gap: 0 12px; padding: 16px 0; border-bottom: 1px solid rgba(28, 28, 28, 0.22); font: 400 13px/17px var(--sans); transition: background-color 0.25s; }
.case-prt-row:not(.is-head):hover { background: rgba(255, 255, 255, 0.35); }
.case-prt-row.is-head { padding: 10px 0; color: #4a4a4a; border-bottom: 1px solid rgba(28, 28, 28, 0.7); }
.case-prt-title { display: flex; flex-direction: column; gap: 4px; }
.case-prt-title b { font-weight: 600; font-size: 14px; line-height: 17px; }
.case-prt-arrow { color: var(--wine); font: 500 14px/17px var(--mono); text-align: center; }
.case-prt-cell { display: flex; flex-direction: column; gap: 6px; }
.case-row.is-step { margin-top: 56px; padding-top: 18px; border-top: 1px solid rgba(28, 28, 28, 0.7); }
.case-row.is-closing { margin-top: 56px; }
.case-inner .case-closing { margin: 0; font: italic 400 20px/24px var(--sans); }
.case-text ol li:last-child { margin-bottom: 0; }
.case-fig.is-full.in-solution { margin-top: 16px; }
.case-text.is-stack > * { margin-bottom: 8px; }
.case-text.is-stack > :last-child { margin-bottom: 0; }
.case-text.is-stack > ul { margin-bottom: 8px; }
.case-inner .case-goal { padding: 10px 12px; background: #c3cfd6; font-weight: 600; }
.case-inner .case-after { margin-top: 12px; margin-bottom: 0; }
.case-text .case-points { margin: 6px 0 0; padding-left: 16px; }
.case-text .case-points li { margin: 0 0 6px; }
.case-text .case-points li:last-child { margin-bottom: 0; }
.case-inner .case-group { margin: 10px 0 4px; }
.case-inner .case-step-closing { margin: 8px 0 0; }
.case-photos { margin-top: 48px; }
.case-photos > .case-fig { margin-top: 8px; }
.case-photos > .case-fig:first-child { margin-top: 0; }
.case-chip { display: inline-block; padding: 1px 3px; background: var(--ink); color: #f0efed; font: 500 12px/15.6px var(--mono); text-transform: uppercase; white-space: nowrap; }
.case-chip.is-mine { margin-left: 4px; font-size: 10px; line-height: 13px; vertical-align: 1px; }
.case-text { max-width: 435px; }
.case-inner .case-lead { margin-bottom: 14px; font-size: 20px; line-height: 24px; }
.case-inner .case-hd { margin: 18px 0 6px; }
.case-text ul, .case-text ol { margin: 0; padding-left: 18px; }
.case-text li { margin: 0 0 10px; }
.case-panel { max-width: 455px; padding: 14px 16px 4px; background: #c3cfd6; }
.case-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 0; max-width: 580px; margin: 0; }
.case-meta div { padding-right: 16px; }
.case-meta dt { margin-bottom: 3px; padding-bottom: 3px; border-bottom: 1px solid rgba(28, 28, 28, 0.7); }
.case-meta dd { margin: 0; }
.case-inner .label { white-space: normal; overflow-wrap: anywhere; }
.case-bgrow { position: relative; margin: 72px -13px 0; overflow: hidden; }
.case-bg-img { display: block; width: 100%; height: auto; opacity: 0.42; filter: grayscale(0.3) saturate(0.8); pointer-events: none; }
.case-bgrow::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--c-works) 55%, transparent) 40%, color-mix(in srgb, var(--c-works) 55%, transparent) 100%); }
.case-bgrow > .case-row { position: absolute; z-index: 1; left: 13px; right: 13px; top: 50%; margin-top: 0; transform: translateY(-50%); }
.case-bgrow.no-bg > .case-row { position: static; margin: 0 13px; transform: none; }
.case-lab { position: relative; align-self: stretch; }
.case-decor { position: absolute; left: 0; right: 0; top: 44px; bottom: 0; overflow: hidden; pointer-events: none; }
.decor-item { position: absolute; }
.decor-item.decor-photo { position: absolute; }
.decor-item img { display: block; width: 100%; height: auto; }
.decor-photo { position: relative; overflow: hidden; opacity: 0.66; filter: grayscale(0.2) saturate(0.85) contrast(0.95); }
.decor-prop img { filter: saturate(1.35) brightness(1.04) contrast(1.04) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2)) drop-shadow(0 14px 12px rgba(0, 0, 0, 0.26)); }
.decor-prop.is-multiply { mix-blend-mode: multiply; }
.decor-prop.is-multiply img { filter: saturate(1.3) contrast(1.05); }
.case-band { position: relative; margin: 56px -13px 0; overflow: hidden; }
.case-band img { display: block; width: 100%; height: auto; }
.case-fig { margin: 0; }
.case-fig img { width: 100%; height: auto; }
.case-inner.is-mini .case-fig { width: calc(100% - 150px); max-width: 560px; margin-left: auto; }
.case-inner.is-mini .case-fig img { cursor: zoom-in; }
.case-fig.is-full { margin-top: 48px; }
.case-fig.is-full + .case-fig.is-full { margin-top: 8px; }
.case-fig.is-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.case-row + .case-fig.is-two { margin-top: 8px; }
.case-fig figure, .case-fig.is-two figure { margin: 0; }
.case figcaption { margin-top: 5px; }
.case-inner .case-note { margin: 14px 0 0; color: #4a4a4a; }
.case-foot { display: flex; justify-content: space-between; margin-top: 72px; padding-top: 12px; border-top: 1.5px solid var(--ink); }
.case-next { color: #4a4a4a; cursor: default; }
a.card { cursor: pointer; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
a.card:hover { transform: translateY(-6px); }
.card.is-static { cursor: default; }
a.card:focus-visible, .case a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* block-based case (podcast): hero cover that fades out under the metadata */
.case-hero { position: relative; isolation: isolate; margin-top: 24px; }
.case-cover { position: absolute; z-index: -1; top: 0; left: 0; width: min(450px, 100%); margin: 0; pointer-events: none; }
.case-cover img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 34%, rgba(0, 0, 0, 0.82) 48%, rgba(0, 0, 0, 0.52) 61%, rgba(0, 0, 0, 0.22) 74%, rgba(0, 0, 0, 0.06) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 34%, rgba(0, 0, 0, 0.82) 48%, rgba(0, 0, 0, 0.52) 61%, rgba(0, 0, 0, 0.22) 74%, rgba(0, 0, 0, 0.06) 88%, transparent 100%);
}
.case-hero-space { width: min(450px, 100%); aspect-ratio: 4 / 3; }
.case-hero > .case-row { margin-top: 0; }
.case-hero + .case-row { margin-top: 36px; }
/* takeaway slips: paper with a title, unfolds on hover */
.case-takes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 18px; align-items: start; margin-top: 22px; }
.case-take { position: relative; display: block; width: 100%; padding: 24px 16px 14px; border: 0; background: rgba(240, 239, 237, 0.92); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.1), 0 8px 18px rgba(0, 0, 0, 0.1); transform: rotate(var(--tilt, 0deg)); transition: transform 0.3s cubic-bezier(0.3, 1.3, 0.5, 1), box-shadow 0.3s; }
.case-take:hover, .case-take.is-open { z-index: 2; transform: rotate(0deg) translateY(-4px); box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.12), 0 16px 30px rgba(0, 0, 0, 0.18); }
.case-take:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.case-take-texture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.case-take-tape { position: absolute; top: -9px; left: 50%; width: 64px; height: 18px; margin-left: -32px; background: rgba(213, 221, 230, 0.8); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); transform: rotate(-3deg); }
.case-take-title { position: relative; display: block; color: var(--wine); font: 600 26px/1.05 var(--hand); }
.case-take-body { position: relative; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.case-take.is-open .case-take-body { grid-template-rows: 1fr; }
.case-take-text { display: block; min-height: 0; overflow: hidden; opacity: 0; transition: opacity 0.3s 0.1s; }
.case-take.is-open .case-take-text { opacity: 1; }
.case-take-inner { display: block; padding-top: 10px; font: 400 13px/17px var(--sans); }
/* final picture on a spotlight stage */
.case-fromto { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 36px 0 6px; color: var(--wine); font: 600 34px/1 var(--hand); }
.case-fromto-arrow { transform: rotate(8deg); }
.spot { position: relative; overflow: hidden; aspect-ratio: 1.3; margin-top: 8px; background: radial-gradient(ellipse at 50% 0%, #3a1212 0%, #190909 55%, #0b0404 100%); perspective: 900px; }
.spot-lamp { position: absolute; top: -8px; left: 50%; width: 90px; height: 28px; margin-left: -45px; border-radius: 50%; background: #fff6dc; box-shadow: 0 0 40px 18px rgba(255, 236, 190, 0.75), 0 0 120px 60px rgba(255, 220, 160, 0.35); }
.spot-beam { position: absolute; top: 10px; left: 50%; width: 130%; max-width: 620px; height: 105%; transform: translateX(-50%); transform-origin: 50% 0; clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); background: linear-gradient(to bottom, rgba(255, 240, 205, 0.55), rgba(255, 240, 205, 0.16) 55%, rgba(255, 240, 205, 0.04)); filter: blur(6px); mix-blend-mode: screen; pointer-events: none; }
.spot-deck { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-top: 22px; }
.spot-card { position: relative; width: min(56%, 370px); margin: 0; transform-style: preserve-3d; will-change: transform; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 230, 180, 0.25); }
.spot-card img { display: block; width: 100%; height: auto; }
.spot-glare { position: absolute; inset: 0; mix-blend-mode: soft-light; pointer-events: none; }
.spot-spark { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #fff7df; box-shadow: 0 0 8px 2px rgba(255, 236, 190, 0.8); opacity: 0; animation: spot-twinkle var(--t) ease-in-out var(--d) infinite; pointer-events: none; }
@keyframes spot-twinkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .spot-spark { animation: none; opacity: 0.7; } }
/* chapter accordion: the chip row is a button, the chapter folds into a body that animates open */
.case-acc { border-top: 1px solid rgba(28, 28, 28, 0.7); }
.case-acc.is-last { border-bottom: 1px solid rgba(28, 28, 28, 0.7); }
.case-row.is-process { margin-top: 72px; }
.case-inner .case-process-title { margin: 0; font: 600 28px/32px var(--sans); letter-spacing: -0.02em; }
.case-inner .case-process-hint { margin: 10px 0 0; color: var(--wine); }
.case-row.is-process + .case-acc { margin-top: 24px; }
.case-row.is-sub { margin-top: 22px; }
.case-inner .case-hand { margin: -3px 0 0; color: var(--wine); font: 600 28px/1 var(--hand); letter-spacing: 0; text-transform: none; transform: rotate(-1.5deg); transform-origin: left center; }
.case-acc-h { margin: 0; font: inherit; }
.case-acc-head { width: 100%; margin: 0; padding: 14px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; align-items: center; }
.case-acc-head:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.case-acc-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.case-acc-main .case-ch-title { margin: 0; }
.case-acc-head:hover .case-ch-title { text-decoration: underline; text-underline-offset: 4px; }
.case-acc-icon { flex: none; font: 400 22px/1 var(--mono); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.case-acc.is-open .case-acc-icon { transform: rotate(45deg); }
.case-acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.case-acc.is-open > .case-acc-body { grid-template-rows: 1fr; }
.case-acc-inner { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear 0.35s; }
.case-acc.is-open .case-acc-inner { visibility: visible; transition-delay: 0s; }
.case-acc-body .case-row.is-cont { margin-top: 14px; }
.case-acc-body .case-row.is-sub { margin-top: 24px; }
.case-acc-inner > :first-child { margin-top: 4px; }
.case-acc-inner { padding-bottom: 0; }
.case-acc-inner::after { content: ""; display: block; height: 28px; }
.case-acc .case-row.is-tools { padding-bottom: 0; border-bottom: 0; }
/* story pile: slides lie in a stack and fly out into a row */
.case-stack { container-type: inline-size; }
.case-stack-stage { --w: calc((100cqw - 24px) / 4); position: relative; height: calc(var(--w) * 16 / 9 + 16px); margin-bottom: 8px; cursor: pointer; outline-offset: 6px; }
.case-stack-item {
  position: absolute;
  z-index: calc(10 - var(--i));
  top: var(--dy);
  left: calc((100cqw - var(--w)) / 2 + var(--dx));
  width: var(--w);
  margin: 0;
  transform: rotate(var(--r));
  transition: left 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i) * 22ms);
}
.case-stack-item img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.case-stack-item:nth-child(1) { --dx: -16px; --dy: 8px; --r: -7deg; }
.case-stack-item:nth-child(2) { --dx: 12px; --dy: 0px; --r: 4deg; }
.case-stack-item:nth-child(3) { --dx: -4px; --dy: 4px; --r: -2deg; }
.case-stack-item:nth-child(4) { --dx: 10px; --dy: 10px; --r: 6deg; }
.case-stack-stage.is-open .case-stack-item { top: 0; left: calc(var(--i) * (var(--w) + 8px)); transform: rotate(0deg); }
.case-stack-stage:focus-visible { outline: 2px solid var(--ink); }
/* block-based case (podcast): chapter titles, pull-quote, slide groups, carousel */
.case-inner .case-ch-title { margin: 0 0 8px; font: 600 20px/24px var(--sans); letter-spacing: -0.01em; }
.case-inner .case-pullquote { margin: 4px 0 14px; font: italic 400 20px/24px var(--sans); }
.case-inner .case-tools { margin: 0; }
.case-row.is-tools { padding-bottom: 16px; border-bottom: 1px solid rgba(28, 28, 28, 0.7); }
.case-inline-link, .case-link { text-decoration: underline; text-underline-offset: 3px; }
.case-links { margin: 0; padding: 0; list-style: none; }
.case-text .case-links li { margin: 0 0 10px; }
.case-figs { margin-top: 16px; }
.case-figs > .case-fig { margin-top: 8px; }
.case-figs > .case-fig:first-child { margin-top: 0; }
.case-fig.is-four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.case-inner .case-figcap { margin: 6px 0 0; }
.case-fig.is-shot img { border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 6px; cursor: zoom-in; }
.case-fig.is-zoom img { cursor: zoom-in; }
.case-figs.is-sized { width: calc(100% - 293px); margin-left: 293px; }
.case-fig.is-loupe, .case-figs.is-loupe figure { position: relative; }
.case-figs.is-loupe img { cursor: crosshair; }
.case-loupe { position: absolute; z-index: 3; display: none; width: 190px; height: 190px; margin: -95px 0 0 -95px; border: 3px solid #fff; border-radius: 50%; background-color: #fff; background-repeat: no-repeat; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); pointer-events: none; }
.case-slip { position: relative; max-width: 360px; padding: 26px 22px 18px 44px; background: rgba(240, 239, 237, 0.92); box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.1), 0 8px 18px rgba(0, 0, 0, 0.1); transform: rotate(-1.2deg); overflow: visible; }
.case-slip-texture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.case-slip-clip { position: absolute; z-index: 2; left: 4px; top: -8px; width: 32px; height: auto; pointer-events: none; }
.case-inner .case-slip-title { position: relative; margin: 0 0 4px; color: var(--wine); font: 600 24px/1 var(--hand); }
.case-inner .case-slip-text { position: relative; margin: 0; color: var(--ink); font: 600 22px/1.12 var(--hand); }
.case-row.is-slipRow { margin-top: 18px; }
.case-inner .case-sign { margin: 72px 0 0; text-align: center; color: var(--wine); font: 600 38px/1.1 var(--hand); }
.case-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 16px; margin-top: 16px; padding: 18px 0 4px; border-top: 1px solid rgba(28, 28, 28, 0.7); }
.case-stat { display: flex; flex-direction: column; gap: 6px; }
.case-stat-v { font: 600 34px/36px var(--sans); letter-spacing: -0.03em; color: var(--wine); white-space: nowrap; }
.case-stat-l { white-space: normal; color: #4a4a4a; }
.case-acc-meta { display: flex; align-items: center; gap: 18px; flex: none; }
.case-inner .case-readtime { margin: 0; color: #6a6a6a; white-space: nowrap; }
.case-next.is-link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.carousel-bar { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 8px; }
.carousel-btn { padding: 5px 9px; border: 1px solid var(--ink); background: none; color: var(--ink); font: 500 12px/1 var(--mono); cursor: pointer; }
.carousel-btn:hover:not(:disabled) { background: var(--ink); color: var(--c-works); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }
.carousel-track { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible, .carousel-btn:focus-visible, .case-inline-link:focus-visible, .case-link:focus-visible, .case-next.is-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.carousel-slide { flex: 0 0 220px; margin: 0; scroll-snap-align: start; }
.carousel-slide img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; }
.carousel-slide figcaption { margin-top: 5px; }

/* ---------------- tablet & phone: tabs above the sheet ---------------- */
@media (max-width: 1199.98px) {
  .stage { flex-direction: column; justify-content: flex-start; padding: 10px 20px 20px; }
  .side:not(.navcol) { display: none; }
  .navcol { order: -1; width: 100%; height: auto; padding: 0 0 0 10px; }
  .tabs.is-horizontal { flex-direction: row; align-items: flex-end; }
  .tabs.is-horizontal .tab + .tab { margin-top: 0; margin-left: -8px; }
  .tabs.is-horizontal .tab-label { left: 50%; top: 56%; transform: translate(-50%, -50%); }
  .tabs.is-horizontal .tab.fade-top, .tabs.is-horizontal .tab.fade-bot { -webkit-mask: none; mask: none; }
  .note-myworks, .note-aboutme { display: none; }
  .page-title, .about .page-title { font-size: 56px; }
  .works .page-title, .intro .page-title, .contact .page-title { font-size: 48px; }
}
@media (max-width: 1199.98px) {
  .stage { padding: 10px; }
  .navcol { overflow-x: auto; }
  .about-head { height: auto; padding-top: 52px; }
  .about-namebio { width: 100%; height: auto; }
  .about-name { height: auto; }
  .about .page-title { font-size: 44px; }
  .about-biocontact { flex: none; overflow: visible; gap: 14px; }
  .about-profile { height: auto; flex: 1 0 0; min-height: 0; justify-content: center; }
  .about-bottom { height: auto; gap: 16px; }
  .tag:not(.is-open) { width: 96px; height: 45px; }
  .tag:not(.is-open) .tag-title { left: 34px; top: 18px; }
  .bio { max-width: 100%; }
  .stamp-wrap { width: auto; max-width: 70%; height: 100%; aspect-ratio: 4 / 5; margin-left: 4px; }
  .note-create { right: -14%; bottom: -4%; width: 66%; }
  .note-aboutme { display: none; }
  .tag.is-open { width: calc(100% - 10px); }
  .tag-card { padding: 64px 22px 24px; gap: 22px; }
  .tag-intro { font-size: 16px; }
  .tag-lists { max-width: 100%; gap: 18px; }
  .contact-table { width: 100%; }
  .works-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-head { justify-content: center; text-align: center; }
  .about-h1 { display: flex; flex-direction: column; align-items: center; }
  .about-biocontact { align-items: center; }
  .about-contact { justify-content: center; }
  .about-profile { align-items: center; padding: 14px 0 34px; }
  .stamp-wrap { margin-left: 0; }
  .note-create { right: -24%; }
  .about-bottom { gap: 28px; align-items: center; text-align: center; }
  .scope { justify-content: center; }
  .scope-rows { justify-content: center; gap: 20px 22px; }
  .scope-row { align-items: center; }
  .based { flex-direction: column; justify-content: center; gap: 10px; }
  .contact-head { height: auto; }
  .contact-title { min-height: 0; padding: 40px 4px 64px; text-align: center; }
  .contact-title h2 { font-size: 20px; margin-inline: auto; }
  .contact-table { align-items: stretch; }
  .crow { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 14px 0; }
  .crow > h2 { width: auto; }
  .crow-links { flex: none; flex-direction: column; justify-content: center; gap: 8px; align-self: auto; }
  .works-head { height: auto; padding-bottom: 20px; }
  .works-head, .contact-head { justify-content: center; }
  .case-row { grid-template-columns: 1fr; row-gap: 12px; }
  .scope-rows { margin-left: 0; }
  .case-prt-row { grid-template-columns: 1fr; gap: 8px; }
  .case-prt-row.is-head, .case-prt-arrow { display: none; }
  .case-prt-cell[data-l]::before { content: attr(data-l); color: var(--wine); font: 500 11px/1 var(--mono); text-transform: uppercase; }
  .case-inner.is-mini .case-fig { width: 100%; max-width: none; margin-left: 0; }
  .case-bgrow > .case-row { position: static; margin: 12px 13px 0; transform: none; }
  .case-bgrow .case-text { padding: 0; background: none; }
  .case-lab:not(:has(.case-chip, .case-hand, .case-process-title)) { display: none; }
  .case-figs.is-sized { width: 100%; max-width: none !important; margin-left: 0; }
  .case-takes { grid-template-columns: repeat(2, 1fr); }
  .case-decor { display: none; }
  .card, .card--wide { width: min(100%, 300px); }
  .card--landscape, .card--fixed { height: auto; justify-content: flex-start; }
  .card--fixed .card-media { height: auto; aspect-ratio: 5 / 4; }
}
@media (min-width: 560px) and (max-width: 1199.98px) {
  .about .page-title { font-size: 72px; }
  .works .page-title, .contact .page-title { font-size: 64px; }
  .bio { font-size: 20px; }
  .about .label, .crow .label, .plink .label, .copy { font-size: 14px; }
  .stamp-wrap { width: auto; max-width: 62%; height: 66%; aspect-ratio: 1; }
  .scope-title mark { padding: 5px 6px; }
  .scope-rows { gap: 24px 36px; }
  .card, .card--wide { width: min(100%, 380px); }
  .contact-title h2 { font-size: 28px; max-width: 640px; }
  .crow { padding: 20px 0; gap: 8px; }
}
@media (max-width: 559.98px) {
  .works-grid { gap: 24px; }
  .works-head { padding-bottom: 0; }
  .case-fig.is-four { grid-template-columns: repeat(2, 1fr); }
  .case-takes { grid-template-columns: 1fr; }
  .case-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  a.card:hover { transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
}
