/* =========================================================
   pipelines.py — shared site styles
   Built from the @pipelines.py Instagram design tokens so the
   site, the videos, and the carousels all read as one brand.
   ========================================================= */

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

:root {
  /* surfaces */
  --bg:           #0D1117;
  --surface:      #080B11;
  --surface2:     #161B27;
  --border:       rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.04);

  /* brand accents */
  --violet:    #6366F1;
  --violet-lt: #A78BFA;
  --cyan:      #06B6D4;
  --green:     #10B981;
  --pink:      #EC4899;
  --amber:     #F59E0B;
  --red:       #EF4444;

  /* text */
  --white:       #F8FAFC;
  --text-body:   #CBD5E1;
  --text-muted:  #94A3B8;
  --text-subtle: #64748B;
  --text-dim:    #475569;
  --text-ghost:  #334155;

  /* syntax */
  --syn-function: #82AAFF;
  --syn-string:   #C3E88D;
  --syn-comment:  #546E7A;
  --syn-output:   #10B981;

  --gradient-brand: linear-gradient(135deg, #A78BFA, #6366F1 40%, #06B6D4);
  --gradient-fill:  linear-gradient(135deg, #6366F1, #06B6D4);

  --font-display: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1100px;
}

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

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-display);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.16) 0%, transparent 70%);
  top: -220px; right: -220px;
  pointer-events: none;
  z-index: 0;
}
.orb.orb-2 {
  background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 70%);
  top: 50%; left: -260px; right: auto;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
code { font-family: var(--font-mono); color: var(--syn-string); font-size: 0.92em; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--syn-comment);
  font-style: italic;
  display: inline-block;
  margin-bottom: 16px;
}

/* ===== Chrome bar (site nav) ===== */
.chrome-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.chrome-bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-width); margin: 0 auto;
  padding: 16px 24px; gap: 24px;
}
.chrome-left { display: flex; align-items: center; gap: 16px; }
.traffic-dots { display: flex; gap: 7px; }
.traffic-dots span { width: 11px; height: 11px; border-radius: 50%; display: block; }
.traffic-dots span:nth-child(1) { background: var(--red); opacity: .55; }
.traffic-dots span:nth-child(2) { background: var(--amber); opacity: .55; }
.traffic-dots span:nth-child(3) { background: var(--green); opacity: .55; }
.chrome-filename { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
.chrome-filename strong { color: var(--text-muted); font-weight: 500; }

.chrome-nav-links { display: flex; align-items: center; gap: 28px; }
.chrome-nav-links a { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); transition: color .2s; }
.chrome-nav-links a:hover { color: var(--white); }
.chrome-nav-links a.active { color: var(--violet-lt); }

.btn {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  padding: 10px 20px; border-radius: 8px;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s; cursor: pointer;
}
.btn-primary { background: var(--gradient-fill); color: #fff; border: none; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { color: var(--text-body); }
.btn-ghost:hover { border-color: var(--violet-lt); color: var(--violet-lt); }

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ===== Hero ===== */
.hero { padding: 100px 0 80px; }
.hero.hero-compact { padding-bottom: 12px; }
.hero.hero-compact h1 { max-width: 14ch; }
.hero .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }

.terminal-line { font-family: var(--font-mono); font-size: 15px; color: var(--text-muted); }
.terminal-line .fn { color: var(--syn-function); }
.terminal-line .str { color: var(--syn-string); }

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 900; letter-spacing: -2px; line-height: 1.05;
  max-width: 16ch;
}
.hero h1::after {
  content: '▌';
  display: inline-block;
  color: var(--cyan);
  animation: blink 1.1s steps(1) infinite;
  margin-left: 4px;
}
@keyframes blink { 50% { opacity: 0; } }

.hero p.lede { font-size: 18px; color: var(--text-muted); max-width: 56ch; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ===== Section shell ===== */
.section { padding: 64px 0; }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 900; letter-spacing: -1px; }

/* ===== Docstring block ===== */
.docstring { font-family: var(--font-mono); font-size: 14px; color: var(--syn-comment); margin-bottom: 4px; }
.docstring-body { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 36px 40px; }
.docstring-body p { font-style: italic; color: var(--text-body); font-size: 17px; line-height: 1.8; margin-bottom: 16px; }
.docstring-body p:last-child { margin-bottom: 0; }

/* ===== Episode cards ===== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid-full { display: grid; grid-template-columns: 1fr; gap: 24px; }

.episode-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: block;
  transition: transform .25s, border-color .25s;
}
.episode-card:hover { transform: translateY(-4px); border-color: rgba(99,102,241,0.3); }

.episode-chrome { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface); }
.episode-chrome .traffic-dots span { width: 8px; height: 8px; }
.episode-chrome .fname { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

.episode-body { padding: 24px; }
.episode-card.full .episode-body { padding: 32px 36px; }
.episode-number { font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; color: var(--violet-lt); margin-bottom: 8px; display: block; }
.episode-card h3 { font-size: 19px; font-weight: 700; color: var(--white); margin-bottom: 10px; line-height: 1.3; }
.episode-card.full h3 { font-size: 22px; }
.episode-hook { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.6; }
.episode-card.full .episode-hook { font-size: 15px; }

.episode-learn { margin-bottom: 22px; }
.episode-learn li { font-size: 13px; color: var(--text-body); padding-left: 18px; position: relative; margin-bottom: 8px; line-height: 1.5; }
.episode-learn li::before { content: '•'; position: absolute; left: 0; color: var(--cyan); }

.episode-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.episode-actions .btn { padding: 8px 14px; font-size: 12px; }

/* ===== CTA / PyPath block ===== */
.cta-block {
  background: linear-gradient(180deg, rgba(99,102,241,0.08), rgba(6,182,212,0.04));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 18px;
  padding: 48px 40px;
  text-align: center;
}
.cta-block h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 900; margin-bottom: 14px; letter-spacing: -1px; }
.cta-block p { color: var(--text-muted); max-width: 56ch; margin: 0 auto 26px; font-size: 16px; line-height: 1.7; }

/* ===== About page ===== */
.about-body p { font-size: 17px; color: var(--text-body); line-height: 1.85; margin-bottom: 22px; max-width: 68ch; }
.about-body p:first-of-type { font-size: 19px; color: var(--white); }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-tag { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--violet-lt); }

/* ===== Reveal-on-scroll ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .chrome-bar { flex-wrap: wrap; }
  .chrome-nav-links { width: 100%; justify-content: space-between; order: 3; padding-top: 10px; border-top: 1px solid var(--border); }
  .hero { padding: 64px 0 56px; }
  .episode-card.full .episode-body { padding: 24px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
