/* ==========================================================
   Milky Lab — motion portfolio
   Light theme by day, dark theme by night (auto, see <head>)
   ========================================================== */

:root {
  --aqua: #6EE7E7;
  --mint: #10B981;
  --mint-soft: #5EEAD4;
  --cyan: #0EA5E9;
  --cyan-deep: #0284C7;

  /* page (light) */
  --bg: #E6FAF8;
  --bg-2: #CFF5F2;
  --orb-1: rgba(110, 231, 231, 0.35);
  --orb-2: rgba(167, 243, 208, 0.35);
  --text: #071526;
  --text-2: #0B192C;
  --muted: #4B6375;
  --subtle: #6A869B;
  --accent-text: #0284C7;
  --chip-bg: rgba(255, 255, 255, 0.6);
  --chip-border: rgba(255, 255, 255, 0.9);
  --btn-bg: #071526;
  --btn-text: #FFFFFF;
  --marquee-bg: #071526;
  --marquee-text: #E6FAF8;
  --footer-stroke: rgba(7, 21, 38, 0.18);
  --hero-fade: rgba(230, 250, 248, 0.78);
  --tg-bg: rgba(255, 255, 255, 0.75);
  --line: rgba(7, 21, 38, 0.12);
  --row-hover: rgba(255, 255, 255, 0.45);

  /* tiles */
  --tile: #0A1728;
  --tile-2: #0F2236;
  --tile-line: rgba(110, 231, 231, 0.14);
  --tile-text: #CFEFF0;
  --tile-dim: #7F9BAE;

  --f-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --f-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 24px;
  --nav-h: 68px;
}

:root[data-theme="dark"] {
  --bg: #050B14;
  --bg-2: #0A1728;
  --orb-1: rgba(14, 165, 233, 0.16);
  --orb-2: rgba(16, 185, 129, 0.12);
  --text: #E6FAF8;
  --text-2: #CFEFF0;
  --muted: #8FA9BA;
  --subtle: #6F8A9C;
  --accent-text: #6EE7E7;
  --chip-bg: rgba(15, 34, 54, 0.7);
  --chip-border: rgba(110, 231, 231, 0.18);
  --btn-bg: #6EE7E7;
  --btn-text: #071526;
  --marquee-bg: #6EE7E7;
  --marquee-text: #071526;
  --footer-stroke: rgba(230, 250, 248, 0.14);
  --hero-fade: rgba(5, 11, 20, 0.7);
  --tg-bg: rgba(15, 34, 54, 0.8);
  --line: rgba(230, 250, 248, 0.12);
  --row-hover: rgba(110, 231, 231, 0.05);

  --tile: #0B1A2C;
  --tile-2: #112840;
  --tile-line: rgba(110, 231, 231, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background:
    radial-gradient(1200px 700px at 85% 10%, var(--orb-1), transparent 60%),
    radial-gradient(900px 600px at 10% 90%, var(--orb-2), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.8s, color 0.8s;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--f-mono); letter-spacing: 0.02em; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); display: inline-block; flex: none; animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: transform 0.6s var(--ease-out), background 0.4s, backdrop-filter 0.4s;
  animation: navIn 0.9s var(--ease-out) both;
}
.nav.scrolled { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.nav.hidden { transform: translateY(-110%); }
@keyframes navIn { from { opacity: 0; transform: translateY(-12px); } }
.nav-brand { display: inline-flex; align-items: center; gap: 12px; }
.nav-title { font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.nav-logo {
  position: relative; width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  transition: transform 0.6s var(--ease-spring);
}
.nav-logo img { width: 100%; height: 100%; display: block; border-radius: 50%; position: relative; z-index: 1; }
.nav-logo::before { /* soft aqua halo that breathes, like the eyes glow */
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 231, 231, 0.55), transparent 65%);
  animation: halo 3.2s ease-in-out infinite;
}
@keyframes halo { 0%, 100% { opacity: 0.35; transform: scale(0.92); } 50% { opacity: 0.9; transform: scale(1.06); } }
.nav-brand:hover .nav-logo { transform: rotate(-10deg) scale(1.08); }

.nav-right { display: flex; align-items: center; gap: clamp(8px, 1.6vw, 18px); }
.nav-clock { font-size: 13px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.nav-clock i { font-style: normal; color: var(--accent-text); font-size: 11px; margin-left: 6px; }

.icon-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2);
  transition: background 0.25s, color 0.25s, transform 0.4s var(--ease-spring);
}
.icon-toggle svg { width: 18px; height: 18px; }
.icon-toggle:hover { background: var(--chip-bg); color: var(--text); }
.icon-toggle:active { transform: scale(0.9); }

.theme-seg {
  position: relative; display: inline-flex; padding: 3px;
  border-radius: 9999px;
  background: var(--chip-bg); border: 1px solid var(--chip-border);
}
.theme-seg button {
  position: relative; z-index: 1;
  width: 30px; height: 28px; border-radius: 9999px;
  display: grid; place-items: center;
  color: var(--subtle);
  transition: color 0.3s;
}
.theme-seg button svg { width: 15px; height: 15px; transition: transform 0.5s var(--ease-spring); }
.theme-seg button:hover { color: var(--text); }
.theme-seg button.active { color: var(--btn-text); }
.theme-seg button.active svg { transform: rotate(-20deg) scale(1.05); }
.theme-pill {
  position: absolute; z-index: 0; top: 3px; left: 3px;
  width: 30px; height: 28px; border-radius: 9999px;
  background: var(--btn-bg);
  transition: transform 0.5s var(--ease-out);
}

.lang-btn {
  display: inline-flex; padding: 3px; border-radius: 9999px;
  background: var(--chip-bg); border: 1px solid var(--chip-border);
  font-size: 11.5px; font-weight: 600;
}
.lang-btn span { padding: 5px 9px; border-radius: 9999px; color: var(--subtle); transition: background 0.3s, color 0.3s; }
:root[lang="ru"] .lang-btn [data-lang="ru"], :root[lang="en"] .lang-btn [data-lang="en"] { background: var(--btn-bg); color: var(--btn-text); }
.nav-links { display: flex; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--chip-bg); border: 1px solid var(--chip-border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-links a { font-size: 13.5px; font-weight: 700; padding: 8px 14px; border-radius: 9999px; transition: background 0.25s, color 0.25s; }
.nav-links a:hover { background: var(--btn-bg); color: var(--btn-text); }

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 100svh; min-height: 600px;
  overflow: hidden;
  background: #CDEFEF;
  cursor: none;
  touch-action: pan-y;
}
:root[data-theme="dark"] .hero { background: #07101C; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.hero.no-webgl .hero-video { opacity: 1; filter: blur(14px) saturate(0.9) brightness(1.1); transform: scale(1.08); }
.hero.no-webgl { cursor: auto; }
.hero-glass { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-cursor {
  position: absolute; top: 0; left: 0; z-index: 3;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 24px rgba(110, 231, 231, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.5);
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.hero-cursor.on { opacity: 1; }
@media (hover: none) { .hero { cursor: auto; } .hero-cursor { display: none; } }

/* soft fade behind the text so it always reads */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(55% 75% at 66% 52%, var(--hero-fade), transparent 72%);
}
/* text sits centred inside the right two thirds (Milky walks in the left third) */
.hero-content {
  container-type: inline-size;
  position: absolute; z-index: 2;
  left: 33.333%; right: 0; top: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--nav-h) var(--gutter) 40px;
  pointer-events: none;
}
.hero-content a { pointer-events: auto; }
.hero-title {
  font-family: var(--f-display); font-weight: 800;
  font-size: min(clamp(52px, 8.4vw, 132px), 15cqi);
  line-height: 0.95; letter-spacing: -0.05em;
  margin-bottom: 18px;
  white-space: nowrap;
}
.hero-title .ch {
  display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(0.35em) scale(1.06);
  animation: chIn 1.1s var(--ease-out) forwards;
  animation-delay: calc(0.3s + var(--c) * 0.05s);
}
.hero-title .sp { display: inline-block; width: 0.26em; }
@keyframes chIn { to { opacity: 1; filter: blur(0); transform: none; } }
.hero-hello {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.hero-hello .wave { display: inline-block; transform-origin: 70% 80%; animation: hand 2.4s ease-in-out 1.8s infinite; }
@keyframes hand { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }

.hero-sub { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.55; font-weight: 500; color: var(--text-2); margin-bottom: 30px; max-width: 44ch; }
[data-intro] { opacity: 0; transform: translateY(16px); animation: introIn 0.9s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes introIn { to { opacity: 1; transform: none; } }

.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px; border-radius: 9999px;
  font-weight: 800; font-size: 15px;
  will-change: transform;
}
.btn-main { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 14px 34px -12px rgba(7, 21, 38, 0.55); transition: box-shadow 0.3s; }
.btn-main:hover { box-shadow: 0 18px 40px -10px rgba(14, 165, 233, 0.55); }
.btn-main::before { /* shine sweep */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 3.6s var(--ease-out) 2.4s infinite;
}
@keyframes shine { 0% { transform: translateX(-120%); } 35%, 100% { transform: translateX(120%); } }
.btn svg { animation: nudge 1.8s var(--ease-out) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.hero-count { font-size: 12px; color: var(--muted); }

.hero-hint {
  position: absolute; z-index: 2; left: var(--gutter); bottom: 28px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-2);
  padding: 8px 14px; border-radius: 9999px;
  background: var(--chip-bg); border: 1px solid var(--chip-border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  pointer-events: none; opacity: 0; white-space: nowrap;
  animation: hintIn 0.8s var(--ease-out) 2.2s forwards;
  transition: opacity 0.6s, transform 0.6s var(--ease-out);
}
@keyframes hintIn { to { opacity: 1; } }
.hero-hint svg { width: 15px; height: 15px; animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: translateX(-3px) rotate(-8deg); } 50% { transform: translateX(3px) rotate(8deg); } }
.hero-hint.gone { opacity: 0 !important; transform: translateY(10px); animation: none; }

/* ============ MARQUEE ============ */
.marquee { overflow: hidden; background: var(--marquee-bg); color: var(--marquee-text); padding: 18px 0; transition: background 0.8s, color 0.8s; }
.marquee-track { display: flex; gap: 28px; width: max-content; font-family: var(--f-display); font-weight: 700; font-size: clamp(20px, 3vw, 34px); text-transform: uppercase; letter-spacing: -0.01em; white-space: nowrap; will-change: transform; }
.marquee-track i { font-style: normal; color: var(--aqua); }
:root[data-theme="dark"] .marquee-track i { color: var(--cyan-deep); }

/* ============ PROJECTS ============ */
.projects { padding: clamp(80px, 11vw, 140px) var(--gutter) clamp(60px, 8vw, 100px); max-width: 1240px; margin: 0 auto; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.section-index { display: block; font-size: 13px; color: var(--accent-text); margin-bottom: 14px; }
.section-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(32px, 5vw, 64px); line-height: 1; letter-spacing: -0.04em; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; border-radius: 9999px; background: var(--chip-bg); border: 1px solid var(--chip-border); }
.chip {
  position: relative;
  font-size: 13.5px; font-weight: 700; color: var(--text-2);
  padding: 9px 16px; border-radius: 9999px;
  transition: color 0.3s;
  z-index: 0;
}
.chip sup { font-family: var(--f-mono); font-size: 10px; margin-left: 4px; opacity: 0.6; }
.chip.active { color: var(--btn-text); }
.chip-pill { position: absolute; z-index: -1; top: 5px; left: 0; height: calc(100% - 10px); border-radius: 9999px; background: var(--btn-bg); transition: transform 0.55s var(--ease-out), width 0.55s var(--ease-out); }

[data-reveal] { opacity: 0; transform: translateY(40px); filter: blur(8px); transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out), filter 0.9s var(--ease-out), background-size 1.6s var(--ease-out); transition-delay: calc(var(--i, 0) * 0.08s); }
[data-reveal].in { opacity: 1; transform: none; filter: blur(0); }

/* ---------- Project list (editorial rows) ---------- */
.grid { border-top: 1px solid var(--line); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr auto 56px;
  /* 64px column = icon tile */
  align-items: center; gap: 24px;
  padding: clamp(22px, 3vw, 34px) 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  transition: opacity 0.4s, background 0.4s;
}
.row::before { /* fill that wipes in from the left on hover */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--row-hover);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.row.enter { animation: rowIn 0.9s var(--ease-out) backwards; animation-delay: calc(var(--k, 0) * 0.08s); }
@keyframes rowIn { from { opacity: 0; transform: translateY(24px); } }
.row.hide { display: none; }
.row-icon {
  width: 80px; height: 80px; border-radius: 22px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--chip-bg); border: 1px solid var(--line); color: var(--text);
  transition: transform 0.5s var(--ease-spring), background 0.3s, color 0.3s;
}
.row-icon svg { width: 36px; height: 36px; stroke-width: 1.6; }
.row-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.row-icon:has(img) { border: 0; background: none; }
.row-cat i { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--subtle); margin-right: 10px; }
.row-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.row-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(26px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.04em;
  transition: transform 0.6s var(--ease-out);
}
.row-soon { font-family: var(--f-mono); font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 0; vertical-align: middle; margin-left: 12px; padding: 3px 9px; border-radius: 9999px; border: 1px solid var(--line); color: var(--accent-text); }
.row-text { font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 56ch; }
.row-cat { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.row-end { justify-self: end; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); transition: background 0.35s, color 0.35s, transform 0.5s var(--ease-spring), border-color 0.35s; }
.row-end svg { width: 18px; height: 18px; }
.row-end em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--subtle); }
.row.soon .row-end { width: auto; height: auto; border: 0; }
.row-thumb { display: none; }
@media (hover: hover) {
  .grid:has(.row:hover) .row:not(:hover) { opacity: 0.45; }
  .row:hover::before { transform: scaleX(1); }
  .row:hover .row-title { transform: translateX(10px); }
  .row:hover .row-icon { transform: rotate(-8deg) scale(1.08); }
  .row:hover .row-icon:not(:has(img)) { background: var(--btn-bg); color: var(--btn-text); border-color: transparent; }
  .row:not(.soon):hover .row-end { background: var(--btn-bg); color: var(--btn-text); border-color: transparent; transform: rotate(45deg); }
}
.row.soon { cursor: default; }


/* ============ FOOTER ============ */
.footer { padding: 40px var(--gutter) 30px; overflow: hidden; }
.footer-big {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(64px, 17vw, 250px); line-height: 0.85; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px var(--footer-stroke);
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  -webkit-background-clip: text; background-clip: text;
  background-size: 0% 100%; background-repeat: no-repeat;
  white-space: nowrap; text-align: center;
}
.footer-big.in { background-size: 100% 100%; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--subtle); margin-top: 20px; flex-wrap: wrap; }

/* ============ TELEGRAM WIDGET ============ */
.tg {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; align-items: center; padding: 5px; border-radius: 9999px;
  background: var(--tg-bg);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--chip-border);
  box-shadow: 0 14px 36px -14px rgba(11, 85, 99, 0.45);
  opacity: 0; transform: translateY(20px) scale(0.8);
  transition: opacity 0.6s var(--ease-out), transform 0.7s var(--ease-spring), box-shadow 0.3s;
}
.tg.show { opacity: 1; transform: none; }
.tg-text { display: flex; flex-direction: column; justify-content: center; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width 0.6s var(--ease-out), opacity 0.35s, padding 0.6s var(--ease-out); }
.tg-text b { font-size: 14px; font-weight: 800; }
.tg-text small { font-size: 12px; color: var(--muted); }
.tg:hover .tg-text, .tg:focus-visible .tg-text, .tg.peek .tg-text { max-width: 360px; opacity: 1; padding: 0 12px 0 14px; }
.tg:hover { box-shadow: 0 18px 44px -14px rgba(14, 165, 233, 0.55); }
.tg-ava { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; background: #071526; }
.tg-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tg-ava::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--aqua); animation: ring 2.4s var(--ease-out) infinite; }
@keyframes ring { 0% { transform: scale(0.92); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
.tg-plane { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; background: #229ED9; color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.tg-plane svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }

/* ============ COOKIE NOTICE ============ */
.cookie {
  position: fixed; left: 18px; bottom: 18px; z-index: 90;
  width: min(420px, calc(100% - 36px));
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: var(--tg-bg);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--chip-border);
  box-shadow: 0 24px 50px -20px rgba(7, 21, 38, 0.45);
  color: var(--text);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.4s, transform 0.6s var(--ease-out);
}
.cookie.show { opacity: 1; transform: none; }
.cookie p { font-size: 13.5px; line-height: 1.5; color: var(--text-2); margin-bottom: 14px; }
.cookie a { text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-btn { font-size: 13.5px; font-weight: 700; padding: 9px 16px; border-radius: 9999px; background: var(--btn-bg); color: var(--btn-text); }
.cookie-btn.ghost { background: transparent; color: var(--text-2); border: 1px solid var(--line); }
.cookie-btn.ghost:hover { border-color: var(--text); }

.legal-links { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.legal-links a, .linklike { color: inherit; font: inherit; }
.legal-links a:hover, .linklike:hover { color: var(--text); }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .row { grid-template-columns: 56px 1fr 48px; gap: 14px; }
  .row-icon { width: 56px; height: 56px; border-radius: 16px; }
  .row-icon svg { width: 28px; height: 28px; }
  .row-cat { display: none; }
  .row-thumb { display: block; grid-column: 2 / 4; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-top: 6px; }
}
@media (max-width: 640px) {
  :root { --nav-h: 60px; --radius: 20px; }
  .nav-clock { display: none; }
  .nav-links a { padding: 7px 11px; font-size: 13px; }
  .hero::after { background: linear-gradient(0deg, var(--hero-fade) 0%, var(--hero-fade) 38%, transparent 72%); }
  .hero-content { left: 0; top: auto; height: auto; justify-content: flex-end; padding: 0 var(--gutter) 64px; }
  .hero-title { font-size: clamp(44px, 14vw, 64px); }
  .hero-sub { font-size: 15px; margin-bottom: 22px; }
  .lang-btn span { padding: 4px 7px; }
  .hero-hint { left: 50%; bottom: auto; top: calc(var(--nav-h) + 10px); transform: translateX(-50%); }
  .hero-hint.gone { transform: translate(-50%, -10px); }
  .row-text { font-size: 14px; }
  .tg { right: 12px; bottom: 12px; }
  .tg-ava { width: 46px; height: 46px; }
  .tg.peek .tg-text { max-width: 230px; }
  .tg-text small { white-space: normal; width: 190px; }
  .cookie { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 480px) {
  .nav-title { display: none; }
}
