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

/* ── exact tokens from source ────────────────── */
:root {
  --cream:            oklch(97% .025 90);
  --ink:              oklch(18% .04 270);
  --coral:            oklch(72% .19 28);
  --lime:             oklch(88% .18 122);
  --sky:              oklch(78% .12 230);
  --card:             oklch(99% .012 90);
  --muted-fg:         oklch(42% .03 270);
  --border:           oklch(18% .04 270 / .15);

  --shadow-zine:    6px 6px 0 0 var(--ink);
  --shadow-zine-sm: 3px 3px 0 0 var(--ink);
  --radius-xl: .75rem;
  --radius-md: .375rem;
  --radius-full: 999px;

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ── reset ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ── header ─────────────────────────────────── */
.site-header {
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.logo-icon {
  width: 18px;
  height: 18px;
  background: var(--ink);
  border-radius: 50%;
  flex-shrink: 0;
}

.site-nav { display: flex; align-items: center; gap: 1.5rem; }

.site-nav a {
  font-size: .875rem;
  text-decoration: none;
  color: var(--muted-fg);
  transition: color .15s;
}
.site-nav a:hover,
.site-nav a.active { color: var(--ink); }

.nav-signin {
  margin-left: .25rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  background: var(--coral);
  padding: .35rem .85rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--cream) !important;
  box-shadow: var(--shadow-zine-sm);
  transition: transform .1s, box-shadow .1s;
}
.nav-signin:hover {
  transform: translate(-0.5px, -0.5px);
  box-shadow: var(--shadow-zine);
}

/* ── main ────────────────────────────────────── */
.site-main { flex: 1; max-width: 1152px; width: 100%; margin: 0 auto; padding: 3rem 1.5rem; }

/* ── coral marquee (between hero and content on homepage) ── */
.marquee-bar {
  background: var(--coral);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: .875rem;
  overflow: hidden;
  white-space: nowrap;
  padding: .75rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.marquee-track { display: inline-block; animation: marquee 30s linear infinite; }
.marquee-track span { margin: 0 1.5rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── footer ──────────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
}
.site-footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  opacity: .7;
}

/* ── archive page ────────────────────────────── */
.archive-eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin-bottom: .4rem;
}
.archive-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.archive-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
}
.archive-count {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted-fg);
}

/* ── tag filter ──────────────────────────────── */
.tag-filter { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }

.tag-btn {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .3rem .85rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .12s, color .12s, box-shadow .12s, transform .1s;
}
.tag-btn:hover { background: oklch(18% .04 270 / .06); }
.tag-btn.active {
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow-zine-sm);
}

/* ── post grid ───────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* ── post card ───────────────────────────────── */
.post-card {
  position: relative;
  display: block;
  border-radius: var(--radius-xl);
  border: 2px solid var(--ink);
  background: var(--card);
  padding: 1.5rem;
  box-shadow: var(--shadow-zine);
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.post-card:hover {
  transform: translate(-3px, -3px) translateY(-1px);
  box-shadow: 8px 8px 0 0 var(--ink);
}

/* tape */
.card-tape {
  position: absolute;
  top: -11px;
  left: 1.5rem;
  width: 80px;
  height: 22px;
  background: #c4e951b3;
  border: 1px solid oklch(18% .04 270 / .2);
  transform: rotate(-4deg);
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

/* tag pill — border-2 border-ink, accent bg, text-ink */
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  border: 2px solid var(--ink);
  padding: .125rem .75rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink);
}
.tag-pill.coral { background: var(--coral); }
.tag-pill.lime  { background: var(--lime); }
.tag-pill.sky   { background: var(--sky); }
.tag-pill.none  { background: transparent; }

.card-read-time {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted-fg);
}

.card-emoji { font-size: 2rem; line-height: 1; margin-bottom: 1rem; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: .6rem;
}

.card-excerpt {
  font-size: .875rem;
  color: var(--muted-fg);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted-fg);
  margin-top: auto;
}

.card-read-link {
  font-weight: 600;
  color: var(--coral);
}
.post-card:hover .card-read-link { text-decoration: underline; }

/* ── post page ───────────────────────────────── */
.post-wrap { max-width: 680px; margin: 0 auto; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted-fg);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color .15s;
}
.back-link:hover { color: var(--ink); }

.post-meta-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted-fg);
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.04em;
  margin-bottom: .75rem;
}

.post-subtitle {
  font-size: 1.05rem;
  color: var(--muted-fg);
  line-height: 1.65;
  margin-bottom: 1.75rem;
  max-width: 560px;
}

.post-emoji { font-size: 2.5rem; line-height: 1; margin-bottom: 2rem; }

.post-divider {
  border: none;
  border-top: 2px solid var(--ink);
  margin: 2rem 0;
}

/* ── post body ───────────────────────────────── */
.post-content { font-size: .975rem; line-height: 1.8; }
.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 2.5rem 0 .75rem;
}
.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 .6rem;
}
.post-content p  { margin-bottom: 1.25rem; }
.post-content a  { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }
.post-content strong { font-weight: 700; }

.post-content ul,
.post-content ol  { padding-left: 1.4rem; margin-bottom: 1.25rem; }
.post-content li  { margin-bottom: .35rem; }

.post-content code {
  font-family: var(--font-mono);
  font-size: .82em;
  background: oklch(18% .04 270 / .07);
  padding: .1em .35em;
  border-radius: .25rem;
}

.post-content pre {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-xl);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-zine-sm);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.65;
}
.post-content pre code { background: none; padding: 0; }

.post-content pre[data-lang]::before {
  content: attr(data-lang);
  display: block;
  font-size: .65rem;
  letter-spacing: .06em;
  color: oklch(78% .12 230);
  margin-bottom: .75rem;
  text-transform: lowercase;
}

/* callout boxes */
.callout {
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .9rem;
}
.callout-label {
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .4rem;
  font-weight: 600;
}
.callout.aka    { background: oklch(78% .12 230 / .15); }
.callout.aka .callout-label { color: var(--sky); }
.callout.gotcha { background: oklch(72% .19 28 / .12); }
.callout.gotcha .callout-label { color: var(--coral); }

/* keep reading */
.keep-reading {
  border: 2px solid var(--ink);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-top: 3rem;
  box-shadow: var(--shadow-zine-sm);
}
.keep-reading-label {
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin-bottom: .85rem;
}
.keep-reading-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 0;
  text-decoration: none;
  color: var(--ink);
  font-size: .9rem;
  border-top: 1px solid var(--border);
  transition: color .12s;
}
.keep-reading-item:first-child { border-top: none; }
.keep-reading-item:hover { color: var(--coral); }
.keep-reading-item-left { display: flex; align-items: center; gap: .6rem; }

/* ── about page ──────────────────────────────── */
.about-eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin-bottom: .75rem;
}
.about-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.04em;
  margin-bottom: 1.5rem;
}
.about-title .accent { color: var(--coral); }

.about-body { max-width: 560px; margin-bottom: 2.5rem; }
.about-body p { font-size: .975rem; line-height: 1.8; margin-bottom: 1rem; }
.about-body strong { font-weight: 700; }

.feature-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
  max-width: 580px;
}
@media (max-width: 560px) { .feature-boxes { grid-template-columns: 1fr; } }

.feature-box {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-zine-sm);
  padding: 1rem;
}
.feature-box-emoji { font-size: 1.5rem; margin-bottom: .5rem; }
.feature-box-title { font-weight: 700; font-size: .9rem; margin-bottom: .3rem; }
.feature-box-desc  { font-size: .8rem; color: var(--muted-fg); line-height: 1.5; }

/* buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  padding: .65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow-zine);
  transition: transform .1s, box-shadow .1s;
}
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-zine); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  padding: .65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--shadow-zine-sm);
  transition: background .12s;
}
.btn-outline:hover { background: var(--lime); }

/* ── home page ───────────────────────────────── */

/* remove site-main padding/max-width on home so sections go full-width */
.home .site-main { max-width: 100%; padding: 0; }

/* hero */
.hero-section {
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}
.hero-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  align-items: end;
  gap: 2.5rem;
}
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.issue-badge {
  display: inline-block;
  border-radius: var(--radius-full);
  border: 2px solid var(--ink);
  background: var(--lime);
  padding: .25rem .75rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.04em;
  margin-bottom: 1.5rem;
}

.hero-highlight-wrap {
  position: relative;
  display: inline-block;
}
.hero-highlight-text { position: relative; z-index: 1; }
.hero-highlight-bar {
  position: absolute;
  inset-inline: 0;
  bottom: .2rem;
  height: 1rem;
  background: var(--coral);
  z-index: 0;
}
@media (min-width: 768px) {
  .hero-highlight-bar { bottom: .35rem; height: 1.5rem; }
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted-fg);
  max-width: 36rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.hero-sub strong { color: var(--ink); font-weight: 700; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  background: var(--ink);
  padding: .75rem 1.25rem;
  font-weight: 600;
  color: var(--cream);
  box-shadow: var(--shadow-zine);
  transition: transform .1s, box-shadow .1s;
}
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-zine); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  background: var(--cream);
  padding: .75rem 1.25rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-zine-sm);
  transition: background .12s;
}
.btn-secondary:hover { background: var(--lime); }

/* mood card */
.hero-right { display: flex; align-items: center; justify-content: center; }

.mood-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 2px solid var(--ink);
  background: var(--card);
  padding: 1.5rem;
  box-shadow: var(--shadow-zine);
  transform: rotate(3deg);
  max-width: 280px;
  width: 100%;
}
.mood-card-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 80px;
  height: 22px;
  background: #c4e951b3;
  border: 1px solid oklch(18% .04 270 / .2);
}
.mood-label {
  font-family: var(--font-mono);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted-fg);
  margin-bottom: .5rem;
}
.mood-quote {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.mood-debug {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted-fg);
}
.mood-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
}

/* coral marquee (home page only) */
.coral-marquee {
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--coral);
  color: var(--cream);
  white-space: nowrap;
}
.coral-marquee-track {
  display: inline-flex;
  gap: 3rem;
  padding: .75rem 0;
  font-family: var(--font-mono);
  font-size: .875rem;
  animation: marquee 25s linear infinite;
}
.coral-marquee-track span { white-space: nowrap; }

/* latest posts section */
.latest-section { padding: 5rem 0; }
.latest-inner { max-width: 1152px; margin: 0 auto; padding: 0 1.5rem; }

.latest-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}
.latest-eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted-fg);
  margin-bottom: .5rem;
}
.latest-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
}
.see-all-link {
  font-family: var(--font-mono);
  font-size: .75rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--ink);
  white-space: nowrap;
  padding-bottom: .25rem;
}
.see-all-link:hover { color: var(--coral); }

/* home post grid — featured first card spans 2 rows */
.home-posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.home-posts-grid .post-card-featured { grid-row: span 2; }

@media (max-width: 640px) {
  .home-posts-grid { grid-template-columns: 1fr; }
  .home-posts-grid .post-card-featured { grid-row: span 1; }
  .hero-inner { padding: 3rem 1rem; }
  .latest-section { padding: 3rem 0; }
}

/* ── 404 ─────────────────────────────────────── */
.not-found { text-align: center; padding: 6rem 1.5rem; }
.not-found h1 {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 900;
  line-height: 1;
  color: var(--border);
  margin-bottom: 1rem;
}
.not-found p { font-size: 1rem; color: var(--muted-fg); margin-bottom: 2rem; }

/* ── responsive ──────────────────────────────── */
@media (max-width: 600px) {
  .site-header { padding: 0 1rem; }
  .site-main   { padding: 2rem 1rem; }
  .post-grid   { grid-template-columns: 1fr; }
  .archive-title-row { flex-direction: column; gap: .25rem; }
}
