/* ==========================================================================
   Melenitas Dev — personal site
   Brand: near-black, brand red, Neo cream. Unity gizmo colours only on the gizmo.
   ========================================================================== */

/* Fonts are self-hosted (latin subset, variable weights) so the page doesn't wait on Google */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
}
@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vt323-latin.woff2") format("woff2");
}

:root {
  --bg: #0c0c0d;
  --bg-2: #131315;
  --bg-3: #1a1a1d;
  --line: #26262a;
  --line-2: #34343a;

  --text: #f2eee6;
  --muted: #a19d95;
  --faint: #6d6a65;

  --red: #e5534b;
  --red-deep: #c23f39;
  --cream: #f3e7c9;
  --blue: #4da3ff;

  /* Transform gizmo, same colours as the YouTube banner */
  --axis-x: #e5534b;
  --axis-y: #48e000;
  --axis-z: #4da3ff;

  --font-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --font-pixel: "VT323", var(--font-mono);

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;

  --shadow-hard: 6px 6px 0 0 #000;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Shared type ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--red);
  margin: 0 0 14px;
}
.eyebrow .dim { color: var(--faint); }

.section-title {
  font-weight: 600;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 18px;
}
.section-title em { font-style: normal; color: var(--red); }

.section-lead {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  max-width: 62ch;
  margin: 0;
}

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

.btn {
  --b-bg: var(--text);
  --b-fg: var(--bg);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  border: 2px solid #000;
  background: var(--b-bg);
  color: var(--b-fg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 4px 4px 0 0 #000;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 #000; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 #000; }
.btn--red { --b-bg: var(--red); --b-fg: #fff; }
.btn--ghost {
  --b-bg: transparent; --b-fg: var(--text);
  border-color: var(--line-2); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--text); box-shadow: none; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header / nav ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0; z-index: 50;
  transition: background .25s, border-color .25s, backdrop-filter .25s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(12, 12, 13, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; font-weight: 500; font-size: 21px; letter-spacing: .01em;
}
.brand-mark { width: 38px; height: 38px; flex: none; border-radius: 50%; }
.brand b { font-weight: 500; color: var(--red); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 14px; color: var(--muted);
  text-decoration: none; transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: var(--bg-3); }
.nav-cta { padding: 10px 16px; font-size: 15px; box-shadow: 3px 3px 0 0 #000; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed; inset: 72px 0 auto 0;
    background: rgba(12, 12, 13, .97);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 24px;
    display: none;
  }
  .nav-menu.is-open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links a { font-size: 16px; padding: 14px 12px; }
  .nav-cta { margin-top: 12px; width: 100%; justify-content: center; }
}
@media (min-width: 1081px) {
  .nav-menu { display: flex; align-items: center; gap: 16px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 128px 0 72px;
  overflow: hidden;
  isolation: isolate;
}
/* Scene-view grid */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 65% 45%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 65% 45%, #000 30%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute; z-index: -1;
  width: 720px; height: 720px; right: -140px; top: 40px;
  background: radial-gradient(circle, rgba(229, 83, 75, .22), transparent 62%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 40px;
}

.hero-hello {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 15px; color: var(--muted);
  margin: 0 0 22px;
}
.hero-hello .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 4px rgba(229, 83, 75, .2);
}

.hero-title {
  font-size: clamp(44px, 7.2vw, 92px);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 600;
  margin: 0 0 24px;
}
.hero-title .accent { color: var(--red); }

.hero-sub {
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 22px;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

.typer {
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 32px;
  display: inline-block;
  max-width: 100%;
}
.typer .k { color: var(--blue); }
.typer .s { color: var(--cream); }
.typer .caret {
  display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em;
  background: var(--red); margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero visual: the "selected GameObject" */
.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  aspect-ratio: 440 / 560;
}
.hero-panel {
  position: absolute; inset: 14% 4% 0 4%;
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.12), transparent 60%),
    var(--red-deep);
  border: 2px solid #000;
  box-shadow: 10px 10px 0 0 #000;
  overflow: hidden;
}
.hero-panel::before {
  /* faint logo pattern, like the brand wallpaper */
  content: ""; position: absolute; inset: 0;
  background-image: url("../img/pattern-logo.svg");
  background-size: 84px 84px;
  opacity: .14;
}
.hero-photo {
  position: absolute; left: 50%; bottom: 0;
  height: 100%; width: auto; max-width: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.45));
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
}
.selection-box {
  position: absolute; inset: 4% 2% 2% 2%;
  border: 1.5px solid var(--cream);
  border-radius: 4px;
  pointer-events: none;
  opacity: .9;
}
.selection-box i {
  position: absolute; width: 9px; height: 9px; background: var(--cream); border-radius: 1px;
}
.selection-box i:nth-child(1) { left: -5px; top: -5px; }
.selection-box i:nth-child(2) { right: -5px; top: -5px; }
.selection-box i:nth-child(3) { left: -5px; bottom: -5px; }
.selection-box i:nth-child(4) { right: -5px; bottom: -5px; }
.object-label {
  position: absolute; left: 2%; top: calc(4% - 30px);
  font-family: var(--font-mono); font-size: 12px;
  background: var(--cream); color: #1b1b1b;
  padding: 3px 8px; border-radius: 4px 4px 4px 0;
  white-space: nowrap;
}
.gizmo {
  position: absolute; left: -2%; bottom: 14%;
  width: 120px; height: 120px;
  filter: drop-shadow(2px 2px 0 #000);
}
.neo-float {
  position: absolute; right: -6%; top: 6%;
  width: 104px;
  --r: 8deg;
  filter: drop-shadow(4px 6px 0 rgba(0,0,0,.6));
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); }
  50% { transform: rotate(calc(var(--r, 0deg) - 3deg)) translateY(-8px); }
}

/* HUD stats */
.hud {
  list-style: none;
  margin: 64px 0 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}
.hud-item {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.hud-item:last-child { border-right: 0; }
.hud-value {
  font-family: var(--font-pixel);
  font-size: clamp(40px, 4.4vw, 54px);
  line-height: 1;
  color: var(--text);
}
.hud-value small { font-size: .6em; color: var(--red); }
.hud-label {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--muted);
  margin-top: 6px;
}

@media (max-width: 920px) {
  .hero { padding-top: 104px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { width: min(86%, 380px); order: -1; margin-top: 24px; }
  .hud { grid-template-columns: repeat(2, 1fr); }
  .hud-item:nth-child(2) { border-right: 0; }
  .hud-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .neo-float { width: 80px; right: -4%; }
  .gizmo { width: 92px; height: 92px; }
  .hud-item { padding: 16px; }
}

/* ---------- Generic section ---------- */

.section { padding: clamp(80px, 11vw, 136px) 0; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }

/* ---------- What I do (Inspector components) ---------- */

.inspector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.component {
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s var(--ease);
}
.component:hover { border-color: var(--line-2); transform: translateY(-3px); }
.component-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 14px;
}
.component-head .check {
  width: 16px; height: 16px; border-radius: 4px; flex: none;
  background: var(--red); display: grid; place-items: center;
}
.component-head .check svg { width: 11px; height: 11px; }
.component-head .name { font-weight: 600; }
.component-head .kebab { margin-left: auto; color: var(--faint); letter-spacing: 2px; }
.component-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.component-body h3 {
  font-size: 24px; font-weight: 600; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.01em;
}
.component-body p { color: var(--muted); margin: 0 0 18px; font-size: 17px; }
.component-body p strong { color: var(--text); font-weight: 500; }
.props {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  font-family: var(--font-mono); font-size: 13px;
  margin: auto 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line-2);
}
.props dt { color: var(--faint); }
.props dd { margin: 0; color: var(--text); }
.component-cta {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid var(--line-2);
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.component-cta svg { width: 16px; height: 16px; transition: transform .15s; }
.component-cta:hover { background: var(--red); border-color: var(--red); color: #fff; }
.component-cta:hover svg { transform: translateX(2px); }

@media (max-width: 760px) { .inspector { grid-template-columns: 1fr; } }

/* ---------- Demo reel ---------- */

.reel {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel-facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; cursor: pointer;
  background: #000;
}
.reel-facade img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease), filter .3s;
}
.reel-facade:hover img { transform: scale(1.015); filter: brightness(1.06); }
.reel-play { position: absolute; inset: 0; display: grid; place-items: center; }
.reel-play .btn-circle {
  width: clamp(64px, 8vw, 96px); height: clamp(64px, 8vw, 96px); border-radius: 50%;
  background: var(--red); border: 2px solid #000; box-shadow: 5px 5px 0 #000;
  display: grid; place-items: center;
  transition: transform .2s var(--ease);
}
.reel-facade:hover .btn-circle { transform: scale(1.08); }
.reel-play .btn-circle svg { width: 38%; height: 38%; margin-left: 6%; }

/* ---------- Projects ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}
.project {
  grid-column: span 4;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.project--wide { grid-column: span 8; }
.project--wide .project-media { aspect-ratio: 16 / 8; }
a.project:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 0 var(--red-deep); }
.project-media {
  position: relative; aspect-ratio: 63 / 50; overflow: hidden; background: var(--bg-3);
  border-bottom: 2px solid #000;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
a.project:hover .project-media img { transform: scale(1.04); }
.project-tag {
  position: absolute; left: 12px; top: 12px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  background: var(--cream); color: #1b1b1b;
  padding: 4px 9px; border-radius: 6px; border: 1.5px solid #000;
}
.project-tag--red { background: var(--red); color: #fff; }
.project-tag--right { left: auto; right: 12px; }
.project-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 { margin: 0; font-size: 23px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.project-body p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.project-meta {
  margin-top: auto; padding-top: 12px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.project-meta span {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px;
}
.project-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 13px; color: var(--red);
}
.project-link svg { width: 14px; height: 14px; transition: transform .15s; }
a.project:hover .project-link svg { transform: translateX(3px); }

@media (max-width: 980px) {
  .project, .project--wide { grid-column: span 6; }
}
@media (max-width: 640px) {
  .project, .project--wide { grid-column: 1 / -1; }
}

/* ---------- About + journey (levels) ---------- */

.about-grid {
  display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start;
}
.about-photo {
  position: sticky; top: 104px;
  isolation: isolate;
  margin: 0;
  border-radius: var(--radius);
  border: 2px solid #000;
  box-shadow: 10px 10px 0 0 #000;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.about-photo figcaption {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  background: rgba(0,0,0,.65); padding: 8px 10px; border-radius: 8px;
  backdrop-filter: blur(6px);
}
.about-text > div > p { color: var(--muted); margin: 0 0 18px; }
.about-text > div > p strong { color: var(--text); font-weight: 500; }

.levels {
  list-style: none; margin: 32px 0 0; padding: 0;
  position: relative;
}
/* the path that joins the levels */
.levels::before {
  content: ""; position: absolute; left: 21px; top: 12px; bottom: 40px;
  width: 2px; background: linear-gradient(var(--line-2), var(--line-2) 80%, transparent);
}
.level {
  position: relative;
  display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  padding-bottom: 26px;
}
.level .lv {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-3); border: 2px solid var(--line-2);
  font-family: var(--font-pixel); font-size: 26px; line-height: 1; color: var(--muted);
}
.level h3 { margin: 8px 0 4px; font-size: 20px; font-weight: 600; line-height: 1.3; }
.level p { margin: 0; font-size: 17px; color: #bdb8af; line-height: 1.55; }
.level strong { color: var(--red); font-weight: 500; }
.level h3 strong { font-weight: 600; }

.level--now .lv {
  background: var(--red); border-color: #000; color: #fff;
  box-shadow: 3px 3px 0 #000, 0 0 0 5px rgba(229, 83, 75, .18);
}
.level--locked .lv { border-style: dashed; color: var(--faint); background: transparent; }
.level--locked .lv svg { width: 20px; height: 20px; }
.level--locked h3 { color: var(--faint); letter-spacing: .12em; }

.pill {
  display: inline-block; vertical-align: 3px; margin-left: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--red); color: #fff; text-transform: uppercase;
}
.pill--soon { background: var(--cream); color: #1b1b1b; }

.chips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 9px; background: var(--bg);
}

@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: relative; top: 0; max-width: 420px; aspect-ratio: 4 / 4.2; }
}

/* ---------- Content / channels ---------- */

.channels {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px;
  margin-bottom: 56px;
}
.channel {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .15s, transform .2s var(--ease);
}
.channel:hover { border-color: var(--red); transform: translateY(-3px); }
.channel-top { display: flex; align-items: center; justify-content: space-between; }
.channel-top svg { width: 24px; height: 24px; }
.channel-top .arrow { width: 16px; height: 16px; color: var(--faint); transition: color .15s, transform .15s; }
.channel:hover .arrow { color: var(--red); transform: translate(2px, -2px); }
.channel-count { font-family: var(--font-pixel); font-size: 40px; line-height: .9; }
.channel-name { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.series-title {
  font-family: var(--font-mono); font-size: 14px; color: var(--muted); margin: 0 0 18px;
}
.series {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  list-style: none; margin: 0; padding: 0;
}
.series li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg);
}
.series .idx { font-family: var(--font-pixel); font-size: 26px; color: var(--red); line-height: 1; min-width: 2ch; }
.series h3 { margin: 0 0 2px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.series p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }

@media (max-width: 980px) { .series { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .series { grid-template-columns: 1fr; } }

/* ---------- Course ---------- */

.academy {
  position: relative;
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 24px;
  border: 2px solid #000;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(229, 83, 75, .16), transparent 60%),
    linear-gradient(135deg, #1d1413, #120d0d);
  box-shadow: 10px 10px 0 0 #000;
  overflow: hidden;
}
.academy::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../img/pattern-logo.svg"); background-size: 90px 90px; opacity: .05;
  pointer-events: none;
}
.academy > * { position: relative; }
.academy .badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  background: var(--cream); color: #1b1b1b; border: 1.5px solid #000;
  padding: 5px 10px; border-radius: 6px; margin-bottom: 18px;
}
.academy h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 16px; font-weight: 600; }
.academy p { color: var(--muted); margin: 0 0 16px; max-width: 56ch; }
.academy ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 8px; }
.academy li { display: flex; gap: 10px; align-items: baseline; font-size: 17px; }
.academy li::before { content: ">"; font-family: var(--font-mono); color: var(--red); font-weight: 700; }
.academy-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.academy-art {
  justify-self: center; width: min(300px, 100%);
  filter: drop-shadow(10px 14px 0 rgba(0,0,0,.55));
  transform: rotate(3deg);
}

@media (max-width: 820px) {
  .academy { grid-template-columns: 1fr; }
  .academy-art { order: -1; width: 170px; justify-self: start; }
}

/* ---------- Brands (logo wall) ---------- */

/* 21 logos: 7 columns on desktop, 3 below (both divide evenly) */
.logo-wall {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px;
}
.logo-wall li {
  height: 92px;
  display: grid; place-items: center;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .2s, background .2s;
}
.logo-wall img {
  max-width: 100%; max-height: 30px; width: auto; height: auto;
  opacity: .72; transition: opacity .2s;
}
.logo-wall li.is-compact img { max-height: 48px; }
.logo-wall li:hover { border-color: var(--line-2); background: var(--bg-3); }
.logo-wall li:hover img { opacity: 1; }

@media (max-width: 1024px) {
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .logo-wall img { max-height: 32px; }
}
.brands-note { margin-top: 22px; font-family: var(--font-mono); font-size: 13px; color: var(--faint); }
.brands-note a { color: var(--red); text-decoration: none; }
.brands-note a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .logo-wall { gap: 8px; }
  .logo-wall li { height: 72px; padding: 10px 12px; }
  .logo-wall img { max-height: 22px; }
  .logo-wall li.is-compact img { max-height: 38px; }
}

/* ---------- Contact ---------- */

.contact { text-align: center; position: relative; }
.contact .section-title { font-size: clamp(38px, 6.4vw, 76px); }
.contact .section-lead { margin: 0 auto 36px; }
.contact-options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  text-align: left; margin-top: 48px;
}
.contact-card {
  padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-2);
  text-decoration: none; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, transform .2s var(--ease);
}
.contact-card:hover { border-color: var(--red); transform: translateY(-3px); }
.contact-card .k { font-family: var(--font-mono); font-size: 12px; color: var(--red); }
.contact-card h3 { margin: 0; font-size: 20px; font-weight: 600; }
.contact-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.email-row {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.copy-btn {
  font-family: var(--font-mono); font-size: 13px;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--muted); cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--text); }

@media (max-width: 820px) { .contact-options { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  font-family: var(--font-mono); font-size: 13px; color: var(--faint);
}
.footer-grid {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.footer-grid p { margin: 0; }
.footer-code { color: var(--muted); }
.footer-code .k { color: var(--blue); }
.footer-code .f { color: var(--cream); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.socials a {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--muted);
  transition: color .15s, border-color .15s;
}
.socials a:hover { color: var(--text); border-color: var(--text); }
.socials svg { width: 18px; height: 18px; }

/* ==========================================================================
   Game-dev touches spread across the page
   ========================================================================== */

/* Scroll progress, drawn like an XP bar under the header */
.scroll-xp { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.scroll-xp span { display: block; height: 100%; width: 0; background: var(--red); box-shadow: 0 0 8px rgba(229, 83, 75, .6); }

/* Floating Neo emotes (Twitch) */
.emote {
  position: absolute; z-index: 2;
  width: clamp(64px, 7.5vw, 104px);
  pointer-events: none;
  filter: drop-shadow(4px 6px 0 rgba(0,0,0,.55));
  animation: bob 4.6s ease-in-out infinite;
}
.emote--whatido { top: 58px;  right: max(12px, calc(50% - 590px)); --r: 7deg; }
.emote--reel    { top: 120px; right: max(12px, calc(50% - 590px)); --r: -9deg; animation-delay: -1.2s; }
.emote--talks   { top: 100px; right: max(12px, calc(50% - 590px)); --r: 8deg; animation-delay: -2.1s; }
.emote--content { top: 100px; right: max(12px, calc(50% - 590px)); --r: -6deg; animation-delay: -.6s; }
.emote--brands  { top: 100px; right: max(12px, calc(50% - 590px)); --r: -8deg; animation-delay: -3s; }
.emote--loading { top: -16px; right: 0; width: 70px; --r: 6deg; }
.level--locked > div { padding-right: 84px; }

@media (max-width: 720px) {
  .emote--whatido, .emote--reel, .emote--talks, .emote--content, .emote--brands { top: 34px; }
  .emote--loading { width: 54px; top: -10px; }
  .level--locked > div { padding-right: 60px; }
}

/* Demo reel inside a Unity-like "Game" window */
.editor {
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: 10px 10px 0 0 var(--red-deep), 10px 10px 0 2px #000;
  overflow: hidden;
  background: #000;
}
.editor-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 6px 10px;
  background: var(--bg-3);
  border-bottom: 2px solid #000;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.editor-tabs { display: flex; gap: 4px; }
.editor-tabs .tab { padding: 4px 10px; border-radius: 6px 6px 0 0; }
.editor-tabs .tab.is-active { background: var(--bg); color: var(--text); box-shadow: inset 0 2px 0 var(--red); }
.editor-controls { display: flex; gap: 2px; background: #000; padding: 2px; border-radius: 7px; }
.ctl {
  width: 34px; height: 26px; display: grid; place-items: center;
  background: var(--bg-2); color: var(--text); border: 0; border-radius: 5px;
}
.ctl svg { width: 14px; height: 14px; }
.ctl--play { cursor: pointer; transition: background .15s, color .15s; }
.ctl--play:hover, .editor.is-playing .ctl--play { background: var(--blue); color: #fff; }
.editor-meta { justify-self: end; }
@media (max-width: 560px) {
  .editor-tabs .tab:not(.is-active), .editor-meta { display: none; }
  .editor-bar { grid-template-columns: 1fr auto; }
}

/* Selection outline when hovering the setup photo, like picking it in the Scene view */
.about-photo::after {
  content: ""; position: absolute; inset: 10px; z-index: 1;
  border: 1.5px solid var(--cream); border-radius: 6px;
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.about-photo:hover::after { opacity: .9; }
.object-label--photo { left: 10px; top: 10px; z-index: 2; opacity: 0; transition: opacity .2s; }
.about-photo:hover .object-label--photo { opacity: 1; }

/* XP bar above the journey */
.xp {
  display: flex; align-items: center; gap: 14px;
  margin: 30px 0 0; padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--faint);
}
.xp-level {
  font-family: var(--font-pixel); font-size: 24px; line-height: 1; color: #fff;
  background: var(--red); border: 2px solid #000; border-radius: 6px; padding: 2px 8px;
}
.xp-bar { flex: 1; height: 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.xp-bar span {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--red) 0 10px, var(--red-deep) 10px 12px);
  transition: width 1.6s var(--ease) .3s;
}
.xp.is-in .xp-bar span { width: 86%; }
@media (max-width: 520px) { .xp-next { display: none; } }

.levels { margin-top: 26px; }
.level--locked { position: relative; }

/* Talks & events */
.stage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stage figure {
  position: relative; margin: 0;
  border: 2px solid #000; border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-3);
}
.stage img { width: 100%; height: 100%; object-fit: cover; }
.stage .stage-main { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
.stage .stage-main img { object-position: 50% 28%; }
.lower-third {
  position: absolute; left: 18px; bottom: 18px; max-width: min(640px, calc(100% - 36px));
  display: grid; gap: 4px;
  padding: 14px 18px 14px 20px;
  background: rgba(12, 12, 13, .88);
  border-left: 4px solid var(--red); border-radius: 8px;
  backdrop-filter: blur(6px);
}
.lower-third strong { font-size: clamp(16px, 1.8vw, 21px); font-weight: 600; line-height: 1.25; }
.lt-tag {
  justify-self: start;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  background: var(--red); color: #fff; padding: 2px 8px; border-radius: 4px;
}
.lt-sub { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .stage { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stage .stage-main { aspect-ratio: 4 / 3; }
  .lower-third { left: 10px; right: 10px; bottom: 10px; max-width: none; padding: 10px 12px; }
  .lt-sub { display: none; }
}

.quests {
  margin-top: 40px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.quests-head {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 18px; background: var(--bg-3); border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
}
.quests-count { color: var(--red); }
.quests > ul { list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quest { display: flex; gap: 14px; padding: 16px; border-radius: 10px; }
.quest:hover { background: var(--bg-2); }
.quest-check {
  flex: none; width: 24px; height: 24px; margin-top: 2px;
  display: grid; place-items: center;
  background: var(--red); color: #fff; font-size: 14px; font-weight: 700;
  border: 2px solid #000; border-radius: 6px; box-shadow: 2px 2px 0 #000;
}
.quest h3 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }
.quest p { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.55; }
@media (max-width: 760px) { .quests > ul { grid-template-columns: 1fr; } }

.stage-cta {
  margin-top: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px;
  border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.stage-cta p { margin: 0; font-size: 20px; font-weight: 500; }

/* "Achievement unlocked" toast on the course card */
.academy > .achievement {
  position: absolute; top: 22px; right: 22px; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px;
  background: #121214; border: 2px solid #000; border-radius: 12px;
  box-shadow: 4px 4px 0 #000;
  opacity: 0; transform: translateX(24px);
  transition: opacity .5s var(--ease) .7s, transform .5s var(--ease) .7s;
}
.academy.is-in > .achievement { opacity: 1; transform: none; }
.achievement-icon {
  width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px;
  background: #2a2112; border: 1.5px solid #e8b44b; border-radius: 8px;
}
.achievement span:last-child { display: grid; font-size: 15px; line-height: 1.3; }
.achievement strong {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: #e8b44b;
}
@media (max-width: 820px) { .academy > .achievement { top: 16px; right: 16px; } }
@media (max-width: 460px) { .academy > .achievement { position: static; justify-self: start; } }

/* Brand wall label */
.inventory-label { margin: 0 0 14px; font-family: var(--font-mono); font-size: 13px; color: var(--faint); }

/* RPG dialogue box in the contact section */
.dialogue {
  display: flex; gap: 20px; align-items: stretch;
  max-width: 720px; margin: 8px auto 34px;
  padding: 18px 22px 22px 18px;
  text-align: left;
  background: #0f0f11;
  border: 3px solid var(--cream); border-radius: 10px;
  box-shadow: 0 0 0 3px #000, 8px 8px 0 3px #000;
  position: relative;
}
.dialogue-portrait {
  flex: none; width: 128px; height: auto; min-height: 120px; object-fit: contain;
  background: var(--bg-3); border: 3px solid var(--cream); border-radius: 8px; padding: 4px;
}
.dialogue-name { font-family: var(--font-pixel); font-size: 24px; line-height: 1; color: var(--red); text-transform: uppercase; }
.dialogue-body p {
  margin: 6px 0 0; min-height: 3.1em;
  font-family: var(--font-pixel); font-size: clamp(22px, 2.4vw, 27px); line-height: 1.15; color: var(--text);
}
.dialogue-next {
  position: absolute; right: 16px; bottom: 8px;
  font-size: 14px; color: var(--cream);
  animation: nudge 1s steps(2) infinite;
}
@keyframes nudge { 50% { transform: translateY(3px); } }
@media (max-width: 520px) {
  .dialogue { gap: 12px; padding: 14px 14px 18px 12px; align-items: flex-start; }
  .dialogue-portrait { width: 76px; height: 76px; min-height: 0; }
}

/* Konami code easter egg */
.emote-rain { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.emote-rain img { position: absolute; top: -120px; width: 72px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(calc(100vh + 160px)) rotate(var(--spin, 180deg)); } }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

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

/* ---------- 404 ---------- */

.notfound {
  min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter);
}
.notfound img { width: auto; height: 220px; margin: 0 auto 24px; }
.notfound h1 { font-family: var(--font-pixel); font-size: clamp(80px, 16vw, 160px); line-height: .9; margin: 0; color: var(--red); font-weight: 400; }
.notfound p { color: var(--muted); margin: 12px 0 28px; }
.notfound code { font-family: var(--font-mono); font-size: 14px; color: var(--cream); }
