/* Theme tokens */
:root {
  --bg: #0b0f14;
  --bg-elev: #121821;
  --text: #e8eef6;
  --muted: #b8c4d6;
  --primary: #7aa2ff;
  --accent: #63e6be;
  --card: #0f141b;
  --border: #1b2430;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --pad: clamp(16px, 3vw, 32px);
  --maxw: 1100px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fb;
    --bg-elev: #ffffff;
    --text: #0b1220;
    --muted: #435065;
    --primary: #3456ff;
    --accent: #00b884;
    --card: #ffffff;
    --border: #e6eaf2;
    --shadow: 0 8px 24px rgba(10,40,120,.12);
  }
}

/* Base */
* { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, Noto Sans, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) }

/* Buttons & badges */
.btn { display:inline-block; padding:12px 18px; border-radius:999px; border:1px solid var(--border); background:linear-gradient(180deg, var(--bg-elev), var(--card)); color:var(--text); box-shadow:var(--shadow); transition: transform .08s ease, background .2s ease, border-color .2s ease }
.btn:hover { transform: translateY(-1px); border-color: var(--primary) }
.btn.primary { background:linear-gradient(180deg, var(--primary), #4b6cff); color:#fff; border-color:transparent }
.badge { display:inline-flex; gap:.5rem; align-items:center; padding:6px 10px; border-radius:999px; background:rgba(122,162,255,.12); color:var(--primary); border:1px solid rgba(122,162,255,.28) }

/* Navbar */
.nav { position:sticky; top:0; z-index:50; backdrop-filter: blur(10px); background: color-mix(in oklab, var(--bg) 85%, transparent); border-bottom:1px solid var(--border) }
.nav-inner { display:flex; align-items:center; justify-content:space-between; gap:1rem; height:64px }
.brand { font-weight:700; letter-spacing:.2px }
.brand span { opacity:.7; font-weight:600 }
.nav-links { display:flex; gap:.75rem; align-items:center }
.nav-links a { padding:8px 12px; border-radius:10px; border:1px solid transparent }
.nav-links a:hover { border-color:var(--border); background: var(--bg-elev) }
.nav-toggle { display:none }
@media (max-width: 820px) {
  .nav-inner { height:auto; flex-wrap:wrap; padding-top:.5rem; padding-bottom:.5rem }
  .nav-toggle { display:inline-flex }
  .nav-links { width:100%; flex-wrap:wrap }
}

/* Hero */
.hero { position:relative; overflow:hidden; padding: clamp(64px, 12vh, 120px) 0 }
.hero-grid { display:grid; grid-template-columns: 1.2fr .8fr; gap: clamp(16px, 4vw, 40px); align-items:center }
.hero h1 { font-size: clamp(28px, 5vw, 48px); margin: 0 0 12px }
.hero p { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); margin: 0 0 24px }
.cta { display:flex; gap:12px; flex-wrap:wrap }
.mock { border-radius: var(--radius); border:1px solid var(--border); background: radial-gradient(80% 60% at 50% 0%, rgba(122,162,255,.12), transparent 65%), var(--card); min-height:280px; box-shadow:var(--shadow); position:relative; overflow:hidden }
.mock::after { content:"Gameplay Preview"; position:absolute; bottom:10px; right:12px; font-size:12px; color:var(--muted) }
.mock svg { width:100%; height:100%; display:block }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr } }

/* Sections */
section { padding: 64px 0 }
.section-title { font-size: clamp(22px, 3.2vw, 32px); margin: 0 0 12px }
.section-desc { color: var(--muted); margin: 0 0 24px }

/* About */
.about-grid { display:grid; grid-template-columns: 240px 1fr; gap: 24px }
.avatar { border-radius:50%; width:200px; height:200px; border:8px solid var(--bg); box-shadow:var(--shadow); background: linear-gradient(135deg, rgba(122,162,255,.25), rgba(99,230,190,.22)) }
.about-card { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); padding: var(--pad) }
.skills { display:flex; flex-wrap:wrap; gap:8px }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; justify-items:center } }

/* Projects */
.grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr } }
.card { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; display:flex; flex-direction:column; box-shadow: var(--shadow) }
.thumb { aspect-ratio: 16/9; background: linear-gradient(120deg, rgba(122,162,255,.18), rgba(99,230,190,.18)); border-bottom:1px solid var(--border); position:relative }
.thumb::after { content:"Media"; position:absolute; bottom:8px; right:10px; font-size:12px; color:var(--muted) }
.card-body { padding:16px }
.meta { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px }
.pill { font-size:12px; padding:4px 8px; border-radius:999px; border:1px solid var(--border); background: var(--bg-elev); color: var(--muted) }
.card-actions { display:flex; gap:10px; padding: 0 16px 16px }

/* Playground */
.play-item .thumb { aspect-ratio: 1/1 }

/* Footer / Contact */
.contact { background: linear-gradient(180deg, var(--bg-elev), var(--card)); border-top:1px solid var(--border) }
.contact .wrap { display:grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items:center }
.contact h3 { margin:0 0 10px }
.contact p { margin:0 0 16px; color: var(--muted) }
.socials { display:flex; gap:10px }
.socials a { padding:10px 12px; border:1px solid var(--border); border-radius:12px; background: var(--bg-elev) }
@media (max-width: 900px) { .contact .wrap { grid-template-columns:1fr } }

/* Utilities */
.muted { color: var(--muted) }
.spacer { height: 12px }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0 }
.divider { height:1px; background: var(--border); margin: 12px 0 }

/* Inline replacements */
.center-grid { display:grid; place-items:center }
.pad-20 { padding:20px }
.footer-bottom { padding: 24px var(--pad); text-align:center; color: var(--muted) }
