/* ============================================================
   COPILOT SHOWCASE — V3
   G3-inspired: minimal, editorial, warm dark
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Mono&display=swap');

:root {
  /* Background palette — warm dark */
  --bg:          #141c1f;
  --bg2:         #1e2a2f;
  --bg3:         #233035;
  --bg-warm:     #22201e;

  /* Text */
  --text:        #f0ede8;
  --text-dim:    rgba(240, 237, 232, 0.72);
  --text-muted:  rgba(240, 237, 232, 0.48);

  /* Accent — warm gold */
  --accent:      #c8a97e;
  --accent-dim:  rgba(200, 169, 126, 0.15);
  --accent-glow: rgba(200, 169, 126, 0.3);

  /* Borders */
  --border:      rgba(240, 237, 232, 0.14);
  --border-mid:  rgba(240, 237, 232, 0.26);

  /* Category colours — increased saturation and opacity */
  --cat-dev:     rgba(80, 160, 220, 1.0);
  --cat-quality: rgba(100, 190, 110, 1.0);
  --cat-test:    rgba(220, 165, 80, 1.0);
  --cat-docs:    rgba(155, 115, 220, 1.0);
  --cat-devops:  rgba(220, 100, 100, 1.0);
  --cat-db:      rgba(80, 195, 195, 1.0);
  --cat-front:   rgba(190, 145, 220, 1.0);
  --cat-learn:   rgba(155, 210, 100, 1.0);

  /* Diff badges */
  --diff-beginner:     rgba(100, 200, 140, 0.15);
  --diff-beginner-c:   #7ecba1;
  --diff-intermediate: rgba(200, 169, 126, 0.15);
  --diff-intermediate-c: #c8a97e;
  --diff-advanced:     rgba(200, 100, 100, 0.15);
  --diff-advanced-c:   #d98080;

  --green: #7ecba1;

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'Space Mono', monospace;

  /* Layout */
  --container-max: 1320px;
  --container-pad: 80px;
  --section-gap:   140px;
  --nav-height:    80px; /* Estimated navbar height */

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t:    0.35s;
}

/* ── Light mode ── */
body.light-mode {
  --bg:         #f4f1ec;
  --bg2:        #ece8e0;
  --bg3:        #ffffff;
  --text:       #1a1714;
  --text-dim:   rgba(26, 23, 20, 0.72);
  --text-muted: rgba(26, 23, 20, 0.48);
  --accent:     #9a6f3a;
  --accent-dim: rgba(154, 111, 58, 0.12);
  --border:     rgba(26, 23, 20, 0.1);
  --border-mid: rgba(26, 23, 20, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Subtle warm texture overlay */
  background-image: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200, 169, 126, 0.07) 0%, transparent 70%);
}

/* Particle canvas */
#particleCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ─── Typography helpers ──────────────────────────────────── */
.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.section-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--text-muted);
}

.section-title {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.pill-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  border-radius: 999px;
  border: 1px solid var(--border-mid);
  background: rgba(240, 237, 232, 0.04);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.pill-button:hover {
  background: rgba(240, 237, 232, 0.10);
  border-color: var(--border-mid);
  transform: translateY(-1px);
}
.pill-button--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}
.pill-button--ghost:hover {
  color: var(--text);
  background: rgba(240, 237, 232, 0.05);
}
.pill-button--submit {
  width: 100%;
  justify-content: center;
  background: var(--accent-dim);
  border-color: var(--accent-glow);
  color: var(--accent);
}
.pill-button--submit:hover {
  background: rgba(200, 169, 126, 0.25);
}

/* Theme toggle */
.btn-theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.btn-theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-mid);
  background: rgba(240, 237, 232, 0.05);
}

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--container-pad);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease, -webkit-backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}
.navbar.scrolled {
  background: rgba(14, 20, 22, 0.55);
  backdrop-filter: blur(32px) saturate(200%) brightness(0.9);
  -webkit-backdrop-filter: blur(32px) saturate(200%) brightness(0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.3);
}
body.light-mode .navbar.scrolled {
  background: rgba(240, 237, 232, 0.55);
  backdrop-filter: blur(32px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(32px) saturate(200%) brightness(1.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.1);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-github-icon {
  font-size: 20px;
  opacity: 0.9;
}
.nav-divider {
  width: 1px;
  height: 14px;
  background: var(--border-mid);
}
.nav-title-main { font-weight: 600; }
.nav-title-sub {
  font-weight: 300;
  color: var(--text-dim);
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-link {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
  transition: color var(--t);
}
.nav-link:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 120px;
  overflow: hidden;
}

/* Mesh gradient blobs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  animation: heroBlob 12s ease-in-out infinite alternate;
}
.hero::before {
  width: 600px;
  height: 600px;
  top: -160px;
  left: -100px;
  background: radial-gradient(circle, rgba(200, 169, 126, 0.18) 0%, transparent 70%);
  animation-delay: 0s;
}
.hero::after {
  width: 500px;
  height: 500px;
  bottom: 0;
  right: -80px;
  background: radial-gradient(circle, rgba(80, 160, 220, 0.13) 0%, transparent 70%);
  animation-delay: -6s;
}

@keyframes heroBlob {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-20px, 50px) scale(0.96); }
}

/* Third blob via wrapper pseudo — use a helper div instead */
.hero-blob-3 {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 40%;
  left: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 115, 220, 0.10) 0%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  animation: heroBlob 15s ease-in-out infinite alternate;
  animation-delay: -3s;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: end;
  padding-bottom: 80px;
}

.hero-title {
  font-size: 88px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.15;
  background: linear-gradient(175deg, var(--text) 0%, rgba(240, 237, 232, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 400px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  width: fit-content;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 28px;
  gap: 4px;
}
.stat-number {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

.hero-cta {
  background: var(--accent-dim);
  border-color: var(--accent-glow);
  color: var(--accent);
}
.hero-cta:hover {
  background: rgba(200, 169, 126, 0.22);
  color: var(--accent);
}

.hero-rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  position: absolute;
  bottom: 0;
}

/* Fade in animations */
.fade-in {
  animation: fadeUp 1.0s var(--ease) forwards;
  opacity: 0;
  transform: translateY(16px);
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Featured Section ───────────────────────────────────── */
.featured-section {
  padding: var(--section-gap) 0;
  position: relative;
  z-index: 1;
}

.featured-track-wrapper {
  overflow: visible;
  padding: 0 var(--container-pad);
}

.featured-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  background: transparent;
}

/* ─── Cards (shared between featured + grid) ─────────────── */
.use-case-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  position: relative;
  box-shadow: none;
  transform: translateY(0);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.use-case-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}
.use-case-card:hover {
  background: var(--bg3);
  border-color: var(--border-mid);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.use-case-card:hover::after { width: 100%; }

.featured-card {
  min-height: 360px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.card-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}
.card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.card-badges {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-category {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(200, 169, 126, 0.2);
}
.badge-difficulty-Beginner {
  background: var(--diff-beginner);
  color: var(--diff-beginner-c);
}
.badge-difficulty-Intermediate {
  background: var(--diff-intermediate);
  color: var(--diff-intermediate-c);
}
.badge-difficulty-Advanced {
  background: var(--diff-advanced);
  color: var(--diff-advanced-c);
}

.card-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #8b6a3e);
  margin-bottom: 0.3rem;
}
.card-section-divider {
  border: none;
  border-top: 1px solid var(--border-light, rgba(0,0,0,0.08));
  margin: 0.75rem 0 0.6rem;
}
.card-scenario {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
}
.card-how-helps {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.card-steps-preview {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.card-steps-preview-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.card-step-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  line-height: 1.5;
}
.card-step-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  width: 14px;
  flex-shrink: 0;
  padding-top: 1px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}
.star { font-size: 11px; color: var(--text-muted); }
.star.filled, .star.half { color: var(--accent); }
.rating-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
  font-family: var(--font-mono);
}

/* ── Inline star rating (featured cards) ── */
.stars-inline {
  display: flex;
  align-items: center;
  gap: 2px;
}
.star-btn-inline {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  padding: 2px;
  line-height: 1;
  transition: color 0.15s, transform 0.1s;
}
.star-btn-inline:hover {
  color: var(--accent);
  transform: scale(1.2);
}
.inline-rate-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 4px;
  font-family: var(--font-mono);
}

.btn-detail {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
  transition: gap var(--t);
  font-family: var(--font-display);
}
.btn-detail:hover { gap: 8px; }

.user-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  background: rgba(160, 130, 200, 0.15);
  color: rgba(180, 150, 220, 0.9);
  border: 1px solid rgba(160, 130, 200, 0.2);
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.use-case-card.user-submitted .card-icon { border-color: rgba(160, 130, 200, 0.3); }

/* ─── Filter Section ─────────────────────────────────────── */
.filter-section {
  padding: var(--section-gap) var(--container-pad);
  position: relative;
  z-index: 1;
}

.search-wrapper {
  margin-bottom: 24px;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0 20px;
  background: var(--bg2);
  transition: border-color var(--t);
  max-width: 560px;
}
.search-bar:focus-within { border-color: var(--border-mid); }
.search-icon { color: var(--text-muted); font-size: 13px; }
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 300;
  padding: 14px 0;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: color var(--t);
}
.search-clear:hover { color: var(--text); }

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t) var(--ease);
  letter-spacing: 0.01em;
}
.filter-btn:hover {
  border-color: var(--border-mid);
  color: var(--text);
}
.filter-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent-glow);
  color: var(--accent);
}

/* ─── Use Cases Grid ──────────────────────────────────────── */
.usecases-section {
  padding-bottom: var(--section-gap);
  position: relative;
  z-index: 1;
}

.results-row {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.results-count {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  background: transparent;
}

.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.empty-icon { font-size: 32px; opacity: 0.3; }
.empty-state p { font-size: 15px; }

/* ─── Tips Section ────────────────────────────────────────── */
.tips-section {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.tips-filter {
  display: flex;
  gap: 6px;
}
.tips-filter-btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.tips-filter-btn:hover { color: var(--text); border-color: var(--border-mid); }
.tips-filter-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent-glow);
  color: var(--accent);
}

.tips-carousel-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 0;
  overflow: hidden;
  padding: 40px var(--container-pad);
}
.tips-carousel-wrapper {
  flex: 1;
  overflow: hidden;
}
.tips-carousel-track {
  display: flex;
  gap: 1px;
  transition: transform 0.5s var(--ease);
}

.tip-card {
  flex: 0 0 calc((100% - 2px) / 3);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: none;
  transform: translateY(0);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
  cursor: pointer;
  min-height: 220px;
}
.tip-card:hover {
  background: var(--bg3);
  border-color: var(--border-mid);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.tip-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tip-card-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent);
}
.tip-card-category {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 2px;
}
.cat-copilot { background: rgba(100, 160, 200, 0.15); color: rgba(100, 180, 220, 0.9); }
.cat-prompt  { background: rgba(200, 169, 126, 0.15); color: var(--accent); }
.cat-general { background: rgba(130, 180, 130, 0.15); color: rgba(140, 200, 140, 0.9); }

.tip-card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.tip-card-summary {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
}
.tip-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.tip-card-tags { display: flex; gap: 6px; }
.tip-card-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.tip-read-more {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  font-family: var(--font-display);
  transition: opacity var(--t);
}
.tip-read-more:hover { opacity: 0.7; }

.tips-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: all var(--t);
}
.tips-nav-btn:hover:not(:disabled) { border-color: var(--border-mid); color: var(--text); }
.tips-nav-btn:disabled { opacity: 0.25; cursor: not-allowed; }

.tips-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
}
.tips-dots {
  display: flex;
  gap: 8px;
}
.tips-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: var(--border-mid);
  cursor: pointer;
  transition: background var(--t), transform var(--t);
  padding: 0;
}
.tips-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ─── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 17, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.modal-overlay.open {
  display: flex;
  animation: overlayIn 0.3s var(--ease);
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 2px;
  position: relative;
  animation: modalIn 0.35s var(--ease);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all var(--t);
  z-index: 1;
}
.modal-close:hover {
  color: var(--text);
  border-color: var(--border-mid);
}

.modal-detail {
  width: min(680px, 100%);
  padding: 48px;
}
.modal-submit {
  width: min(640px, 100%);
  padding: 48px;
}
.modal-tip {
  width: min(560px, 100%);
  padding: 48px;
}

/* Modal body content */
.modal-body { display: flex; flex-direction: column; gap: 28px; }

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.detail-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}
.detail-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.detail-section { margin-bottom: 28px; }
.detail-section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-scenario {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
}

.steps-list, .tips-list { display: flex; flex-direction: column; gap: 10px; }
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}
.step-num-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  width: 20px;
  flex-shrink: 0;
  padding-top: 2px;
}
.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}
.tip-icon { color: var(--accent); font-size: 12px; margin-top: 3px; flex-shrink: 0; }

.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 2px;
}

.time-saved-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 9px;
  border-radius: 2px;
  background: rgba(126, 203, 161, 0.12);
  color: var(--green);
  border: 1px solid rgba(126, 203, 161, 0.2);
  letter-spacing: 0.03em;
}

/* Rating */
.rating-section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.rating-label {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stars-interactive {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.star-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: transform var(--t), color var(--t);
  padding: 2px;
}
.star-btn.hovered i, .star-btn.selected i { color: var(--accent); }
.star-btn:hover { transform: scale(1.15); }
.rating-submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-rate {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-mid);
  background: var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
  transition: all var(--t);
  letter-spacing: 0.02em;
}
.btn-rate:not(:disabled):hover { background: rgba(200, 169, 126, 0.25); }
.btn-rate:disabled { opacity: 0.35; cursor: not-allowed; }
.rating-avg {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Submit modal */
.modal-header { margin-bottom: 32px; }
.modal-title {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 16px;
}
.modal-subtitle-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.flow-step { display: flex; align-items: center; gap: 5px; }
.flow-arrow { font-size: 10px; opacity: 0.4; }
.modal-notice {
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 2px;
  background: var(--bg);
  display: flex;
  gap: 8px;
  line-height: 1.5;
}
.modal-notice i { color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* Form */
.submit-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.required { color: var(--accent); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 300;
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--t);
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--border-mid); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg2); }
.form-group textarea { resize: vertical; line-height: 1.6; }
.form-error { font-size: 11px; color: #d98080; min-height: 14px; }

.steps-container { display: flex; flex-direction: column; gap: 8px; }
.step-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}
.step-field {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 300;
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--t);
}
.step-field:focus { border-color: var(--border-mid); }
.step-field::placeholder { color: var(--text-muted); }
.btn-remove-step {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  transition: all var(--t);
}
.btn-remove-step:hover { border-color: #d98080; color: #d98080; }
.btn-add-step {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(200, 169, 126, 0.2);
  border-radius: 2px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background var(--t);
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.01em;
  width: fit-content;
}
.btn-add-step:hover { background: rgba(200, 169, 126, 0.22); }

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-option { cursor: pointer; }
.radio-option input { display: none; }
.radio-label {
  font-size: 12px;
  font-weight: 400;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all var(--t);
  display: block;
  cursor: pointer;
}
.radio-option input:checked + .radio-label {
  background: var(--accent-dim);
  border-color: var(--accent-glow);
  color: var(--accent);
}

/* ─── Tip Full-Screen Reader ──────────────────────────────── */
.tip-reader-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: none;
  flex-direction: column;
}
.tip-reader-overlay.open {
  display: flex;
  animation: overlayIn 0.25s var(--ease);
}

/* Reading progress bar */
.tip-reader-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 201;
  transition: width 0.1s linear;
}

/* Close button */
.tip-reader-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 202;
  transition: all var(--t);
}
.tip-reader-close:hover {
  color: var(--text);
  border-color: var(--border-mid);
  background: var(--bg3);
}

/* Scrollable area */
.tip-reader-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 80px 24px 100px;
}

/* Content column — centered, readable width */
.tip-reader-body {
  max-width: 680px;
  margin: 0 auto;
}

/* Header meta */
.tip-modal-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 16px;
}
.tip-modal-category {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 20px;
  display: inline-block;
}
.tip-modal-title {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 32px;
  line-height: 1.2;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* Article body */
.tip-modal-content {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 32px;
}
.tip-modal-content p {
  margin: 0 0 16px;
}
.tip-modal-content h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 36px 0 12px;
}
.tip-modal-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
}
/* Table: wrapper for horizontal scroll on narrow screens */
.tip-modal-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 16px 0 24px;
  table-layout: fixed;
}
.tip-modal-content th,
.tip-modal-content td {
  padding: 7px 10px;
  border: 1px solid var(--border);
  text-align: left;
  word-break: break-word;
  line-height: 1.4;
}
.tip-modal-content th {
  background: var(--bg3);
  color: var(--text);
  font-weight: 600;
}
.tip-modal-content tr:nth-child(even) td {
  background: var(--bg2);
}
.tip-modal-content ul,
.tip-modal-content ol {
  padding-left: 24px;
  margin: 8px 0 16px;
}
.tip-modal-content li {
  margin-bottom: 6px;
}
.tip-modal-content code {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
}
.tip-modal-content pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}
.tip-modal-content pre code {
  background: none;
  padding: 0;
}
.tip-modal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
.tip-modal-content strong {
  color: var(--text);
  font-weight: 600;
}
.tip-modal-content em {
  color: var(--text-muted);
}
.tip-modal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tip-modal-content a:hover {
  color: var(--text);
}
.tip-modal-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 16px 0;
  padding: 8px 16px;
  color: var(--text-muted);
  background: var(--bg2);
  border-radius: 0 4px 4px 0;
}
.tip-modal-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ─── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 14px 20px;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  max-width: 340px;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: rgba(126, 203, 161, 0.3); color: var(--green); }
.toast.error   { border-color: rgba(217, 128, 128, 0.3); color: #d98080; }

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}
.footer-brand i { font-size: 18px; }
.footer-tagline {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --container-pad: 48px; }
  .hero-title { font-size: 64px; }
  .featured-track { grid-template-columns: repeat(2, 1fr); }
  .usecases-grid { grid-template-columns: repeat(2, 1fr); }
  .tip-card { flex: 0 0 calc((100% - 1px) / 2); }
}

@media (max-width: 768px) {
  :root { --container-pad: 24px; --section-gap: 80px; }
  .hero-title { font-size: 48px; }
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .section-title { font-size: 28px; }
  .section-header-row { flex-direction: column; align-items: flex-start; gap: 24px; }
  .featured-track { grid-template-columns: 1fr; }
  .usecases-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .tip-card { flex: 0 0 100%; }
  .nav-links { display: none; }
  .hero-stats { overflow-x: auto; }
}

/* ── Use Cases Page (use-cases.html) ── */
.nav-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.nav-back:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
body.light-mode .nav-back:hover {
  background: rgba(0, 0, 0, 0.06);
}

.usecases-page-header {
  padding: calc(var(--nav-height) + 80px) 0 40px; /* Increased top padding from 48px to 80px */
}
