/* ── Theme tokens ──────────────────────────────────── */
:root {
  --accent:     #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --accent-glow:rgba(34, 211, 238, 0.25);
  --bg:         #0b1120;
  --bg-card:    #111827;
  --border:     rgba(255, 255, 255, 0.07);
  --border-hover: rgba(34, 211, 238, 0.35);
  --text:       #e2e8f0;
  --text-dim:   #94a3b8;
  --shadow:     0 8px 32px rgba(0, 0, 0, 0.5);
  --grid-line:  rgba(255, 255, 255, 0.035);
}

[data-theme="light"] {
  --accent:     #0284c7;
  --accent-dim: rgba(2, 132, 199, 0.10);
  --accent-glow:rgba(2, 132, 199, 0.18);
  --bg:         #f0f4f8;
  --bg-card:    #ffffff;
  --border:     rgba(0, 0, 0, 0.09);
  --border-hover: rgba(2, 132, 199, 0.40);
  --text:       #0f172a;
  --text-dim:   #64748b;
  --shadow:     0 8px 32px rgba(0, 0, 0, 0.10);
  --grid-line:  rgba(0, 0, 0, 0.045);
}

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

/* ── Base ──────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ── Header ────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  user-select: none;
}

.logo span {
  color: var(--text-dim);
  font-weight: 400;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.04);
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Main layout ───────────────────────────────────── */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 72px 24px 120px;
}

/* ── Hero ──────────────────────────────────────────── */
.hero {
  margin-bottom: 72px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 460px;
  line-height: 1.7;
}

/* ── Section label ─────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Card grid ─────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.22s ease;
  border-radius: 16px 16px 0 0;
}

.card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent-glow);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.card:hover::before { opacity: 1; }
.card:hover::after  { opacity: 1; }

.card-emoji {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 18px;
  display: block;
  user-select: none;
}

.card-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  width: fit-content;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
}

.card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 22px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-link-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s;
}

.card:hover .card-link-label { gap: 9px; }

.card-link-label svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.card:hover .card-link-label svg {
  transform: translate(2px, -2px);
}

/* ── Footer ────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 28px 24px;
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  letter-spacing: 0.02em;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 560px) {
  header { padding: 12px 16px; }
  main   { padding: 48px 16px 80px; }
  .card-grid { grid-template-columns: 1fr; }
}
