:root {
  --bg: #0f0e17;
  --bg-alt: #16151f;
  --surface: #1c1b28;
  --surface-2: #232232;
  --border: #2e2c3f;
  --text: #eceaf5;
  --muted: #a29fb8;
  --accent: #7c5cff;
  --accent-2: #16d5a8;
  --grad: linear-gradient(100deg, #7c5cff 0%, #16d5a8 100%);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.6);
  --radius: 18px;
  --maxw: 1140px;
}

[data-theme="light"] {
  --bg: #f6f5fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0eefa;
  --border: #e3e0f0;
  --text: #191826;
  --muted: #5f5b73;
  --shadow: 0 18px 50px -24px rgba(80, 60, 160, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.08; letter-spacing: -0.01em; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 48px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--grad);
  box-shadow: 0 0 18px -2px var(--accent);
}
.brand-name { font-family: "Fraunces", serif; font-weight: 900; font-size: 1.25rem; }
.brand-name span { color: var(--accent-2); }
.brand-name.small { font-size: 1.05rem; }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.2s, background 0.2s;
}
.theme-toggle:hover { transform: rotate(-20deg); background: var(--surface-2); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) clamp(20px, 5vw, 48px) 60px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% 0 auto 50%;
  transform: translateX(-50%);
  width: 640px; height: 640px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 32%, transparent), transparent 62%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 900; }
.hero-sub {
  max-width: 620px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.subscribe {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 34px auto 0;
}
.subscribe input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.subscribe input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.subscribe button {
  padding: 14px 22px;
  border-radius: 12px;
  border: none;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, filter 0.2s;
}
.subscribe button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.hero-note { color: var(--muted); font-size: 0.85rem; margin-top: 12px; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 6vw, 68px);
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
}
.hero-stats span { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- feed sections ---------- */
.feed { padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 48px); }
.feed.alt { background: var(--bg-alt); }
.section-head { max-width: var(--maxw); margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 900; }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 560px; font-size: 1.05rem; }

.cards {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
  opacity: 0;
  transform: translateY(18px);
}
.card.in { opacity: 1; transform: none; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }

.card-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.card h3 { font-size: 1.22rem; font-weight: 600; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card-meta { margin-top: auto; display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 0.82rem; }
.card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

/* tooling cards */
.tools .card { flex-direction: column; }
.tool-top { display: flex; align-items: center; gap: 12px; }
.tool-logo {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 1.1rem; color: #fff;
  font-family: "Fraunces", serif;
}
.tool-price { margin-left: auto; font-size: 0.82rem; color: var(--accent-2); font-weight: 600; }
.rating { color: var(--accent-2); letter-spacing: 2px; font-size: 0.9rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: clamp(56px, 8vw, 90px) clamp(20px, 5vw, 48px) 40px; }
.footer-cta { max-width: 640px; margin: 0 auto; text-align: center; }
.footer-cta h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 900; }
.footer-cta .subscribe { margin-top: 26px; }
.footer-meta {
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 620px) {
  .nav { display: none; }
  .subscribe { flex-direction: column; }
}
