:root {
  --base: #DDE3EA;
  --paper: #F6F8FA;
  --ink: #151B26;
  --muted: #4C586A;
  --brick: #FF6A1A;
  --plate: #1FA89A;
  --line: #C3CCD7;
  --radius: 14px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 3px;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
}
.topbar nav { display: flex; gap: clamp(0.8rem, 2.5vw, 1.8rem); }
.topbar nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--muted);
}
.topbar nav a:hover { color: var(--ink); }

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: center;
  background: var(--base);
  overflow: hidden;
}
#studs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
  max-width: 820px;
  pointer-events: none;
}
.hero-copy a, .hero-copy .btn { pointer-events: auto; }
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7.5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lead {
  margin-top: 1.4rem;
  max-width: 34rem;
  font-size: 1.2rem;
  color: var(--muted);
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.hint {
  margin-top: 2.2rem;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 4px 0 var(--ink);
}
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--brick); color: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); }

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 3rem);
  max-width: 1180px;
  margin: 0 auto;
}
.section-alt {
  max-width: none;
  background: var(--base);
}
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.section-intro {
  margin-top: 0.8rem;
  max-width: 38rem;
  color: var(--muted);
}

/* Games */
.games {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
}
.game {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}
.game:hover { transform: translateY(-4px); }
.thumb {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.35) 0 14%, transparent 15%),
    linear-gradient(135deg, var(--c1), var(--c2));
  border-bottom: 2px solid var(--ink);
}
.game-body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}
.game-body p { color: var(--muted); font-size: 1rem; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; font-size: 0.95rem; }
.link {
  margin-top: auto;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--brick);
}
.link:hover { text-decoration-color: var(--ink); }

/* Skills */
.skills {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem 2.5rem;
}
.skills p { margin-top: 0.4rem; color: var(--muted); }
.stack { margin-top: 2.5rem; font-weight: 500; }

/* About */
.about { margin-top: 1.5rem; max-width: 40rem; display: grid; gap: 1rem; font-size: 1.15rem; }

/* Contact */
.contact { border-top: 1px solid var(--line); }

.footer {
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 560px) {
  .topbar nav a:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .game { transition: none; }
}
