/* ==========================================================================
   DESIGN TOKENS
   Direction: "IDE at 2am" — a developer's dark editor, not a generic
   gradient-hero template. Section labels read like real code comments.
   Hero is a terminal window, not a glowing circle badge.
   ========================================================================== */

:root {
  /* -- Palette -- */
  --bg: #0a0e14;
  --bg-alt: #0d1219;
  --surface: #111722;
  --surface-2: #161d2b;
  --border: #232b3a;
  --border-soft: #1a2130;

  --text: #e8ecf4;
  --text-dim: #8892a4;
  --text-faint: #545e70;

  --accent: #45e0c4;      /* electric teal — cursor / prompt */
  --accent-2: #7c8cff;    /* indigo — secondary gradient stop */
  --accent-warm: #ffb454; /* amber — status / warnings */
  --danger: #ff6b6b;

  --gradient: linear-gradient(120deg, var(--accent), var(--accent-2));

  /* -- Type -- */
  --font-display: 'Space Grotesk', 'Poppins', sans-serif;
  --font-body: 'Inter', 'Poppins', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* -- Rhythm -- */
  --section-pad: 7rem;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 0 1px var(--border), 0 20px 40px -20px rgba(0,0,0,.6);
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --border: #e1e5ee;
  --border-soft: #eaedf4;

  --text: #131722;
  --text-dim: #5a6478;
  --text-faint: #9aa3b5;

  --shadow-glow: 0 0 0 1px var(--border), 0 20px 40px -20px rgba(20,25,45,.15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
  overflow-x: hidden;
}

/* faint code-pattern backdrop, not a loud image */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(69,224,196,.06), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(124,140,255,.06), transparent 40%);
  pointer-events: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* -- Reusable primitives -- */

.section { padding: var(--section-pad) 0; position: relative; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  background: rgba(69, 224, 196, .08);
  border: 1px solid rgba(69, 224, 196, .18);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow::before { content: "//"; color: var(--text-faint); }

.section-head { text-align: center; margin-bottom: 3.5rem; }
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: .6rem;
}
.section-head h2 .accent { color: var(--accent); }
.section-head p { color: var(--text-dim); font-size: 1.02rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(69,224,196,.35);
  box-shadow: var(--shadow-glow);
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient);
  color: #061019;
  box-shadow: 0 10px 30px -10px rgba(69,224,196,.45);
}
.btn-primary:hover { box-shadow: 0 14px 34px -8px rgba(69,224,196,.6); }

.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  padding: 13px 8px;
}
.btn-ghost:hover { color: var(--accent); }

/* progress bar + back to top */
#progressBar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--gradient); z-index: 2000; transition: width .1s ease;
}

#backToTop {
  position: fixed; right: 24px; bottom: 24px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .25s ease; z-index: 900;
}
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#backToTop:hover { background: var(--accent); color: #061019; border-color: var(--accent); }
