/* Никита Пастухов - personal site
   Theme: dark (locked). Single accent: cyan/teal "stream" gradient.
   Fonts: Unbounded (display), Manrope (body), JetBrains Mono (numbers).
   Note: fonts linked via Google Fonts CDN for this no-build static draft. */

:root {
  --bg: #0a0b0f;
  --bg-soft: #111319;
  --surface: #14161d;
  --surface-2: #181b23;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f5;
  --muted: #9aa3b2;
  --faint: #6b7280;

  /* single locked accent */
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --accent-grad: linear-gradient(100deg, #2dd4bf 0%, #22d3ee 45%, #38bdf8 100%);
  --accent-soft: rgba(45, 212, 191, 0.14);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 700; }
img { display: block; max-width: 100%; }

/* ---------- background field ---------- */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 78% -8%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(50vw 50vw at -10% 18%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(45vw 45vw at 60% 110%, rgba(34, 211, 238, 0.08), transparent 60%);
}

/* ---------- layout ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 24px;
}
@media (max-width: 768px) { .section { padding: 64px 20px; } }

.section__title {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 36px;
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.section__head .section__title { margin: 0; }

.link-arrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s var(--ease);
}
.link-arrow:hover { opacity: 0.7; }

.sub-title {
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 48px 0 20px;
}
#opensource .section__title + .sub-title { margin-top: 0; }
.sub-note { color: var(--faint); font-size: 0.92rem; margin: -8px 0 20px; }

/* ---------- nav ---------- */
.nav {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  background: transparent;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}
.nav__brand:hover { color: var(--accent); }
.nav__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.7);
}
.nav__links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 0.95rem;
}
.nav__links a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}
.nav__links a:hover { color: var(--text); }
.nav__cta { margin-left: 8px; }
/* mobile: header wraps to two rows - brand + CTA, then the page links */
@media (max-width: 860px) {
  .nav {
    height: auto;
    flex-wrap: wrap;
    padding: 12px 20px 10px;
    gap: 10px 16px;
  }
  .nav__cta { margin-left: auto; }
  .nav__links {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 20px;
    font-size: 0.92rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .nav__links::-webkit-scrollbar { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn--accent {
  background: var(--accent-grad);
  color: #04201c;
  box-shadow: 0 8px 30px rgba(45, 212, 191, 0.28);
}
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(45, 212, 191, 0.4); }
.nav__cta.btn--accent { height: 40px; padding: 0 18px; font-size: 0.9rem; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: calc(100dvh - 64px);
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 48px;
  padding: 40px 24px 64px;
}
.hero__text, .hero__media { position: relative; z-index: 1; }

/* ambient heatmap: a 7-row band under the hero that flows horizontally like a river */
.hero__hm {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  height: 115px; /* exactly 7 rows: 7*13 + 6*4 */
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.8;
  /* fade both horizontal edges so the band dissolves in/out */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}
.hhm__track { display: flex; gap: 4px; height: 100%; will-change: transform; }
.hhm__col { display: flex; flex-direction: column; gap: 4px; flex: 0 0 13px; }
.hhm__cell { width: 13px; height: 13px; border-radius: 3px; flex: 0 0 13px; background: rgba(255, 255, 255, 0.03); }
.hhm__cell.l1 { background: rgba(45, 212, 191, 0.12); }
.hhm__cell.l2 { background: rgba(45, 212, 191, 0.22); }
.hhm__cell.l3 { background: rgba(45, 212, 191, 0.36); }
.hhm__cell.l4 { background: rgba(45, 212, 191, 0.52); }
@media (max-width: 860px) {
  .hero__hm { bottom: 24px; opacity: 0.6; }
}
.hero__role {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 18px;
}
.hero__title {
  font-family: "Unbounded", sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.hero__lead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 30ch;
  margin: 0 0 32px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }

.social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
}
.social a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.18s var(--ease);
}
.social a:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero__media { display: flex; justify-content: center; }
.avatar {
  position: relative;
  width: min(340px, 78vw);
  aspect-ratio: 1;
  border-radius: 28px;
  padding: 4px;
  background: var(--accent-grad);
  box-shadow: 0 30px 80px rgba(34, 211, 238, 0.22);
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 24px;
  background: var(--surface);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
    text-align: left;
  }
  .hero__media { order: -1; justify-content: flex-start; }
  .avatar { width: min(200px, 50vw); border-radius: 22px; }
}

/* ---------- single-screen hero (home) ----------
   Whole page in one viewport: text + photo on top,
   achievements strip and heatmap river pinned below. */
.hero--one {
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "text media"
    "band band"
    "stats stats";
  align-content: center; /* rows stay grouped; leftover space splits above/below */
  gap: 26px 48px;
  padding: 24px 24px 20px;
}
.hero--one .hero__text { grid-area: text; }
.hero--one .hero__media { grid-area: media; }
.hero--one .hero__role { margin-bottom: 12px; }
.hero--one .hero__title {
  font-size: clamp(2.5rem, 4.5vw + 0.8rem, 4.6rem);
  margin-bottom: 16px;
}
.hero--one .hero__lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 42ch;
  margin-bottom: 22px;
}
.hero--one .hero__actions { margin-bottom: 20px; }
.hero--one .avatar { width: min(300px, 36vh); }

/* project mentions in the lead are links to GitHub (same treatment as .link-arrow) */
.hero__lead a,
.hero__lead a strong {
  color: var(--accent);
  transition: opacity 0.2s var(--ease);
}
.hero__lead a:hover { opacity: 0.7; }

/* achievements strip */
.hero__stats { grid-area: stats; }
.hero__stats .stat { padding: 14px 18px; gap: 3px; }
.hero__stats .stat__num { font-size: clamp(1.25rem, 2vw, 1.7rem); }
.hero__stats .stat__cap { font-size: 0.82rem; }

/* heatmap river as the closing row of the composition (in flow, no overlap) */
.hero__hm--flow {
  position: static;
  grid-area: band;
  height: clamp(47px, 11vh, 115px);
}

/* short desktop viewports: shrink the flexible pieces, keep one screen */
@media (min-width: 861px) and (max-height: 780px) {
  .hero--one { gap: 18px 40px; }
  .hero--one .hero__title { font-size: clamp(2.2rem, 4vw, 3.4rem); }
  .hero--one .avatar { width: min(240px, 32vh); }
  .hero__hm--flow { height: clamp(30px, 7vh, 64px); }
}

@media (max-width: 860px) {
  .hero--one {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "text"
      "band"
      "stats";
    padding-top: 32px;
  }
}

/* ---------- stats ---------- */
.stats {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat__num {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: -0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__cap { color: var(--muted); font-size: 0.9rem; line-height: 1.3; }
.stats--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .stats--4 { grid-template-columns: 1fr 1fr; }
}

/* ---------- projects bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-2); }
.card--feature {
  grid-column: span 3;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
    var(--surface);
}
.card__head { display: flex; align-items: center; justify-content: space-between; }
.card__head h3 {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0;
}
.card--feature .card__head h3 { font-size: 1.9rem; }
.card__ext { color: var(--accent); font-size: 1.2rem; }
.card__stars {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* contributions: single horizontal scroll strip */
.repos {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 0 6px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
  /* edge fade driven by scroll position (main.js toggles --fade-l / --fade-r):
     a side fades only when there is content off-screen on that side */
  --fade-l: 0px;
  --fade-r: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
}
.repos::-webkit-scrollbar { display: none; } /* WebKit - hide scrollbar, keep scroll */
.repo {
  flex: 0 0 232px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
/* always visible inside the scroll strip (scroll-reveal can't track off-screen cards) */
.repo.reveal { opacity: 1; transform: none; }
.repo:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--surface-2); }
.repo__stars {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
}
.repo__name { font-size: 0.92rem; color: var(--muted); }
.repo__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* contribution heatmap */
.heatmap { margin-top: 22px; }
.hm__scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.hm__scroll::-webkit-scrollbar { display: none; }
.hm__inner { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.hm__months,
.hm__grid {
  display: grid;
  grid-template-columns: repeat(var(--weeks, 53), minmax(9px, 1fr));
  gap: 3px;
}
.hm__month {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  color: var(--faint);
  white-space: nowrap;
  overflow: visible;
}
.hm__col { display: flex; flex-direction: column; gap: 3px; }
.hm__cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}
.hm__cell.l1 { background: rgba(45, 212, 191, 0.22); }
.hm__cell.l2 { background: rgba(45, 212, 191, 0.42); }
.hm__cell.l3 { background: rgba(45, 212, 191, 0.66); }
.hm__cell.l4 { background: var(--accent); }
.hm__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.hm__total { font-family: "JetBrains Mono", monospace; font-size: 0.85rem; color: var(--muted); }
.hm__legend { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--faint); }
.hm__legend .hm__cell { flex: 0 0 11px; width: 11px; height: 11px; aspect-ratio: auto; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.card--feature p { max-width: 60ch; font-size: 1.08rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tags span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 11px;
}
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .card--feature { grid-column: span 1; }
}

/* ---------- articles: 4 best with full metrics ---------- */
.arts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.art-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.art-card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-2); }
.art__year {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--faint);
}
.art-card h3 {
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.art-metrics {
  list-style: none;
  margin: auto 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.art-metrics li { display: flex; flex-direction: column; gap: 2px; }
.art-metrics b {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.art-metrics li:first-child b {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.art-metrics span {
  font-size: 0.74rem;
  color: var(--faint);
  line-height: 1.2;
}
@media (max-width: 860px) { .arts { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .art-metrics { grid-template-columns: 1fr 1fr; gap: 14px 10px; } }

/* all articles: single horizontal scroll strip, by views (mirrors .repos) */
.art-chip {
  flex: 0 0 250px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
/* always visible inside the scroll strip (scroll-reveal can't track off-screen cards) */
.art-chip.reveal { opacity: 1; transform: none; }
.art-chip:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--surface-2); }
.art-chip__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.art-chip__views {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.art-chip__views small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--faint);
  -webkit-text-fill-color: var(--faint);
}
.art-chip__year { font-family: "JetBrains Mono", monospace; font-size: 0.74rem; color: var(--faint); }
.art-chip__title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.26;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-chip__meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
}

/* ---------- media grid (talks) ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.media { display: flex; flex-direction: column; gap: 14px; }
.media__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.media__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.media:hover .media__thumb img { transform: scale(1.05); }
.media__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(10, 11, 15, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.1rem;
  padding-left: 4px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.media:hover .media__play { background: var(--accent); color: #04201c; transform: scale(1.08); }
.media__meta { display: flex; flex-direction: column; gap: 4px; }
.media__meta strong { font-size: 1.02rem; line-height: 1.25; }
.media__meta em { color: var(--faint); font-style: normal; font-size: 0.85rem; font-family: "JetBrains Mono", monospace; }
@media (max-width: 860px) { .media-grid { grid-template-columns: 1fr; } }

/* ---------- tag filter ---------- */
#videos .section__title { margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter__btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.18s var(--ease);
}
.filter__btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.filter__btn.is-active {
  background: var(--accent-grad);
  color: #04201c;
  border-color: transparent;
  font-weight: 700;
}
@media (prefers-reduced-motion: reduce) { .filter__btn { transition: none; } }

/* ---------- rows (videos + podcasts) ---------- */
.rows { display: flex; flex-direction: column; gap: 12px; }
.row {
  display: grid;
  grid-template-columns: 152px 1fr auto;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.row:hover { transform: translateX(4px); border-color: var(--line-strong); background: var(--surface-2); }
.row__thumb {
  width: 152px; aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
}
.row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row__meta { display: flex; flex-direction: column; gap: 4px; }
.row__meta strong { font-size: 1.05rem; line-height: 1.25; }
.row__meta em { color: var(--faint); font-style: normal; font-size: 0.82rem; font-family: "JetBrains Mono", monospace; }
.row__go { color: var(--accent); font-weight: 600; font-size: 0.9rem; white-space: nowrap; padding-right: 8px; }
@media (max-width: 680px) {
  .row { grid-template-columns: 1fr; }
  .row__thumb { width: 100%; }
  .row__go { display: none; }
}

/* ---------- nav active state ---------- */
.nav__links a.is-active { color: var(--accent); }

/* ---------- footer (global contacts, subpages) ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 30px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.foot__name {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  display: block;
}
.foot__tag { color: var(--muted); margin: 10px 0 16px; font-size: 0.95rem; max-width: 44ch; }
.foot__mail { color: var(--accent); font-family: "JetBrains Mono", monospace; font-weight: 700; }
.foot__mail:hover { opacity: 0.75; }
.foot__social { align-content: flex-start; }
.foot__bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}
.foot__bottom a { transition: color 0.2s var(--ease); }
.foot__bottom a:hover { color: var(--accent); }

/* ---------- design toggle (three swatches, one per design) ---------- */
.dtoggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.dtoggle__btn {
  width: 16px; height: 16px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease);
}
.dtoggle__btn:hover { transform: scale(1.18); }
.dtoggle__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dtoggle__btn.is-active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.dtoggle__btn[data-design="stream"] { background: linear-gradient(120deg, #2dd4bf, #38bdf8); }
.dtoggle__btn[data-design="press"] { background: radial-gradient(circle at 50% 50%, #bf1d1d 0 3px, #f3f2ee 3px); }
.dtoggle__btn[data-design="term"] { background: radial-gradient(circle at 50% 50%, #3fb950 0 3px, #0d120d 3px); }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .art, .media__thumb img, .row, .social a { transition: none; }
}
