/* ============================================================
   LEO DAVIDOV — leodavidov.uk
   Design ref: utazon.fr aesthetic
   ============================================================ */

:root {
  --bg:           #121212;
  --bg-card:      #1a1a1a;
  --bg-card-2:    #1d1d1d;
  --bg-modal:     #161616;
  --border:       #1e1e1e;
  --border-light: #2a2a2a;
  --text:         #ffffff;
  --text-sec:     #cccccc;
  --text-muted:   #444444;
  --radius-card:  16px;
  --radius-btn:   50px;
  --header-h:     72px;
  --font:         'Inter', -apple-system, sans-serif;
  --ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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


/* ── FEATURE CARD 3D TILT — merged into .project-card below ── */

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── INNER CONTAINER ── */
.inner {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* ── SKIP LINK (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--text);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ── HEADER ── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 40px;
  z-index: 100;
  transition: background 0.3s var(--ease), box-shadow 0.3s;
}

.header.scrolled {
  background: rgba(18, 18, 18, 0.68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.35);
}

.header__logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
  flex: 0 0 auto;
  margin-right: auto;
}
.header__logo-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.header__logo-name {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sec);
}

.fps-monitor {
  position: fixed;
  left: 40px;
  top: calc(var(--header-h) + 134px);
  z-index: 120;
  pointer-events: none;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 14, 20, 0.52);
  color: rgba(220, 252, 231, 0.95);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.fps-monitor[data-fps-state="mid"] {
  color: rgba(254, 240, 138, 0.98);
  border-color: rgba(234, 179, 8, 0.5);
}

.fps-monitor[data-fps-state="low"] {
  color: rgba(254, 205, 211, 0.98);
  border-color: rgba(239, 68, 68, 0.58);
}

.header__nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  margin-left: 20px;
}

.header__nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.header__nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sec);
  transition: color 0.2s;
}
.header__nav-links a:hover { color: #e85000; }
.header__nav-links a.active { color: #e85000; }

/* Social icons in header */
.header__nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.header__nav-socials {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.header__nav-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sec);
  transition: color 0.2s;
  opacity: 0.7;
}
.header__nav-socials a:hover { color: #e85000; opacity: 1; }
.header__nav-socials svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  display: block;
}

/* ── PLAY GAME button — gradient hover effect ── */
.btn-play-game {
  all: unset;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(.76,-0.25,.51,1.13);
}
.btn-play-game:hover  { transform: scale(1.05); }
.btn-play-game:active { transform: scale(0.97); }

.btn-play-game > div {
  display: block;
  padding: 0.65em 1.2em;
  background: var(--accent, #e85000);
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}

/* gradient text sweep */
.btn-play-game > div > span {
  background: linear-gradient(
    to right,
    #fff, #fff,
    hsl(180,100%,50%), hsl(240,100%,50%), hsl(270,100%,50%),
    hsl(330,40%,70%), hsl(0,100%,50%), hsl(60,100%,50%), hsl(90,100%,75%),
    #fff, #fff
  ) no-repeat 100% 0% / 900%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 3s ease;
}
.btn-play-game:hover > div > span {
  background-position: 0% 0%;
}

/* gradient border ring */
.btn-play-game > div::before {
  content: "";
  display: block;
  position: absolute;
  inset: -1.5px;
  border-radius: var(--radius-btn);
  background: linear-gradient(
    to right,
    #fff, #fff,
    hsl(180,100%,50%), hsl(240,100%,50%), hsl(270,100%,50%),
    hsl(330,40%,70%), hsl(0,100%,50%), hsl(60,100%,50%), hsl(90,100%,75%),
    #fff, #fff
  ) no-repeat 100% 0% / 900%;
  z-index: -1;
  opacity: 0.25;
  transition: background-position 3s ease, opacity 0.3s ease;
}
.btn-play-game:hover > div::before {
  background-position: 0% 0%;
  opacity: 1;
}

/* glow bloom */
.btn-play-game > div::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  border-radius: var(--radius-btn);
  background: linear-gradient(
    to right,
    #fff, #fff,
    hsl(180,100%,50%), hsl(240,100%,50%), hsl(270,100%,50%),
    hsl(330,40%,70%), hsl(0,100%,50%), hsl(60,100%,50%), hsl(90,100%,75%),
    #fff, #fff
  ) no-repeat 100% 0% / 900%;
  z-index: -2;
  filter: blur(0px);
  opacity: 0;
  transition: background-position 3s ease, filter 0.3s ease, opacity 0.3s ease;
}
.btn-play-game:hover > div::after {
  background-position: 0% 0%;
  filter: blur(28px);
  opacity: 0.5;
}

.btn-play-game:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-contact {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-btn);
  padding: 10px 22px;
  transition: border-color 0.2s, background 0.2s;
}
.btn-contact:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.06);
}

.header__lang {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.header__lang a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  color: var(--text-sec);
  transition: color 0.2s, border-color 0.2s;
}
.header__lang a:hover { color: #e85000; border-color: rgba(232,80,0,0.3); }
.header__lang a.active { color: var(--text); border-color: rgba(255,255,255,0.35); }

/* ── BURGER ── */
.burger {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  cursor: pointer;
  margin-left: 16px;
}
.burger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE OVERLAY ── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-overlay.open { opacity: 1; }

.mobile-overlay nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.mobile-overlay nav a {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text-sec);
  transition: color 0.2s;
}
.mobile-overlay nav a:hover { color: #e85000; }

.mobile-overlay__divider {
  width: 40px;
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

.mobile-overlay__lang {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-sec);
  margin-bottom: 24px;
}
.mobile-overlay__lang a { margin-right: 16px; transition: color 0.2s; }
.mobile-overlay__lang a:hover,
.mobile-overlay__lang a.active { color: var(--text); }

.mobile-overlay__socials {
  display: flex;
  gap: 24px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sec);
}
.mobile-overlay__socials a:hover { color: var(--text); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  padding: 13px 28px;
  min-width: 152px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
  text-align: center;
}
.btn--outline {
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--text);
}
.btn--outline:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.06);
}
.btn--solid {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}
.btn--solid:hover { background: rgba(255,255,255,0.88); }
.btn--orange {
  background: #e85000;
  color: #fff;
  border: 1px solid #e85000;
}
.btn--orange:hover {
  background: #ff5900;
  border-color: #ff5900;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 40px 40px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 40px 80px;
  align-items: start;
}

.footer__brand-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer__brand-tag {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sec);
}

.footer__col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 16px;
}
.footer__col-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__col-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sec);
  transition: color 0.2s;
}
.footer__col-links a:hover { color: #e85000; }

.footer__bottom {
  border-top: 1px solid var(--border);
  margin: 40px 0 0;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.footer__bottom a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__bottom a:hover { color: var(--text-sec); }

/* ── FOOTER ORANGE GRADIENT WRAPPER ── */
.footer-wrap {
  position: relative;
  overflow: visible;
}
.footer-wrap::before {
  content: '';
  position: absolute;
  top: -140px;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 80% 75% at 90% 85%, rgba(180, 55, 0, 0.55) 0%, rgba(130, 35, 0, 0.22) 40%, rgba(70, 15, 0, 0.07) 65%, transparent 82%);
  pointer-events: none;
  z-index: 0;
}
.footer-wrap .footer,
.footer-wrap .footer__bottom { position: relative; z-index: 1; }

/* cursor dot - desktop only */
.cursor-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff6a1a 0%, #e85000 35%, rgba(232, 80, 0, 0.3) 65%, transparent 100%);
  filter: blur(2px);
  box-shadow: 0 0 14px 5px rgba(232, 80, 0, 0.55), 0 0 32px 12px rgba(232, 80, 0, 0.22);
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.3s, width 0.3s ease, height 0.3s ease, box-shadow 0.4s ease;
  will-change: transform;
}

/* Squish при поедании */
.cursor-dot.eat {
  animation: dot-eat 120ms ease forwards;
}
@keyframes dot-eat {
  0%   { transform: translate(-50%, -50%) scale(1); }
  40%  { transform: translate(-50%, -50%) scale(0.7); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Milestone: score >= 10 — золотое свечение */
.cursor-dot.milestone-1 {
  box-shadow: 0 0 14px 5px rgba(255, 200, 0, 0.65), 0 0 32px 12px rgba(255, 180, 0, 0.28);
}

/* Milestone: score >= 20 — белое/холодное свечение */
.cursor-dot.milestone-2 {
  box-shadow: 0 0 14px 5px rgba(200, 220, 255, 0.75), 0 0 32px 14px rgba(180, 210, 255, 0.32);
}

@media (pointer: coarse) { .cursor-dot { display: none !important; } }

/* ── CURSOR GAME ── */

/* Счёт над точкой — отдельный элемент body, позиция задаётся через JS */
.cursor-score {
  position: fixed;
  z-index: 10000;
  transform: translate(-50%, -100%);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  will-change: top, left, opacity;
  user-select: none;
}

/* Soft backdrop blur pulse on dot-eat (separate from contact modal) */
.game-eat-blur-overlay {
  --game-blur: 0px;
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(var(--game-blur));
  -webkit-backdrop-filter: blur(var(--game-blur));
  transition:
    opacity 0.28s var(--ease),
    backdrop-filter 0.08s linear,
    -webkit-backdrop-filter 0.08s linear;
}

.game-eat-blur-overlay.active {
  opacity: 1;
}

.game-hit-flash-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 60, 90, 0.16) 0%, rgba(255, 30, 70, 0.08) 35%, rgba(0, 0, 0, 0) 70%),
    rgba(120, 0, 20, 0.14);
  mix-blend-mode: screen;
}

@keyframes enemy-hit-flash {
  0% { opacity: 0; }
  18% { opacity: 0.55; }
  100% { opacity: 0; }
}

.game-hit-flash-overlay.active {
  animation: enemy-hit-flash 0.22s ease-out forwards;
}

/* Жёлтая еда */
.food-dot {
  position: fixed;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f5d000;
  box-shadow: 0 0 8px 3px rgba(245, 208, 0, 0.55);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%) scale(0);
  animation: food-appear 0.3s ease forwards;
  will-change: left, top;
}

@keyframes food-appear {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.food-dot.food-disappear {
  animation: food-vanish 0.3s ease forwards;
}

/* Red bonus dot — 2× size, red glow */
.food-dot--red {
  width: 30px !important;
  height: 30px !important;
  background: radial-gradient(circle, #ff6666 0%, #cc0000 40%, rgba(180,0,0,0.3) 70%, transparent 100%);
  box-shadow: 0 0 14px 5px rgba(220,0,0,0.7), 0 0 28px 10px rgba(180,0,0,0.3);
}

/* Ghost dot — translucent white, static, pulsing */
.food-dot--ghost {
  width: 22px !important;
  height: 22px !important;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(180,220,255,0.5) 50%, transparent 100%);
  box-shadow: 0 0 12px 4px rgba(180,220,255,0.6), 0 0 24px 8px rgba(120,180,255,0.3);
  opacity: 0.55;
  animation: ghost-pulse 1.2s ease-in-out infinite;
}
@keyframes ghost-pulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 0.85; transform: translate(-50%, -50%) scale(1.18); }
}

/* Cursed dot — purple, fast, eerie glow */
.food-dot--cursed {
  width: 18px !important;
  height: 18px !important;
  background: radial-gradient(circle, #dd88ff 0%, #7700cc 45%, rgba(100,0,180,0.3) 75%, transparent 100%);
  box-shadow: 0 0 12px 4px rgba(180,0,255,0.7), 0 0 24px 8px rgba(120,0,200,0.4);
  animation: cursed-flicker 0.8s ease-in-out infinite alternate;
}
@keyframes cursed-flicker {
  0%   { box-shadow: 0 0 12px 4px rgba(180,0,255,0.7), 0 0 24px 8px rgba(120,0,200,0.4); }
  100% { box-shadow: 0 0 18px 7px rgba(220,80,255,0.9), 0 0 36px 12px rgba(160,0,255,0.5); }
}

.enemy-dot {
  position: fixed;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 9998;
  border-radius: 3px;
  border: 1px solid rgba(255, 170, 190, 0.6);
  background: linear-gradient(145deg, #8e1538 0%, #540619 50%, #bc2b52 100%);
  box-shadow:
    0 0 10px rgba(214, 38, 88, 0.72),
    0 0 24px rgba(110, 0, 34, 0.46);
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  animation: enemy-appear 0.22s ease forwards;
  will-change: left, top, opacity, transform;
}

.heal-soul-dot {
  position: fixed;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 9998;
  border-radius: 3px;
  border: 1px solid rgba(160, 255, 198, 0.85);
  background: linear-gradient(145deg, #28c76f 0%, #0e7e45 48%, #3af08f 100%);
  box-shadow:
    0 0 10px rgba(58, 240, 143, 0.7),
    0 0 22px rgba(18, 162, 86, 0.45);
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  animation: enemy-appear 0.22s ease forwards;
  will-change: left, top, opacity, transform;
}

@keyframes enemy-appear {
  0%   { transform: translate(-50%, -50%) rotate(45deg) scale(0); opacity: 0; }
  60%  { transform: translate(-50%, -50%) rotate(45deg) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(1); opacity: 1; }
}

.enemy-dot.enemy-dot--parried {
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.2, 0.9, 0.25, 1), box-shadow 0.32s ease;
  opacity: 0.2;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.68);
  box-shadow: 0 0 8px rgba(230, 245, 255, 0.55), 0 0 20px rgba(180, 220, 255, 0.38);
}

.heal-soul-dot.enemy-dot--parried {
  opacity: 0.2;
  box-shadow: 0 0 8px rgba(186, 255, 220, 0.6), 0 0 22px rgba(92, 232, 163, 0.42);
}

.enemy-dot.enemy-dot--parry-bounce {
  animation: enemy-parry-bounce 0.26s cubic-bezier(0.25, 0.85, 0.28, 1);
}

@keyframes enemy-parry-bounce {
  0%   { transform: translate(-50%, -50%) rotate(45deg) scale(1); }
  32%  { transform: translate(-50%, -50%) rotate(45deg) scale(1.16); }
  68%  { transform: translate(-50%, -50%) rotate(45deg) scale(0.92); }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(0.86); }
}

.enemy-dot.enemy-dot--vanish,
.heal-soul-dot.enemy-dot--vanish {
  transition: opacity 0.22s ease, transform 0.22s ease;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.55);
}

.enemy-burst {
  --burst-main: rgba(255, 160, 188, 0.95);
  --burst-soft: rgba(239, 68, 68, 0.35);
  position: fixed;
  width: 2px;
  height: 2px;
  pointer-events: none;
  z-index: 10002;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px var(--burst-soft));
}

.enemy-burst--parry {
  --burst-main: rgba(236, 245, 255, 0.95);
  --burst-soft: rgba(181, 224, 255, 0.42);
}

.enemy-burst--heal {
  --burst-main: rgba(188, 255, 220, 0.95);
  --burst-soft: rgba(90, 232, 164, 0.42);
}

.enemy-burst__core,
.enemy-burst__ring,
.enemy-burst__ray {
  position: absolute;
  left: 0;
  top: 0;
}

.enemy-burst__core {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--burst-main) 0%, rgba(255, 255, 255, 0.7) 35%, rgba(255, 255, 255, 0) 72%);
  animation: enemy-burst-core 0.38s ease-out forwards;
}

.enemy-burst__ring {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--burst-main);
  opacity: 0.9;
  animation: enemy-burst-ring 0.44s ease-out forwards;
}

.enemy-burst__ray {
  width: var(--ray-len, 14px);
  height: 2px;
  border-radius: 999px;
  transform-origin: 0 50%;
  transform: translate(0, -50%) rotate(var(--ray-angle, 0deg));
  background: linear-gradient(90deg, var(--burst-main) 0%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  animation: enemy-burst-ray 0.42s ease-out forwards;
  animation-delay: var(--ray-delay, 0s);
}

@keyframes enemy-burst-core {
  0%   { opacity: 0.95; transform: translate(-50%, -50%) scale(0.2); }
  60%  { opacity: 0.65; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
}

@keyframes enemy-burst-ring {
  0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

@keyframes enemy-burst-ray {
  0%   { opacity: 0; transform: translate(0, -50%) rotate(var(--ray-angle, 0deg)) scaleX(0.2); }
  24%  { opacity: 1; transform: translate(0, -50%) rotate(var(--ray-angle, 0deg)) scaleX(1.1); }
  100% { opacity: 0; transform: translate(0, -50%) rotate(var(--ray-angle, 0deg)) scaleX(0.8); }
}

.perfect-parry-star {
  --star-life: 700ms;
  --star-drift-x: 0px;
  --star-drift-y: -20px;
  --star-scale: 1;
  position: fixed;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 240, 170, 0.95) 45%, rgba(255, 222, 120, 0.12) 100%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 92%, 50% 69%, 21% 92%, 32% 56%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 6px rgba(255, 234, 150, 0.6));
  opacity: 0;
  animation: perfect-parry-star-life var(--star-life) ease-out forwards;
}

@keyframes perfect-parry-star-life {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(-14deg);
  }
  20% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(calc(var(--star-scale) * 1.05)) rotate(8deg);
  }
  65% {
    opacity: 0.78;
    transform: translate(calc(-50% + var(--star-drift-x)), calc(-50% + var(--star-drift-y))) scale(var(--star-scale)) rotate(20deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--star-drift-x)), calc(-50% + var(--star-drift-y))) scale(calc(var(--star-scale) * 0.85)) rotate(36deg);
  }
}


@keyframes food-vanish {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

/* Hint "catch it" — появляется один раз */
.cursor-hint {
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(245, 208, 0, 0.7);
  letter-spacing: 0.08em;
  transform: translate(-50%, -50%);
  animation: hint-life 2.5s ease forwards;
  user-select: none;
}

@keyframes hint-life {
  0%   { opacity: 0; margin-top: 0px; }
  20%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; margin-top: -12px; }
}

/* Food word label */
.food-word {
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(245, 208, 0, 0.85);
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
  transform: translate(0, -50%);
  opacity: 0;
  transition: opacity 0.2s ease, top 0.08s ease, left 0.08s ease;
}
.food-word.visible { opacity: 1; }
.food-word.eating  { opacity: 0; transition: opacity 0.15s ease; }

/* XP ring flash on level up */
@keyframes ring-flash-anim {
  0%   { filter: drop-shadow(0 0 6px #fff) brightness(3); }
  100% { filter: none; }
}
.ring-flash {
  animation: ring-flash-anim 0.5s ease forwards;
}

.health-ring {
  will-change: top, left, opacity;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.45));
}

.shield-ring {
  will-change: top, left, opacity;
  filter: drop-shadow(0 0 7px rgba(220, 236, 255, 0.35));
}

/* Float / vibe animation for score + lvl labels */
/* XP % label — centered on dot */
.xp-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

/* LVL label — floats below ring */
.lvl-label {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  letter-spacing: 0.06em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  will-change: top, left, opacity;
}

.quest-bar {
  position: fixed;
  top: calc(var(--header-h) + 28px);
  left: 40px;
  right: auto;
  width: min(340px, calc(100vw - 24px));
  max-height: min(44vh, 420px);
  overflow: hidden auto;
  pointer-events: none;
  z-index: 9995;
  opacity: 0;
  padding: 10px 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(128, 146, 170, 0.35);
  background: linear-gradient(145deg, rgba(11, 14, 19, 0.86) 0%, rgba(7, 10, 14, 0.92) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 28px rgba(255, 128, 0, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  transition: opacity 1.2s ease;
}

.quest-bar__head {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(234, 245, 255, 0.82);
  margin-bottom: 8px;
}

.quest-bar__item {
  margin-bottom: 8px;
}

.quest-bar__item:last-of-type {
  margin-bottom: 4px;
}

.quest-bar__item--done .quest-bar__title {
  color: rgba(198, 232, 208, 0.92);
}

.quest-bar__item--done .quest-bar__track span {
  background: linear-gradient(90deg, #22c55e 0%, #82f0b2 100%);
}

.quest-bar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.quest-bar__title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(238, 245, 255, 0.95);
  text-shadow: 0 0 6px rgba(255, 170, 82, 0.24);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-bar__meta {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(168, 190, 212, 0.88);
  flex-shrink: 0;
}

.quest-bar__track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.quest-bar__track span {
  display: block;
  position: relative;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #b9ff8c 0%, #dfff84 58%, #ffe992 100%);
  box-shadow: 0 0 10px rgba(218, 255, 152, 0.62), 0 0 20px rgba(248, 255, 178, 0.48);
}

.quest-bar__track span::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #f8ffbf;
  opacity: var(--tip-opacity, 0);
  box-shadow: 0 0 18px rgba(246, 255, 184, 1), 0 0 36px rgba(238, 255, 168, 0.9);
}

.quest-bar__more {
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(160, 178, 200, 0.86);
  letter-spacing: 0.04em;
}

@media (max-width: 680px) {
  .quest-bar {
    top: calc(var(--header-h) + 28px);
    left: 24px;
    right: auto;
    width: min(320px, calc(100vw - 40px));
    border-radius: 14px;
    padding: 8px 10px 8px;
  }
}

/* Pulse animation on dot */
@keyframes dot-pulse {
  0%   { transform: translate(-50%, -50%) scale(1); }
  40%  { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.cursor-dot.pulse {
  animation: dot-pulse 0.35s ease forwards;
}

/* Expanding pulse rings */
@keyframes pulse-ring-anim {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}
.pulse-ring {
  position: fixed;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.8);
  pointer-events: none;
  z-index: 9997;
  animation: pulse-ring-anim 0.6s ease-out forwards;
}

/* ── WANT TO PLAY PROMPT ── */

.menu-panel {
  position: fixed;
  top: calc(var(--header-h) + 8px);
  right: 40px;
  width: 170px;
  transform: translateY(-6px);
  z-index: 10010;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.menu-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.menu-panel-btn,
.menu-panel-close {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-btn);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.menu-panel-btn:hover,
.menu-panel-close:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.06);
}
.menu-panel-btn:active,
.menu-panel-close:active {
  transform: scale(0.97);
}

/* ── CONTACT MODAL ── */
.game-over-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(8, 8, 12, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.25s ease;
}

.game-over-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.game-over-panel {
  width: min(520px, calc(100vw - 32px));
  border-radius: 18px;
  padding: 26px 20px 18px;
  background: rgba(12, 12, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.game-over-title {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 16px;
}

.game-over-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.game-over-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: none;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font: 600 13px/1 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
}

.game-over-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.game-over-btn:active {
  transform: scale(0.98);
}

.game-over-btn--danger {
  border-color: rgba(255, 120, 120, 0.72);
}

.game-over-saves {
  margin-top: 6px;
  max-height: min(66vh, 560px);
  overflow-y: auto;
  padding-right: 4px;
}

.game-over-saves-title {
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  font: 600 12px/1.2 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.game-over-saves-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.game-over-save-btn {
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  font: 600 12px/1 'Inter', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.game-over-save-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.07);
}

.game-over-save-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.music-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(8, 10, 14, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.22s ease;
}

.music-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.music-menu-panel {
  width: min(940px, calc(100vw - 28px));
  max-height: min(86vh, 920px);
  overflow: hidden;
  border-radius: 18px;
  padding: 18px;
  background: rgba(10, 12, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.52);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.music-menu-title {
  color: #fff;
  font: 800 24px/1 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.music-menu-close {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font: 600 11px/1 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.music-menu-close:hover {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

.music-menu-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font: 500 12px/1.35 'Inter', sans-serif;
  letter-spacing: 0.03em;
}

.music-menu-list {
  overflow-y: auto;
  padding-right: 4px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.music-effect-item {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  align-items: center;
  gap: 10px;
}

.music-effect-fn {
  color: rgba(255, 255, 255, 0.96);
  font: 700 13px/1.2 'Inter', sans-serif;
  letter-spacing: 0.05em;
}

.music-effect-desc {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.66);
  font: 500 11px/1.3 'Inter', sans-serif;
  letter-spacing: 0.02em;
}

.music-effect-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.music-variant-btn {
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.9);
  font: 600 11px/1 'Inter', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.music-variant-btn:hover {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.09);
}

.music-variant-btn.active {
  border-color: rgba(104, 239, 171, 0.9);
  background: rgba(62, 188, 128, 0.2);
  color: #e8fff3;
}

@media (max-width: 720px) {
  .game-over-saves-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .music-menu-panel {
    width: calc(100vw - 18px);
    padding: 12px;
  }

  .music-effect-item {
    grid-template-columns: 1fr;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 48px;
  width: 100%;
  max-width: 680px;
  position: relative;
  transform: translateY(24px);
  transition: transform 0.3s var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sec);
  font-size: 20px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
}
.modal__close:hover { color: var(--text); background: var(--border); }

.modal__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 36px;
  padding-right: 40px;
}

.modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.modal__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal__field.full { grid-column: 1 / -1; }

.modal__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-sec);
}

.modal__input,
.modal__textarea {
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}
.modal__input:focus,
.modal__textarea:focus { border-color: rgba(255,255,255,0.4); }
.modal__textarea { resize: vertical; min-height: 100px; }

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.modal__socials {
  display: flex;
  gap: 20px;
  align-items: center;
}
.modal__socials a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sec);
  transition: color 0.2s;
}
.modal__socials a:hover { color: var(--text); }

/* ── PLACEHOLDER IMAGE ── */
.img-placeholder {
  width: 100%;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #141414 0%, #0a0a0a 100%);
}

/* ── SECTION TAG ── */
.section-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 16px;
}

/* ============================================================
   PAGE: HOME
   ============================================================ */

.home-hero {
  position: relative;
  height: 100dvh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 0;
}

.home-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 85% 70% at 82% 6%, rgba(230, 70, 0, 0.88) 0%, rgba(175, 45, 0, 0.42) 38%, transparent 65%);
  z-index: 1;
}


/* ── MAGIC CARD SPOTLIGHT (from retro-template MagicUI) ── */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(230, 80, 0, 0.10),
    transparent 70%
  );
  opacity: var(--spotlight-opacity, 0);
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 2;
}

.home-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 40px;
  padding: 0 40px 56px;
}

.home-hero__left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
}

.home-hero__location {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sec);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.home-hero__h1 {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.0;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.home-hero__h1--typewriter {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  min-height: 2.1em;
}

.home-hero__typewriter-text {
  display: inline-block;
  white-space: pre-line;
}

.home-hero__typewriter-text::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 0.88em;
  background: currentColor;
  margin-left: 4px;
  vertical-align: -0.06em;
}

.home-hero__typewriter-text.is-paused-before-type::after {
  animation: typewriter-pause-blink 0.20s steps(1, end) 3;
}

@keyframes typewriter-pause-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.home-hero__typewriter-caret {
  display: none;
}

.home-hero__sub {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-sec);
  letter-spacing: 0.04em;
}

.home-hero__right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 18px;
}

.home-hero__right-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-hero__desc {
  font-size: 19px;
  line-height: 1.72;
  color: #ffffff;
  max-width: 540px;
}

.home-hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* Peek card at bottom of home */
.home-peek {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(50%);
  z-index: 2;
}

/* ============================================================
   PAGE: ABOUT (compact)
   ============================================================ */

.about-page { padding-top: var(--header-h); min-height: 100vh; }

.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 80px 40px 80px;
  align-items: start;
}

.about-hero__name {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.0;
  margin-bottom: 28px;
}

.about-hero__bio {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.72);
  margin-bottom: 36px;
  max-width: 440px;
}

.about-hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.about-hero__link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sec);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.about-hero__link:hover { color: #e85000; }
.about-hero__link::after { content: '→'; }

.about-hero__name-wrap {
  display: block;
  margin-bottom: 28px;
}
.about-hero__name-line1 {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.about-hero__name-line1 .about-hero__name {
  margin-bottom: 0;
}
.about-hero__name-line2 {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.0;
}
.about-hero__name-alt {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sec);
  line-height: 1;
  margin-top: 0;
  white-space: nowrap;
  opacity: 0.75;
  align-self: flex-end;
  padding-bottom: 8px;
}

.about-services {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.service-card {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  transition: border-color 0.2s;
}
.service-card:last-child { border-bottom: 1px solid var(--border); }

.service-card__left {}

.service-card__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.service-card__desc {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
  max-width: 300px;
}

.service-card__link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sec);
  transition: color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.service-card__link:hover { color: #e85000; }

/* Commitment section */
.commitment {
  text-align: left;
  padding: 120px 40px;
  border-top: 1px solid var(--border);
}
.commitment__title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.05;
}
.commitment__text {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 0 48px;
  line-height: 1.65;
}

/* ============================================================
   PAGE: PROJECTS
   ============================================================ */

.projects-page { padding-top: var(--header-h); }

.projects-header {
  padding: 60px 40px 40px;
}
.projects-header h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Sticky filter */
.projects-filter {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  gap: 0;
}

.filter-btn {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sec);
  padding: 16px 20px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-btn:hover { color: #e85000; }
.filter-btn.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Projects grid */
.projects-grid {
  padding: 40px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s;
  position: relative;
  text-decoration: none;
  display: block;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card:hover {
  border-color: rgba(232,80,0,0.35);
}

.project-card__img {
  aspect-ratio: 16/10;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}
.project-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.project-card:hover .project-card__img img { transform: scale(1.03); }

/* placeholder when no image */
.project-card__img-placeholder {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.project-card__year {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}

.project-card__info {
  padding: 20px 24px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.project-card__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.project-card__tag {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sec);
  letter-spacing: 0.04em;
}

.project-card__arrow {
  font-size: 18px;
  color: var(--text-sec);
  transition: color 0.2s, transform 0.2s;
}
.project-card:hover .project-card__arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

.project-card:hover .project-card__tag { color: #e85000; }


/* Coming soon card variant */
.project-card--coming-soon {
  opacity: 0.45;
}
.project-card--coming-soon:hover {
  border-color: var(--border);
  transform: none;
}
.project-card--coming-soon:hover .project-card__tag { color: inherit; }

/* hidden cards (filter) */
.project-card[hidden] { display: none; }

/* ============================================================
   PAGE: PROJECT DETAIL
   ============================================================ */

.project-detail { padding-top: var(--header-h); }

.project-detail__hero {
  height: 85vh;
  min-height: 500px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-detail__hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f0f0f 0%, #141414 100%);
}

.project-detail__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.9) 0%, transparent 60%);
}

.project-detail__hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  padding: 0 40px 56px;
  width: 100%;
}

.project-detail__back {
  position: absolute;
  top: 32px;
  left: 40px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sec);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.project-detail__back:hover { color: #e85000; }
.project-detail__back::before { content: '←'; }

.project-detail__tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 12px;
}

.project-detail__title {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 0.95;
}

/* Meta bar */
.project-detail__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 40px;
}

.meta-item {
  padding: 24px 0;
  border-right: 1px solid var(--border);
}
.meta-item:last-child { border-right: none; }
.meta-item:not(:first-child) { padding-left: 32px; }

.meta-item__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 6px;
}
.meta-item__value {
  font-size: 14px;
  font-weight: 500;
}

/* Project detail sections */
.project-detail__body {
  padding: 0 40px;
}

.detail-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
  max-width: 760px;
}

.detail-section__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 20px;
}

.detail-section__title {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.detail-section__text {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
}
.detail-section__text + .detail-section__text { margin-top: 16px; }

/* Full width image sections */
.detail-images {
  padding: 0 40px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-image-block {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.detail-image-block.full { grid-column: 1 / -1; aspect-ratio: 16/7; }

/* Next project */
.next-project {
  padding: 80px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.next-project__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 12px;
}
.next-project__name {
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.next-project__arrow {
  font-size: 40px;
  color: var(--text-sec);
  transition: color 0.2s, transform 0.2s;
}
.next-project a:hover .next-project__arrow {
  color: var(--text);
  transform: translateX(8px);
}

/* ============================================================
   LANDING PAGE SCROLL SECTIONS
   ============================================================ */

.landing-section {
  padding: 100px 40px;
  border-top: 1px solid var(--border);
}

.landing-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  gap: 24px;
  flex-wrap: wrap;
}

.landing-section__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 12px;
}

.landing-section__title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.0;
}

.landing-section .projects-grid {
  grid-template-columns: repeat(3, 1fr);
  padding: 0;
}

.landing-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.landing-about__bio {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
  margin-bottom: 36px;
}

.landing-about__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-cta {
  text-align: left;
  padding: 120px 40px;
  border-top: 1px solid var(--border);
}

.landing-cta__title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.05;
}

.landing-cta__sub {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: 0;
  margin-right: auto;
  line-height: 1.65;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .header { padding: 0 24px; justify-content: space-between; }
  .header__logo { flex: none; }
  .header__nav { display: none; }
  .burger { margin-left: 0; gap: 7px; }
  .fps-monitor {
    left: 24px;
    top: calc(var(--header-h) + 134px);
  }

  .home-hero__content {
    grid-template-columns: 1fr;
    padding: 0 24px 48px;
    align-items: start;
  }
  .home-hero__left { gap: 20px; justify-content: flex-start; }
  .home-hero__right { gap: 20px; justify-content: flex-start; }

  .about-hero {
    grid-template-columns: 1fr;
    padding: 48px 24px 48px;
    gap: 48px;
  }

  .projects-header { padding: 40px 24px 24px; }
  .projects-filter { padding: 0 24px; overflow-x: auto; }
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 24px 24px 60px;
  }

  .project-detail__hero-content { grid-template-columns: 1fr; }
  .project-detail__meta { grid-template-columns: 1fr 1fr; }
  .project-detail__meta .meta-item:nth-child(2n) { border-right: none; }
  .project-detail__meta .meta-item:nth-child(n+3) { border-top: 1px solid var(--border); }
  .project-detail__body { padding: 0 24px; }
  .detail-images { padding: 0 24px 60px; grid-template-columns: 1fr; }
  .detail-image-block.full { grid-column: 1; }
  .next-project { padding: 60px 24px; }

  .footer {
    grid-template-columns: 1fr 1fr;
    padding: 48px 24px 32px;
    gap: 40px 32px;
  }
  .footer__bottom { margin: 32px 0 0; padding: 20px 24px; flex-direction: column; gap: 8px; text-align: center; }

  .commitment { padding: 80px 24px 80px; }

  .modal { padding: 32px 24px; }
  .modal__grid { grid-template-columns: 1fr; }

  .landing-section { padding: 72px 24px; }
  .landing-section__header { align-items: flex-start; margin-bottom: 40px; }
  .landing-section .projects-grid { grid-template-columns: 1fr 1fr; padding: 0; }
  .landing-about-grid { grid-template-columns: 1fr; gap: 48px; }
  .landing-cta { padding: 80px 24px; }
}

@media (max-width: 480px) {
  .home-hero__h1 { font-size: 38px; }
  .project-detail__title { font-size: 36px; }
  .filter-btn { padding: 14px 14px; font-size: 11px; }
  .footer { grid-template-columns: 1fr; }
  .landing-section .projects-grid { grid-template-columns: 1fr; padding: 0; }
  .landing-cta__title { font-size: 32px; }
  .btn { min-width: 120px; }
}

/* ============================================================
   PAGE: ABOUT FULL
   ============================================================ */

.about-full-page { padding-top: var(--header-h); }

.about-full__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  padding: 80px 40px;
  border-bottom: 1px solid var(--border);
}

.about-full__img {
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  overflow: hidden;
}
.about-full__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-full__intro-text {}
.about-full__intro-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 20px;
}
.about-full__intro-name {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.0;
  margin-bottom: 8px;
}
.about-full__intro-role {
  font-size: 14px;
  color: var(--text-sec);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 40px;
}
.about-full__intro-bio {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
  margin-bottom: 40px;
}

.about-full__section {
  padding: 100px 40px;
  border-bottom: 1px solid var(--border);
  max-width: 860px;
}
.about-full__section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 20px;
}
.about-full__section-title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.about-full__section-text {
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255,255,255,0.72);
}
.about-full__section-text + .about-full__section-text { margin-top: 32px; }

/* Timeline */
.about-full__timeline {
  padding: 100px 40px;
  border-bottom: 1px solid var(--border);
}
.about-full__timeline-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 20px;
}
.about-full__timeline-title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 48px;
}
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.timeline-item:first-child { border-top: 1px solid var(--border); }
.timeline-item__year {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #e85000;
}
.timeline-item__text {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

/* About-full CTA */
.about-full__cta {
  padding: 120px 40px;
  border-top: 1px solid var(--border);
}
.about-full__cta-title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.05;
}
.about-full__cta-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 0 48px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .about-full__intro { grid-template-columns: 1fr; padding: 48px 24px; gap: 40px; }
  .about-full__img { aspect-ratio: 4/3; max-width: 360px; }
  .about-full__section { padding: 64px 24px; }
  .about-full__timeline { padding: 64px 24px; }
  .about-full__cta { padding: 80px 24px; }
  .timeline-item { grid-template-columns: 60px 1fr; }
}

/* ── Accessibility: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Focus indicators ── */
:focus-visible {
  outline: 2px solid rgba(255,255,255,0.7);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── PEEK INDICATOR (home hero) ── */
.home-hero__peek {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
  margin-top: 40px;
}
.home-hero__peek:hover { color: var(--text-sec); }


/* ── HERO DESC HIGHLIGHT ── */
.home-hero__desc--highlight {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}

/* ── SEE PROJECTS asymmetric pill ── */
.btn--skew-right {
  border-radius: 50px 4px 4px 50px;
}

/* ── HOME PHILOSOPHICAL QUOTE ── */
.home-quote {
  padding: 100px 40px;
  border-top: 1px solid var(--border);
}
.home-quote p {
  font-size: clamp(17px, 1.8vw, 22px);
  font-style: italic;
  color: rgba(255,255,255,0.42);
  line-height: 1.78;
  padding-left: 28px;
  border-left: 2px solid #e85000;
  max-width: 760px;
}

/* ── PHILOSOPHICAL BLOCKQUOTES (about-full, project detail) ── */
.about-full__quote {
  margin: 44px 0;
  padding: 2px 0 2px 28px;
  border-left: 2px solid #e85000;
}
.about-full__quote p {
  font-size: 17px;
  font-style: italic;
  color: rgba(255,255,255,0.42);
  line-height: 1.78;
}

/* ── ABOUT-FULL QUOTE SPACING ── */
.about-full__quote + .about-full__intro-bio { margin-top: 40px; }

@media (max-width: 900px) {
  .home-quote { padding: 64px 24px; }
  .about-full__section { padding: 64px 24px; }
  .about-full__timeline { padding: 64px 24px; }
}

@media (max-width: 900px) {
  .header__nav-divider,
  .header__nav-socials { display: none; }
}
