/* ------------------------------------------------------------------
   Tanlugi portfolio
   Idea: the page is the sky from the avatar drawing. Every section has
   its own time of day (see main.js): day, sunset, night, aurora,
   twilight and sunrise at the end.
   ------------------------------------------------------------------ */

:root {
  /* Sky, set by main.js while scrolling (starts on the day scene) */
  --sky-top: #3db8f5;
  --sky-mid: #79d0fb;
  --sky-bottom: #bfe8ff;
  --glow: 255 255 255;
  --glow-a: 0;
  --stars: 0;
  --clouds: 1;
  --cloud-shift: 0;

  /* Ink and accents */
  --ink: #000;
  --sky-blue: #3db8f5;
  --night: #060c26;
  --text-day: #0a1a33;
  --text-night: #eaf4ff;
  --muted-night: #a9bddc;
  --aqua: #9fddeb;
  --flare: #ff7a2e;
  --discord: #5865f2;

  --font-display: "Dela Gothic One", "Arial Black", system-ui, sans-serif;
  --font-body: "Zen Kaku Gothic New", system-ui, sans-serif;

  --ease-pop: cubic-bezier(0.2, 0.9, 0.25, 1.2);
  --ease-out: cubic-bezier(0.2, 0.9, 0.3, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1200px;
}

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

/* clip (not hidden) so decorations that bleed past the edges never widen the page on phones */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--text-night);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--flare);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }

/* ---------- Sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-bottom) 100%);
}

/* Light rising from below the horizon (sunset, aurora, sunrise...) */
.sky__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 62% at 50% 100%, rgb(var(--glow) / var(--glow-a)) 0%, rgb(var(--glow) / 0) 72%);
}

.sky__stars { position: absolute; inset: 0; opacity: var(--stars); }

.sky__stars i {
  position: absolute;
  border-radius: 50%;
  background: #fff6d5;
}

.sky__stars i.tw { animation: twinkle var(--tw, 3s) ease-in-out var(--tw-d, 0s) infinite alternate; }

@keyframes twinkle {
  from { opacity: 0.15; }
  to { opacity: 1; }
}

/* A shooting star every few seconds (only seen when the stars are out) */
.sky__meteor {
  position: absolute;
  top: 10%;
  left: 78%;
  width: 140px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 246, 213, 0), #fff6d5);
  rotate: -28deg;
  opacity: 0;
  animation: meteor 9s ease-in 2s infinite;
}

@keyframes meteor {
  0% { opacity: 0; translate: 0 0; }
  2% { opacity: 1; }
  9% { opacity: 0; translate: -420px 220px; }
  100% { opacity: 0; translate: -420px 220px; }
}

/* Clouds in two depths: the near ones are bigger and move more with the scroll */
.sky__clouds { position: absolute; inset: 0; opacity: var(--clouds); }
.sky__clouds--far { translate: 0 calc(var(--cloud-shift) * -0.05px); }
.sky__clouds--near { translate: 0 calc(var(--cloud-shift) * -0.16px); }

/* Every cloud crosses the whole screen from left to right and comes back around.
   --x is where it rests when motion is off; the negative delay spreads them out. */
.cloud {
  position: absolute;
  left: var(--x);
  height: auto;
  filter: blur(0.6px);
  animation: cloud-pass var(--dur) linear var(--delay) infinite;
}

.sky__clouds--far .cloud { opacity: 0.75; filter: blur(1.4px); }

.cloud--1 { --x: 18vw; --dur: 150s; --delay: -20s;  width: clamp(110px, 11vw, 180px); top: 14vh; }
.cloud--2 { --x: 56vw; --dur: 175s; --delay: -95s;  width: clamp(90px, 9vw, 150px); top: 6vh; }
.cloud--3 { --x: 8vw;  --dur: 160s; --delay: -130s; width: clamp(120px, 12vw, 200px); top: 46vh; }
.cloud--4 { --x: 70vw; --dur: 140s; --delay: -60s;  width: clamp(100px, 10vw, 170px); top: 60vh; }

.cloud--5 { --x: 0vw;  --dur: 70s;  --delay: -12s;  width: clamp(180px, 22vw, 340px); top: 9vh; }
.cloud--6 { --x: 75vw; --dur: 85s;  --delay: -55s;  width: clamp(140px, 16vw, 260px); top: 26vh; }
.cloud--7 { --x: 30vw; --dur: 95s;  --delay: -35s;  width: clamp(220px, 28vw, 420px); bottom: 6vh; }
.cloud--8 { --x: 85vw; --dur: 78s;  --delay: -68s;  width: clamp(120px, 13vw, 210px); bottom: 28vh; }

@keyframes cloud-pass {
  from { translate: calc(-110% - var(--x)) 0; }
  to { translate: calc(100vw - var(--x)) 0; }
}

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  color: var(--text-day);
  transition: color 0.35s ease, background-color 0.35s ease;
}

.is-night .topbar {
  color: var(--text-night);
  background: rgba(6, 12, 38, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar__brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-decoration: none;
}

.topbar__nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 28px); font-weight: 700; }
.topbar__nav a { text-decoration: none; }
.topbar__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.topbar__cta {
  padding: 6px 16px;
  border: 2.5px solid currentColor;
  border-radius: 999px;
}

.topbar__nav .topbar__cta:hover { text-decoration: none; background: var(--text-day); border-color: var(--text-day); color: #fff; }
.is-night .topbar__nav .topbar__cta:hover { background: #fff; border-color: #fff; color: var(--night); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 24px;
  border: 3px solid var(--btn-edge, var(--ink));
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* On hover the button lifts and its shadow takes the same color as its border */
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--btn-edge, var(--ink)); }
.btn:active { transform: none; box-shadow: none; }

.btn__icon { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* Black buttons get a white border (and white shadow), so they read on any sky */
.btn--solid { background: var(--ink); color: #fff; --btn-edge: #fff; }
.btn--outline { background: #fff; color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }

.btn--discord { background: var(--discord); color: #fff; }
.btn--x { background: var(--ink); color: #fff; --btn-edge: #fff; }
.btn--roblox { background: #fff; color: var(--ink); }

/* ---------- Hero (day) ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  max-width: var(--max);
  margin: 0 auto;
  padding: 110px var(--gutter) 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  color: var(--text-day);
  overflow-x: clip;
}

/* The name sits above the drawing and may overlap its edge, like a manga cover title. */
.hero__text { position: relative; z-index: 2; }

.hero__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4.2rem, 11.5vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: #fff;
  -webkit-text-stroke: 0.09em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.05em 0.06em 0 var(--text-day);
  margin-left: -0.04em;
  white-space: nowrap;
}

.hero__name .ch { display: inline-block; }

.hero__role {
  margin-top: 24px;
  max-width: 30ch;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.5;
}

.hero__role a,
.about__body a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }

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

/* Tilts a little toward the pointer (main.js sets --tx / --ty) */
.hero__art {
  position: relative;
  justify-self: center;
  width: min(100%, 520px);
  aspect-ratio: 1;
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 7deg)) rotateX(calc(var(--ty, 0) * -7deg));
  transition: transform 0.4s var(--ease-out);
}

/* Manga focus lines behind the drawing, turning slowly */
.hero__lines {
  position: absolute;
  inset: -22%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0.75) 0deg 1.1deg, transparent 1.1deg 7.5deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 34%, #000 46%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 34%, #000 46%, transparent 70%);
  pointer-events: none;
}

.panel {
  position: relative;
  border: 4px solid var(--ink);
  background: var(--sky-blue);
  overflow: hidden;
}

.panel img { width: 100%; height: 100%; object-fit: cover; }

.panel--art {
  position: absolute;
  inset: 0;
  rotate: -2.5deg;
  border-width: 5px;
  box-shadow: 14px 16px 0 rgba(10, 26, 51, 0.22);
}

/* Current Roblox avatar: the wings and the pumpkin break out of the frame */
.avatar-card {
  position: absolute;
  z-index: 3;
  width: 54%;
  aspect-ratio: 1;
  left: -13%;
  bottom: -15%;
  rotate: 5deg;
  translate: calc(var(--tx, 0) * 14px) calc(var(--ty, 0) * 10px);
  transition: translate 0.4s var(--ease-out);
}

.avatar-card__frame {
  position: absolute;
  inset: 0;
  border: 4px solid var(--ink);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #e4f5ff 0%, #a9dcf7 100%);
  box-shadow: 8px 10px 0 rgba(10, 26, 51, 0.22);
}

.avatar-card__img {
  position: absolute;
  width: 158%;
  max-width: none;
  left: -29%;
  bottom: -9%;
  filter: drop-shadow(0 6px 8px rgba(10, 26, 51, 0.25));
}

/* The 3D model replaces the render once it has loaded (avatar3d.js) */
.avatar-card__3d {
  position: absolute;
  width: 128%;
  aspect-ratio: 1;
  left: -14%;
  bottom: -2%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* The render underneath never catches the pointer, so dragging spins the model
   instead of picking up the picture */
.avatar-card__img { transition: opacity 0.6s ease; pointer-events: none; -webkit-user-drag: none; }
.avatar-card { user-select: none; -webkit-user-select: none; }
.avatar-card.is-3d { cursor: grab; touch-action: pan-y; }
.avatar-card.is-dragging { cursor: grabbing; }
.avatar-card.is-3d .avatar-card__img { opacity: 0; }
.avatar-card.is-3d .avatar-card__3d { opacity: 1; }

.avatar-card figcaption {
  position: absolute;
  z-index: 1;
  bottom: 8px;
  left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- Hero entrance and idle motion ---------- */

/* The hero plays its entrance every time it comes back on screen (main.js toggles .is-in).
   Fill mode "backwards" only covers the delay, so hovers work normally afterwards. */
.motion .topbar { animation: drop 0.6s var(--ease-out) backwards; }

.motion .hero:not(.is-in) :is(.hero__name .ch, .hero__role, .hero__actions, .panel--art, .avatar-card, .hero__lines) { opacity: 0; }
.motion .hero.is-in .hero__name .ch { animation: pop 0.55s var(--ease-pop) calc(0.12s + var(--i) * 0.06s) backwards; }
.motion .hero.is-in .hero__role { animation: rise 0.6s var(--ease-out) 0.55s backwards; }
.motion .hero.is-in .hero__actions { animation: rise 0.6s var(--ease-out) 0.7s backwards; }
.motion .hero__lines { animation: spin 160s linear infinite; }
.motion .hero.is-in .hero__lines { animation: fade 0.9s ease-out 0.25s backwards, spin 160s linear infinite; }
.motion .panel--art { animation: bob 5s ease-in-out 1s infinite alternate; }
.motion .hero.is-in .panel--art { animation: land 0.7s var(--ease-pop) backwards, bob 5s ease-in-out 1s infinite alternate; }
.motion .hero.is-in .avatar-card { animation: land 0.7s var(--ease-pop) 0.2s backwards; }
.motion :is(.avatar-card__img, .avatar-card__3d) { animation: float 3.2s ease-in-out 0.9s infinite alternate; }

@keyframes drop {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(0.45em) scale(0.55) rotate(-10deg); }
  to { opacity: 1; transform: none; }
}

@keyframes land {
  from { opacity: 0; transform: translateY(-40px) scale(1.06); }
  to { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -7px; } }
@keyframes float { from { translate: 0 2px; } to { translate: 0 -10px; } }

/* ---------- Reveal on scroll ----------
   main.js adds .is-in when an element comes on screen and removes it once it has fully left,
   so the animation plays again every time you come back to a section. */

.motion [data-reveal]:not(.is-in) { opacity: 0; }

.motion [data-reveal="rise"].is-in { animation: reveal-rise 0.7s var(--ease-out) var(--d, 0ms) backwards; }
.motion [data-reveal="land"].is-in { animation: reveal-land 0.8s var(--ease-pop) var(--d, 0ms) backwards; }
.motion [data-reveal="pop"].is-in { animation: reveal-pop 0.6s var(--ease-pop) var(--d, 0ms) backwards; }
.motion [data-reveal="line"].is-in { animation: reveal-rise 0.7s var(--ease-out) calc(var(--d, 0ms) + 0.15s) backwards; }

/* Manga "slash": the title is cut in from the left */
.motion [data-reveal="wipe"].is-in { animation: reveal-wipe 0.75s cubic-bezier(0.7, 0, 0.2, 1) var(--d, 0ms) backwards; }

@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(30px); }
}

@keyframes reveal-land {
  from { opacity: 0; transform: translateY(-34px) rotate(-2.5deg) scale(1.05); }
}

@keyframes reveal-pop {
  from { opacity: 0; transform: scale(0.6) rotate(-6deg); }
}

@keyframes reveal-wipe {
  from { clip-path: inset(-10% 100% -10% 0); transform: translateX(-28px) skewX(-10deg); }
  to { clip-path: inset(-10% -10% -10% -10%); transform: none; }
}

.motion .word { display: inline-block; }
.motion [data-split="words"]:not(.is-in) .word { opacity: 0; }
.motion [data-split="words"].is-in .word { animation: reveal-word 0.7s var(--ease-pop) calc(var(--i) * 70ms) backwards; }

@keyframes reveal-word {
  from { opacity: 0; transform: translateY(0.6em) rotate(4deg); }
}

/* ---------- Sections ---------- */

.games,
.skills,
.about,
.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.games { padding-top: clamp(120px, 22vh, 220px); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 1;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-title--small { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }

/* Games (night) */

.games__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 32px;
  row-gap: 14px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.games__head .section-title { margin-bottom: 0; }

.games__total { color: var(--muted-night); font-size: 1.05rem; }

.games__total strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.05;
  color: #fff;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

/* Thumbnail panels: black frame with the aqua rim light from the drawing */
.feature__media,
.game__media {
  display: block;
  aspect-ratio: 16 / 9;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--aqua);
}

a.feature__media img,
a.game__media img { transition: scale 0.35s ease; }

a.feature__media:hover img,
a.game__media:hover img { scale: 1.05; }

.role {
  display: inline-block;
  padding: 2px 12px;
  border: 2px solid rgba(159, 221, 235, 0.6);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--aqua);
}

.role--main { background: var(--aqua); border-color: var(--aqua); color: var(--night); }

.feature__body .role { margin-bottom: 12px; }

.feature__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  line-height: 1.1;
}

.feature__lead { margin-top: 14px; color: var(--muted-night); max-width: 46ch; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 30px;
  padding: 18px 0;
  border-top: 2px solid rgba(159, 221, 235, 0.35);
  border-bottom: 2px solid rgba(159, 221, 235, 0.35);
}

.stats dt { font-size: 0.85rem; color: var(--muted-night); }
.stats dd { font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; font-variant-numeric: tabular-nums; }

.game-grid {
  list-style: none;
  padding: 0;
  margin: clamp(64px, 9vw, 110px) 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 48px) clamp(18px, 2.5vw, 32px);
}

.game { display: grid; align-content: start; justify-items: start; }

.game .role { margin-top: 16px; }

.game__title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.15;
}

.game__stats { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 10px; }
.game__stats dt { font-size: 0.8rem; color: var(--muted-night); }
.game__stats dd { font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.games__note { margin-top: 28px; font-size: 0.85rem; color: var(--muted-night); }

/* What I do (aurora) */

.skills { padding-top: clamp(140px, 20vw, 240px); }

.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.skill { position: relative; padding-top: 19px; }

/* The top line draws itself from the left when the item appears */
.skill::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--aqua);
  transform-origin: left;
}

.motion .skill.is-in::before { animation: draw-line 0.9s cubic-bezier(0.7, 0, 0.2, 1) calc(var(--d, 0ms) + 0.15s) backwards; }

@keyframes draw-line {
  from { transform: scaleX(0); }
}

.skill h3 { font-size: 1.2rem; font-weight: 700; }
.skill p { margin-top: 8px; color: #b9d6dc; max-width: 34ch; }

/* About (twilight) */

.about {
  padding-top: clamp(140px, 20vw, 240px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  column-gap: clamp(28px, 5vw, 72px);
}

.about .section-title { grid-row: span 2; }

.about__body { display: grid; gap: 16px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; max-width: 58ch; }

.about__tools {
  list-style: none;
  padding: 0;
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about__tools li {
  padding: 4px 14px;
  border: 2px solid rgba(234, 244, 255, 0.45);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Contact (sunrise: the glow comes from the sky itself) */

.contact {
  margin-top: clamp(140px, 20vw, 240px);
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(90px, 14vw, 160px);
  text-align: center;
}

.contact__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1.05;
  max-width: 16ch;
  margin: 0 auto;
}

.contact__text { margin-top: 18px; color: rgba(255, 255, 255, 0.9); font-size: 1.15rem; }

.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* Footer on the bright horizon */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 32px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(80, 30, 40, 0.45);
}

.footer a { text-underline-offset: 4px; }

/* ---------- Reduced motion ---------- */

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

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 96px;
    padding-bottom: 110px;
  }

  .hero__art { width: min(100%, 440px); margin: 12px auto 0; }
  .avatar-card { left: -1%; bottom: -16%; }

  .feature { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills__grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about .section-title { grid-row: auto; }
}

@media (max-width: 520px) {
  .topbar__nav a:not(.topbar__cta) { display: none; }
  .hero__lines { inset: -12%; }
  .game-grid { grid-template-columns: 1fr; }
  .stats { gap: 8px; }
  .stats dt { font-size: 0.75rem; }
  .btn { flex: 1 1 auto; }
}
