/* ============================================================
   Game API Connect Device Admin — Portfolio styles
   Dark technical theme, neon accents, mobile-first
   ============================================================ */

:root {
  --bg: #0f0f0f;
  --bg-alt: #151515;
  --surface: #1a1a1a;
  --surface-2: #202024;
  --border: #2a2a2e;
  --text: #e0e0e0;
  --muted: #8b8b8b;
  --blue: #00d4ff;
  --green: #39ff14;
  --purple: #b026ff;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px;
  --maxw: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 15, 15, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { flex: none; }
.brand-text {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1rem;
}
.brand-accent { color: var(--blue); }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta {
  color: var(--blue);
  border: 1px solid rgba(0, 212, 255, 0.4);
  padding: 7px 16px;
  border-radius: 8px;
}
.site-nav .nav-cta:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--blue);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #0aa9cc);
  color: #04121a;
  box-shadow: 0 0 0 rgba(0, 212, 255, 0);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.35);
}
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 90px 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: saturate(1.1);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 500px at 75% 20%, rgba(0, 212, 255, 0.12), transparent 60%),
    radial-gradient(800px 500px at 20% 80%, rgba(176, 38, 255, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(15,15,15,0.75) 0%, rgba(15,15,15,0.92) 100%);
}
.hero-inner { position: relative; max-width: 780px; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--green);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 18px;
  letter-spacing: -1px;
  background: linear-gradient(120deg, #ffffff 20%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.hero-code {
  font-family: var(--mono);
  font-size: 0.86rem;
  background: rgba(20, 20, 24, 0.85);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  padding: 18px 20px;
  max-width: 460px;
  overflow-x: auto;
  color: var(--text);
}

/* ---------- Code syntax tokens ---------- */
.c-key { color: var(--purple); }
.c-path { color: var(--blue); }
.c-str { color: var(--green); }
.c-val { color: #ffc55c; }
.c-brace { color: var(--muted); }
.c-com { color: #5f7a6a; font-style: italic; }
.c-fn { color: var(--blue); }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.kicker {
  font-family: var(--mono);
  color: var(--purple);
  font-size: 0.85rem;
  letter-spacing: 1px;
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 8px 0 12px;
  letter-spacing: -0.5px;
}
.section-lead { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- Architecture ---------- */
.arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.arch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.arch-list li {
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  background: var(--surface);
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.arch-list li:nth-child(2) { border-left-color: var(--green); }
.arch-list li:nth-child(3) { border-left-color: var(--purple); }
.arch-list li:nth-child(4) { border-left-color: var(--blue); }
.arch-list li:nth-child(5) { border-left-color: var(--green); }
.arch-list li:hover { transform: translateX(4px); }
.arch-list h3 { margin: 0 0 4px; font-size: 1.05rem; }
.arch-list p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.arch-visual { display: grid; gap: 22px; position: sticky; top: 84px; }
.diagram {
  border: 1px solid var(--border);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(0,212,255,0.06), transparent 70%),
    var(--surface);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}
.diagram-node {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.node-gateway { border-color: rgba(0,212,255,0.5); color: var(--blue); }
.node-pipe { border-color: rgba(176,38,255,0.5); color: var(--purple); }
.node-db { border-color: rgba(57,255,20,0.5); color: var(--green); }
.diagram-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diagram-arrow { color: var(--muted); margin: 10px 0; font-size: 1.1rem; }

.code-block {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: #0c0c0e;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0;
  line-height: 1.7;
}

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--blue));
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
}
.feature-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--accent, var(--blue));
  background: color-mix(in srgb, var(--accent, var(--blue)) 14%, transparent);
  margin-bottom: 16px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- Showcase ---------- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.shot:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(0,0,0,0.55); }
.shot-mock {
  height: 190px;
  position: relative;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.5)),
    var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock-topbar { height: 10px; border-radius: 4px; background: linear-gradient(90deg, var(--blue), transparent 60%); opacity: 0.7; }
.mock-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.mock-stats span { height: 40px; border-radius: 6px; background: #2b2b31; border: 1px solid var(--border); }
.mock-chart { flex: 1; border-radius: 6px; background:
  repeating-linear-gradient(90deg, rgba(0,212,255,0.14) 0 6px, transparent 6px 16px), #17171b; }
.mock-rows { display: grid; gap: 8px; }
.mock-rows span { height: 24px; border-radius: 5px; background: #232329; border-left: 3px solid var(--green); }
.mock-bars { flex: 1; display: flex; align-items: flex-end; gap: 8px; }
.mock-bars i { flex: 1; background: linear-gradient(180deg, var(--purple), rgba(176,38,255,0.2)); border-radius: 4px 4px 0 0; }
.mock-bars i:nth-child(1){height:40%} .mock-bars i:nth-child(2){height:70%}
.mock-bars i:nth-child(3){height:55%} .mock-bars i:nth-child(4){height:85%}
.mock-bars i:nth-child(5){height:60%} .mock-bars i:nth-child(6){height:75%}
.mock-tree { display: grid; gap: 8px; }
.mock-tree span { height: 14px; border-radius: 4px; background: #2b2b31; }
.mock-tree span:nth-child(2){ width: 80%; margin-left: 14px; }
.mock-tree span:nth-child(3){ width: 60%; margin-left: 14px; }
.mock-json { flex: 1; border-radius: 6px; background:
  repeating-linear-gradient(0deg, rgba(57,255,20,0.10) 0 3px, transparent 3px 12px), #17171b; }
.shot figcaption {
  padding: 14px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.shot-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--blue);
  border: 1px solid rgba(0,212,255,0.4);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ---------- Tech Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.stack-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.stack-col h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--blue);
  font-family: var(--mono);
}
.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 6px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0b0b0b;
  border-top: 1px solid var(--border);
  padding-top: 54px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
}
.footer-brand { max-width: 420px; }
.footer-brand p { color: var(--muted); font-size: 0.94rem; margin: 12px 0 0; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--muted); font-weight: 500; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 20px;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--mono);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .arch-grid { grid-template-columns: 1fr; }
  .arch-visual { position: static; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(15,15,15,0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav.open { max-height: 340px; }
  .site-nav a { width: 100%; padding: 12px 0; }
  .site-nav .nav-cta { width: auto; margin-top: 6px; }
}

@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .hero { padding: 70px 0; min-height: auto; }
  .feature-grid, .shot-grid, .stack-grid { grid-template-columns: 1fr; }
  .hero-code { max-width: 100%; }
  .footer-inner { flex-direction: column; }
}
