/* Form & Matter, portfolio v2.0
   One dark optical bench. Glass lives in the WebGL canvas; everything you read is DOM. */

:root {
  color-scheme: dark;
  --ground: #0a0b0d;
  --ground-2: #121419;
  --ink: #eceae4;
  --ink-2: #b4b4af;
  --muted: #7b7d82;
  --line: rgba(236, 234, 228, .12);
  --milk: #f3f2ee;
  --milk-2: #e4e3de;
  --carbon: #0c0c0d;
  --carbon-2: #5d5e61;
  --f-display: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --f-ui: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --f-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --gutter: clamp(16px, 2.4vw, 34px);
  --top: max(env(safe-area-inset-top, 0px), 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 15px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow: hidden; overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
::selection { background: rgba(160, 220, 255, .35); color: #fff; }

.skip { position: fixed; left: var(--gutter); top: 8px; z-index: 90; padding: 8px 14px; border-radius: 99px; background: var(--milk); color: var(--carbon); transform: translateY(-160%); transition: transform .3s var(--ease-out); }
.skip:focus { transform: none; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.bg-fallback { display: none; position: fixed; inset: 0; z-index: 0;
  background:
    linear-gradient(rgba(236,234,228,.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(236,234,228,.035) 1px, transparent 1px) 0 0 / 56px 56px,
    radial-gradient(60% 55% at 50% 50%, #17191e, var(--ground) 75%);
}
.no-gl .bg-fallback { display: block; }
.no-gl #gl { display: none; }

/* ---- Top bar ---------------------------------------------------------------- */
.topbar {
  position: fixed; z-index: 30; left: 0; right: 0; top: 0;
  padding: calc(var(--top) + 18px) var(--gutter) 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 11px; justify-self: start; padding: 6px 0; }
.brand-word, .menu-brand, .loader-word { font: 500 17px/1 var(--f-display); letter-spacing: -.02em; }
.brand-word em, .menu-brand em, .loader-word em { font: italic 400 1.12em/1 var(--f-serif); letter-spacing: 0; }
.brand-mark { position: relative; width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.95) 0 9%, rgba(255,255,255,0) 26%), radial-gradient(circle at 60% 70%, #232730, #0c0d10 70%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 2px 10px rgba(0,0,0,.5);
}
.brand-mark::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; padding: 1.6px;
  background: conic-gradient(from 210deg, #ff8f8f, #ffe08a, #8fffc4, #8ad4ff, #c38fff, #ff8f8f);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .75; transition: transform 1.2s var(--ease-out), opacity .4s;
}
.brand:hover .brand-mark::before { transform: rotate(200deg); opacity: 1; }

.switch { position: relative; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 99px; justify-self: center;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.switch-opt { position: relative; z-index: 1; padding: 8px 15px; border-radius: 99px; font-size: 14px; color: var(--muted); transition: color .35s; }
.switch-opt[aria-pressed="true"] { color: var(--ink); }
.switch-opt:hover { color: var(--ink); }
.switch-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.switch-lens { position: absolute; left: 0; top: 4px; bottom: 4px; width: 60px; border-radius: 99px; z-index: 0; transform-origin: 50% 50%;
  background:
    radial-gradient(120% 140% at 30% 0%, rgba(255,255,255,.22), rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(255,255,255,.1), 0 6px 18px rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(6px) saturate(1.6) brightness(1.2); backdrop-filter: blur(6px) saturate(1.6) brightness(1.2);
}
.switch-lens::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: conic-gradient(from 90deg, rgba(255,140,140,.5), rgba(255,230,140,.2), rgba(140,255,200,.45), rgba(140,210,255,.2), rgba(200,150,255,.5), rgba(255,140,140,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .6; }
body:not([data-view="spiral"]):not([data-view="list"]) .switch { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.menu-btn { justify-self: end; height: 40px; padding: 0 20px; border-radius: 99px; background: var(--milk); color: var(--carbon);
  font-size: 14px; font-weight: 500; box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 6px 20px rgba(0,0,0,.35);
  transition: transform .5s var(--spring), background .3s; }
.menu-btn:hover { transform: scale(1.05); }
.menu-btn:active { transform: scale(.93); transition-duration: .12s; }
.menu-btn-label { display: inline-block; }

/* ---- Views ----------------------------------------------------------------- */
.view { position: fixed; inset: 0; z-index: 10; opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease-out), visibility 0s linear .45s; }
.view.is-active { opacity: 1; visibility: visible; transition: opacity .8s var(--ease-out) .1s, visibility 0s; }
.view-list, .view-project, .view-about { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.view-list::-webkit-scrollbar, .view-project::-webkit-scrollbar, .view-about::-webkit-scrollbar { display: none; }

/* Spiral */
.stage { position: absolute; inset: 0; cursor: grab; touch-action: none; outline: none; }
.stage.is-dragging { cursor: grabbing; }
.stage:focus-visible { box-shadow: inset 0 0 0 1px rgba(236,234,228,.25); border-radius: 0; }
.caption { position: absolute; left: 50%; bottom: calc(var(--bottom) + 30px); transform: translateX(-50%); text-align: center; pointer-events: none; width: min(560px, 60vw); }
.caption-roll { display: flex; align-items: baseline; justify-content: center; gap: 12px; overflow: hidden; height: 34px; }
.caption-num { font: 500 11px/1 var(--f-mono); color: var(--muted); transform: translateY(-9px); }
.caption-title { font: 500 30px/34px var(--f-display); letter-spacing: -.03em; }
.caption-roll.is-rolling > * { animation: roll .55s var(--ease-out) both; }
.caption-roll.is-rolling .caption-num { animation-name: roll-num; }
@keyframes roll { from { transform: translateY(100%); opacity: 0; } }
@keyframes roll-num { from { transform: translateY(26px); opacity: 0; } }
.caption-meta { margin: 6px 0 0; display: flex; gap: 14px; justify-content: center; font-size: 12px; color: var(--muted); }
.caption-mat { font-family: var(--f-mono); font-size: 11px; }
.hint { position: absolute; left: var(--gutter); top: calc(var(--top) + 84px); margin: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; font: 10px var(--f-mono); color: var(--muted); letter-spacing: .08em; }
.hint i { width: 26px; height: 1px; background: var(--line); }

/* List */
.view-list { padding: calc(var(--top) + 120px) var(--gutter) calc(var(--bottom) + 140px); }
.works { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-direction: column; align-items: center; }
.works li { width: 100%; display: flex; justify-content: center; }
.work-link { position: relative; display: inline-flex; align-items: flex-start; gap: 10px; padding: .06em .12em; color: var(--ink);
  font: 500 clamp(44px, 7.6vw, 128px)/.96 var(--f-display); letter-spacing: -.045em; transition: color .45s var(--ease-out), opacity .45s; }
.work-num { font: 500 12px/1 var(--f-mono); letter-spacing: 0; color: var(--muted); margin-top: .8em; transition: color .3s; }
.work-meta { position: absolute; left: 100%; top: 50%; transform: translate(10px, -50%); white-space: nowrap; font: 12px/1.4 var(--f-mono); letter-spacing: 0; color: var(--ink-2); opacity: 0; transition: opacity .35s, transform .5s var(--ease-out); }
.works.is-hovering .work-link { color: rgba(236,234,228,.18); }
.works.is-hovering .work-link.is-active { color: var(--ink); }
.works.is-hovering .work-link.is-active .work-meta { opacity: 1; transform: translate(18px, -50%); }
.work-link.is-selected .work-num { color: var(--ink); }
.list-foot { text-align: center; color: var(--muted); font-size: 13px; margin: 56px 0 0; }
.list-count { font-family: var(--f-mono); }
.css-preview { display: none; }
.no-gl .css-preview { display: block; position: fixed; z-index: 5; width: 280px; aspect-ratio: 1.6; border-radius: 18px; pointer-events: none; opacity: 0; transition: opacity .3s;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 20px 50px rgba(0,0,0,.5); }

/* Project */
.view-project { padding: calc(var(--top) + 96px) var(--gutter) calc(var(--bottom) + 60px); }
.p-head { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; font-size: 13px; color: var(--ink-2); }
.p-back { display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; }
.p-back span { transition: transform .4s var(--ease-out); display: inline-block; }
.p-back:hover span { transform: translateX(-4px); }
.p-title { max-width: 1400px; margin: 22px auto 0; font: 500 clamp(64px, 14vw, 232px)/.84 var(--f-display); letter-spacing: -.055em; text-wrap: balance; }
.p-title .ch { display: inline-block; animation: rise .9s var(--ease-out) both; animation-delay: calc(var(--i) * 28ms + 120ms); }
@keyframes rise { from { transform: translateY(.5em) rotate(4deg); opacity: 0; filter: blur(8px); } }
.p-hero { position: relative; max-width: 1400px; margin: clamp(28px, 4vw, 56px) auto 0; aspect-ratio: 16 / 9; }
.no-gl .p-hero { border-radius: 26px; background: var(--fallback); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.p-info { max-width: 1400px; margin: clamp(40px, 6vw, 90px) auto 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
.p-lede { grid-column: 1 / span 7; margin: 0; font: 400 clamp(24px, 2.6vw, 40px)/1.12 var(--f-display); letter-spacing: -.02em; text-wrap: balance; }
.p-body { grid-column: 1 / span 6; margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 62ch; }
.p-specs { grid-column: 9 / span 4; grid-row: 1 / span 2; margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 20px; align-self: start; border-top: 1px solid var(--line); }
.p-specs dt, .p-specs dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.p-specs dt { color: var(--muted); }
.p-specs dd.mono { font-size: 12px; }
.p-plates { max-width: 1400px; margin: clamp(48px, 7vw, 110px) auto 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(12px, 1.6vw, 22px); }
.p-plate { margin: 0; position: relative; }
.p-plate canvas, .p-plate .plate-fallback { display: block; width: 100%; height: auto; aspect-ratio: 1.6; border-radius: 18px; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.p-plate.wide { grid-column: 1 / -1; }
.p-plate figcaption { margin-top: 10px; font: 11px var(--f-mono); color: var(--muted); display: flex; justify-content: space-between; }
.p-next { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; max-width: 1400px; margin: clamp(80px, 12vw, 180px) auto 0; padding-top: 22px; border-top: 1px solid var(--line); }
.p-next-label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 8px; }
.p-next-title { font: 500 clamp(48px, 9vw, 150px)/.9 var(--f-display); letter-spacing: -.05em; display: block; transition: transform .6s var(--ease-out); }
.p-next:hover .p-next-title { transform: translateX(12px); }
.p-next-card { width: clamp(150px, 22vw, 320px); aspect-ratio: 1.6; border-radius: 16px; }
.no-gl .p-next-card { background: var(--fallback); }

/* About */
.view-about { padding: calc(var(--top) + 130px) 0 0; }
.a-wrap { padding: 0 var(--gutter); max-width: 1560px; margin: 0 auto; }
.eyebrow { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 26px; display: flex; gap: 12px; align-items: center; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 12px rgba(255,255,255,.6); }
.a-lead { margin: 0; font: 500 clamp(34px, 5.4vw, 92px)/1.02 var(--f-display); letter-spacing: -.038em; }
.lit-line { display: block; --x: -20%; padding: .06em 0 .16em; margin: -.06em 0 -.16em;
  color: transparent; -webkit-text-stroke: .6px rgba(236,234,228,.16);
  background-image: linear-gradient(100deg,
    var(--ink) 0%, var(--ink) calc(var(--x) - 16%),
    #ffffff calc(var(--x) - 9%),
    #ffe2b8 calc(var(--x) - 5%), #b6f4ff calc(var(--x) - 1.5%), #d7b8ff calc(var(--x) + 2%),
    rgba(236,234,228,.12) calc(var(--x) + 8%), rgba(236,234,228,.12) 100%);
  -webkit-background-clip: text; background-clip: text;
  transform: translateY(calc((1 - var(--p, 0)) * .08em));
}
.lit-line.is-done { -webkit-text-stroke: 0; }
.reduced .lit-line, .no-light .lit-line { color: var(--ink); background: none; -webkit-text-stroke: 0; transform: none; }
.a-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); margin: clamp(90px, 14vw, 200px) 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.a-grid h2 { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.a-grid ul { list-style: none; margin: 0; padding: 0; }
.a-grid li { font: 400 clamp(20px, 1.8vw, 28px)/1.3 var(--f-display); letter-spacing: -.015em; }
.a-grid p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 44ch; }
.a-contact { position: relative; margin-top: clamp(120px, 16vw, 240px); padding: 0 var(--gutter) calc(var(--bottom) + 100px); overflow: hidden; min-height: 86vh; display: flex; flex-direction: column; justify-content: flex-end; }
.a-contact .eyebrow { max-width: 1560px; width: 100%; margin: 0 auto 26px; }
.a-cta { position: relative; z-index: 1; margin: 0 auto; max-width: 1560px; width: 100%; font: 500 clamp(56px, 11.4vw, 200px)/.86 var(--f-display); letter-spacing: -.055em; text-wrap: balance; }
.a-cta em { font: italic 400 1.04em/1 var(--f-serif); letter-spacing: -.02em; }
.a-contact-row { position: relative; z-index: 3; max-width: 1560px; width: 100%; margin: 48px auto 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.a-mail .mail-text { font: 400 clamp(22px, 2.6vw, 38px)/1.1 var(--f-display); letter-spacing: -.02em; user-select: all; }
.mail-row { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.copy-btn { height: 30px; padding: 0 13px; border-radius: 99px; font-size: 12px; box-shadow: inset 0 0 0 1px currentColor; opacity: .7; transition: opacity .2s, transform .4s var(--spring); }
.copy-btn:hover { opacity: 1; }
.copy-btn:active { transform: scale(.92); }
.sticker-hint { position: absolute; z-index: 1; top: 30px; right: var(--gutter); margin: 0; font: 11px var(--f-mono); color: var(--muted); }
.stickers { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.a-foot { max-width: 1560px; margin: 0 auto; padding: 22px var(--gutter) calc(var(--bottom) + 26px); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.a-foot .mono { font-size: 12px; }

/* Socials: circular chips shared by menu and contact */
.socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.social { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font: 500 13px var(--f-mono); transition: transform .5s var(--spring); }
.social:hover { transform: scale(1.1) rotate(-6deg); }
.social[aria-disabled="true"] { cursor: default; opacity: .45; }
.a-contact .social { color: var(--carbon); background: var(--milk); box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }

/* Glass stickers */
.sticker { position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); display: grid; place-items: center;
  font: 500 11px var(--f-mono); color: rgba(12,12,13,.72); border-radius: 50%;
  background:
    radial-gradient(90% 80% at 30% 18%, rgba(255,255,255,.85), rgba(255,255,255,0) 42%),
    radial-gradient(80% 80% at 70% 90%, rgba(255,255,255,.28), rgba(255,255,255,0) 50%),
    conic-gradient(from var(--h), rgba(255,150,150,.38), rgba(255,230,150,.3), rgba(150,255,200,.36), rgba(150,215,255,.32), rgba(205,160,255,.38), rgba(255,150,150,.38));
  -webkit-backdrop-filter: blur(5px) saturate(1.8) brightness(1.25); backdrop-filter: blur(5px) saturate(1.8) brightness(1.25);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.9), inset 0 -3px 8px rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.35), 0 10px 26px rgba(0,0,0,.4);
  will-change: transform, opacity; }
.sticker.pill { width: calc(var(--s) * 1.9); border-radius: 99px; }
.sticker.drop { border-radius: 50% 50% 50% 8%; }
.sticker.square { border-radius: 28%; }
.sticker.star { border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sticker.ring { background: none; box-shadow: inset 0 0 0 calc(var(--s) * .16) rgba(255,255,255,.3), inset 0 1px 1px rgba(255,255,255,.9), 0 10px 26px rgba(0,0,0,.35); }

/* ---- Dock, sound, cursor ---------------------------------------------------- */
.dock { position: fixed; z-index: 20; left: var(--gutter); bottom: calc(var(--bottom) + 22px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
body:not([data-view="spiral"]):not([data-view="list"]) .dock { opacity: 0; transform: translateY(10px); pointer-events: none; }
.reel-btn { display: flex; align-items: center; gap: 14px; text-align: left; }
.reel-thumb { position: relative; width: 96px; height: 60px; border-radius: 12px; display: grid; place-items: center; }
.no-gl .reel-thumb { background: linear-gradient(135deg, #2d9fb0, #07303f); }
.reel-play { width: 26px; height: 26px; border-radius: 50%; background: rgba(243,242,238,.92); position: relative; transition: transform .5s var(--spring); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.reel-play::after { content: ""; position: absolute; left: 10px; top: 8px; border-left: 8px solid var(--carbon); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.reel-btn:hover .reel-play { transform: scale(1.18); }
.reel-text { display: grid; gap: 2px; font-size: 14px; }
.reel-text small { color: var(--muted); }

.sound-btn { position: fixed; z-index: 20; right: var(--gutter); bottom: calc(var(--bottom) + 22px); width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); background: rgba(10,11,13,.35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .5s var(--spring), box-shadow .3s; }
.sound-btn:hover { transform: scale(1.07); box-shadow: inset 0 0 0 1px rgba(236,234,228,.3); }
.sound-btn:active { transform: scale(.92); }
.bars { display: flex; align-items: center; gap: 2.5px; height: 16px; }
.bars i { width: 2px; height: 2px; border-radius: 2px; background: var(--ink); transition: height .3s var(--ease-out); }
.sound-btn[aria-pressed="true"] .bars i { animation: bar 1.1s var(--ease-io) infinite alternate; }
.sound-btn[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.sound-btn[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.7s; }
.sound-btn[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.15s; }
.sound-btn[aria-pressed="true"] .bars i:nth-child(5) { animation-delay: -.5s; }
@keyframes bar { 0% { height: 3px; } 100% { height: 15px; } }

.cursor-tag { position: fixed; z-index: 70; left: 0; top: 0; pointer-events: none; padding: 6px 12px; border-radius: 99px; background: var(--milk); color: var(--carbon);
  font: 500 12px var(--f-ui); opacity: 0; transform: translate(-100px, -100px) scale(.6); transition: opacity .25s, scale .35s var(--spring); scale: .6; }
.cursor-tag.is-on { opacity: 1; scale: 1; }

/* ---- Menu -------------------------------------------------------------------- */
.menu { position: fixed; inset: 0; z-index: 50; }
.menu-panel { position: absolute; inset: calc(var(--top) + 10px) 10px calc(var(--bottom) + 10px); border-radius: 30px; color: var(--carbon);
  background: linear-gradient(165deg, rgba(248,247,244,.985), rgba(233,232,228,.975));
  -webkit-backdrop-filter: blur(28px) saturate(1.3); backdrop-filter: blur(28px) saturate(1.3);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255,255,255,.7), inset 0 -40px 80px rgba(0,0,0,.035), 0 30px 80px rgba(0,0,0,.5);
  display: grid; grid-template-rows: auto 1fr auto; padding: 22px clamp(20px, 3vw, 44px) clamp(20px, 3vw, 36px); overflow: hidden; }
.menu-panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--rim, 120deg), rgba(255,120,120,.55), rgba(255,220,120,.2), rgba(120,255,190,.5), rgba(120,200,255,.25), rgba(190,130,255,.55), rgba(255,120,120,.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.menu-sheen { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 20%), rgba(255,255,255,.95), rgba(255,255,255,0) 60%); mix-blend-mode: soft-light; }
.menu-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.menu-close { height: 40px; padding: 0 20px; border-radius: 99px; background: var(--carbon); color: var(--milk); font-size: 14px; font-weight: 500; transition: transform .5s var(--spring); }
.menu-close:hover { transform: scale(1.05); }
.menu-nav { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.menu-nav a { display: inline-flex; align-items: flex-start; gap: 10px; font: 500 clamp(64px, 12.5vw, 200px)/.88 var(--f-display); letter-spacing: -.06em; }
.menu-nav .mask { display: block; overflow: hidden; padding: 0 .04em .06em 0; }
.menu-nav .word { display: inline-block; transition: transform .6s var(--ease-out); }
.menu-nav a:hover .word { transform: translateX(.06em) skewX(-6deg); }
.menu-nav a[aria-current="page"] .word { font-style: italic; }
.menu-count { font-size: 14px; margin-top: .5em; color: var(--carbon-2); letter-spacing: 0; }
.menu-foot { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.menu-label { display: block; color: var(--carbon-2); margin-bottom: 8px; }
.menu-mail .mail-text { font: 500 clamp(18px, 1.8vw, 24px)/1.2 var(--f-display); letter-spacing: -.01em; user-select: all; }
.menu-studio { font: 500 clamp(18px, 1.8vw, 24px)/1.2 var(--f-display); letter-spacing: -.01em; }
.menu-studio:hover { text-decoration: underline; text-underline-offset: 4px; }
.menu-socials .social { background: var(--carbon); color: var(--milk); }

body.reel-open .caption, body.reel-open .hint, body.reel-open .dock, body.reel-open .switch { opacity: 0; pointer-events: none; }
.caption, .hint { transition: opacity .5s var(--ease-out); }
/* ---- Reel ------------------------------------------------------------------- */
.reel { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; }
.reel-frame { width: min(86vw, 138vh); aspect-ratio: 16 / 9; border-radius: 22px; cursor: pointer; }
.no-gl .reel-frame { background: linear-gradient(135deg, #2d9fb0, #07303f); }
.reel-ui { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--bottom) + 24px); display: grid; grid-template-columns: auto 1fr auto auto; gap: 22px; align-items: center; }
.reel-now { margin: 0; font: 500 20px var(--f-display); letter-spacing: -.02em; display: flex; gap: 10px; align-items: baseline; }
.reel-bar { height: 1px; background: var(--line); position: relative; }
.reel-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); }
.reel-time { margin: 0; color: var(--ink-2); }
.reel-close { height: 40px; padding: 0 20px; border-radius: 99px; background: var(--milk); color: var(--carbon); font-size: 14px; font-weight: 500; }

/* ---- Loader ------------------------------------------------------------------ */
.loader { position: fixed; inset: 0; z-index: 60; background: var(--ground); display: grid; place-items: center; }
.loader-inner { display: grid; justify-items: center; gap: 18px; }
.loader-word { font-size: 22px; }
.loader-line { width: 160px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.loader-line i { position: absolute; inset: 0; background: linear-gradient(90deg, #ff9d9d, #ffe39d, #9dffcc, #9dd9ff, #c99dff); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.loader-meta { display: flex; gap: 18px; color: var(--muted); }
.loader.is-done { clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease-io); }

.noscript { position: fixed; inset: auto 0 40% 0; text-align: center; z-index: 99; }

/* ---- Responsive ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .p-lede { grid-column: 1 / -1; }
  .p-body { grid-column: 1 / -1; }
  .p-specs { grid-column: 1 / -1; grid-row: auto; }
  .a-grid { grid-template-columns: 1fr 1fr; }
  .a-grid > :last-child { grid-column: 1 / -1; }
  .work-meta { display: none; }
}
@media (max-width: 640px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 8px; }
  .brand-word { display: none; }
  .switch-opt { padding: 8px 11px; font-size: 13px; }
  .menu-btn { height: 38px; padding: 0 16px; }
  .caption { bottom: calc(var(--bottom) + 96px); width: calc(100vw - 32px); }
  .caption-title { font-size: 24px; }
  .hint { display: none; }
  .dock { bottom: calc(var(--bottom) + 18px); }
  .reel-thumb { width: 72px; height: 45px; border-radius: 10px; }
  .sound-btn { bottom: calc(var(--bottom) + 18px); width: 46px; height: 46px; }
  .view-list { padding-top: calc(var(--top) + 96px); }
  .p-plates { grid-template-columns: 1fr; }
  .p-next { grid-template-columns: 1fr; }
  .a-grid { grid-template-columns: 1fr; }
  .menu-foot { flex-direction: column; align-items: flex-start; }
  .social { width: 50px; height: 50px; }
  .reel-ui { grid-template-columns: 1fr auto; }
  .reel-bar, .reel-time { display: none; }
  .sticker-hint { display: none; }
}
@media (hover: none) {
  .work-meta { display: none; }
  /* Touch: a fixed glass preview sits above the list and follows the row in the middle. */
  .view-list { padding-top: calc(var(--top) + 300px); padding-bottom: 42vh; }
  .work-link { font-size: clamp(40px, 11vw, 72px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
