/* Volodymyr Riabchuk portfolio
   Aesthetic direction: editorial gallery on paper, one accent (electric blue) for all chrome,
   per-case tint used ONLY for graphic accents (rules, dots, chips) so text contrast never depends on it.
   Radius rule: media and panels 14px, interactive pills fully rounded. */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Schibsted';
  src: url('../fonts/schibsted-var.woff2') format('woff2-variations');
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --paper: #F0EDE6;
  --paper-2: #E7E3D8;
  --panel: #FBFAF7;
  --ink: #16161A;
  --soft: rgba(22, 22, 26, .60);
  --faint: rgba(22, 22, 26, .38);
  --line: rgba(22, 22, 26, .14);
  --line-2: rgba(22, 22, 26, .07);
  --accent: #1B2FFF;
  --case: var(--accent);
  --r: 14px;
  --pad: clamp(18px, 4.6vw, 76px);
  --maxw: 1580px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14140F;
    --paper-2: #1C1C16;
    --panel: #1E1E18;
    --ink: #F2EFE6;
    --soft: rgba(242, 239, 230, .62);
    --faint: rgba(242, 239, 230, .40);
    --line: rgba(242, 239, 230, .16);
    --line-2: rgba(242, 239, 230, .08);
    --accent: #8AA0FF;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Schibsted', ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  font-synthesis-weight: none;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .99;
  margin: 0;
  text-wrap: balance;
}

a { color: inherit; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: 68px; display: flex; align-items: center;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line-2);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
.nav-name { font-family: 'Archivo'; font-weight: 700; letter-spacing: -.02em; font-size: 16px; white-space: nowrap; text-decoration: none; }
.nav-name span { color: var(--faint); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); font-size: 14.5px; }
.nav-links a { text-decoration: none; color: var(--soft); transition: color .25s var(--ease); white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  color: var(--ink) !important; transition: background .25s var(--ease), border-color .25s var(--ease);
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; border-color: var(--ink); }
@media (max-width: 700px) { .nav-links .hide-s { display: none; } }
@media (max-width: 460px) {
  .nav-name span { display: none; }
  .nav-name { font-size: 15px; }
  .nav-links { gap: 12px; font-size: 14px; }
  .nav-cta { padding: 7px 13px; }
}

/* ---------- hero ----------
   Poster composition: the name is set huge, the cut out portrait sits between the two
   lines (one behind, one in front), and his own 3D work drifts behind at three depths. */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(920px, calc(100dvh - 68px));
  display: flex; align-items: stretch;
}
.hero-inner {
  position: relative; z-index: 2; width: 100%;
  display: grid; grid-template-rows: 1fr auto;
  padding-block: clamp(16px, 2.6vw, 40px) clamp(24px, 3.4vw, 48px);
}

/* background field */
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.aura { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.aura-a {
  width: 46vw; height: 46vw; left: 46%; top: -14%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 34%, transparent), transparent 68%);
}
.aura-b {
  width: 38vw; height: 38vw; left: 2%; bottom: -16%;
  background: radial-gradient(circle, rgba(216, 138, 90, .5), transparent 68%);
}
@media (prefers-color-scheme: dark) { .aura { opacity: .34; } }
@media (prefers-reduced-motion: no-preference) {
  .aura-a { animation: drift-a 26s ease-in-out infinite alternate; }
  .aura-b { animation: drift-b 32s ease-in-out infinite alternate; }
}
@keyframes drift-a { to { transform: translate3d(-7%, 6%, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(9%, -7%, 0) scale(1.08); } }

.obj {
  position: absolute; height: auto; will-change: transform;
  filter: drop-shadow(0 26px 44px rgba(22, 22, 26, .16));
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) rotate(var(--rot, 0deg));
}
.obj-1 { width: clamp(70px, 7.4vw, 122px); left: 2%; top: 10%; --rot: -9deg; }
.obj-2 { width: clamp(56px, 5.6vw, 94px); left: 24%; top: 3%; --rot: 8deg; }
.obj-3 { width: clamp(64px, 6.6vw, 108px); left: 60%; top: 1%; --rot: -6deg; }
.obj-4 { width: clamp(58px, 6vw, 98px); left: 47%; top: 4%; --rot: 11deg; }
@media (prefers-reduced-motion: no-preference) {
  .obj-1 { animation: float 9s ease-in-out infinite alternate; }
  .obj-2 { animation: float 11s ease-in-out infinite alternate -2s; }
  .obj-3 { animation: float 10s ease-in-out infinite alternate -4s; }
  .obj-4 { animation: float 12s ease-in-out infinite alternate -1s; }
}
@keyframes float {
  to { transform: translate3d(var(--px, 0px), calc(var(--py, 0px) - 18px), 0) rotate(calc(var(--rot, 0deg) * -1)); }
}

/* the name */
.hero-name {
  position: relative; z-index: 1; align-self: center;
  display: grid; gap: 0; width: 100%;
  font-size: clamp(2.9rem, 11.6vw, 11rem);
  line-height: .84; letter-spacing: -.045em; font-weight: 800; text-transform: uppercase;
}
.hero-name .ln { display: block; white-space: nowrap; }
.ln-back { z-index: 1; }
.ln-front { z-index: 3; position: relative; margin-left: .14em; color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .ln { opacity: 0; transform: translateY(.14em); animation: rise .95s var(--ease) forwards; }
  .ln-front { animation-delay: .12s; }
  .hero-cut { opacity: 0; animation: pop 1.1s var(--ease) .06s forwards; }
  .hero-foot { opacity: 0; animation: rise .9s var(--ease) .3s forwards; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: translate3d(0, 16px, 0) scale(.99); } to { opacity: 1; transform: none; } }

/* the portrait, keyed out and dropped between the two lines */
.hero-cut {
  position: absolute; z-index: 2; right: calc(-50vw + 50%); bottom: 0; left: auto;
  height: min(90vh, 900px); width: auto; max-width: none;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
}


.hero-foot {
  position: relative; z-index: 4; display: grid; gap: clamp(16px, 2vw, 26px);
  justify-items: start; max-width: min(52ch, 58%);
}
.hero-sub { margin: 0; font-size: clamp(1rem, 1.22vw, 1.16rem); color: var(--soft); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  border-radius: 999px; padding: 14px 26px; text-decoration: none;
  font-size: 15.5px; font-weight: 600; border: 1px solid transparent;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-primary { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #14140F; } }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: scale(.985); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-arrow { transition: transform .35s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* film grain over the whole page, fixed so it never repaints on scroll */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .30; mix-blend-mode: multiply;
  background-image: 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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { .grain { mix-blend-mode: screen; opacity: .16; } }

@media (max-width: 1080px) {
  .hero-cut { height: min(66vh, 600px); right: calc(-50vw + 50%); }
  .hero-name { font-size: clamp(2.8rem, 12.6vw, 8rem); }
  .hero-foot { max-width: 74%; }
}
@media (max-width: 760px) {
  .hero { min-height: auto; }
  .hero-inner { padding-block: clamp(14px, 3vw, 28px) 34px; }
  .hero-name { align-self: start; font-size: clamp(2.4rem, 13.2vw, 5rem); }
  .ln-front { text-align: left; }
  .hero-cut {
    position: relative; right: auto; bottom: auto; transform: none;
    height: auto; width: min(76%, 320px); margin: -5% auto -3%; display: block;
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
  }
  @media (prefers-reduced-motion: no-preference) {
    .hero-cut { animation: pop-m 1s var(--ease) .06s forwards; }
    @keyframes pop-m { from { transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
  }
  .obj { display: none; }
  .hero-foot { max-width: 100%; }


  .hero-foot { flex-direction: column; align-items: flex-start; }
}

/* ---------- capability bento ---------- */
.range { padding-block: clamp(40px, 6vw, 86px) clamp(20px, 3vw, 40px); }
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(26px, 3.4vw, 46px); max-width: 74ch; }
.sec-head h2 { font-size: clamp(1.9rem, 4vw, 3.15rem); }
.sec-head p { margin: 0; color: var(--soft); font-size: clamp(1rem, 1.2vw, 1.13rem); max-width: 60ch; }
.label { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cell {
  border-radius: var(--r); padding: clamp(20px, 2vw, 30px);
  background: var(--panel); border: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: clamp(10px, 1vw, 15px);
  min-height: 196px; position: relative; overflow: hidden;
}
.cell h3 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); letter-spacing: -.02em; }
.cell p { margin: 0; color: var(--soft); font-size: 15px; }
.cell-media { padding: 0; min-height: 240px; }
.cell-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cell-a { grid-column: span 2; }
.cell-b { grid-column: span 2; }
.cell-c { grid-column: span 2; }
.cell-d { grid-column: span 3; }
.cell-e { grid-column: span 3; }
.cell-f { grid-column: span 2; }
.cell-g { grid-column: span 4; background: var(--ink); color: var(--paper); }
.cell-g p { color: rgba(240, 237, 230, .68); }
@media (prefers-color-scheme: dark) { .cell-g { background: var(--accent); color: #14140F; } .cell-g p { color: rgba(20,20,15,.72); } }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, 1fr); } .cell, .cell-d, .cell-e, .cell-g { grid-column: span 1; } .cell-g { grid-column: span 2; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .cell, .cell-g { grid-column: span 1; } }

/* ---------- client marquee ---------- */
.clients { padding-block: clamp(30px, 4vw, 56px); overflow: hidden; border-block: 1px solid var(--line-2); margin-top: clamp(40px, 5vw, 70px); }
.marquee { display: flex; gap: 0; width: max-content; animation: slide 42s linear infinite; }
.marquee span {
  font-family: 'Archivo'; font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(1.4rem, 2.6vw, 2.3rem); color: var(--faint); padding-inline: clamp(18px, 2.4vw, 40px);
  display: inline-flex; align-items: center; gap: clamp(18px, 2.4vw, 40px);
}
.marquee span::after { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--line); }
@keyframes slide { to { transform: translateX(-50%); } }
.clients:hover .marquee { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .marquee { animation: none; flex-wrap: wrap; width: auto; } }

/* ---------- case index rail ---------- */
.rail {
  position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 30;
  display: none; flex-direction: column; gap: 7px; font-size: 12px;
}
@media (min-width: 1340px) { .rail { display: flex; } }
.rail a { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--faint); transition: color .3s var(--ease); }
.rail i { width: 16px; height: 1px; background: currentColor; transition: width .4s var(--ease), background .3s var(--ease); flex: none; }
.rail a span { opacity: 0; transform: translateX(-4px); transition: opacity .3s var(--ease), transform .3s var(--ease); white-space: nowrap; }
.rail:hover a span { opacity: 1; transform: none; }
.rail a.on { color: var(--ink); }
.rail a.on i { width: 30px; background: var(--case); }
.rail a.on span { opacity: 1; transform: none; }

/* ---------- work / cases ---------- */
.work { padding-top: clamp(56px, 7vw, 110px); }
.case { padding-block: clamp(52px, 7vw, 118px); border-top: 1px solid var(--line-2); scroll-margin-top: 80px; }
.case:first-of-type { border-top: 0; }
.case-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: clamp(20px, 3.4vw, 60px); align-items: start; margin-bottom: clamp(26px, 3.5vw, 48px); }
.case-title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.case-title h2 { font-size: clamp(2.1rem, 4.9vw, 4rem); }
.case-dot { width: 11px; height: 11px; border-radius: 999px; background: var(--case); flex: none; transform: translateY(-6px); }
.case-meta { margin: 14px 0 0; color: var(--faint); font-size: 14.5px; }
.case-body { padding-top: 6px; }
.case-body p { margin: 0 0 14px; color: var(--soft); max-width: 62ch; }
.case-body p:last-child { margin-bottom: 0; }
.case-body strong { color: var(--ink); font-weight: 600; }
.did { list-style: none; margin: clamp(18px, 2.2vw, 26px) 0 0; padding: 0; display: grid; gap: 9px; }
.did li { display: flex; gap: 12px; align-items: baseline; font-size: 15.5px; color: var(--soft); }
.did li::before { content: ''; width: 5px; height: 5px; border-radius: 999px; background: var(--case); flex: none; transform: translateY(-2px); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: clamp(20px, 2.4vw, 30px); }
.chip {
  font-size: 12.5px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--case) 38%, transparent);
  color: var(--soft); background: color-mix(in srgb, var(--case) 6%, transparent);
}
.case-foot { margin-top: clamp(22px, 2.6vw, 32px); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.drive {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft);
  text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 3px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.drive:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 900px) { .case-head { grid-template-columns: 1fr; } }

/* media primitives */
figure { margin: 0; }
.m { border-radius: var(--r); overflow: hidden; background: var(--paper-2); position: relative; cursor: zoom-in; }
.m img, .m video { width: 100%; height: 100%; object-fit: cover; }
.m::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none;
}
.m-plain { cursor: default; }
/* Visible by default: the entrance animation is an enhancement, never a prerequisite.
   Only a JS enabled document hides them first. */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* layout family: hero + system grid */
.feature-3 .m { border-radius: var(--r); }
.stack { display: grid; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.align-start { align-items: start; }

/* masonry columns keep native aspect ratios without leaving holes in a row */
.masonry { columns: 4; column-gap: 14px; }
.masonry-2 { columns: 2; column-gap: 14px; }
.masonry > *, .masonry-2 > * { break-inside: avoid; margin-bottom: 14px; }
@media (max-width: 1100px) { .masonry { columns: 3; } }
@media (max-width: 760px) { .masonry { columns: 2; } }
@media (max-width: 480px) { .masonry, .masonry-2 { columns: 1; } }

.feature-2 { align-items: start; }
.pull {
  font-family: 'Archivo'; font-weight: 600; letter-spacing: -.025em;
  font-size: clamp(1.15rem, 1.75vw, 1.6rem); line-height: 1.24; margin: 0; max-width: 22ch;
}
.railmedia .tall { flex-basis: clamp(180px, 21vw, 268px); }

/* layout family: sticky split */
.lay-split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 46px); align-items: start; }
.lay-split .sticky { position: sticky; top: 100px; }
@media (max-width: 950px) { .lay-split { grid-template-columns: 1fr; } .lay-split .sticky { position: static; } }

/* layout family: horizontal rail */
.railmedia {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 14px; scrollbar-width: thin; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad);
}
.railmedia > * { scroll-snap-align: start; flex: 0 0 clamp(215px, 26vw, 340px); }
.railmedia::-webkit-scrollbar { height: 5px; }
.railmedia::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.railmedia::-webkit-scrollbar-track { background: transparent; }
.rail-hint { font-size: 13px; color: var(--faint); margin-top: 10px; }

/* layout family: diptych compare */
.diptych { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.diptych .m { aspect-ratio: 4 / 3; }
.diptych .m.fit { background: var(--panel); }
.diptych .m.fit img { object-fit: contain; padding: 7%; }
.diptych .cap { font-size: 13.5px; color: var(--faint); margin-top: 10px; }
@media (max-width: 700px) { .diptych { grid-template-columns: 1fr; } }

/* layout family: identity steps */
.steps { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.steps > *:nth-child(1) { grid-column: 1 / span 7; }
.steps > *:nth-child(2) { grid-column: 8 / span 5; align-self: end; }
.steps > *:nth-child(3) { grid-column: 1 / span 4; }
.steps > *:nth-child(4) { grid-column: 5 / span 8; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } .steps > * { grid-column: 1 / -1 !important; } }

/* layout family: deck covers */
.covers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cover { text-decoration: none; display: block; }
.cover .m img { aspect-ratio: 16 / 9; }
.cover .cname { font-size: 14.5px; margin-top: 11px; font-weight: 600; }
.cover .cmeta { font-size: 13px; color: var(--faint); margin-top: 2px; }
@media (max-width: 950px) { .covers { grid-template-columns: repeat(2, 1fr); } }

/* layout family: poster wall */
.posters { columns: 3; column-gap: 14px; }
.posters > * { break-inside: avoid; margin-bottom: 14px; }
@media (max-width: 900px) { .posters { columns: 2; } }
@media (max-width: 520px) { .posters { columns: 1; } }

/* ---------- approach ---------- */
.approach { padding-block: clamp(60px, 8vw, 120px); border-top: 1px solid var(--line-2); }
.approach-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(26px, 4vw, 70px); align-items: start; }
.approach h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); max-width: 18ch; }
.approach .lead { font-size: clamp(1.02rem, 1.3vw, 1.18rem); color: var(--soft); margin-top: 24px; max-width: 58ch; }
.cv { list-style: none; margin: clamp(30px, 4vw, 50px) 0 0; padding: 0; }
.cv li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 18px; padding: 16px 0; border-top: 1px solid var(--line-2); align-items: baseline; }
.cv .role { font-weight: 600; font-size: 15.5px; }
.cv .org { color: var(--soft); font-size: 14.5px; }
.cv .yrs { color: var(--faint); font-size: 13.5px; margin-top: 3px; }
.approach-portrait { position: relative; }
.approach-portrait img {
  width: 100%; max-height: 560px; object-fit: contain; object-position: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
}
.approach-portrait figcaption { font-size: 13.5px; color: var(--faint); margin-top: 12px; }
.tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; }
@media (max-width: 900px) { .approach-grid { grid-template-columns: 1fr; } .cv li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- contact ---------- */
.headstrip { overflow: hidden; border-top: 1px solid var(--line-2); }
.headstrip img { width: 100%; height: clamp(70px, 9vw, 132px); object-fit: cover; object-position: 50% 30%; opacity: .5; }
@media (prefers-color-scheme: dark) { .headstrip img { opacity: .35; } }
.contact { padding-block: clamp(56px, 8vw, 118px) clamp(30px, 4vw, 60px); }
.contact h2 { font-size: clamp(2.1rem, 5.4vw, 4.2rem); max-width: 17ch; }
.contact .note { color: var(--soft); max-width: 58ch; margin-top: 22px; }
.channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: clamp(34px, 4vw, 54px); }
.ch {
  border: 1px solid var(--line); border-radius: var(--r); padding: 20px; text-decoration: none;
  display: flex; flex-direction: column; gap: 6px; transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
}
.ch:hover { border-color: var(--ink); transform: translateY(-3px); background: var(--panel); }
.ch .k { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.ch .v { font-family: 'Archivo'; font-weight: 600; letter-spacing: -.02em; font-size: clamp(.95rem, 1.15vw, 1.1rem); word-break: break-word; }
@media (max-width: 800px) { .channels { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .channels { grid-template-columns: 1fr; } }
.foot { border-top: 1px solid var(--line-2); padding-block: 26px 40px; display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; color: var(--faint); font-size: 13.5px; }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: color-mix(in srgb, var(--paper) 92%, #000 8%);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.lb.open { display: grid; grid-template-rows: 1fr auto; }
.lb-stage { display: grid; place-items: center; overflow: hidden; padding: clamp(46px, 6vw, 70px) clamp(16px, 5vw, 90px) 8px; min-height: 0; }
.lb-stage img, .lb-stage video {
  max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto;
  object-fit: contain; border-radius: 10px;
}
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 20px 26px; }
.lb-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); display: grid; place-items: center; cursor: pointer;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.lb-btn:hover { border-color: var(--ink); transform: translateY(-2px); }
.lb-count { font-size: 13.5px; color: var(--faint); min-width: 62px; text-align: center; }
.lb-close { position: absolute; top: 16px; right: clamp(16px, 4vw, 40px); }

/* scroll-driven progress bar (progressive enhancement) */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 50; transform-origin: 0 50%; background: var(--case); transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress { animation: grow linear; animation-timeline: scroll(root block); }
    @keyframes grow { to { transform: scaleX(1); } }
  }
}


/* ---------- case pages ---------- */
.casepage { padding-block: clamp(18px, 2.4vw, 34px) clamp(40px, 6vw, 80px); }
.back {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 14.5px; color: var(--soft); margin-bottom: clamp(18px, 2.4vw, 32px);
  transition: color .25s var(--ease), gap .25s var(--ease);
}
.back:hover { color: var(--ink); gap: 12px; }
.case-full { border-top: 0; padding-block: 0 clamp(30px, 4vw, 50px); }
.case-full .case-head h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); }

.cgroup { padding-top: clamp(34px, 4.6vw, 68px); }
.ghead {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-bottom: 16px; margin-bottom: clamp(16px, 2vw, 26px); border-bottom: 1px solid var(--line-2);
}
.ghead h2 { font-size: clamp(1.35rem, 2.1vw, 1.9rem); }
.gmeta { font-size: 13.5px; color: var(--faint); }
.gsub { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 12px; color: var(--soft); }
.cgroup > * + .gsub { margin-top: 30px; }
.cgroup .masonry + .gsub { margin-top: 30px; }
.cgroup > .carousel + .carousel, .cgroup > .railmedia + .railmedia { margin-top: clamp(20px, 2.6vw, 34px); }

/* a social carousel keeps its slide order, so it is shown as one */
.carousel { position: relative; }
.ctrack {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; border-radius: var(--r);
}
.ctrack::-webkit-scrollbar { display: none; }
.ctrack .slide {
  scroll-snap-align: center; flex: 0 0 clamp(230px, 30%, 400px);
  border-radius: var(--r); overflow: hidden; background: var(--paper-2); cursor: zoom-in;
  position: relative; margin: 0;
}
.ctrack .slide img { width: 100%; height: auto; display: block; }
.ctrack .slide::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none;
}
.cbar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cbtn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; display: grid; place-items: center; cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease), opacity .25s var(--ease);
}
.cbtn:hover { border-color: var(--ink); }
.cbtn[disabled] { opacity: .3; cursor: default; }
.cbtn[disabled]:hover { border-color: var(--line); }
.ccount { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }

.casenav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  border-top: 1px solid var(--line-2); padding-top: clamp(22px, 3vw, 36px); margin-top: clamp(30px, 4vw, 54px);
}
.casenav a {
  display: grid; gap: 5px; text-decoration: none; padding: 18px 20px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.casenav a:hover { border-color: var(--ink); background: var(--panel); transform: translateY(-2px); }
.casenav .right { text-align: right; }
.casenav .k { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.casenav .v { font-family: 'Archivo'; font-weight: 600; letter-spacing: -.02em; font-size: clamp(1rem, 1.5vw, 1.3rem); }
.btn-sm { padding: 10px 18px; font-size: 14.5px; }
@media (max-width: 620px) { .casenav { grid-template-columns: 1fr; } .casenav .right { text-align: left; } }
