/* ── Design tokens & global reset ─────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Light theme (default) ─────────────────────────────────────── */
:root {
  --bg:            #fafaf8;
  --surface:       #ffffff;
  --surface2:      #f2f0eb;
  --accent:        #d97706;
  --accent2:       #f59e0b;
  --green:         #16a34a;
  --text:          #1c1917;
  --muted:         #78716c;
  --text-secondary:#57534e;
  --border:        rgba(0, 0, 0, 0.08);
  --nav-bg:        rgba(250, 250, 248, 0.92);
  --radius:        12px;
  --gap:           clamp(2.5rem, 6vw, 5rem);
  --track-lane:    rgba(180, 120, 20, 0.18);
  --track-line:    rgba(180, 120, 20, 0.35);
}

/* ── Dark theme ────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:            #131210;
  --surface:       #1c1a17;
  --surface2:      #252219;
  --accent:        #f59e0b;
  --accent2:       #fbbf24;
  --green:         #4ade80;
  --text:          #f5f0e8;
  --muted:         #a8a29e;
  --text-secondary:#d6cfc7;
  --border:        rgba(255, 255, 255, 0.07);
  --nav-bg:        rgba(19, 18, 16, 0.90);
  --track-lane:    rgba(245, 158, 11, 0.07);
  --track-line:    rgba(245, 158, 11, 0.22);
}

/* ── Respect system preference when no explicit override ───────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #131210;
    --surface:       #1c1a17;
    --surface2:      #252219;
    --accent:        #f59e0b;
    --accent2:       #fbbf24;
    --green:         #4ade80;
    --text:          #f5f0e8;
    --muted:         #a8a29e;
    --text-secondary:#d6cfc7;
    --border:        rgba(255, 255, 255, 0.07);
    --nav-bg:        rgba(19, 18, 16, 0.90);
    --track-lane:    rgba(245, 158, 11, 0.07);
    --track-line:    rgba(245, 158, 11, 0.22);
  }
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
}

/* Lift all real content above the ambient background layer (z-index:0) */
body > [aria-hidden="false"],
body > :not([aria-hidden]):not(nav) {
  position: relative;
  z-index: 1;
}

img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent2);
}

/* ── Layout helpers ────────────────────────────────────────────── */

.container {
  width: min(100%, 1060px);
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 4vw, 2.5rem);
}

section {
  padding-block: var(--gap);
}

/* ── Typography ────────────────────────────────────────────────── */

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.025em;
  margin-bottom: .6rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .35rem;
}

p {
  color: var(--text-secondary);
}

p + p {
  margin-top: .8rem;
}

/* ── Tag pill ──────────────────────────────────────────────────── */

.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(79, 142, 247, .12);
  border: 1px solid rgba(79, 142, 247, .25);
  border-radius: 999px;
  padding: .28em .9em;
  margin-bottom: 1rem;
}

/* ── Shared card ───────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.card .icon {
  width: 1.8rem;
  height: 1.8rem;
  margin-bottom: .8rem;
  color: var(--accent);
}

.card .icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
}
