/* =========================================================
   Bhaskar Roy — Photography
   Darkroom palette: warm black, paper white, brass, and a red
   safelight used only while the print develops.
   ========================================================= */
:root {
  --serif: "Cormorant", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --bar: 64px;
}
:root, :root[data-theme="dark"] {
  --bg: #0E0D0C; --bg2: #151311; --panel: #1A1815; --line: rgba(242, 236, 226, .1); --line2: rgba(242, 236, 226, .2);
  --text: #F1ECE3; --muted: #A39C91; --faint: #6E685F; --gold: #C9A55C; --gold2: #E6CF98; --ink: #17120A;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F4F3F0; --bg2: #FFFFFF; --panel: #FFFFFF; --line: rgba(20, 19, 17, .1); --line2: rgba(20, 19, 17, .2);
  --text: #141311; --muted: #5F5A52; --faint: #9A948A; --gold: #8E6A26; --gold2: #8E6A26; --ink: #FFFFFF;
  --shadow: 0 30px 70px -35px rgba(20, 19, 17, .35);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 120px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "lnum" 1; overflow-x: hidden; transition: background-color .4s; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--ink); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 12px; }
body.viewing { overflow: hidden; }

/* ---------- bar ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--bar); display: flex; align-items: center; gap: 24px; padding: 0 clamp(16px, 3vw, 36px); transition: background-color .4s, border-color .4s; border-bottom: 1px solid transparent; color: #F1ECE3; }
.bar.solid { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--line); color: var(--text); }
:root[data-theme="light"] .bar { color: var(--text); }
:root[data-theme="light"] body.dark-phase .bar:not(.solid) { color: #F1ECE3; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mono { width: 38px; height: 38px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font: 500 16px/1 var(--serif); opacity: .9; }
.brand-t { display: grid; font: 400 1.15rem/1.05 var(--serif); }
.brand-t small { font: 400 11px/1.4 var(--sans); opacity: .6; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; text-decoration: none; font-size: 14px; opacity: .75; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.bar-act { display: flex; align-items: center; gap: 8px; }
.ib { width: 38px; height: 38px; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); background: transparent; cursor: pointer; display: grid; place-items: center; transition: border-color .2s; }
.ib:hover { border-color: currentColor; }
.pill { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); display: inline-flex; align-items: center; text-decoration: none; font-size: 13.5px; }
.pill:hover { border-color: var(--gold); color: var(--gold2); }

.btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none; font-size: 14.5px; font-weight: 500; transition: background-color .25s, border-color .25s, color .25s, transform .3s var(--ease); }
.btn.gold { background: var(--gold); color: #17120A; }
.btn.gold:hover { background: #E6CF98; transform: translateY(-1px); }
.btn.ghost { border-color: var(--line2); background: transparent; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold2); }

/* =========================================================
   STORY
   ========================================================= */
.story { position: relative; }
body.has-intro .story { height: 820vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); transition: background-color .6s; }
body.has-intro .stage.darkroom { background: #0B0A09; }
body.no-intro .stage { position: relative; min-height: 100svh; height: auto; }

/* Hero: full-bleed portrait on the right, melting into the page through a graduated blur */
.hero { position: absolute; inset: 0; overflow: hidden; transform-origin: 70% 50%; will-change: transform; }
body.no-intro .hero { position: relative; min-height: 100svh; }
.hero-portrait { position: absolute; top: 0; right: 0; bottom: 0; width: 64%; margin: 0; }
.hero-portrait img, .portrait-empty { width: 100%; height: 100%; object-fit: cover; object-position: 60% 22%; filter: grayscale(1) contrast(1.12) brightness(.92); }
.portrait-empty { display: grid; place-items: center; background: var(--panel); color: var(--faint); font-size: 56px; filter: none; }
/* progressive blur: each layer blurs more and covers less, so sharpness falls off smoothly */
.hero-veil { position: absolute; top: 0; bottom: 0; right: 0; width: 64%; pointer-events: none; }
.hero-veil i { position: absolute; inset: 0; display: block; }
.hero-veil i:nth-child(1) { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); -webkit-mask: linear-gradient(90deg, #000 0, #000 22%, transparent 46%); mask: linear-gradient(90deg, #000 0, #000 22%, transparent 46%); }
.hero-veil i:nth-child(2) { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); -webkit-mask: linear-gradient(90deg, #000 0, #000 16%, transparent 36%); mask: linear-gradient(90deg, #000 0, #000 16%, transparent 36%); }
.hero-veil i:nth-child(3) { backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); -webkit-mask: linear-gradient(90deg, #000 0, #000 10%, transparent 27%); mask: linear-gradient(90deg, #000 0, #000 10%, transparent 27%); }
.hero-veil i:nth-child(4) { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); -webkit-mask: linear-gradient(90deg, #000 0, #000 5%, transparent 19%); mask: linear-gradient(90deg, #000 0, #000 5%, transparent 19%); }
.hero-veil i:nth-child(5) { backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); -webkit-mask: linear-gradient(90deg, #000 0, transparent 12%); mask: linear-gradient(90deg, #000 0, transparent 12%); }
.hero-veil i:nth-child(6) { background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 9%, color-mix(in srgb, var(--bg) 35%, transparent) 24%, transparent 44%),
  linear-gradient(0deg, color-mix(in srgb, var(--bg) 70%, transparent) 0, transparent 22%), linear-gradient(180deg, color-mix(in srgb, var(--bg) 45%, transparent) 0, transparent 16%); }
.hero-copy { position: absolute; left: clamp(18px, 5vw, 88px); top: 50%; transform: translateY(-46%); width: min(50%, 640px); z-index: 2; text-align: left; }
.hero-name { margin: 0; display: grid; font: 300 clamp(4.2rem, 10vw, 10.5rem)/.84 var(--serif); letter-spacing: -.04em; }
.hero-name span:last-child { padding-left: .48em; font-style: italic; }
.hero-role { margin: 28px 0 0; font: 400 clamp(1.2rem, 1.8vw, 1.5rem)/1.3 var(--serif); color: var(--gold2); }
.hero-aka { margin: 10px 0 0; font: 400 11.5px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.hero-aka b { font-weight: 500; color: var(--muted); }
.hero-intro { margin: 12px 0 0; max-width: 42ch; color: var(--muted); font-size: 17px; }
.hero-stats { margin: 18px 0 0; font: 400 13px/1.6 var(--mono); color: var(--faint); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.scroll-cue span { width: 22px; height: 34px; border-radius: 12px; border: 1.5px solid var(--line2); position: relative; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 50% { transform: translateY(9px); opacity: .3; } }

.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .3s; }
.gl.ready { opacity: 1; }
.iris-fallback { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, transparent 0, transparent 8%, #000 30%); }
.lensfx { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55) 100%), 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.stage.darkroom .lensfx { opacity: 1; }
.iris, .scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.scene { opacity: 0; transition: opacity .2s; }
.iris .blade { filter: drop-shadow(0 0 6px rgba(0, 0, 0, .8)); }
.iris.shut .iris-ring { display: none; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; mix-blend-mode: normal; }
.safelight { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 2; mix-blend-mode: multiply; background: radial-gradient(60% 70% at 62% 30%, rgba(255, 70, 50, .95), rgba(150, 18, 10, .95) 60%, rgba(70, 6, 4, 1)); }
.scene { z-index: 1; }
.iris { z-index: 3; }
.flash { z-index: 5; }
.pol-note { font: italic 400 15px var(--serif); fill: #3b352c; }
.cam-mark { font: 500 18px var(--serif); fill: #c9a55c; letter-spacing: .1em; }
.tray-mark { font: 500 10px var(--mono); fill: rgba(255, 255, 255, .35); letter-spacing: .2em; }

.story-hud { position: absolute; left: clamp(18px, 4vw, 48px); bottom: clamp(18px, 4vh, 40px); z-index: 5; display: grid; gap: 2px; color: #F1ECE3; opacity: 0; transition: opacity .3s; pointer-events: none; }
#hud-l { font: 500 clamp(1.6rem, 3vw, 2.4rem)/1 var(--mono); letter-spacing: -.02em; }
#hud-r { font: 400 13px/1.4 var(--sans); color: rgba(241, 236, 227, .6); }
.stage.ended .story-ui, .stage.ended .story-hud, .stage.at-hero .story-ui, .stage.at-hero .story-hud { opacity: 0 !important; pointer-events: none; }
.story-ui { transition: opacity .3s; }
.story-ui { position: absolute; right: clamp(14px, 3vw, 36px); bottom: clamp(18px, 4vh, 40px); z-index: 6; display: flex; flex-direction: column; align-items: flex-end; gap: 18px; color: #F1ECE3; }
.story-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.story-steps button { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border: 0; background: none; cursor: pointer; padding: 4px 0; font-size: 12px; color: rgba(241, 236, 227, .45); transition: color .3s; }
.story-steps button::after { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; transition: background-color .3s, transform .3s; }
.story-steps li.done button { color: rgba(241, 236, 227, .7); }
.story-steps li.on button { color: #E6CF98; }
.story-steps li.on button::after { background: #C9A55C; border-color: #C9A55C; transform: scale(1.4); }
.story-steps span { opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s; }
.story-steps li.on span, .story-steps:hover span { opacity: 1; transform: none; }
.skip-intro { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(241, 236, 227, .25); background: rgba(14, 13, 12, .4); backdrop-filter: blur(8px); cursor: pointer; font-size: 12.5px; color: #F1ECE3; display: inline-flex; gap: 8px; align-items: center; }
.skip-intro:hover { border-color: #C9A55C; color: #E6CF98; }

.story-final { position: absolute; z-index: 5; inset: 0; display: grid; align-items: center; justify-items: start; padding: 0 clamp(18px, 6vw, 96px) 0 58%; opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); pointer-events: none; color: #F1ECE3; }
.story-final.show { opacity: 1; transform: none; pointer-events: auto; }
.fin-k { margin: 0 0 6px; font: 400 13px/1.4 var(--sans); color: #C9A55C; }
.story-final h2 { margin: 0; font: 300 clamp(2.4rem, 4.6vw, 4.4rem)/1 var(--serif); letter-spacing: -.02em; max-width: 14ch; }
.fin-sub { margin: 12px 0 0; color: rgba(241, 236, 227, .65); }
.fin-exif { margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; font: 400 14px/1.8 var(--mono); color: #E6CF98; }
.fin-exif i { width: 4px; height: 4px; border-radius: 50%; background: rgba(241, 236, 227, .3); }
.fin-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.story-final .btn.ghost { color: #F1ECE3; border-color: rgba(241, 236, 227, .25); }

/* =========================================================
   GALLERY
   ========================================================= */
.work { position: relative; padding: clamp(80px, 10vw, 140px) clamp(14px, 3vw, 40px) 40px; background: var(--bg); }
.work-head { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 16px 48px; padding-bottom: 22px; }
.work-head h2 { margin: 0; font: 300 clamp(3rem, 7vw, 6.2rem)/.9 var(--serif); letter-spacing: -.03em; }
.work-head p { margin: 0; justify-self: end; max-width: 48ch; color: var(--muted); font-size: 15px; text-align: right; }
.filters { position: sticky; top: var(--bar); z-index: 30; max-width: 1500px; margin: 0 auto 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 10px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cats { position: relative; display: flex; flex-wrap: wrap; gap: 2px; flex: 1; min-width: 0; }
.cats button { position: relative; z-index: 1; height: 38px; padding: 0 14px; border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--muted); border-radius: 999px; transition: color .3s; white-space: nowrap; }
.cats button sup { margin-left: 4px; font: 400 10px var(--mono); color: var(--faint); vertical-align: super; }
.cats button:hover { color: var(--text); }
.cats button[aria-selected="true"] { color: #17120A; }
.cats button[aria-selected="true"] sup { color: rgba(23, 18, 10, .6); }
.cat-ink { position: absolute; left: 0; top: 0; height: 38px; border-radius: 999px; background: var(--gold); transition: transform .5s var(--ease), width .5s var(--ease); z-index: 0; }
:root[data-theme="light"] .cats button[aria-selected="true"] { color: #fff; }
:root[data-theme="light"] .cats button[aria-selected="true"] sup { color: rgba(255, 255, 255, .7); }
.filters-r { display: flex; align-items: center; gap: 10px; }
.active-tag { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid var(--gold); font-size: 13px; color: var(--gold2); }
.active-tag button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: none; cursor: pointer; color: inherit; }
.sort { position: relative; display: inline-flex; }
.sort select { appearance: none; height: 36px; padding: 0 32px 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; cursor: pointer; font-size: 13px; color: var(--text); }
.sort select option { background: var(--bg2); }
.sort i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--muted); pointer-events: none; }
.cat-desc { max-width: 1500px; margin: -8px auto 22px; color: var(--muted); font: italic 400 1.25rem/1.4 var(--serif); }

.masonry { position: relative; max-width: 1500px; margin: 0 auto; transition: height .6s var(--ease); }
.tile {
  position: absolute; left: 0; top: 0; padding: 0; border: 0; cursor: pointer; overflow: hidden; border-radius: 3px; background: var(--panel); color: #fff; text-align: left;
  transition: transform .75s var(--ease), opacity .45s var(--ease), width .75s var(--ease), height .75s var(--ease);
  transition-delay: var(--d, 0ms);
}
.tile.out { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.tile .ph { position: absolute; inset: -12px; filter: blur(14px); transform: scale(1.05); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease), transform 1.2s var(--ease); }
.tile.loaded img { opacity: 1; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.035); }
.ov { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; opacity: 0; transition: opacity .4s var(--ease); background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0, transparent 26%, transparent 48%, rgba(0, 0, 0, .78) 100%); }
.tile:hover .ov, .tile:focus-visible .ov { opacity: 1; }
.ov-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ov-cam { display: grid; font: 500 11.5px/1.45 var(--mono); color: rgba(255, 255, 255, .92); }
.ov-cam i { margin-right: 4px; color: #E6CF98; }
.ov-cam em { font-style: normal; font-weight: 400; color: rgba(255, 255, 255, .65); }
.hst { display: block; }
.hst path { mix-blend-mode: screen; }
.hst .r { fill: rgba(255, 70, 70, .6); } .hst .g { fill: rgba(70, 220, 90, .6); } .hst .b { fill: rgba(80, 130, 255, .65); } .hst .l { fill: rgba(255, 255, 255, .55); }
.ov-hist { width: 96px; height: 34px; padding: 3px; border-radius: 4px; background: rgba(0, 0, 0, .55); flex: none; }
.ov-bot { display: grid; gap: 2px; transform: translateY(8px); transition: transform .5s var(--ease); }
.tile:hover .ov-bot, .tile:focus-visible .ov-bot { transform: none; }
.ov-bot b { font: 400 1.45rem/1.1 var(--serif); }
.ov-bot small { font-size: 12px; color: rgba(255, 255, 255, .7); }
.ov-exif { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ov-exif span { font: 500 11px/1 var(--mono); padding: 5px 7px; border-radius: 3px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 80px 20px; text-align: center; color: var(--muted); }
.empty-state i { font-size: 30px; color: var(--gold); margin-bottom: 8px; }
.empty-state b { font: 300 2.4rem/1 var(--serif); color: var(--text); }
.ns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

.cursor { position: fixed; left: -44px; top: -44px; z-index: 50; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; pointer-events: none; background: rgba(201, 165, 92, .92); color: #17120A; font: 500 13px var(--sans); transform: translate(-200px, -200px); opacity: 0; scale: .4; transition: opacity .25s, scale .35s var(--ease); }
.cursor.on { opacity: 1; scale: 1; }

/* gear + about */
.wrap { max-width: 1180px; margin: 0 auto; }
.gear, .about { padding: clamp(70px, 9vw, 120px) clamp(18px, 4vw, 48px) 0; }
.gear h2, .about h2 { margin: 0; font: 300 clamp(2.6rem, 5vw, 4.4rem)/1 var(--serif); letter-spacing: -.02em; }
.gear-note { margin: 14px 0 34px; color: var(--muted); max-width: 64ch; }
.gear-note b { color: var(--text); font: 500 14px var(--mono); }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.gear-col h3 { margin: 0 0 14px; font: 400 1.4rem/1.2 var(--serif); color: var(--gold2); }
.gear-col h3 i { font-size: 14px; margin-right: 6px; }
.gear-col ul { list-style: none; margin: 0; padding: 0; }
.gear-col li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.gear-col li em { font: 400 13px var(--mono); font-style: normal; color: var(--muted); }
.gear-col li i { position: absolute; left: 0; bottom: -1px; height: 1px; width: var(--w); background: var(--gold); }
.about-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px 64px; border-top: 1px solid var(--line); padding-top: 36px; }
.about-body p { margin: 0 0 22px; color: var(--muted); font-size: 17px; line-height: 1.75; max-width: 62ch; white-space: pre-line; }
.about-body .about-aka { font-size: 15px; color: var(--faint); }
.about-aka a, .foot a[rel=me] { color: inherit; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; }
.about-links a { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); text-decoration: none; font-size: 14px; transition: border-color .2s, color .2s; }
.about-links a:hover { border-color: var(--gold); color: var(--gold2); }
.foot { max-width: 1180px; margin: 90px auto 0; padding: 24px clamp(18px, 4vw, 48px) 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.foot a { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 400; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; transition: all .35s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   VIEWER — camera back in playback mode
   ========================================================= */
.viewer { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(6, 5, 5, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 20px; }
.viewer.on .cam { animation: camIn .55s var(--ease); }
.viewer.on .lcd-img { animation: powerOn .6s .15s both; }
@keyframes camIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes powerOn { from { filter: brightness(0); } 40% { filter: brightness(1.6) saturate(0); } to { filter: none; } }
.cam {
  --cam: min(1260px, 96vw, (100vh - 40px) * 1.62);
  width: var(--cam); aspect-ratio: 1.62; display: grid; grid-template-columns: 9% 1fr 19%; grid-template-rows: 11% 1fr; gap: 0 2.4%;
  padding: 0 2.2% 3.4% 2.2%; border-radius: calc(var(--cam) * .045); position: relative;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .06), transparent 50%),
    repeating-radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #2a2826, #121110);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(0, 0, 0, .6), 0 60px 120px -40px #000, 0 0 0 1px rgba(255, 255, 255, .04);
}
.cam-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 1%; }
.eyepiece { width: 15%; height: 70%; margin-top: 1%; border-radius: 12px 12px 18px 18px; background: linear-gradient(180deg, #0b0b0b, #1c1b1a); box-shadow: inset 0 0 0 2px #050505, inset 0 6px 14px rgba(0, 0, 0, .9); }
.cam-brand { font: 500 calc(var(--cam) * .016) var(--serif); color: #C9A55C; letter-spacing: .18em; opacity: .85; }
.cam-left { display: flex; flex-direction: column; justify-content: space-around; align-items: center; }
.cb { width: calc(var(--cam) * .046); height: calc(var(--cam) * .046); min-width: 34px; min-height: 34px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #d9d4ca; font: 600 calc(var(--cam) * .0085) var(--sans); letter-spacing: .04em;
  background: radial-gradient(circle at 40% 30%, #3a3836, #151413); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 6px rgba(0, 0, 0, .6); transition: transform .1s, color .2s; }
.cb i { font-size: calc(var(--cam) * .012); }
.cb:hover { color: #E6CF98; }
.cb:active { transform: translateY(1px) scale(.97); }
.lcd { position: relative; align-self: center; aspect-ratio: 3 / 2; width: 100%; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 0 0 calc(var(--cam) * .008) #060606, 0 0 0 calc(var(--cam) * .011) #2b2a28, inset 0 0 30px rgba(0, 0, 0, .9); font: 500 clamp(9px, calc(var(--cam) * .0105), 14px)/1.3 var(--mono); color: #f2f2f2; touch-action: none; user-select: none; }
.lcd-img { position: absolute; overflow: hidden; transition: left .3s var(--ease), top .3s var(--ease), width .3s var(--ease), height .3s var(--ease); }
.lcd-img img { width: 100%; height: 100%; object-fit: cover; transform-origin: center; transition: transform .25s var(--ease), opacity .12s; opacity: .15; }
.lcd-img img.in { opacity: 1; }
.lcd.zoomed .lcd-img img { cursor: grab; }
#blinkies { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: center; display: none; pointer-events: none; image-rendering: pixelated; }
.lcd.mode-2 #blinkies.has { display: block; animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hud { position: absolute; left: 0; right: 0; padding: 1.6% 2.2%; display: flex; gap: 1.4em; align-items: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); pointer-events: none; transition: opacity .2s; }
.hud-top { top: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent); }
.hud-bot { bottom: 0; flex-direction: column; align-items: stretch; gap: .25em; background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent); }
.h-row { display: flex; gap: 1.6em; align-items: baseline; }
.h-main { font-size: 1.25em; }
.h-mode { padding: 0 .4em; border: 1px solid #f2f2f2; border-radius: 3px; }
.h-sub { color: rgba(242, 242, 242, .75); }
.h-title { font-family: var(--sans); font-weight: 500; }
.h-grow { flex: 1; }
.h-play { color: #7CFC9A; }
.h-stars { color: #f6c445; letter-spacing: .1em; }
.h-card { padding: 0 .35em; border: 1px solid currentColor; border-radius: 2px; font-size: .85em; }
.h-batt { display: inline-flex; gap: 2px; padding: 2px 3px; border: 1px solid currentColor; border-radius: 2px; position: relative; }
.h-batt::after { content: ""; position: absolute; right: -4px; top: 30%; width: 2px; height: 40%; background: currentColor; }
.h-batt i { width: .45em; height: .8em; background: currentColor; }
.lcd.mode-1 .hud, .lcd.mode-2 .hud-bot { opacity: 0; }
.lcd-side { position: absolute; right: 0; top: 0; bottom: 0; width: 40%; padding: 9% 3% 3%; display: none; flex-direction: column; gap: 1em; background: #050505; border-left: 1px solid #1d1d1d; overflow: hidden; }
.lcd.mode-2 .lcd-side { display: flex; }
.hist-big { display: grid; gap: .5em; }
.hist-big .hst { width: 100%; height: 3.4em; background: #111; border: 1px solid #2a2a2a; }
.hb-l .hst { height: 5em; }
.hb-rgb { display: grid; gap: .3em; }
.hb-rgb .hst { height: 2.2em; }
.lcd-side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25em 1em; font-size: .92em; }
.lcd-side dt { color: #8d8d8d; }
.lcd-side dd { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcd-nav { position: absolute; right: 2.5%; bottom: 4%; width: 18%; border: 1px solid rgba(255, 255, 255, .7); background-size: cover; background-position: center; opacity: .9; box-shadow: 0 0 0 1px #000; }
.lcd-nav span { position: absolute; border: 1.5px solid #f6c445; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.lcd-msg { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); padding: .4em .9em; background: rgba(0, 0, 0, .75); border: 1px solid #333; border-radius: 4px; opacity: 0; pointer-events: none; white-space: nowrap; }
.lcd-msg.show { animation: msg 1.4s var(--ease); }
@keyframes msg { 10%, 70% { opacity: 1; } 100% { opacity: 0; } }
.lcd-menu { position: absolute; inset: 0; background: #070707; display: flex; flex-direction: column; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.m-tabs { display: flex; gap: 0; border-bottom: 1px solid #262626; }
.m-tabs span { padding: .9em 1.4em; color: #777; font-size: .95em; }
.m-tabs span.on { color: #111; background: #E6CF98; }
.m-body { flex: 1; overflow-y: auto; padding: 1.4em 2em 2em; font-family: var(--sans); font-size: 1.05em; }
.m-body h3 { margin: 0 0 .3em; font: 400 2.2em/1.1 var(--serif); color: #fff; }
.m-cap { margin: 0 0 1em; color: #b8b8b8; font-size: 1.05em; line-height: 1.6; }
.m-body dl { display: grid; grid-template-columns: 9em 1fr; gap: 0; margin: 0; }
.m-body dt, .m-body dd { padding: .55em 0; border-bottom: 1px solid #1d1d1d; }
.m-body dt { color: #8d8d8d; }
.m-body dd { margin: 0; font-family: var(--mono); color: #eee; }
.m-tags { display: flex; flex-wrap: wrap; gap: .4em; margin-top: 1.2em; }
.m-tags button, .m-act button { border: 1px solid #3a3a3a; background: #111; color: #eee; border-radius: 999px; padding: .45em .9em; cursor: pointer; font: inherit; font-size: .95em; }
.m-tags button:hover, .m-act button:hover { border-color: #C9A55C; color: #E6CF98; }
.m-act { display: flex; gap: .5em; margin-top: 1.4em; }
.lcd-glass { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 32%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px); }
.cam-right { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 2% 0 0; }
.cb.info { align-self: flex-start; margin-left: 12%; }
.dial { --rot: 0deg; position: relative; width: 74%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #3a3836, #121110 70%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), 0 6px 14px rgba(0, 0, 0, .7), 0 0 0 4px #0b0a0a; }
.dial::before { content: ""; position: absolute; inset: 5%; border-radius: 50%; background: repeating-conic-gradient(from var(--rot), rgba(255, 255, 255, .12) 0 2deg, transparent 2deg 10deg); transition: background .3s var(--ease); -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%); mask: radial-gradient(circle, transparent 62%, #000 63%); }
.dial button { position: absolute; border: 0; background: none; cursor: pointer; color: #cfc9be; display: grid; place-items: center; }
.dial button:hover { color: #E6CF98; }
.d-up, .d-down { left: 30%; width: 40%; height: 26%; }
.d-up { top: 4%; } .d-down { bottom: 4%; }
.d-left, .d-right { top: 30%; width: 26%; height: 40%; font-size: calc(var(--cam) * .016); }
.d-left { left: 4%; } .d-right { right: 4%; }
.d-ok { left: 31%; top: 31%; width: 38%; height: 38%; border-radius: 50% !important; background: radial-gradient(circle at 40% 30%, #3e3c39, #191817) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 2px 6px rgba(0, 0, 0, .7); font: 600 calc(var(--cam) * .01) var(--sans) !important; }
.grip { width: 60%; height: 22%; border-radius: 14px; background: repeating-linear-gradient(90deg, #1a1918 0 3px, #242321 3px 6px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7); }
.viewer-mobile { display: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .nav { display: none; }
  .hero-portrait { left: 0; width: 100%; bottom: auto; height: 64%; }
  .hero-portrait img { object-position: 50% 18%; }
  .hero-veil { left: 0; width: 100%; top: 0; bottom: auto; height: 64%; }
  .hero-veil i:nth-child(-n+5) { -webkit-mask-image: linear-gradient(0deg, #000 0, #000 10%, transparent 42%); mask-image: linear-gradient(0deg, #000 0, #000 10%, transparent 42%); }
  .hero-veil i:nth-child(6) { background: linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 14%, transparent 45%), linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent) 0, transparent 18%); }
  .hero-copy { left: 18px; right: 18px; width: auto; top: auto; bottom: max(26px, 4svh); transform: none; }
  .hero-name { font-size: clamp(3.4rem, 15vw, 6rem); }
  .hero-role { margin-top: 14px; }
  .hero-intro { font-size: 15px; }
  .hero-stats { display: none; }
  .hero-cta { margin-top: 18px; }
  .hero-cta .btn { height: 42px; padding: 0 16px; font-size: 13.5px; }
  .scroll-cue { display: none; }
  .story-final { padding: 56vh 22px 0; align-items: start; justify-items: center; text-align: center; }
  .fin-exif, .fin-act { justify-content: center; }
  .story-final h2 { font-size: 2.2rem; }
  .story-steps { display: none; }
  .work-head { grid-template-columns: 1fr; }
  .work-head p { justify-self: start; text-align: left; }
  .filters { top: var(--bar); }
  .cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .viewer { padding: 0; }
  .cam { width: 100vw; height: 100svh; aspect-ratio: auto; display: block; padding: 0; border-radius: 0; background: #000; box-shadow: none; }
  .cam-top, .cam-left, .cam-right { display: none; }
  .lcd { position: absolute; inset: 0 0 64px 0; width: auto; height: auto; align-self: stretch; aspect-ratio: auto; border-radius: 0; box-shadow: none; font-size: 11px; }
  .lcd.mode-2 .lcd-side { display: none; }
  .viewer-mobile { display: flex; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; justify-content: space-around; align-items: center; background: #0b0b0b; border-top: 1px solid #1f1f1f; padding-bottom: env(safe-area-inset-bottom); }
  .viewer-mobile button { min-width: 44px; height: 44px; border: 0; background: none; color: #ddd; font: 600 11px var(--sans); letter-spacing: .04em; border-radius: 10px; }
  .viewer-mobile button:active { background: #1d1d1d; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
