/* ------------------------------------------------------------------
   Game.Lab — portfolio styles
   ------------------------------------------------------------------ */

:root {
  --bg: #0b1020;
  --bg-soft: #11172e;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf8;
  --muted: #9aa3bf;
  --accent: #ffb86b;
  --accent-2: #7c5cff;
  --accent-3: #4ade80;
  --danger: #ff6b6b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

.svg-inline--fa, [data-lucide] { width: 18px; height: 18px; stroke-width: 2; }

/* ------------------------------------------------------------------
   Backgrounds
   ------------------------------------------------------------------ */

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 80%);
  z-index: -2;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 700px;
  background:
    radial-gradient(closest-side, rgba(124,92,255,0.35), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(255,184,107,0.25), transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

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

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #0b1020;
  box-shadow: 0 8px 24px -6px rgba(124,92,255,0.5);
}
.brand-mark [data-lucide] { width: 20px; height: 20px; }

.brand .accent { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a { color: var(--muted); transition: color 0.2s; }
.nav a:hover { color: var(--text); }

.nav-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.2s;
}
.nav-icon:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

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

.hero {
  max-width: 1100px;
  margin: 60px auto 80px;
  padding: 0 32px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: 28px;
}
.hero-eyebrow [data-lucide] { width: 14px; height: 14px; color: var(--accent); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}

.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn [data-lucide] { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff8a4c);
  color: #1a1208;
  box-shadow: 0 12px 30px -10px rgba(255, 138, 76, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); color: #1a1208; }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* Stats */

.stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.25rem;
  background: linear-gradient(135deg, #fff, #c4cce8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ------------------------------------------------------------------
   Games Section
   ------------------------------------------------------------------ */

.games-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.section-head h2 [data-lucide] { color: var(--accent); width: 24px; height: 24px; }

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0f1f;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.card:hover .card-thumb img { transform: scale(1.05); }

.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11,16,32,0.85) 100%);
  pointer-events: none;
}

.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(11, 16, 32, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-tag [data-lucide] { width: 12px; height: 12px; }

.card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.card-desc {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.card-foot .play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  transition: gap 0.2s;
}
.card:hover .card-foot .play { gap: 10px; }
.card-foot .play [data-lucide] { width: 14px; height: 14px; }

/* ------------------------------------------------------------------
   About
   ------------------------------------------------------------------ */

.about {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 32px;
}

.about-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(124,92,255,0.08), rgba(255,184,107,0.04)),
    var(--surface);
}
.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 12px;
}
.about-card p { color: var(--text); margin: 0 0 12px; }
.about-card .muted { color: var(--muted); font-size: 0.92rem; }
.about-card a { color: var(--accent); border-bottom: 1px dashed currentColor; }

.about-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  color: #0b1020;
}
.about-icon [data-lucide] { width: 28px; height: 28px; stroke-width: 2.2; }

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

.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}
.site-footer .dot { margin: 0 8px; }

.foot-links {
  display: flex;
  gap: 10px;
}
.foot-links a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.foot-links a:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

/* ------------------------------------------------------------------
   Blog nav link
   ------------------------------------------------------------------ */

.nav-blog {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-blog:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

/* ------------------------------------------------------------------
   Blog teaser strip
   ------------------------------------------------------------------ */

.blog-teaser-section {
  max-width: 1240px;
  margin: 0 auto 60px;
  padding: 0 32px;
}

.blog-teaser {
  position: relative;
  padding: 40px 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(135deg, rgba(124,92,255,0.12) 0%, rgba(255,184,107,0.06) 100%),
    var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blog-teaser::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124,92,255,0.2), transparent);
  pointer-events: none;
}

.blog-teaser-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  font-family: var(--font-mono);
}
.blog-teaser-tag [data-lucide] { width: 14px; height: 14px; }

.blog-teaser-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  max-width: 640px;
}

.blog-teaser-desc {
  color: var(--muted);
  max-width: 580px;
  font-size: 1rem;
  line-height: 1.65;
}

.blog-teaser-btn {
  align-self: flex-start;
  margin-top: 4px;
}
.blog-teaser-btn [data-lucide] { width: 16px; height: 16px; }

@media (max-width: 720px) {
  .blog-teaser { padding: 28px 24px; }
  .blog-teaser-section { padding: 0 20px; margin-bottom: 40px; }
}

/* ------------------------------------------------------------------
   Card entrance animation
   ------------------------------------------------------------------ */

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card { animation: cardIn 0.5s ease both; }

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

@media (max-width: 720px) {
  .site-header { padding: 16px 20px; }
  .nav a:not(.nav-icon) { display: none; }
  .hero { margin: 30px auto 50px; }
  .stats { gap: 28px; }
  .about-card { grid-template-columns: 1fr; padding: 28px; }
  .games-section { padding: 30px 20px 60px; }
  .site-footer { padding: 24px 20px; flex-direction: column; text-align: center; }
}

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