/* =========================================================================
   Valery Nevzorov — Portfolio
   Design system: dark, cinematic, minimal. Engineer + musician.
   ========================================================================= */

:root {
  /* ---- Palette ---- */
  --bg:            #08080a;
  --bg-elev:       #0e0e11;
  --bg-card:       #101014;
  --line:          rgba(255, 255, 255, 0.08);
  --line-strong:   rgba(255, 255, 255, 0.16);

  --text:          #f4f4f6;
  --text-dim:      #d2d2d8;  /* lifted for readability */
  --text-faint:    #a6a6ae;  /* lifted for readability */

  /* UI accent: a muted slate-periwinkle. Calm, not neon — used across the
     whole interface (numbers, tags, dots, buttons, links, glows). */
  --accent:        #a6b1de;
  --glow:          rgba(166, 177, 222, 0.32);

  /* Display gradient: the bright aurora (indigo -> cyan). Reserved ONLY for the
     two big headline moments — hero and contact — not for UI elements. */
  --grad-1:        #7c8bff;
  --grad-2:        #4fd6d0;

  /* ---- Type ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, "Menlo", monospace;

  /* ---- Layout ---- */
  --maxw: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 16px;
  --radius-sm: 10px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--glow); color: #fff; }

/* ---- Reusable ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 1.75rem; height: 1px;
  background: linear-gradient(90deg, var(--text-dim), transparent);
}

.section { padding-block: clamp(3.5rem, 7vw, 6rem); position: relative; }
.section-head { max-width: 46ch; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-top: 1rem;
}
.section-head p { color: var(--text-dim); margin-top: 1rem; font-size: 1.05rem; }
.section-head h2 .grad {
  /* softer, less-saturated indigo at the start (not the vivid --grad-1) → teal */
  background: linear-gradient(100deg, #9ba4e8 8%, var(--grad-2) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* =========================================================================
   Navigation
   ========================================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 1.1rem var(--gutter);
  transition: background var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__brand { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; font-weight: 600; font-size: 0.95rem; color: var(--text); transition: border-color 0.25s var(--ease), color 0.25s var(--ease); }
.nav__brand:hover { border-color: var(--accent); color: var(--accent); }
.nav__links { display: flex; gap: 2rem; align-items: center; }
.nav__links a {
  font-size: 0.9rem; color: var(--text-dim);
  transition: color 0.25s var(--ease); position: relative;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  font-size: 0.85rem; color: var(--text) !important;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.5rem 1.1rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav__cta:hover { border-color: var(--accent); background: rgba(152,164,196,0.08); }
@media (max-width: 720px) { .nav__links a:not(.nav__cta) { display: none; } }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 7rem 4rem;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: 0.64;
  mask-image: radial-gradient(120% 90% at 70% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 70% 40%, #000 30%, transparent 78%);
}
.hero::after { /* vignette + floor fade */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(115% 78% at 50% -6%, rgba(166,177,222,0.20), transparent 70%),
    linear-gradient(to bottom, transparent 55%, var(--bg) 96%);
}
.hero .wrap { position: relative; z-index: 2; }

.hero__status {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.4rem 0.9rem; margin-bottom: 2rem;
  background: rgba(255,255,255,0.02);
}
.hero__status .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(152,164,196,0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(152,164,196,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(152,164,196,0); }
  100% { box-shadow: 0 0 0 0 rgba(152,164,196,0); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.0;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--text) 20%, var(--grad-1) 55%, var(--grad-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead {
  margin-top: 1.7rem; font-size: clamp(1.5rem, 3.25vw, 2.1rem);
  font-weight: 500; color: var(--text); letter-spacing: -0.015em;
}
.hero__lead .grad {
  background: linear-gradient(100deg, var(--grad-1) 8%, var(--grad-2) 94%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub {
  margin-top: 1.3rem; max-width: 46ch;
  font-size: clamp(1.08rem, 2.2vw, 1.35rem); color: var(--text-dim);
  letter-spacing: -0.01em;
}
.hero__sub strong { color: var(--text); font-weight: 500; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.95rem; font-weight: 500;
  padding: 0.8rem 1.5rem; border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--primary { background: var(--text); color: #0a0a0c; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px var(--glow); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: rgba(152,164,196,0.06); transform: translateY(-2px); }

.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 2; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.hero__scroll .line { width: 1px; height: 42px; background: linear-gradient(var(--text-faint), transparent); animation: drop 2s var(--ease) infinite; }
@keyframes drop { 0%,100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* =========================================================================
   Marquee / logos of past companies
   ========================================================================= */
.trusted { border-block: 1px solid var(--line); padding-block: 2.25rem; }
.trusted__label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); text-align: center; margin-bottom: 1.4rem; }
.trusted__row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.5rem, 5vw, 4rem); }
.trusted__row a, .trusted__row span { font-size: 1.1rem; font-weight: 500; color: var(--text); letter-spacing: -0.01em; opacity: 1; transition: color 0.25s; }
.trusted__row a:hover { color: var(--accent); }

/* =========================================================================
   Stats
   ========================================================================= */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-card); padding: clamp(1.5rem, 3vw, 2.25rem); transition: background 0.35s var(--ease); }
.stat:hover { background: #17171e; }
.stat__num { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; transition: transform 0.4s var(--ease), text-shadow 0.4s var(--ease); }
.stat:hover .stat__num { transform: translateY(-3px); }
.stat__num .u { color: var(--accent); font-weight: 400; transition: filter 0.35s var(--ease); }
.stat:hover .stat__num .u { filter: brightness(1.25); }
.stat__label { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.6rem; }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================================
   About
   ========================================================================= */
.about__cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about__bio p { color: var(--text-dim); font-size: 1.1rem; margin-top: 1.2rem; }
.about__bio p:first-child { margin-top: 0; }
.about__bio p strong { color: var(--text); font-weight: 500; }

.about__skills { display: grid; gap: 1.7rem; }
.skillrow__label { display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips span { font-size: 0.85rem; color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.35rem 0.8rem; transition: border-color 0.2s var(--ease); }
.chips span:hover { border-color: var(--accent); }
@media (max-width: 760px) { .about__cols { grid-template-columns: 1fr; } }

/* About — editorial byline (avatar + name / role) atop the first-person bio.
   The role uses the mono caption voice of .xp__meta .role-date (natural case)
   so "Senior iOS Engineer" keeps its casing. */
.byline { display: flex; align-items: center; gap: 0.9rem; margin-bottom: clamp(1.6rem, 3.5vw, 2.1rem); }
.byline__avatar {
  position: relative; flex: 0 0 auto;
  width: 60px; height: 60px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--bg-elev);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.8);
}
.byline__avatar img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 26%;
}
/* inner hairline + vignette: melts the photo's light-grey wall into the page */
.byline__avatar::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 0 16px 2px rgba(8, 8, 10, 0.5);
}
.byline__meta { display: flex; flex-direction: column; gap: 0.26rem; min-width: 0; }
.byline__name { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; color: var(--text); }
.byline__role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; line-height: 1.2; color: var(--text-faint); }
@media (max-width: 760px) { .byline__avatar { width: 54px; height: 54px; } }
.about__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
@media (max-width: 640px) { .about__cards { grid-template-columns: 1fr; } }
.about__card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.about__card h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.9rem; }
.about__card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.about__card li { font-size: 0.85rem; color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.35rem 0.8rem; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } .about__aside { position: static; } }

/* About portrait — dark-bg studio photo, compact framed card that melts
   into the page (its own dark background matches the site). */
.about__portrait {
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,0.85);
}
.about__portrait img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%;
  transition: transform 0.6s var(--ease);
}
.about__portrait:hover img { transform: scale(1.02); }

/* =========================================================================
   Experience (timeline)
   ========================================================================= */
.xp { display: grid; gap: 0; }
.xp__item {
  display: grid; grid-template-columns: 190px 1fr; gap: 2rem;
  padding-block: 2.25rem; border-top: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.xp__item:last-child { border-bottom: 1px solid var(--line); }
.xp__logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-elev); font-weight: 600; font-size: 1.05rem; color: var(--text); margin-bottom: 1rem; overflow: hidden; }
.xp__logo img { width: 100%; height: 100%; object-fit: cover; }
.xp__meta .role-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); }
.xp__meta .company { font-size: 1.15rem; font-weight: 600; margin-top: 0.4rem; letter-spacing: -0.01em; }
.xp__meta .place { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.15rem; }
.xp__body .title { font-size: 1.05rem; font-weight: 500; color: var(--text); }
.xp__body .desc { color: var(--text-faint); font-size: 0.92rem; margin-top: 0.2rem; }
.xp__body ul { list-style: none; margin-top: 1rem; display: grid; gap: 0.6rem; }
.xp__body li { color: var(--text-dim); font-size: 0.98rem; padding-left: 1.4rem; position: relative; }
.xp__body li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.8; }
.xp__body li strong { color: var(--text); font-weight: 500; }
.xp__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.2rem; }
.xp__tags span { font-size: 0.85rem; color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.35rem 0.8rem; transition: border-color 0.2s var(--ease); }
.xp__tags span:hover { border-color: var(--accent); }
@media (max-width: 720px) { .xp__item { grid-template-columns: 1fr; gap: 0.9rem; } }

/* =========================================================================
   Projects
   ========================================================================= */
.projects__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.pcard {
  position: relative; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.pcard:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 50px -24px rgba(0,0,0,0.8); }
.pcard--feature { grid-column: 1 / -1; }
.pcard__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; display: grid; place-items: center; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: transform 0.6s var(--ease), opacity 0.4s; }
.pcard:hover .pcard__media img { transform: scale(1.04); opacity: 1; }

/* Featured split: portrait video on one side, text on the other */
.pcard__feature-inner { display: grid; grid-template-columns: minmax(260px, 320px) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding: clamp(1.5rem, 3vw, 2.25rem); }
.pcard--feature .pcard__body { padding: 0; }
.pcard__media--portrait {
  aspect-ratio: 1126 / 2300;      /* matches the source video, no crop */
  width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(152,164,196,0.20), transparent 60%),
    #000;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.9), 0 0 60px -20px var(--glow);
}
.pcard__media--portrait video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard__hint { font-size: 0.85rem !important; color: var(--text-faint) !important; }
.pcard__hint strong { color: var(--accent); font-weight: 500; }

/* Sound toggle — crisp, solid, icon-only.
   NOTE: no translateZ / will-change here on purpose. Promoting a rounded
   element to its own compositor layer makes Chrome clip the circle without
   antialiasing (pixelated edge). Painted on the normal layer, it's smooth. */
.mute-btn {
  position: absolute; left: 0.7rem; bottom: 0.7rem; z-index: 3;
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  color: #fff; cursor: pointer;
  background: #0d0d11;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.85);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
              transform 0.2s var(--ease), color 0.2s var(--ease);
}
.mute-btn:hover { background: #131318; border-color: var(--accent); transform: translateY(-1px); }
.mute-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mute-btn.is-on { color: var(--accent); background: #101018; border-color: var(--accent); }
.mute-btn__ic { width: 17px; height: 17px; display: block; }
/* muted (default): show the X, hide the waves */
.mute-btn .mute-wave { opacity: 0; transition: opacity 0.25s var(--ease); }
.mute-btn .mute-x    { opacity: 1; transition: opacity 0.25s var(--ease); }
/* sound on: show the waves, hide the X */
.mute-btn.is-on .mute-wave { opacity: 1; }
.mute-btn.is-on .mute-x    { opacity: 0; }
@media (max-width: 720px) {
  .pcard__feature-inner { grid-template-columns: 1fr; }
  .pcard__media--portrait { max-width: 300px; margin-inline: auto; }
}
.pcard__media--placeholder { background:
  radial-gradient(120% 120% at 20% 0%, rgba(152,164,196,0.18), transparent 55%),
  radial-gradient(120% 120% at 90% 100%, rgba(152,164,196,0.12), transparent 55%),
  var(--bg-elev);
}
.pcard__media--placeholder .ph-mono { font-family: var(--font-mono); color: var(--text-faint); font-size: 0.8rem; letter-spacing: 0.1em; }
.pcard__body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.pcard__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pcard__tags span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 0.2rem 0.5rem; }
.pcard__body h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.pcard__body p { color: var(--text-dim); font-size: 0.98rem; }
.pcard__link { margin-top: auto; padding-top: 0.5rem; font-size: 0.9rem; color: var(--accent); display: inline-flex; align-items: center; gap: 0.4rem; }
.pcard__link .arrow { transition: transform 0.25s var(--ease); }
.pcard:hover .pcard__link .arrow { transform: translateX(4px); }
@media (max-width: 720px) { .projects__grid { grid-template-columns: 1fr; } }

/* =========================================================================
   Deep dives — case-study teaser cards that link out to the full write-up
   ========================================================================= */
.dives { display: grid; gap: 1.25rem; }
.dive {
  display: grid; grid-template-columns: minmax(230px, 300px) 1fr;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.dive:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 50px -24px rgba(0,0,0,0.8); }
.dive__media {
  position: relative; display: grid; place-items: center; padding: 1.5rem;
  background:
    radial-gradient(110% 120% at 20% 0%, rgba(166,177,222,0.14), transparent 55%),
    radial-gradient(110% 120% at 90% 100%, rgba(79,214,208,0.10), transparent 55%),
    var(--bg-elev);
  border-right: 1px solid var(--line);
}
.flow { display: flex; flex-direction: column; align-items: stretch; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.8rem; width: 100%; max-width: 190px; }
.flow span { border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.5rem 0.8rem; color: var(--text); background: rgba(255,255,255,0.02); text-align: center; }
.flow i { color: var(--accent); text-align: center; font-style: normal; line-height: 0.8; }
.dive__body { padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 0.7rem; }
.dive__meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.dive__body h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.dive__body p { color: var(--text-dim); font-size: 0.98rem; }
.dive__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.dive__tags span { font-size: 0.85rem; color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.35rem 0.8rem; }
.dive__link { margin-top: auto; padding-top: 0.6rem; font-size: 0.9rem; color: var(--accent); display: inline-flex; align-items: center; gap: 0.4rem; }
.dive__link .arrow { transition: transform 0.25s var(--ease); }
.dive:hover .dive__link .arrow { transform: translateX(4px); }
@media (max-width: 720px) { .dive { grid-template-columns: 1fr; } .dive__media { border-right: 0; border-bottom: 1px solid var(--line); } }

/* =========================================================================
   Musician strip
   ========================================================================= */
.music {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(152,164,196,0.08), transparent 55%),
    var(--bg-card);
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
}
.music h3 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 600; letter-spacing: -0.02em; }
.music p { color: var(--text-dim); margin-top: 0.8rem; max-width: 52ch; }
.music__keys { display: flex; gap: 0.5rem; }
.music__keys span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); border: 1px solid rgba(166,177,222,0.28); border-radius: 999px; padding: 0.4rem 0.9rem; }
@media (max-width: 720px) { .music { grid-template-columns: 1fr; } }

/* =========================================================================
   Contact / footer
   ========================================================================= */
.contact { text-align: center; }
.contact h2 { font-size: clamp(2rem, 6vw, 4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.contact h2 .grad { background: linear-gradient(100deg, var(--text) 15%, var(--grad-1) 60%, var(--grad-2) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact p { color: var(--text-dim); margin-top: 1.2rem; font-size: 1.1rem; }
.contact__mail { display: inline-block; margin-top: 2rem; font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 500; border-bottom: 1px solid var(--line-strong); padding-bottom: 0.3rem; transition: border-color 0.25s; }
.contact__mail:hover { border-color: var(--accent); }
.contact__socials { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2.5rem; }
.contact__socials a { font-size: 0.9rem; color: var(--text-dim); transition: color 0.25s; }
.contact__socials a:hover { color: var(--text); }

.footer { border-top: 1px solid var(--line); padding-block: 2.5rem; margin-top: clamp(4rem, 10vw, 7rem); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer small { color: var(--text-faint); font-size: 0.82rem; }
.footer .top { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); }

/* =========================================================================
   Scroll reveal — a small, tasteful motion system
   Variants via data-reveal="up|blur|scale|left|right|clip" (default = blur).
   Cascades via data-stagger on a parent; children get an incremental --i.
   ========================================================================= */
/* Best practice: animate ONLY opacity + transform (GPU-composited, no
   per-frame repaint) for a rock-steady 60fps. No blur/filter here — that's
   what makes reveals feel janky. Motion stays short and understated. */
[data-reveal] {
  --rev-dur: 0.85s;
  /* easeOutCubic — even, smooth glide with a little life. The balance point
     between snappy (expo) and sluggish (long cubic). */
  --rev-ease: cubic-bezier(0.33, 1, 0.68, 1);
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity calc(var(--rev-dur) + 0.15s) cubic-bezier(0.4, 0, 0.4, 1),
    transform var(--rev-dur) var(--rev-ease);
  transition-delay: calc(var(--i, 0) * 100ms + var(--delay, 0ms));
}
[data-reveal].in { opacity: 1; transform: none; }

[data-reveal],
[data-reveal="blur"],
[data-reveal="up"]    { transform: translate3d(0, 24px, 0); }
[data-reveal="scale"] { transform: translate3d(0, 16px, 0) scale(0.985); }
[data-reveal="left"]  { transform: translate3d(-30px, 0, 0); }
[data-reveal="right"] { transform: translate3d(30px, 0, 0); }

/* heading mask reveal */
[data-reveal="clip"] {
  transform: none; opacity: 1;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s var(--rev-ease);
  transition-delay: calc(var(--i, 0) * 100ms + var(--delay, 0ms));
}
[data-reveal="clip"].in { clip-path: inset(0 0 -12% 0); }

/* legacy manual delays (still supported) */
[data-reveal][data-delay="1"] { --delay: 100ms; }
[data-reveal][data-delay="2"] { --delay: 200ms; }
[data-reveal][data-delay="3"] { --delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
}
