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

:root {
  --bg:        #0d0d16;
  --surface:   #13131f;
  --card:      #17172a;
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(124,106,255,0.32);
  --text:      rgba(255,255,255,0.9);
  --muted:     rgba(255,255,255,0.48);
  --hint:      rgba(255,255,255,0.26);
  --accent:    #7c6aff;
  --accent2:   #ff6ab0;
  --radius:    8px;
  --status-h:  40px;
  --font-body: "Segoe UI Variable","Segoe UI",system-ui,sans-serif;
  --font-mono: "Cascadia Code","Cascadia Mono","Courier New",Courier,monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: var(--status-h);
}

/* ── Background canvas ────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

/* ── Pill nav ─────────────────────────────────────────────── */
#pill-nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(13,13,22,0.92);
  border: 0.5px solid rgba(124,106,255,0.2);
  border-radius: 100px;
  display: flex;
  align-items: center;
  padding: 4px;
  gap: 2px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  white-space: nowrap;
}

.nav-logo { display: none; }
.nav-sep  { display: none; }

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 100px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-link i    { font-size: 16px; line-height: 1; }
.nav-link span { display: none; }

.nav-link.active,
.nav-link:hover {
  background: rgba(124,106,255,0.14);
  color: #c4b5fd;
}

@media (min-width: 680px) {
  .nav-logo {
    display: block;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-body);
    color: #c4b5fd;
    padding: 5px 14px;
    border-radius: 100px;
    text-decoration: none;
    letter-spacing: 0.02em;
  }
  .nav-sep {
    display: block;
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.08);
    margin: 0 2px;
    flex-shrink: 0;
  }
  .nav-link {
    width: auto;
    height: auto;
    padding: 5px 13px;
  }
  .nav-link i    { display: none; }
  .nav-link span {
    display: inline;
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0;
  }
}

/* ── Terminal hero ────────────────────────────────────────── */
#terminal {
  height: 100vh;
  height: 100dvh;
  padding: 66px 12px calc(var(--status-h) + 10px);
  display: flex;
  flex-direction: column;
}

@media (min-width: 680px) {
  #terminal { padding: 66px 20px calc(var(--status-h) + 14px); }
}
@media (min-width: 1000px) {
  #terminal { padding: 72px clamp(20px, 6vw, 100px) calc(var(--status-h) + 16px); }
}

/* ── Terminal window ──────────────────────────────────────── */
.term-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0f0f1a;
  border-radius: var(--radius);
  border: 0.5px solid rgba(124,106,255,0.18);
  font-family: var(--font-mono);
  overflow: hidden;
  min-height: 0;
}

.term-bar {
  background: #161622;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.term-dot   { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.term-dot-r { background: #ff5f57; }
.term-dot-y { background: #febc2e; }
.term-dot-g { background: #28c840; }

.term-titlebar {
  color: rgba(255,255,255,0.25);
  font-size: 11px;
  margin-left: auto;
  letter-spacing: 1.5px;
}

.term-body {
  flex: 1;
  padding: 12px 14px;
  overflow-y: auto;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,106,255,0.2) transparent;
  min-height: 0;
}
.term-body::-webkit-scrollbar { width: 4px; }
.term-body::-webkit-scrollbar-thumb { background: rgba(124,106,255,0.2); border-radius: 2px; }

.term-line { font-size: clamp(10px, 2.6vw, 13px); line-height: 1.5; white-space: pre; }
.t-muted   { color: rgba(255,255,255,0.22); }
.t-output  { color: rgba(255,255,255,0.65); }
.t-accent  { color: #7c6aff; }
.t-pink    { color: #ff6ab0; }
.t-green   { color: #4ade80; }
.t-yellow  { color: #fbbf24; }
.t-error   { color: #f87171; }
.t-cyan    { color: #22d3ee; }

.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 0.5px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.18);
  flex-shrink: 0;
}

.term-prompt-sym {
  color: #7c6aff;
  font-size: 13px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.term-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.88);
  font-family: var(--font-mono);
  font-size: clamp(10px, 2.6vw, 13px);
  caret-color: #7c6aff;
  min-width: 0;
}

.term-hints {
  display: flex;
  gap: 5px;
  padding: 7px 14px 9px;
  flex-wrap: wrap;
  background: rgba(0,0,0,0.12);
  flex-shrink: 0;
  border-top: 0.5px solid rgba(255,255,255,0.04);
}

.term-hint-btn {
  background: rgba(124,106,255,0.08);
  border: 0.5px solid rgba(124,106,255,0.22);
  color: #a090ff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.term-hint-btn:hover {
  background: rgba(124,106,255,0.16);
  border-color: rgba(124,106,255,0.4);
  color: #c4b5fd;
}

/* ── Scroll cue ───────────────────────────────────────────── */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11px;
  flex-shrink: 0;
  animation: cue-bob 2.5s ease-in-out infinite;
}

@keyframes cue-bob {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%       { opacity: 0.55; transform: translateY(3px); }
}

/* ── Content sections ─────────────────────────────────────── */
main > section:not(#terminal) {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-block: clamp(4rem, 10vh, 7rem);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; font-family: var(--font-body); }

.section-head        { margin-bottom: 0.5rem; }
.section-head h2     { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 600; }
.section-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 460px;
  line-height: 1.65;
}

/* ── Fluent 2 Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.12);
  color: var(--text);
  border-radius: var(--radius);
  padding: 7px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover  { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.btn:active { background: rgba(255,255,255,0.03); transform: scale(0.98); }

.btn-accent {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-weight: 500;
}
.btn-accent:hover  { background: #6b5be0; border-color: transparent; }
.btn-accent:active { background: #5a4cca; }

.btn-subtle {
  background: transparent;
  border-color: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 12px;
  padding: 4px 12px;
}
.btn-subtle:hover { background: rgba(255,255,255,0.05); color: var(--text); border-color: rgba(255,255,255,0.16); }

/* ── Card grid ────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: default;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(124,106,255,0.1), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(124,106,255,0.3);
  background: #1c1c30;
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }

.card-icon          { font-size: 1.75rem; margin-bottom: 0.85rem; display: block; }
.card h3            { font-size: 1rem; font-weight: 600; margin-bottom: 0.45rem; }
.card p             { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

.card-tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a090ff;
  background: rgba(124,106,255,0.1);
  border: 0.5px solid rgba(124,106,255,0.25);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

/* ── Bento grid ───────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 140px;
  gap: 1rem;
  margin-top: 2.5rem;
}

.bento-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.bento-card:hover {
  border-color: rgba(124,106,255,0.28);
  background: #1c1c30;
  transform: translateY(-2px);
}

.bento-card .label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.bento-card h3 { font-size: 1rem; font-weight: 600; }
.bento-card p  { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.col-span-5  { grid-column: span 5; }
.col-span-7  { grid-column: span 7; }
.col-span-4  { grid-column: span 4; }
.col-span-8  { grid-column: span 8; }
.col-span-6  { grid-column: span 6; }
.col-span-12 { grid-column: span 12; }
.row-span-2  { grid-row: span 2; }

.bento-accent {
  background: rgba(124,106,255,0.1);
  border-color: rgba(124,106,255,0.22);
}
.bento-accent:hover {
  background: rgba(124,106,255,0.15);
  border-color: rgba(124,106,255,0.35);
}

.bento-card .deco {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 2.75rem;
  opacity: 0.16;
  transition: opacity 0.3s, transform 0.3s;
}
.bento-card:hover .deco { opacity: 0.28; transform: scale(1.08) rotate(-4deg); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  width: min(1100px, 92vw);
  margin-inline: auto;
  border-top: 0.5px solid var(--border);
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
}

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.7; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .col-span-5, .col-span-7, .col-span-4,
  .col-span-8, .col-span-6 { grid-column: span 12; }
  .row-span-2  { grid-row: span 1; }
  .bento       { grid-auto-rows: auto; }
}

/* ── Status Bar ───────────────────────────────────────────── */
#status-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  font-family: var(--font-body);
}

#sb-collapsed {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1.25rem;
  height: var(--status-h);
  background: rgba(10,10,20,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 0.5px solid rgba(124,106,255,0.2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.sb-dot        { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.sb-dot-green  { background: #4ade80; }
.sb-dot-yellow { background: #fbbf24; animation: pulse 1.5s ease-in-out infinite; }
.sb-dot-red    { background: #f87171; }

.sb-status-label { color: var(--text); font-weight: 500; font-size: 12px; }
.sb-sep          { opacity: 0.2; }
.sb-sha-inline   { color: var(--accent); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; }

#sb-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  padding: 0 0.2rem;
  flex-shrink: 0;
}
.sb-spark-bar {
  width: 4px;
  background: var(--accent);
  border-radius: 1px 1px 0 0;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.sb-toggle-btn {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sb-toggle-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); border-color: rgba(255,255,255,0.2); }

#sb-panel {
  max-height: 0;
  overflow: hidden;
  background: rgba(10,10,20,0.99);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 0.5px solid rgba(255,255,255,0.06);
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#status-bar.sb-expanded #sb-panel { max-height: 300px; }

.sb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  border-bottom: 0.5px solid rgba(255,255,255,0.05);
}
.sb-panel-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.sb-panel-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1rem 1.25rem 1.25rem;
  max-height: 240px;
  overflow-y: auto;
  font-size: 12px;
}

.sb-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.sb-deploy-status { font-size: 13px; font-weight: 600; margin-bottom: 0.3rem; }
.sb-deploy-msg    { color: var(--text); font-size: 12px; margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-deploy-meta   { color: var(--muted); font-size: 11px; line-height: 1.5; }
.sb-link          { color: var(--accent); text-decoration: none; }
.sb-link:hover    { text-decoration: underline; }

.sb-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 56px;
  margin-top: 0.25rem;
}
.sb-bar-wrap { flex: 1; display: flex; align-items: flex-end; cursor: default; }
.sb-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  transition: filter 0.15s;
  min-height: 4px;
  opacity: 0.55;
}
.sb-bar-wrap:hover .sb-bar { filter: brightness(1.35); opacity: 1 !important; }

.sb-commits-list { overflow-y: auto; max-height: 200px; }
.sb-commit {
  padding: 0.35rem 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
}
.sb-commit:last-child { border-bottom: none; }
.sb-commit-msg {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}
.sb-commit-meta {
  display: flex;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 11px;
  align-items: center;
}
.sb-sha-pill {
  background: rgba(124,106,255,0.12);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-family: var(--font-mono);
  text-decoration: none;
  flex-shrink: 0;
}
.sb-sha-pill:hover { background: rgba(124,106,255,0.25); }

@media (max-width: 700px) {
  .sb-panel-body { grid-template-columns: 1fr; }
  #sb-sparkline  { display: none; }
}

/* ── Clippy mascot ────────────────────────────────────────── */
#sb-clippy {
  height: 28px;
  width: auto;
  flex-shrink: 0;
  pointer-events: none;
  image-rendering: auto;
}

/* ── Arcade / Play section ────────────────────────────────── */
.arcade-wrap { margin-top: 2rem; }

.arcade-screen {
  position: relative;
  width: 100%;
  height: clamp(420px, 56vh, 620px);
  background: #07070f;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 0.5px solid var(--border);
  border-bottom: none;
  overflow: hidden;
}

.arcade-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 3;
}

#game-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  z-index: 1;
}

.arcade-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--muted);
  font-family: var(--font-mono);
  user-select: none;
  z-index: 2;
}
.arcade-ph-icon {
  font-size: 2.5rem;
  opacity: 0.22;
  animation: cue-bob 3s ease-in-out infinite;
}
.arcade-placeholder p {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.28;
  font-family: var(--font-body);
}

/* ── Arcade meta bar ──────────────────────────────────────── */
.arcade-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
  height: 36px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  background: rgba(10,10,18,0.97);
  border: 0.5px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  flex-wrap: nowrap;
  overflow: hidden;
}
#arcade-meta-name  { color: var(--text); font-weight: 600; white-space: nowrap; }
.arcade-meta-sep   { opacity: 0.18; flex-shrink: 0; }
#arcade-meta-controls { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.arcade-meta-link {
  margin-left: auto;
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  opacity: 0.7;
  flex-shrink: 0;
  display: none;
}
.arcade-meta-link:hover { opacity: 1; text-decoration: underline; }

.arcade-fs-btn {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  color: var(--muted);
  font-size: 12px;
  width: 26px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.arcade-fs-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }

@media (max-width: 680px) {
  .arcade-screen { height: 42vh; min-height: 300px; }
}

/* ── Game shelf ───────────────────────────────────────────── */
#game-grid {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 1rem 0 0.5rem;
  margin-top: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,106,255,0.2) transparent;
}
#game-grid::-webkit-scrollbar { height: 4px; }
#game-grid::-webkit-scrollbar-thumb { background: rgba(124,106,255,0.2); border-radius: 2px; }

/* ── Game card ────────────────────────────────────────────── */
.game-card {
  --game-accent: #7c6aff;
  flex: 0 0 auto;
  width: 155px;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.game-card:hover {
  border-color: var(--game-accent);
  background: #1c1c30;
  transform: translateY(-2px);
}
.game-card-active {
  border-color: var(--game-accent) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--game-accent) 25%, transparent);
}
.game-card-screen {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08080f;
  border-bottom: 0.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.game-card-screen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--game-accent);
}
.game-card-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.06) 3px, rgba(0,0,0,0.06) 6px
  );
}
.game-card-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--game-accent);
  text-align: center;
  padding: 0 8px;
  position: relative;
  z-index: 1;
}
.game-card-body     { padding: 0.6rem 0.7rem 0.7rem; }
.game-card-row      { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.3rem; }
.game-card-year     { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.game-card-tag      { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--game-accent); border: 0.5px solid var(--game-accent); border-radius: 999px; padding: 0.1rem 0.42rem; opacity: 0.75; }
.game-card-desc     { font-size: 0.7rem; color: var(--muted); line-height: 1.4; margin-bottom: 0.3rem; font-family: var(--font-body); }
.game-card-ctrl     { font-family: var(--font-mono); font-size: 0.6rem; color: var(--hint); }

/* ── Arcade launch overlay ────────────────────────────────── */
.arcade-launch {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7,7,15,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.arcade-launch.active { opacity: 1; pointer-events: auto; }
.arcade-launch-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1.5rem;
}
.arcade-launch-game {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.arcade-launch-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
  font-family: var(--font-body);
}
.arcade-launch-controls {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.85rem;
  letter-spacing: 0.03em;
  margin-top: 0.15rem;
}
.arcade-launch-btn {
  margin-top: 0.5rem;
  background: var(--accent);
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.arcade-launch-btn:hover  { background: #6b5be0; }
.arcade-launch-btn:active { background: #5a4cca; transform: scale(0.97); }
.arcade-launch-note {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--hint);
  letter-spacing: 0.04em;
}

/* ── Tool Cards ─────────────────────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.tool-card:hover {
  border-color: var(--border-hi);
  background: #1c1c30;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

.tool-preview {
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
}
.tool-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tool-body {
  padding: 0.75rem 0.85rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tool-tag {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-light, #a090ff);
  border: 0.5px solid rgba(124,106,255,0.3);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.tool-body h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.tool-body p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.tool-url {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--hint);
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .tool-body  { padding: 0.6rem 0.7rem; }
}
@media (max-width: 400px) {
  .tool-grid { grid-template-columns: 1fr; }
}
