/* ============================================
   Khushi Khurana — Design tokens
   Palette: field-notebook. Paper, deep ink, thread.
   Signature motif: the stitch — a hand-drawn dashed
   underline referencing "Suljhaav" (to unravel / thread).
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #EAE7DC;
  --paper-2: #E1DDCE;
  --ink: #202A22;
  --ink-soft: #45524A;
  --thread: #B8722D;       /* decorative only — stitches, borders, hover fills */
  --thread-text: #935B23;  /* AA-safe on paper for actual text/links (4.5:1+) */
  --thread-soft: #D9A15C;
  --sage: #6E7F6B;
  --line: rgba(32, 42, 34, 0.16);

  --display: 'Fraunces', serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--thread);
  outline-offset: 3px;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Stitch signature ---------- */
.stitch {
  background-image: repeating-linear-gradient(
    100deg,
    var(--thread) 0 10px,
    transparent 10px 16px
  );
  background-position: 0 100%;
  background-size: 100% 2px;
  background-repeat: repeat-x;
  padding-bottom: 6px;
}

/* ---------- Header ---------- */
header.site {
  padding: 30px 0 22px;
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}
.brand {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
nav.site a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  margin-left: 22px;
  color: var(--ink-soft);
}
nav.site a:first-child { margin-left: 0; }
nav.site a:hover, nav.site a.active { color: var(--thread-text); }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--thread-text);
  margin: 0 0 18px;
}
h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 8px;
}

/* ---------- Sections ---------- */
section { padding: 46px 0; }
section + section { border-top: 1px solid var(--line); }
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 22px;
}
h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 6px;
}
p { margin: 0 0 16px; }
.dim { color: var(--ink-soft); }

/* ---------- Timeline (real chronology → numbering is earned) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.timeline li:first-child { border-top: none; }
.timeline time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--thread-text);
  padding-top: 3px;
}
.timeline .role {
  font-weight: 600;
  font-family: var(--display);
  font-size: 1.05rem;
}
.timeline .org { color: var(--ink-soft); font-size: 0.95rem; margin: 2px 0 6px; }

/* ---------- Fill-in placeholders (internal, pre-launch only) ---------- */
.fill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(184, 114, 45, 0.14);
  color: var(--thread-text);
  border: 1px dashed var(--thread-soft);
  border-radius: 3px;
  padding: 1px 7px;
}

/* ---------- Quiet public-facing placeholder, safe to publish ---------- */
.soon {
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 8px 0 6px;
}
.stat .num {
  font-family: var(--display);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--ink);
}
.stat .label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Resource cards ---------- */
.cards { display: grid; gap: 16px; margin-top: 6px; }
.card {
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 6px;
  padding: 20px 22px;
}

/* ---------- Media block ---------- */
.media {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 18px 0 8px;
}
.media img { display: block; width: 100%; height: auto; }
.media figcaption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  padding: 8px 4px 0;
}

/* ---------- Poetry ---------- */
.poem {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-line;
  border-left: 2px dashed var(--thread-soft);
  padding-left: 22px;
  margin: 18px 0 26px;
}
.poem-title {
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--thread-text);
  margin-bottom: 8px;
  display: block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 12px 20px;
  border-radius: 3px;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--thread-text); }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 34px 0 50px;
  margin-top: 20px;
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
footer.site a { text-decoration: none; color: var(--ink-soft); }
footer.site a:hover { color: var(--thread-text); }

/* ---------- Archive strip (old blog, kept — not killed) ---------- */
footer.site .archive {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 2;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px dashed var(--thread-soft);
}
footer.site .archive .archive-label {
  color: var(--thread-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 10px;
}
footer.site .archive a {
  margin-right: 2px;
  white-space: nowrap;
}
footer.site .archive .sep { color: var(--line); margin: 0 8px; }

/* ---------- Under-construction marquee ---------- */
/* Base: fully visible, static, centred. Works everywhere,
   including contexts that never run the animation at all. */
.marquee-bar {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.marquee-bar .marquee-track {
  display: block;
  text-align: center;
  padding: 9px 16px;
}
.marquee-bar .msg {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.marquee-bar .msg + .msg { display: none; }
.marquee-bar a {
  color: var(--thread-soft);
  text-decoration: underline;
}

/* Enhancement: only browsers that both support the animation
   AND haven't asked for reduced motion get the scrolling version. */
@media (prefers-reduced-motion: no-preference) {
  .marquee-bar { white-space: nowrap; }
  .marquee-bar .marquee-track {
    display: inline-block;
    text-align: left;
    padding-left: 100%;
    animation: marquee-scroll 26s linear infinite;
  }
  .marquee-bar:hover .marquee-track { animation-play-state: paused; }
  .marquee-bar .msg { padding: 9px 0; display: inline-block; }
  .marquee-bar .msg + .msg { display: inline-block; padding-left: 60px; }
  @keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
}

@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
