:root {
  color-scheme: dark;
  --page: #05060a;
  --ink: #f8fbff;
  --soft: rgba(248, 251, 255, 0.82);
  --muted: rgba(248, 251, 255, 0.58);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --panel: rgba(10, 14, 22, 0.62);
  --panel-strong: rgba(15, 21, 32, 0.84);
  --glass: rgba(255, 255, 255, 0.075);
  --accent: #e8edf3;
  --accent-2: #cfd8e3;
  --accent-3: #7d8591;
  --accent-4: #a9b2bf;
  --shadow: rgba(0, 0, 0, 0.56);
  --topbar-bg: rgba(5, 6, 10, 0.58);
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  --scroll-pct: 0%;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f5f7fb;
  --ink: #10131a;
  --soft: rgba(16, 19, 26, 0.78);
  --muted: rgba(16, 19, 26, 0.58);
  --line: rgba(16, 19, 26, 0.13);
  --line-strong: rgba(16, 19, 26, 0.24);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --glass: rgba(255, 255, 255, 0.66);
  --accent: #171b22;
  --accent-2: #303743;
  --accent-3: #6e7784;
  --accent-4: #4a5260;
  --shadow: rgba(55, 67, 84, 0.18);
  --topbar-bg: rgba(245, 247, 251, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--accent-3) 10%, transparent), transparent 28%),
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 25%),
    var(--page);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle 360px at var(--cursor-x) var(--cursor-y), color-mix(in srgb, var(--accent) 18%, transparent), transparent 74%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 80px 80px, 80px 80px;
  mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0.72), transparent 92%);
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.52;
  background:
    conic-gradient(from 120deg at 50% 50%, transparent, color-mix(in srgb, var(--accent) 8%, transparent), transparent 28%),
    linear-gradient(115deg, transparent 28%, color-mix(in srgb, var(--accent-3) 8%, transparent), transparent 58%);
  transform: translate3d(calc(var(--scroll, 0) * -80px), calc(var(--scroll, 0) * 90px), 0) rotate(8deg);
  filter: blur(18px);
}

@media (pointer: fine) {
  body,
  a,
  button {
    cursor: none;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

#scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 34%);
}

#root {
  isolation: isolate;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: 3px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.08);
}

.scroll-progress__bar {
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #ffffff, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 72%, transparent);
  transition: transform 120ms linear;
}

.cursor-dot,
.cursor-aura,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease, width 180ms ease, height 180ms ease, border-color 180ms ease;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 18px var(--accent);
}

.cursor-aura {
  display: none;
}

.cursor-ring {
  display: none;
}

body.is-pointer-active .cursor-dot,
body.is-pointer-active .cursor-aura,
body.is-pointer-active .cursor-ring {
  opacity: 1;
}

body.is-hovering-hotspot .cursor-aura {
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-color: color-mix(in srgb, var(--accent-2) 72%, transparent);
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 26%),
    var(--page);
  transition: opacity 560ms ease, visibility 560ms ease, transform 560ms ease;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
}

.preloader__grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  animation: gridDrift 1.4s linear infinite;
}

.preloader__inner {
  position: relative;
  display: grid;
  place-items: center;
  gap: 16px;
}

.preloader__mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05060a;
  font-weight: 900;
  font-size: 1.35rem;
  transform: skewX(-8deg);
  box-shadow: 0 0 70px color-mix(in srgb, var(--accent) 34%, transparent);
}

.preloader__word {
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.preloader__line {
  width: 180px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.preloader__line::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #ffffff);
  transform-origin: left center;
  animation: loadLine 900ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.topbar {
  position: fixed;
  inset: 18px 22px auto;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--topbar-bg);
  backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 20px 80px var(--shadow);
}

nav,
.brand,
.brand-logo,
.brand-logo__mark,
.brand-logo__text {
  display: inline-flex;
  align-items: center;
}

.brand {
  border: 0;
  background: transparent;
  color: inherit;
  min-height: 42px;
  padding: 0 4px;
}

.brand-logo {
  gap: 10px;
}

.brand-logo__mark {
  justify-content: center;
  width: 38px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ink), var(--accent-2));
  color: #05060a;
  font-weight: 900;
  transform: skewX(-8deg);
}

.brand-logo__text {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

nav {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

nav a,
.language-toggle,
.game-toggle,
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.secret-trigger {
  cursor: none;
}

nav a:hover,
.language-toggle:hover,
.game-toggle:hover,
.theme-toggle:hover {
  color: var(--ink);
  background: var(--glass);
  border-color: var(--line);
}

.language-toggle,
.game-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-toggle .is-active {
  color: var(--ink);
}

.theme-toggle__track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.theme-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 180ms ease;
}

:root[data-theme="light"] .theme-toggle__knob {
  transform: translateX(16px);
}

.theme-flash {
  position: fixed;
  left: var(--theme-flash-x);
  top: var(--theme-flash-y);
  z-index: 95;
  width: 1px;
  height: 1px;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  isolation: isolate;
}

.theme-flash__wash,
.theme-flash__core,
.theme-flash__ring {
  position: fixed;
  left: var(--theme-flash-x);
  top: var(--theme-flash-y);
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
}

.theme-flash__wash {
  z-index: 95;
  width: 34px;
  height: 34px;
  opacity: 0;
  animation: themeWash 920ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theme-flash__core {
  z-index: 96;
  width: 18px;
  height: 18px;
  opacity: 0;
  animation: themeCore 760ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theme-flash__ring {
  z-index: 97;
  width: 76px;
  height: 76px;
  border: 1px solid currentColor;
  opacity: 0;
  animation: themeRing 880ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theme-flash__label {
  position: fixed;
  left: var(--theme-flash-x);
  top: calc(var(--theme-flash-y) + 34px);
  z-index: 98;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 8px);
  animation: themeLabel 720ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theme-flash--light .theme-flash__wash,
.theme-flash--light .theme-flash__core {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 20%, rgba(255, 255, 255, 0.62) 46%, transparent 74%);
  box-shadow: 0 0 110px rgba(255, 255, 255, 0.78);
}

.theme-flash--dark .theme-flash__wash,
.theme-flash--dark .theme-flash__core {
  background:
    radial-gradient(circle, rgba(5, 6, 10, 0.98) 0 20%, rgba(5, 6, 10, 0.7) 48%, transparent 74%);
  box-shadow: 0 0 110px rgba(5, 6, 10, 0.82);
}

.theme-flash--light .theme-flash__ring {
  color: rgba(255, 255, 255, 0.72);
}

.theme-flash--dark .theme-flash__ring {
  color: rgba(5, 6, 10, 0.72);
}

.idle-zzz {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 18px);
  background: color-mix(in srgb, var(--page) 44%, transparent);
  color: var(--ink);
  backdrop-filter: blur(16px) saturate(0.86);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.idle-zzz.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.idle-zzz span {
  display: inline-block;
  font-weight: 900;
  line-height: 0.82;
  text-transform: uppercase;
  text-shadow:
    0 0 34px color-mix(in srgb, var(--ink) 18%, transparent),
    0 26px 90px var(--shadow);
  animation: zzzFloat 1.7s ease-in-out infinite;
}

.idle-zzz span:nth-child(1) {
  font-size: clamp(5rem, 13vw, 12rem);
}

.idle-zzz span:nth-child(2) {
  font-size: clamp(6.2rem, 16vw, 15rem);
  animation-delay: 160ms;
}

.idle-zzz span:nth-child(3) {
  font-size: clamp(7.6rem, 19vw, 18rem);
  animation-delay: 320ms;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.72fr);
  align-items: center;
  gap: clamp(30px, 5vw, 78px);
  padding: 138px 6vw 80px;
}

.hero__copy {
  max-width: 880px;
}

.kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  position: relative;
  display: inline-block;
  margin: 0;
  max-width: 860px;
  font-size: clamp(4.3rem, 9.7vw, 8.7rem);
  line-height: 0.78;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

.hero-title__base {
  position: relative;
  z-index: 1;
  display: inline-flex;
  transition: opacity 220ms ease, filter 220ms ease;
}

.hero-title__base span {
  display: inline-block;
  opacity: 0;
  transform: translateY(52px) rotateX(70deg) scale(0.75);
  animation: titleIn 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(240ms + var(--i) * 70ms);
  text-shadow: 0 0 42px color-mix(in srgb, var(--accent) 18%, transparent);
}

.hero-title:hover .hero-title__base,
.hero-title.is-pulsing .hero-title__base {
  opacity: 1;
  animation: titlePulse 1.45s ease-in-out infinite;
}

.hero-title:hover .hero-title__base span,
.hero-title.is-pulsing .hero-title__base span {
  color: var(--ink) !important;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero__intro {
  max-width: 760px;
  margin: 30px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.72;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(780px, 100%);
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 24px 70px color-mix(in srgb, var(--shadow) 68%, transparent);
}

.hero-fact {
  position: relative;
  overflow: hidden;
  min-height: 86px;
  padding: 18px 20px;
  background: color-mix(in srgb, var(--page) 82%, var(--panel));
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0), var(--ty, 0), 0);
}

.hero-fact span,
.local-clock span,
.contact-panel__direct {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-fact strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(0.98rem, 1.4vw, 1.18rem);
  line-height: 1.25;
}

.local-clock {
  width: min(520px, 100%);
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    color-mix(in srgb, var(--page) 86%, var(--panel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.local-clock strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 36px color-mix(in srgb, var(--accent) 16%, transparent);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0), var(--ty, 0), 0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button::before,
.magnetic::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 34%, transparent), transparent 38%);
  transition: opacity 180ms ease;
}

.button:hover::before,
.magnetic:hover::after {
  opacity: 1;
}

.button:hover,
.magnetic:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0), var(--ty, 0), 0) translateY(-3px);
}

.button--solid {
  background: linear-gradient(135deg, #ffffff, var(--accent-2));
  color: #05060a;
  border-color: transparent;
  box-shadow: 0 18px 60px color-mix(in srgb, var(--accent) 17%, transparent);
}

.button--ghost {
  background: var(--glass);
  backdrop-filter: blur(18px);
}

.button.is-copied {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 62%, transparent);
}

.ui-icon,
.chip-icon,
.card-icon,
.project-icon,
.contact-icon,
.marquee-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: grayscale(1) contrast(1.15);
}

.signal-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.signal-cloud span {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 800;
  backdrop-filter: blur(16px);
  animation: chipFloat 5.4s ease-in-out infinite;
  animation-delay: var(--d);
}

.chip-icon {
  width: 18px;
  height: 18px;
}

.hero-card {
  position: relative;
  justify-self: end;
  width: min(360px, 100%);
  min-height: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    var(--panel);
  backdrop-filter: blur(24px) saturate(1.18);
  box-shadow: 0 40px 130px var(--shadow);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0), var(--ty, 0), 0);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), transparent 32%, var(--accent-3) 70%, var(--accent-4));
  opacity: 0.48;
}

.hero-card__glow {
  position: absolute;
  inset: 12% -18% auto;
  height: 210px;
  opacity: 0.38;
  background: radial-gradient(circle, var(--accent), transparent 62%);
  filter: blur(28px);
  animation: glowPulse 4.8s ease-in-out infinite;
}

.profile-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e14;
}

.profile-shell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.13);
  transform: scale(1.02);
  transition: transform 380ms ease, filter 380ms ease;
}

.hero-card:hover .profile-shell img {
  transform: scale(1.075);
  filter: grayscale(0.25) contrast(1.16) saturate(1.08);
}

.scan-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(114, 247, 255, 0.18), transparent);
  transform: translateY(-110%);
  animation: scan 3.4s linear infinite;
}

.hero-card__meta,
.mini-stats {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 14px;
}

.hero-card__meta {
  padding: 20px 4px 12px;
}

.hero-card__meta span,
.mini-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card__meta strong {
  font-size: 2.15rem;
  line-height: 1;
}

.mini-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 12px;
}

.mini-stats div {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.mini-stats strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 0.92;
}

.orbit-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px var(--shadow);
  animation: orbitFloat 4.7s ease-in-out infinite;
}

.orbit-pill--1 {
  top: 13%;
  left: -28px;
}

.orbit-pill--2 {
  right: -26px;
  top: 49%;
  animation-delay: -1.4s;
}

.orbit-pill--3 {
  left: 30px;
  bottom: -18px;
  animation-delay: -2.2s;
}

.marquee-band {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
}

.marquee-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  gap: 14px;
  padding: 18px clamp(70px, 8vw, 96px);
  cursor: grab;
  user-select: none;
}

.marquee-track::-webkit-scrollbar {
  display: none;
}

.marquee-track:active {
  cursor: grabbing;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.045);
}

.marquee-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  font-weight: 900;
  transform: translateY(-50%);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.marquee-control:hover {
  border-color: var(--line-strong);
  background: var(--ink);
  color: var(--page);
}

.marquee-control--prev {
  left: 18px;
}

.marquee-control--next {
  right: 18px;
}

.marquee-icon {
  width: 19px;
  height: 19px;
}

.section {
  position: relative;
  padding: 108px 6vw;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--scroll-pct) 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 30%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.035), transparent);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.section-heading--wide {
  max-width: 980px;
}

.section-heading h2,
.contact-panel h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5.2vw, 5.6rem);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0;
}

.stat-grid,
.project-grid {
  display: grid;
  gap: 16px;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.project-card,
.timeline-item,
.contact-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    var(--panel);
  backdrop-filter: blur(22px) saturate(1.15);
  box-shadow: 0 24px 80px var(--shadow);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0), var(--ty, 0), 0);
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease, background 190ms ease;
}

.stat-card:hover,
.project-card:hover,
.timeline-item:hover,
.contact-panel:hover {
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
  box-shadow: 0 34px 110px var(--shadow), 0 0 46px color-mix(in srgb, var(--accent) 12%, transparent);
}

.stat-card {
  min-height: 285px;
  padding: 25px;
}

.card-label,
.project-card__number {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-icon {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.stat-card strong {
  display: block;
  margin-top: 30px;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 0.9;
  font-weight: 900;
}

.stat-card--text strong {
  font-size: clamp(2rem, 2.5vw, 2.8rem);
  line-height: 1;
}

.stat-card p,
.project-card p,
.timeline-item p {
  color: var(--soft);
  line-height: 1.65;
}

.stat-card p {
  margin: 26px 0 0;
}

.project-card {
  min-height: 312px;
  padding: 26px;
}

.project-card__icon {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.07);
  transform: rotate(12deg);
  transition: transform 220ms ease, border-color 220ms ease;
}

.project-card:hover .project-card__icon {
  transform: rotate(28deg) scale(1.08);
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
}

.project-icon {
  width: 30px;
  height: 30px;
  transform: rotate(-12deg);
}

.project-card h3 {
  margin: 78px 0 0;
  max-width: 80%;
  font-size: 1.55rem;
  line-height: 1.05;
}

.project-card p {
  margin: 22px 0 0;
}

.flow-section {
  position: relative;
  min-height: 240vh;
  overflow: clip;
  border-block: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 34%, rgba(255, 255, 255, 0.04)),
    color-mix(in srgb, var(--page) 88%, #ffffff 12%);
}

.flow-section__sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(290px, 0.62fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 78px);
  padding: 110px 6vw 72px;
}

.flow-section__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 620px;
}

.flow-section__copy h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: 0.94;
  font-weight: 900;
}

.flow-section__copy p:not(.kicker) {
  margin: 24px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.7;
}

.flow-line {
  justify-self: end;
  width: min(560px, 48vw);
  height: auto;
  overflow: visible;
  opacity: 0.9;
  transform: rotate(-8deg) translate3d(2%, 0, 0);
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--ink) 14%, transparent));
}

.flow-line__ghost,
.flow-line__active {
  vector-effect: non-scaling-stroke;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-line__ghost {
  stroke: var(--line-strong);
  stroke-width: 12;
  opacity: 0.28;
}

.flow-line__active {
  stroke: var(--ink);
  stroke-width: 13;
}

.mechanics {
  padding-top: 94px;
}

.mechanics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  gap: 16px;
  align-items: stretch;
}

.spring-panel,
.theme-mechanic {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 20%, transparent), transparent 33%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    var(--panel);
  backdrop-filter: blur(22px) saturate(1.15);
  box-shadow: 0 24px 80px var(--shadow);
}

.spring-panel {
  padding: clamp(24px, 4vw, 42px);
}

.theme-mechanic {
  padding: 28px;
}

.spring-panel__follower {
  position: absolute;
  top: 0;
  left: 0;
  width: 190px;
  height: 190px;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--ink) 14%, transparent), transparent 62%),
    radial-gradient(circle at 64% 32%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 48%);
  filter: blur(2px);
  opacity: 0;
  mix-blend-mode: screen;
}

.spring-panel h3,
.theme-mechanic h3 {
  position: relative;
  margin: 80px 0 0;
  max-width: 720px;
  font-size: clamp(2rem, 3.8vw, 4.3rem);
  line-height: 0.96;
}

.theme-mechanic h3 {
  font-size: clamp(1.7rem, 2.4vw, 2.6rem);
}

.spring-panel p,
.theme-mechanic p {
  position: relative;
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--soft);
  line-height: 1.68;
}

.spring-panel__chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.spring-panel__chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.process {
  padding-top: 80px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  max-width: 980px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 26px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  min-height: 150px;
  padding: 22px;
}

.timeline-item__index {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--accent);
  font-weight: 900;
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.25rem;
}

.timeline-item p {
  margin: 12px 0 0;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 26px;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 70px);
  text-align: center;
}

.contact-panel__main {
  display: grid;
  justify-items: center;
  width: 100%;
}

.contact-panel h2 {
  max-width: 820px;
  font-size: clamp(3.8rem, 10vw, 8.2rem);
  line-height: 0.86;
}

.contact-panel h2 span {
  display: block;
}

.contact-panel h2 span:first-child {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  color: var(--ink);
  background: transparent;
  padding: 0 0.04em;
  transition: color 520ms ease, background 520ms ease, transform 520ms ease;
}

.contact-panel.is-framed h2 span:first-child {
  color: #05060a;
  background: var(--ink);
  transform: translateY(-0.02em);
}

.contact-panel h2 span:last-child {
  color: color-mix(in srgb, var(--ink) 64%, transparent);
}

.contact-panel__body {
  max-width: 560px;
  margin: 34px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.62;
}

.contact-cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: min(354px, 100%);
  min-height: 70px;
  margin-top: 34px;
  padding: 0 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: var(--page);
  font-size: 1.18rem;
  font-weight: 900;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0), var(--ty, 0), 0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.contact-cta:hover {
  box-shadow: 0 24px 70px color-mix(in srgb, var(--accent) 18%, transparent);
}

.contact-panel__direct {
  margin: 34px 0 12px;
}

.contact-email {
  color: var(--ink);
  font-weight: 900;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 8px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.contact-row a,
.contact-row button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  font-size: 0.88rem;
  font-weight: 850;
  overflow-wrap: anywhere;
  font: inherit;
  cursor: pointer;
}

.contact-icon {
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.site-footer {
  padding: 84px 6vw 34px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 90%, transparent);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.55fr) minmax(180px, 0.55fr);
  gap: clamp(36px, 8vw, 120px);
  align-items: start;
}

.site-footer__logo {
  display: inline-block;
  color: var(--ink);
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  font-weight: 900;
  letter-spacing: 0;
}

.site-footer__brand p {
  max-width: 480px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.72;
}

.site-footer__nav,
.site-footer__aside {
  display: grid;
  gap: 17px;
}

.site-footer__nav span,
.site-footer__aside span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.site-footer a,
.site-footer button {
  width: max-content;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--soft);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.site-footer a:hover,
.site-footer button:hover {
  color: var(--ink);
  transform: translateX(4px);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 76px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer__bottom p {
  margin: 0;
}

.secret-game {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  cursor: auto;
}

.secret-game__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(14px);
}

.secret-game__panel {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 44px));
  min-width: 0;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    var(--panel-strong);
  box-shadow: 0 34px 120px var(--shadow);
}

.secret-game__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.secret-game__head > div {
  min-width: 0;
}

.secret-game__head h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.92;
}

.secret-game__head h2,
.secret-game__head p {
  overflow-wrap: anywhere;
}

.secret-game__head p:not(.kicker) {
  margin: 12px 0 0;
  color: var(--soft);
  line-height: 1.55;
}

.secret-game__close,
.secret-game__controls button {
  min-width: 0;
  min-height: 40px;
  padding-inline: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.secret-game__close:hover,
.secret-game__controls button:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--glass) 78%, var(--ink) 10%);
}

.secret-game__close:active,
.secret-game__controls button:active {
  transform: translateY(1px) scale(0.99);
}

.secret-game__close {
  width: 40px;
}

.secret-game__hud {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.secret-game__stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  height: min(420px, 52vh);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 32%, rgba(255, 255, 255, 0.05) 32% 34%, transparent 34% 66%, rgba(255, 255, 255, 0.05) 66% 68%, transparent 68%),
    rgba(255, 255, 255, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.secret-game__stage.is-hot {
  border-color: color-mix(in srgb, var(--ink) 48%, transparent);
  box-shadow: inset 0 0 48px color-mix(in srgb, var(--ink) 8%, transparent);
}

.secret-game__lane {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line-strong), transparent);
}

.secret-game__obstacle,
.secret-game__player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.secret-game__obstacle {
  top: -46px;
  width: 78px;
  height: 28px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ink) 28%, transparent), transparent),
    var(--panel-strong);
  box-shadow: 0 16px 36px var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  animation-name: obstacleFall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.secret-game__player {
  left: 50%;
  bottom: 18px;
  width: 56px;
  height: 42px;
  background: linear-gradient(135deg, var(--ink), var(--accent-2));
  color: var(--page);
  font-weight: 900;
  transition: left 130ms ease;
}

.secret-game__over {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.secret-game__pop {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translate(-50%, -50%);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
  pointer-events: none;
  animation: scorePop 260ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.secret-game__controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 0;
  gap: 10px;
  margin-top: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition:
    opacity 720ms ease,
    transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes titleIn {
  0% {
    opacity: 0;
    transform: translateY(52px) rotateX(70deg) scale(0.75);
    filter: blur(12px);
  }

  68% {
    opacity: 1;
    transform: translateY(-10px) rotateX(-8deg) scale(1.04);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: blur(0);
  }
}

@keyframes titleLiquid {
  0%,
  100% {
    background-position: 0% 48%, 0% 50%;
    filter: contrast(1);
  }

  50% {
    background-position: 100% 52%, 100% 50%;
    filter: contrast(1.18);
  }
}

@keyframes titlePulse {
  0%,
  100% {
    text-shadow: 0 0 22px color-mix(in srgb, var(--ink) 16%, transparent);
    filter: contrast(1);
  }

  50% {
    text-shadow:
      0 0 18px color-mix(in srgb, var(--ink) 28%, transparent),
      0 0 48px color-mix(in srgb, var(--accent-3) 24%, transparent);
    filter: contrast(1.16);
  }
}

@keyframes chipFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes orbitFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-14px) rotate(2deg);
  }
}

@keyframes scan {
  to {
    transform: translateY(110%);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.28;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.46;
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes gridDrift {
  to {
    transform: translate3d(54px, 54px, 0);
  }
}

@keyframes loadLine {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes themeWash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
    filter: blur(0);
  }

  18% {
    opacity: 0.88;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(95);
    filter: blur(10px);
  }
}

@keyframes themeCore {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.35);
  }

  48% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(4.2);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(9);
  }
}

@keyframes themeRing {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(0deg);
  }

  26% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.8) rotate(18deg);
  }
}

@keyframes themeLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  24%,
  66% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -6px);
  }
}

@keyframes zzzFloat {
  0%,
  100% {
    opacity: 0.42;
    transform: translateY(22px) rotate(-2deg) scale(0.96);
  }

  45% {
    opacity: 1;
    transform: translateY(-18px) rotate(2deg) scale(1.02);
  }
}

@keyframes obstacleFall {
  from {
    transform: translate(-50%, -50%) translateY(-40px);
  }

  to {
    transform: translate(-50%, -50%) translateY(calc(52vh + 110px));
  }
}

@keyframes scorePop {
  from {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.75);
  }

  35% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translate(-50%, -32px) scale(1.2);
  }
}

@media (max-width: 1120px) {
  .stat-grid,
  .project-grid,
  .mechanics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 122px;
  }

  .hero-card {
    justify-self: start;
    min-height: auto;
  }

  .flow-section__sticky {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .flow-line {
    justify-self: center;
    width: min(520px, 82vw);
    height: auto;
    transform: rotate(-8deg);
  }
}

@media (max-width: 820px) {
  body::before {
    background-size: auto, 54px 54px, 54px 54px;
    opacity: 0.7;
  }

  body::after {
    opacity: 0.34;
    filter: blur(24px);
  }

  #scene {
    opacity: 0.42;
  }

  .topbar {
    position: sticky;
    top: 8px;
    inset: 8px 10px auto;
    margin: 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 9px;
    border-radius: 8px;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    min-height: auto;
    gap: 28px;
    padding: 44px 18px 58px;
  }

  .hero__copy {
    max-width: 100%;
  }

  .hero-title {
    max-width: 100%;
    font-size: clamp(3.15rem, 17vw, 5.8rem);
    line-height: 0.84;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero__intro {
    margin-top: 22px;
    font-size: 0.98rem;
    line-height: 1.58;
  }

  .hero-facts {
    margin-top: 22px;
  }

  .hero-fact {
    min-height: 72px;
    padding: 15px 16px;
  }

  .hero-card {
    justify-self: center;
    width: min(320px, 88vw);
    padding: 12px;
    box-shadow: 0 24px 70px var(--shadow);
  }

  .section {
    padding: 64px 18px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading h2,
  .contact-panel h2 {
    font-size: clamp(2.35rem, 11vw, 4.5rem);
    line-height: 0.98;
  }

  .stat-grid,
  .project-grid,
  .mechanics-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .stat-card,
  .project-card,
  .timeline-item {
    min-height: auto;
    padding: 20px;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .local-clock strong {
    font-size: clamp(2.55rem, 14vw, 4.3rem);
  }

  .marquee-track {
    gap: 10px;
    padding: 14px 58px;
  }

  .marquee-track span {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.82rem;
  }

  .marquee-control {
    width: 36px;
    height: 36px;
  }

  .marquee-control--prev {
    left: 10px;
  }

  .marquee-control--next {
    right: 10px;
  }

  .contact-panel h2 {
    font-size: clamp(3rem, 14vw, 5.2rem);
  }

  .contact-panel {
    padding: 30px 18px;
  }

  .contact-panel__body {
    margin-top: 24px;
    font-size: 1rem;
  }

  .contact-cta {
    min-height: 58px;
    margin-top: 26px;
  }

  .site-footer {
    padding: 58px 18px 28px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .site-footer__brand p {
    margin-top: 16px;
    font-size: 0.98rem;
    line-height: 1.62;
  }

  .site-footer__nav,
  .site-footer__aside {
    gap: 13px;
  }

  .site-footer__bottom {
    flex-direction: column;
    margin-top: 42px;
    padding-top: 22px;
  }

  .timeline::before {
    left: 24px;
  }

  .flow-section {
    min-height: auto;
  }

  .flow-section__sticky {
    position: relative;
    top: auto;
    min-height: auto;
    padding: 64px 18px;
  }

  .flow-line {
    width: min(320px, 82vw);
    height: auto;
    transform: rotate(-6deg);
  }

  .secret-game {
    padding: 12px;
  }

  .secret-game__stage {
    height: 360px;
  }

  .idle-zzz {
    backdrop-filter: blur(12px) saturate(0.86);
  }
}

@media (max-width: 520px) {
  nav {
    gap: 6px;
  }

  nav a,
  .language-toggle,
  .game-toggle,
  .theme-toggle {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.74rem;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo__text {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    padding-inline: 16px;
  }

  .hero-title {
    font-size: clamp(2.9rem, 18vw, 4.7rem);
  }

  .hero__intro {
    font-size: 0.94rem;
  }

  .hero-fact strong {
    font-size: 0.98rem;
  }

  .profile-shell img {
    transform: none;
  }

  .hero__actions .button {
    width: 100%;
  }

  .contact-cta {
    min-width: 100%;
    padding: 0 20px;
  }

  .social-tooltip-list a,
  .social-tooltip-list button {
    width: 50px;
    height: 50px;
    min-height: 50px;
  }

  .mini-stats {
    grid-template-columns: 1fr;
  }

  .project-card,
  .stat-card,
  .theme-mechanic,
  .spring-panel {
    padding: 18px;
  }

  .project-card h3,
  .spring-panel h3,
  .theme-mechanic h3 {
    font-size: 1.35rem;
  }

  .secret-game__panel {
    width: calc(100vw - 20px);
    padding: 14px;
  }

  .secret-game__head {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .secret-game__hud {
    font-size: 0.75rem;
  }

  .site-footer a,
  .site-footer button {
    width: 100%;
    min-height: 32px;
  }

  .project-card h3 {
    max-width: 100%;
  }

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

  .timeline::before {
    display: none;
  }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-aura,
  .cursor-ring {
    display: none;
  }

  .magnetic,
  .button,
  .hero-card,
  .stat-card,
  .project-card,
  .timeline-item,
  .contact-panel {
    transform: none !important;
  }

  .button:hover,
  .magnetic:hover {
    transform: none;
  }

  .hero-card:hover .profile-shell img {
    transform: none;
    filter: grayscale(1) contrast(1.13);
  }

  .hero-title:hover .hero-title__base,
  .hero-title:hover .hero-title__base span {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  body,
  a,
  button {
    cursor: auto;
  }
}
