/* ── reset & tokens ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0c0f;
  --bg2:      #0f1318;
  --bg3:      #161b22;
  --border:   #1e2730;
  --border2:  #2a3540;
  --text:     #cdd6e0;
  --text2:    #7a8a96;
  --text3:    #44535e;
  --accent:   #00c8ff;
  --accent2:  #0088bb;
  --green:    #39d98a;
  --amber:    #f5a623;
  --red:      #ff4c4c;
  --mono:     'Share Tech Mono', monospace;
  --sans:     'Barlow', sans-serif;
  --cond:     'Barlow Condensed', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── atmospheric effects ──────────────────────────────────────── */
.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── nav ──────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  background: rgba(10,12,15,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.blink {
  animation: blink 1.1s step-end infinite;
  color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }

.nav-cta {
  border: 1px solid var(--accent2) !important;
  color: var(--accent) !important;
  padding: 6px 14px;
  transition: background 0.15s !important;
}
.nav-cta:hover { background: rgba(0,200,255,0.08) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text2);
  transition: all 0.2s;
}

/* ── buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 10px 20px;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border-radius: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: #33d4ff; }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border2);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(0,200,255,0.06);
}

/* ── section labels ───────────────────────────────────────────── */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text3);
  margin-bottom: 16px;
}

/* ── hero ─────────────────────────────────────────────────────── */
.hero {
  padding: 64px 32px 56px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0 48px;
}

.hero-tag {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-name {
  font-family: var(--cond);
  font-size: clamp(72px, 10vw, 120px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--text);
  align-self: end;
}

.outline {
  -webkit-text-stroke: 1.5px var(--text);
  color: transparent;
}

.hero-bio {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}

.hero-bio p {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.65;
  max-width: 480px;
}

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

.chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--border2);
  color: var(--text2);
  border-radius: 2px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--border);
  background: var(--border);
}

.stat {
  background: var(--bg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-n {
  font-family: var(--cond);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-l {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text3);
}

/* ── featured section ─────────────────────────────────────────── */
.featured {
  padding: 56px 32px;
  border-bottom: 1px solid var(--border);
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 24px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  overflow: hidden;
}

/* ── game screen mockup ───────────────────────────────────────── */
.featured-screen {
  background: #050d14;
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border2);
}

.featured-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(0,200,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(57,217,138,0.04) 0%, transparent 50%);
}

.screen-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.screen-hud.small { top: 10px; left: 10px; }

.hud-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text3);
  width: 28px;
}

.hud-track {
  width: 80px;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 1px;
  overflow: hidden;
}

.hud-fill {
  height: 100%;
  border-radius: 1px;
  animation: drain 4s ease-in-out infinite alternate;
}

.charge-fill {
  background: var(--accent);
  width: 72%;
  animation: chargePulse 3s ease-in-out infinite alternate;
}

.health-fill {
  background: var(--green);
  width: 55%;
  animation: healthPulse 4.5s ease-in-out infinite alternate;
}

@keyframes chargePulse { from { width: 45%; } to { width: 78%; } }
@keyframes healthPulse { from { width: 55%; } to { width: 38%; } }

.screen-title {
  font-family: var(--cond);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(0,200,255,0.15);
  text-align: center;
  z-index: 1;
  user-select: none;
}

.screen-title.small { font-size: 28px; }

.screen-sub {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text3);
}

.screen-badge-corner {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--text3);
}

/* ── animated dots (robots / enemies) ────────────────────────── */
.screen-dots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.dot {
  position: absolute;
  border-radius: 50%;
}

.dot-robot {
  width: 8px; height: 8px;
  background: var(--accent);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: robotMove 5s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent);
}

.dot-payload {
  width: 12px; height: 12px;
  background: var(--amber);
  top: 55%; left: 35%;
  border-radius: 2px;
  animation: payloadMove 5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--amber);
}

.dot-enemy {
  width: 6px; height: 6px;
  background: var(--red);
  top: 35%; left: 70%;
  animation: enemy1Move 3.2s ease-in-out infinite alternate;
  box-shadow: 0 0 4px var(--red);
}

.dot-enemy2 {
  width: 6px; height: 6px;
  background: var(--red);
  top: 65%; left: 75%;
  animation: enemy2Move 2.8s ease-in-out infinite alternate;
  box-shadow: 0 0 4px var(--red);
}

.track-line {
  position: absolute;
  top: 55%; left: 10%; width: 80%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(245,166,35,0.3), transparent);
}

@keyframes robotMove {
  0%   { top:55%; left:40%; }
  25%  { top:40%; left:65%; }
  50%  { top:55%; left:55%; }
  75%  { top:65%; left:42%; }
  100% { top:55%; left:40%; }
}
@keyframes payloadMove {
  0%   { left:30%; }
  50%  { left:50%; }
  100% { left:30%; }
}
@keyframes enemy1Move {
  from { top:32%; left:72%; }
  to   { top:45%; left:62%; }
}
@keyframes enemy2Move {
  from { top:62%; left:73%; }
  to   { top:50%; left:66%; }
}

/* ── featured info ────────────────────────────────────────────── */
.featured-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.featured-engine {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent2);
}

.featured-title {
  font-family: var(--cond);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--text);
}

.featured-desc {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.65;
}

.featured-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid var(--border2);
  padding-left: 16px;
}

.featured-details li {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  gap: 8px;
}

.featured-details li span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  width: 56px;
  flex-shrink: 0;
  padding-top: 1px;
}

/* ── mini game cards (homepage row) ──────────────────────────── */
.recent-games {
  padding: 48px 32px 56px;
}

.games-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.mini-card {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color 0.15s;
  display: block;
}
.mini-card:hover { border-color: var(--border2); }

.mini-screen {
  background: var(--c, #1a3a6b);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
}

.mini-info {
  padding: 10px 12px;
  background: var(--bg2);
}

.mini-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.mini-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.06em;
}

.view-all-row {
  display: flex;
  justify-content: flex-end;
}

/* ── games list page ──────────────────────────────────────────── */
.page-header {
  padding: 48px 32px 24px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--cond);
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
  margin-top: 12px;
}

.games-list {
  padding: 40px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.game-entry {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.game-entry:hover { border-color: var(--border2); }

.featured-entry { border-color: var(--accent2); }
.featured-entry:hover { border-color: var(--accent); }

.game-screen {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.game-screen-lopr {
  background: #050d14;
}
.game-screen-lopr::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 70%, rgba(0,200,255,0.07) 0%, transparent 60%);
}

.latest-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #000;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 2px;
}

.game-info {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 1px solid var(--border);
  background: var(--bg2);
}

.game-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-jam-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border: 1px solid var(--border2);
  color: var(--amber);
  border-color: rgba(245,166,35,0.3);
  border-radius: 2px;
}

.game-engine-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border: 1px solid var(--border2);
  color: var(--text3);
  border-radius: 2px;
}

.game-title-lg {
  font-family: var(--cond);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

.game-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 580px;
}

.game-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.game-details li {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  gap: 8px;
}

.game-details li span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text3);
  width: 56px;
  flex-shrink: 0;
  padding-top: 2px;
}

.game-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.divider-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}
.divider-rule::before,
.divider-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider-rule span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text3);
  white-space: nowrap;
}

/* ── art page ─────────────────────────────────────────────────── */
.art-section {
  padding: 40px 32px 64px;
}

.art-intro {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 40px;
}

.art-categories {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 48px;
}

.art-category-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text3);
  margin-bottom: 16px;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.art-placeholder {
  aspect-ratio: 1;
  background: var(--bg3);
  border: 1px dashed var(--border2);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text3);
  font-size: 12px;
  font-family: var(--mono);
  text-align: center;
  padding: 12px;
}

.art-placeholder-sub {
  font-size: 10px;
  color: var(--border2);
}

.art-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.art-cta-text {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text3);
}

/* ── footer ───────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text3);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text3);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent); }

/* ── entrance animations ──────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag    { animation: fadeUp 0.4s ease both; }
.hero-name   { animation: fadeUp 0.4s 0.1s ease both; }
.hero-bio    { animation: fadeUp 0.4s 0.2s ease both; }
.hero-stats  { animation: fadeUp 0.4s 0.3s ease both; }
.featured-card { animation: fadeUp 0.5s 0.1s ease both; }
.game-entry  { animation: fadeUp 0.4s ease both; }

/* ── responsive ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 16px 20px; gap: 16px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  .hero { grid-template-columns: 1fr; padding: 40px 20px 40px; }
  .hero-name { font-size: 72px; }
  .hero-stats { grid-template-columns: repeat(2,1fr); }

  .featured-card { grid-template-columns: 1fr; }
  .featured-screen { border-right: none; border-bottom: 1px solid var(--border2); min-height: 200px; }

  .games-row { grid-template-columns: repeat(2,1fr); }
  .game-entry { grid-template-columns: 1fr; }
  .game-screen { min-height: 140px; }

  .art-grid { grid-template-columns: repeat(2,1fr); }
  .hero { gap: 0 24px; }
  .featured, .recent-games, .games-list, .art-section, .page-header { padding-left: 20px; padding-right: 20px; }
  footer { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 520px) {
  .hero-name { font-size: 56px; }
  .games-row { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: repeat(2,1fr); }
}
