/* ============================================
   NathGate — a learning lab
   Edit the variables below to tweak the look.
   ============================================ */

:root {
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --accent: #6d28d9;
  --on-accent: #ffffff;
  --done: #15803d;
  --next: #b45309;
  --border: #d2d2d7;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --card-bg: #ffffff;
  --radius: 18px;
  --max-width: 980px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f5f7;
    --text-secondary: #98989d;
    --bg: #000000;
    --bg-alt: #161617;
    --accent: #a78bfa;
    --on-accent: #1a1033;
    --done: #4ade80;
    --next: #fbbf24;
    --border: #333336;
    --nav-bg: rgba(22, 22, 23, 0.72);
    --card-bg: #1d1d1f;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Navigation ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-name span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 120px 22px 90px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.07;
}

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

.hero .tagline {
  margin-top: 18px;
  font-size: clamp(19px, 3vw, 26px);
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.hero .actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 980px;
  font-size: 15px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-secondary {
  color: var(--accent);
  border: 1px solid var(--accent);
}

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

a.text-link:hover {
  text-decoration: underline;
}

/* ---------- Page sections ---------- */

.page-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 90px 22px 30px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-header p {
  margin: 14px auto 0;
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 620px;
}

section.band {
  padding: 70px 0;
}

section.band.alt {
  background: var(--bg-alt);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

.section-inner h2 {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-inner > p.lede {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 36px;
}

/* ---------- Stats ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.stat-num {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.progress {
  height: 8px;
  border-radius: 980px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 12px;
}

.progress > div {
  height: 100%;
  width: 0;
  background: var(--done);
  transition: width 0.6s ease;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.card .eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.card h3 {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-secondary);
}

.card-foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card .card-link {
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
}

.card .card-link:hover {
  text-decoration: underline;
}

/* ---------- Status badges ---------- */

.badge {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 980px;
  padding: 3px 11px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  white-space: nowrap;
}

.badge.done {
  color: var(--done);
  background: color-mix(in srgb, var(--done) 14%, transparent);
}

.badge.next {
  color: var(--next);
  background: color-mix(in srgb, var(--next) 14%, transparent);
}

/* ---------- Filters & search ---------- */

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

span.filter-pill {
  cursor: default;
  pointer-events: none;
}

.search {
  width: 100%;
  max-width: 420px;
  font: inherit;
  font-size: 15px;
  padding: 9px 16px;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
}

.search:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.feed-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 20px;
}

.empty {
  color: var(--text-secondary);
  font-size: 15px;
  padding: 20px 0;
}

/* ---------- Simple lists ---------- */

.item-list {
  list-style: none;
  margin-top: 24px;
}

.item-list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.item-list li:last-child {
  border-bottom: none;
}

.item-list .item-title {
  font-size: 17px;
  font-weight: 600;
}

.item-list .item-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---------- Notes (journal) ---------- */

.note-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 20px;
  padding: 28px 32px;
  margin-top: 22px;
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.note-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.note-body p {
  font-size: 16px;
  margin-bottom: 12px;
}

.note-body p:last-child {
  margin-bottom: 0;
}

.note-related {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 34px 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

footer a {
  color: var(--text-secondary);
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  .nav-links {
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links a {
    white-space: nowrap;
  }
  .hero {
    padding: 80px 22px 60px;
  }
  .page-header {
    padding: 60px 22px 20px;
  }
  .note-card {
    padding: 22px 20px;
  }
}
