@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&family=Epilogue:wght@300;400;600;800;900&display=swap');

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --border: #222222;
  --border2: #2e2e2e;
  --accent: #ff6b00;
  --accent2: #00d4ff;
  --accent3: #39ff14;
  --text: #efefef;
  --text-muted: #666666;
  --text-dim: #444444;
  --font-display: 'Epilogue', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --max-width: 1080px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 998;
}

/* ─── LAYOUT ─── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ─── NAV ─── */
nav {
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.logo-bracket { color: var(--accent); }
.logo-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  animation: blink 1.2s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  display: flex;
  align-items: stretch;
  gap: 0;
  list-style: none;
}

.nav-links li { display: flex; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-left: 1px solid var(--border);
  transition: all 0.15s;
}

.nav-links a:hover {
  color: var(--accent);
  background: rgba(255,107,0,0.05);
}

/* ─── AD SLOTS ─── */
.ad-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ad-slot-leaderboard { width: 100%; height: 90px; margin: 24px 0; }
.ad-slot-rectangle { width: 300px; height: 250px; }
.ad-slot-banner { width: 100%; height: 60px; margin: 20px 0; }

/* ─── HERO ─── */
.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,107,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,0,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -80px;
  left: -100px;
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255,107,0,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-tag::before {
  content: '▶';
  font-size: 0.5rem;
  animation: blink 1.5s step-end infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 20px;
  max-width: 700px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  font-weight: 300;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.htag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 3px;
  padding: 5px 10px;
  text-decoration: none;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}

.htag:hover {
  color: var(--accent2);
  border-color: var(--accent2);
  background: rgba(0,212,255,0.04);
}

/* ─── SECTION ─── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before { content: '//'; color: var(--text-dim); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  line-height: 1.15;
}

/* ─── CATEGORY COLORS ─── */
/* data-cat="ai"    → cyan  (#00d4ff) */
/* data-cat="gear"  → green (#39ff14) */
/* data-cat="hacks" → purple(#b57bee) */
/* data-cat="quiz"  → orange(#ff6b00) */
.card[data-cat="ai"]    .card-badge { color: var(--accent2); }
.card[data-cat="ai"]::after         { background: var(--accent2); }
.card[data-cat="gear"]  .card-badge { color: var(--accent3); }
.card[data-cat="gear"]::after       { background: var(--accent3); }
.card[data-cat="hacks"] .card-badge { color: #b57bee; }
.card[data-cat="hacks"]::after      { background: #b57bee; }
.card[data-cat="quiz"]  .card-badge { color: var(--accent); }

/* ─── CARD GRID ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
}

.card {
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
  position: relative;
}

.card:hover { background: var(--surface2); }

.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}

.card:hover::after { transform: scaleX(1); }

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  font-size: 2rem;
  padding: 16px 16px 4px;
  line-height: 1;
  display: block;
}

.card-body { padding: 10px 16px 18px; flex: 1; }

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.card-arrow { color: var(--accent); }

/* ─── ARTICLE ─── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 48px 0;
  align-items: start;
}

@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
}

.article-header { margin-bottom: 28px; }

.article-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.article-category::before { content: '>_'; color: var(--text-dim); }

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  letter-spacing: 0.03em;
}

.article-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-weight: 300;
  line-height: 1.75;
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}

/* ─── LIST ITEMS ─── */
.list-items { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 28px 0; }

.list-item {
  background: var(--surface);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 20px;
  align-items: center;
  transition: background 0.15s;
}

.list-item:hover { background: var(--surface2); }

.list-number {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: #555555;
  line-height: 1;
  text-align: center;
}

.list-item:first-child  { box-shadow: inset 3px 0 0 var(--accent); }
.list-item:nth-child(2) { box-shadow: inset 3px 0 0 var(--text-dim); }
.list-item:nth-child(3) { box-shadow: inset 3px 0 0 #7a4f00; }

.list-item:first-child .list-number  { color: var(--accent); }
.list-item:nth-child(2) .list-number { color: var(--text-dim); }
.list-item:nth-child(3) .list-number { color: #7a4f00; }

.list-item:first-child { background: rgba(255,107,0,0.03); }

.list-item-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.list-item-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.affiliate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.affiliate-btn:hover { opacity: 0.85; }

/* ─── SIDEBAR ─── */
.article-sidebar { position: sticky; top: 68px; }

.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.sidebar-widget h4 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.related-link {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
  line-height: 1.4;
}

.related-link:last-child { border-bottom: none; }
.related-link:hover { color: var(--accent2); }

/* ─── QUIZ ─── */
.quiz-wrapper { max-width: 660px; margin: 48px auto; padding: 0 24px; }

.quiz-progress {
  height: 2px;
  background: var(--border);
  margin-bottom: 36px;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.quiz-question {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  line-height: 1.2;
}

.quiz-options { display: flex; flex-direction: column; gap: 8px; }

.quiz-option {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: left;
  transition: all 0.12s;
  font-family: var(--font-display);
}

.quiz-option:hover {
  border-color: var(--accent2);
  color: var(--text);
  background: var(--surface2);
}

.quiz-option.selected {
  border-color: var(--accent);
  background: rgba(255,107,0,0.06);
  color: var(--accent);
}

/* ─── RESULT ─── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  margin: 28px 0;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(255,107,0,0.015) 10px,
    rgba(255,107,0,0.015) 11px
  );
}

.result-emoji { font-size: 3.5rem; margin-bottom: 14px; }

.result-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 10px;
}

.result-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 24px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 3px;
  padding: 9px 16px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  margin: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.share-btn:hover { border-color: var(--accent2); color: var(--accent2); }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 32px 0;
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
}

.footer-logo span { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text-muted); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  width: 100%;
  letter-spacing: 0.03em;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.4s ease forwards; opacity: 0; }
.fade-up:nth-child(1) { animation-delay: 0.04s; }
.fade-up:nth-child(2) { animation-delay: 0.08s; }
.fade-up:nth-child(3) { animation-delay: 0.12s; }
.fade-up:nth-child(4) { animation-delay: 0.16s; }
.fade-up:nth-child(5) { animation-delay: 0.20s; }
.fade-up:nth-child(6) { animation-delay: 0.24s; }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .list-item {
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    row-gap: 10px;
  }
  .list-item .affiliate-btn {
    grid-column: 2;
    justify-self: start;
    font-size: 0.62rem;
    padding: 6px 10px;
  }
  .card-grid { grid-template-columns: 1fr; }
}
