/* Portfolio page (portfolio.html). Tokens, header and footer repeat styles.css; change both together. */
:root {
  /* Layout: navy hero with a month-by-month ribbon of every record, then year groups whose spine fills as you read; galleries keep the large-first-photo layout. */
  color-scheme: light;
  --paper: #f5f8f7;
  --surface: #ffffff;
  --ink: #10253d;
  --muted: #51677a;
  --line: #d9e3e4;
  --soft: #e9f3f0;
  --accent: #087d72;
  --teal: #14b8a6;
  --logo-ink: #0b2b54;
  --focus: #078778;
  --shadow: rgba(11, 43, 84, .16);
  --glow-card: rgba(20, 184, 166, .14);
  --btn-bg: #0b2b54;
  --btn-ink: #ffffff;
  --photo-bg: #e3ecea;
  --cat0: #b45309; --cat1: #6d28d9; --cat2: #087d72; --cat3: #be185d; --cat4: #1d6fb8; --cat5: #0b2b54;

  /* Navy surfaces (header, hero, CTA) stay navy in both themes, like the home mockup:
     light = brand navy with a white stats card, dark = deeper navy with a glass card. */
  --hero-bg: #0b2b54;
  --hero-bg2: #17508c;
  --hero-card: #ffffff;
  --hero-card-ink: #10253d;
  --hero-card-muted: #5a6f80;
  --hero-card-line: rgba(255, 255, 255, .7);
  --hero-card-track: #e3ebee;
  --hero-ink: #ecf5f8;
  --hero-muted: #a5bbca;
  --hero-line: rgba(148, 197, 214, .18);
  --hero-line-strong: rgba(170, 214, 228, .38);
  --hero-grid: rgba(170, 210, 225, .07);
  --glow: #3ce7d2;
  --glow-line: rgba(60, 231, 210, .32);
  --glass: rgba(14, 44, 78, .62);
  --hero-btn-bg: #3ce7d2;
  --hero-btn-ink: #04232a;
  --focus-dark: #70dfd0;
  --hc0: #ffc861; --hc1: #c4a8ff; --hc2: #3ce7d2; --hc3: #ff9fb2; --hc4: #8fc8ff; --hc5: #ffffff;
  --app-bg: #0f161e;
  --app-panel: #17212c;
  --app-line: #27333f;
  --app-ink: #e6edf2;
  --app-muted: #8fa1b0;

  --font-body: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  /* IBM Plex Mono has no Hangul: Korean inside mono labels falls back to the body face, not a system font. */
  --font-mono: "IBM Plex Mono", "Noto Sans KR", ui-monospace, Consolas, "SFMono-Regular", Menlo, monospace;
  --font-word: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --gutter: clamp(16px, 4vw, 44px);
  --maxw: 1200px;
  --header-h: 71px;
  --filter-h: 66px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #081422; --surface: #0e1e30; --ink: #e4edf2; --muted: #9db1c0; --line: #1e3348; --soft: #10263a;
    --accent: #5fdccb; --logo-ink: #ffffff; --focus: #70dfd0; --shadow: rgba(0, 0, 0, .5); --glow-card: rgba(60, 231, 210, .1);
    --btn-bg: #5fdccb; --btn-ink: #04201c; --photo-bg: #13293a;
    --cat0: #ffc861; --cat1: #c4a8ff; --cat2: #5fdccb; --cat3: #ff9fb2; --cat4: #8fc8ff; --cat5: #e4edf2;
    --hero-bg: #061a33; --hero-bg2: #0d3060; --hero-card: rgba(14, 44, 78, .62); --hero-card-ink: #ecf5f8; --hero-card-muted: #a5bbca; --hero-card-line: rgba(148, 197, 214, .18); --hero-card-track: rgba(148, 197, 214, .18);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #081422; --surface: #0e1e30; --ink: #e4edf2; --muted: #9db1c0; --line: #1e3348; --soft: #10263a;
  --accent: #5fdccb; --logo-ink: #ffffff; --focus: #70dfd0; --shadow: rgba(0, 0, 0, .5); --glow-card: rgba(60, 231, 210, .1);
  --btn-bg: #5fdccb; --btn-ink: #04201c; --photo-bg: #13293a;
  --cat0: #ffc861; --cat1: #c4a8ff; --cat2: #5fdccb; --cat3: #ff9fb2; --cat4: #8fc8ff; --cat5: #e4edf2;
  --hero-bg: #061a33; --hero-bg2: #0d3060; --hero-card: rgba(14, 44, 78, .62); --hero-card-ink: #ecf5f8; --hero-card-muted: #a5bbca; --hero-card-line: rgba(148, 197, 214, .18); --hero-card-track: rgba(148, 197, 214, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.75; word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.dialog-open { overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--hero-bg); }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.site-header, .p-hero, .p-cta, .viewer { --focus: var(--focus-dark); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; color: var(--accent); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--teal); flex-shrink: 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { transform: translateY(108%); } to { transform: none; } }

.skip-link { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 10px 16px; border-radius: 8px; background: var(--hero-btn-bg); color: var(--hero-btn-ink); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
#main:focus { outline: none; }
/* Dev server only: records marked "draft": true, and the notice that lists them. */
.dev-notice { background: var(--soft); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.dev-notice .wrap { padding-block: 9px; }
.dev-notice strong { margin-right: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; color: var(--ink); }
.dev-notice code { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.draft-badge { display: inline-flex; align-items: center; flex-shrink: 0; padding: 0 8px; border-radius: 999px; border: 1px dashed currentColor; font-size: 11.5px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.records-empty { padding-block: 56px; color: var(--muted); font-size: 15px; }

/* Header (same as home mockup) */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--hero-bg); border-bottom: 1px solid var(--hero-line); color: var(--hero-ink); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 10px 30px -16px rgba(0, 0, 0, .6); }
.header-inner { position: relative; display: flex; align-items: center; gap: 18px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; --logo-l: #ffffff; min-height: 44px; }
.brand svg { width: 25px; height: 27px; }
.wordmark { font-family: var(--font-word); font-weight: 700; font-size: 19px; letter-spacing: -.5px; }
.wordmark span { font-weight: 400; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--hero-muted); text-decoration: none; font-size: 14.5px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--hero-ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--glow); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-bottom: 14px; font-size: 13.5px; color: var(--hero-muted); animation: fadeUp .7s ease-out both; }
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "›"; color: var(--hero-muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--hero-muted); text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.crumbs a:hover { color: var(--hero-ink); border-bottom-color: currentColor; }
.crumbs [aria-current] { color: var(--hero-ink); font-weight: 700; }
.nav .nav-cta { color: var(--hero-btn-ink); background: var(--hero-btn-bg); padding: 0 18px; border-radius: 7px; min-height: 42px; font-weight: 700; }
.nav .nav-cta:hover { color: var(--hero-btn-ink); filter: brightness(1.08); }
.menu-btn { display: none; margin-left: auto; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--hero-line-strong); border-radius: 8px; background: none; color: var(--hero-ink); font-size: 14px; }
.menu-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle { display: inline-grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--hero-line-strong); border-radius: 8px; background: none; color: var(--hero-ink); transition: border-color .2s, color .2s; }
.theme-toggle:hover { border-color: var(--glow-line); color: var(--glow); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun, .theme-toggle[aria-pressed="true"] .i-moon { display: none; }
.theme-toggle[aria-pressed="true"] .i-sun { display: block; }

/* Hero */
.p-hero { position: relative; overflow: hidden; isolation: isolate; color: var(--hero-ink); background: radial-gradient(110% 120% at 85% 0%, var(--hero-bg2) 0%, var(--hero-bg) 62%); }
.p-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--hero-grid) 1px, transparent 1px), linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(70% 80% at 80% 10%, #000, transparent); mask-image: radial-gradient(70% 80% at 80% 10%, #000, transparent); }
.p-hero .eyebrow { color: var(--glow); animation: fadeUp .7s ease-out both; }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px 56px; align-items: end; padding-block: 60px 36px; }
.p-hero-grid > * { min-width: 0; }
.p-hero h1 { margin-top: 22px; font-size: clamp(34px, 5vw, 60px); line-height: 1.22; font-weight: 800; letter-spacing: -.045em; }
.p-hero h1 .line { display: block; overflow: hidden; padding-bottom: .07em; }
.p-hero h1 .line > span { display: inline-block; animation: rise .95s cubic-bezier(.2, .75, .2, 1) both; }
.p-hero h1 .line:nth-child(2) > span { animation-delay: .1s; color: var(--glow); }
.p-hero .lead { margin-top: 20px; max-width: 34em; font-size: 16.5px; line-height: 1.85; color: var(--hero-muted); animation: fadeUp .8s .25s ease-out both; }
.stats { display: grid; gap: 16px; padding: 22px 24px; border: 1px solid var(--hero-card-line); border-radius: 18px; background: var(--hero-card); color: var(--hero-card-ink); animation: fadeUp .8s .35s ease-out both; }
.stats-total { display: flex; align-items: baseline; gap: 10px; }
.stats-total b { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stats-total span { color: var(--hero-card-muted); font-size: 14.5px; }
.stats-rows { display: grid; gap: 9px; }
.stats-rows div { display: grid; grid-template-columns: 68px minmax(0, 1fr) 28px; align-items: center; gap: 12px; font-size: 14px; }
.stats-rows dt { display: flex; align-items: center; gap: 8px; color: var(--hero-card-ink); }
.stats-rows dt i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.stats-rows .bar { height: 6px; border-radius: 3px; background: var(--hero-card-track); overflow: hidden; }
.stats-rows .bar i { display: block; height: 100%; width: var(--w); border-radius: 3px; background: var(--c); transform-origin: left; animation: grow 1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.5s + var(--i) * .08s); }
.ko { font-family: var(--font-body); letter-spacing: 0; }
.stats-rows dd { text-align: right; font-variant-numeric: tabular-nums; color: var(--hero-card-muted); }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }

/* Ribbon: one dot per record, placed by month */
.ribbon { padding-block: 22px 26px; border-top: 1px solid var(--hero-line); }
.ribbon-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; color: var(--hero-muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-body); letter-spacing: 0; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--hc); }
.axis { position: relative; height: 124px; margin-top: 8px; }
.axis-line { position: absolute; left: 0; right: 0; top: 84px; height: 2px; border-radius: 1px; background: var(--hero-line-strong); transform-origin: left; animation: grow 1.1s .2s cubic-bezier(.2, .7, .2, 1) both; }
.tick { position: absolute; top: 85px; width: 1px; height: 6px; background: var(--hero-line-strong); }
.tick.tick-y { height: 16px; background: var(--hero-muted); }
.tick-label { position: absolute; top: 104px; transform: translateX(-1px); font-family: var(--font-mono); font-size: 12px; color: var(--hero-muted); }
.dot { position: absolute; top: calc(84px - 1px - var(--s) * 24px); width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--hc); border: 3px solid var(--hero-bg); box-shadow: 0 0 0 1px var(--hc); text-decoration: none; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(.55s + var(--i) * .09s); transition: transform .2s, opacity .3s; }
.dot:hover, .dot:focus-visible { transform: scale(1.3); }
.dot.dim { opacity: .2; }
.dot .tip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px); width: max-content; max-width: 240px; padding: 7px 10px; border-radius: 8px; background: var(--app-panel); border: 1px solid var(--hero-line-strong); color: var(--hero-ink); font-size: 12.5px; line-height: 1.45; white-space: normal; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.dot .tip b { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--hc); }
.dot.tip-l .tip { left: -6px; transform: translate(0, 4px); }
.dot.tip-r .tip { left: auto; right: -6px; transform: translate(0, 4px); }
.dot:hover .tip, .dot:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.dot.tip-l:hover .tip, .dot.tip-l:focus-visible .tip, .dot.tip-r:hover .tip, .dot.tip-r:focus-visible .tip { transform: none; }
@keyframes pop { from { transform: scale(0); } to { transform: none; } }

/* Filters */
.filters-bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.filters-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--filter-h); }
/* position: relative keeps the buttons' visually hidden text inside this scrolling row. */
.filters { position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 4px; min-width: 0; }
.filters::-webkit-scrollbar { display: none; }
.filters button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .25s, color .25s, border-color .25s; }
.filters button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.filters button .n { font-family: var(--font-mono); font-size: 12px; opacity: .75; }
.filters button:hover { border-color: var(--accent); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.f-total { flex-shrink: 0; font-size: 14px; color: var(--muted); }

/* Year groups */
.years { padding-block: 16px 40px; }
.year { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px 40px; padding-block: 44px; border-top: 1px solid var(--line); }
.year:first-child { border-top: 0; }
.year > * { min-width: 0; }
.year-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + var(--filter-h) + 28px); align-self: start; }
.year-num { font-size: clamp(48px, 6vw, 76px); line-height: 1; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.year-count { margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.recs { position: relative; padding-left: 38px; --p: 0; }
.rec-list { display: grid; gap: 18px; }
.spine { position: absolute; left: 9px; top: 12px; bottom: 12px; width: 2px; border-radius: 1px; background: var(--line); }
.spine i { position: absolute; inset: 0; border-radius: 1px; background: linear-gradient(180deg, var(--teal), var(--accent)); transform-origin: top; transform: scaleY(var(--p)); }
.rec { position: relative; padding: 22px 24px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); scroll-margin-top: calc(var(--header-h) + var(--filter-h) + 24px); transition: border-color .3s, box-shadow .35s; }
.rec:hover { border-color: var(--c); box-shadow: 0 24px 48px -32px var(--shadow); }
.rec::before { content: ""; position: absolute; left: -34px; top: 30px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--c); transition: background-color .35s, box-shadow .35s; }
.rec.seen::before { background: var(--c); box-shadow: 0 0 0 5px var(--glow-card); }
.rec:focus { outline: none; }
.rec.flash { animation: flash 1.8s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 4px var(--c); } 100% { box-shadow: 0 0 0 4px transparent; } }
.rec-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.rec-date { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.rec-cat { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--c); color: var(--c); font-size: 12.5px; font-weight: 700; }
.rec-title { margin-top: 10px; display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 800; line-height: 1.45; letter-spacing: -.03em; }
.rec-icon { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; padding: 4px; border-radius: 9px; background: #ffffff; border: 1px solid var(--line); }
.rec-icon img { width: 100%; height: 100%; object-fit: contain; }
.rec-sub { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.rec-link { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--accent); font-size: 14.5px; font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; }
.rec-link:hover span { transform: translate(2px, -2px); }
.rec-link span { transition: transform .2s; }
.c0 { --c: var(--cat0); --hc: var(--hc0); } .c1 { --c: var(--cat1); --hc: var(--hc1); } .c2 { --c: var(--cat2); --hc: var(--hc2); }
.c3 { --c: var(--cat3); --hc: var(--hc3); } .c4 { --c: var(--cat4); --hc: var(--hc4); } .c5 { --c: var(--cat5); --hc: var(--hc5); }

/* Gallery (large first photo + two small, +N) */
.rec-media { margin-top: 18px; }
.gallery { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.shot { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--photo-bg); border: 1px solid var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.shot:hover img { transform: scale(1.04); }
.gallery-3 .shot-main { grid-row: 1 / span 2; aspect-ratio: auto; height: 100%; }
.gallery-3 .shot-main img { position: absolute; inset: 0; }
.gallery-1 { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.gallery-2 .shot:not(.shot-main) { align-self: start; }
.shot-zoom { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(6, 22, 40, .82); color: #ffffff; font-size: 12.5px; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.shot-zoom svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.shot:hover .shot-zoom, .shot:focus-visible .shot-zoom { opacity: 1; transform: none; }
.shot-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6, 22, 40, .62); color: #ffffff; font-size: 24px; font-weight: 800; letter-spacing: -.02em; transition: background-color .3s; }
.shot:hover .shot-more { background: rgba(6, 22, 40, .45); }
.gallery-all { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none; }
.gallery-all svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.gallery-all:hover { text-decoration: underline; text-underline-offset: 4px; }
.photo-note { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

/* CTA + footer */
.p-cta { position: relative; overflow: hidden; isolation: isolate; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px 40px; margin-bottom: clamp(56px, 7vw, 96px); padding: clamp(28px, 5vw, 56px); border-radius: 26px; color: var(--hero-ink); background: radial-gradient(90% 140% at 100% 0%, var(--hero-bg2), var(--hero-bg) 65%); }
.p-cta .eyebrow { color: var(--glow); }
.p-cta h2 { margin-top: 14px; font-size: clamp(24px, 3vw, 36px); line-height: 1.35; letter-spacing: -.04em; font-weight: 800; }
.p-cta p.sub { margin-top: 8px; color: var(--hero-muted); font-size: 15px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 9px; font-size: 15px; font-weight: 700; text-decoration: none; border: 1px solid transparent; transition: transform .2s, box-shadow .25s, background-color .2s; }
.btn.primary { background: var(--hero-btn-bg); color: var(--hero-btn-ink); box-shadow: 0 12px 30px -14px var(--glow); }
.btn.primary:hover { transform: translateY(-2px); }
.btn.ghost { color: var(--hero-ink); border-color: var(--hero-line-strong); }
.btn.ghost:hover { background: var(--glass); }
.footer { padding-block: 44px 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.footer .company { font-weight: 700; color: var(--ink); }
.footer dl { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer dl div { display: flex; gap: 8px; }
.footer dd { color: var(--ink); }
.footer .brand { color: var(--ink); --logo-l: var(--logo-ink); }
.footer .slogan { margin-top: 6px; font-size: 13px; }

/* Viewer */
.viewer { width: min(1180px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 16px; background: var(--app-bg); color: var(--app-ink); overflow: hidden; }
.viewer::backdrop { background: rgba(3, 10, 20, .8); backdrop-filter: blur(3px); }
.viewer[open] { display: flex; flex-direction: column; animation: fadeUp .25s ease-out both; }
.v-bar { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--app-line); }
.v-bar h2 { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-count { font-family: var(--font-mono); font-size: 12.5px; color: var(--app-muted); font-variant-numeric: tabular-nums; }
.v-close { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--app-line); background: none; color: var(--app-ink); font-size: 20px; line-height: 1; }
.v-stage { position: relative; display: grid; place-items: center; height: min(66vh, 640px); background: #070b10; }
.v-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.v-nav { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 1px solid var(--app-line); background: rgba(15, 22, 30, .82); color: var(--app-ink); display: grid; place-items: center; transition: background-color .2s; }
.v-nav:hover { background: var(--app-panel); }
.v-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v-prev { left: 12px; }
.v-next { right: 12px; }
.v-cap { padding: 10px 18px; font-size: 13.5px; color: var(--app-muted); border-top: 1px solid var(--app-line); }
.v-strip { display: flex; gap: 8px; padding: 10px 14px 14px; overflow-x: auto; scroll-behavior: smooth; }
.v-strip button { flex-shrink: 0; width: 108px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; background: var(--app-panel); opacity: .55; transition: opacity .2s, border-color .2s; }
.v-strip button:hover { opacity: .85; }
.v-strip button[aria-current="true"] { opacity: 1; border-color: var(--glow); }
.v-strip img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }

/* Moving between the home and portfolio pages: the header stays in place,
   the content underneath crossfades with a short rise (browsers without support just load the page). */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(root) { animation: vtOut .2s ease-in both; }
::view-transition-new(root) { animation: vtIn .45s cubic-bezier(.2, .7, .2, 1) .05s both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(16px); } }
.vt .crumbs ol, .vt .p-hero .eyebrow, .vt .p-hero h1 .line > span, .vt .p-hero .lead, .vt .stats { animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 1040px) { .nav { gap: 18px; } }
@media (max-width: 920px) {
  .header-inner { gap: 10px; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--hero-bg); border-bottom: 1px solid var(--hero-line); padding: 6px max(var(--gutter), env(safe-area-inset-right, 0px)) 18px max(var(--gutter), env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { border-bottom: 1px solid var(--hero-line); padding: 0 2px; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--glow); }
  .nav .nav-cta { margin-top: 12px; justify-content: center; border-bottom: 0; }
  .p-hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: 44px 28px; }
  .year { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 32px; }
  .year-side { position: static; display: flex; align-items: baseline; gap: 14px; }
  .year-count { margin-top: 0; }
}
@media (max-width: 720px) {
  .f-total { display: none; }
  .recs { padding-left: 26px; }
  .spine { left: 5px; }
  .rec { padding: 18px 16px 20px; }
  .rec::before { left: -27px; }
  .rec-title { font-size: 17.5px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .gallery .shot-main { grid-column: 1 / -1; grid-row: auto; height: auto; aspect-ratio: 16 / 9; }
  .gallery .shot-main img { position: static; }
  .gallery-1 .shot-main { grid-column: auto; }
  .shot-more { font-size: 18px; }
  .v-stage { height: 52vh; }
  .v-nav { width: 40px; height: 40px; margin-top: -20px; }
  .v-strip button { width: 84px; }
  .dot .tip { max-width: 180px; }
  .btn { flex: 1 1 200px; }
}
