/* Blog styles — shares tokens with the main site */
:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #efece6;
  --text: #15141a;
  --muted: #6c6a74;
  --border: rgba(20, 18, 28, 0.1);
  --accent: #ff5436;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(20, 18, 28, 0.04), 0 12px 40px rgba(20, 18, 28, 0.08);
  --maxw: 720px;
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
html[data-theme="dark"] {
  --bg: #0c0c0f;
  --surface: #16161b;
  --surface-2: #1d1d23;
  --text: #f1f0ec;
  --muted: #9b9aa4;
  --border: rgba(255, 255, 255, 0.11);
  --accent: #ff6a4d;
  --accent-ink: #16161b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 50px rgba(0, 0, 0, 0.5);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 500; font-size: 19px; letter-spacing: -0.01em; text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a.link {
  color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a.link:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.link-story { color: var(--accent); }
.nav-links a.link-story:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 560px) { .nav-links a.link { display: none; } .nav-links a.link.keep { display: inline-block; } }
.toggle {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; display: grid; place-items: center;
}
.toggle svg { width: 19px; height: 19px; }
.toggle .moon { display: none; }
html[data-theme="dark"] .toggle .sun { display: none; }
html[data-theme="dark"] .toggle .moon { display: block; }

/* Article */
.post { padding: clamp(40px, 8vw, 80px) 0 40px; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.post h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.02em;
  margin: 14px 0 0;
}
.post-meta { margin-top: 16px; color: var(--muted); font-size: 14.5px; }
.post-body { margin-top: 36px; }
.post-body h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(23px, 3.4vw, 30px); letter-spacing: -0.01em; line-height: 1.2;
  margin: 44px 0 12px;
}
.post-body h3 { font-size: 18.5px; font-weight: 600; margin: 30px 0 8px; }
.post-body p { margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body strong { font-weight: 600; }
.post-body a { color: var(--accent); text-decoration: none; }
.post-body a:hover { text-decoration: underline; }
.post-body blockquote {
  margin: 24px 0; padding: 16px 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 12px 12px 0;
  color: var(--muted); font-style: italic;
}
.callout {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 22px; margin: 24px 0;
  box-shadow: var(--shadow); font-size: 15.5px;
}
.callout b { font-weight: 600; }

/* Reading progress bar */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 60; pointer-events: none;
}
.progress i {
  display: block; height: 100%; width: 0;
  background: var(--accent);
}

/* Read next */
.read-next { margin-top: 56px; }
.read-next .rn-label {
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.rn-grid {
  margin-top: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 560px) { .rn-grid { grid-template-columns: 1fr; } }
.rn-card {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.rn-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.rn-card .cat { color: var(--muted); font-size: 13px; }
.rn-card h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; margin: 6px 0 0;
}
.rn-card .more { color: var(--accent); font-weight: 500; font-size: 13.5px; margin-top: 10px; display: inline-block; }

/* Author footer */
.author-box {
  margin: 56px 0 0; padding: 24px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 15px;
}
.author-box b { font-weight: 600; }
.author-box a { color: var(--accent); text-decoration: none; }

/* Blog index */
.blog-head { padding: clamp(48px, 9vw, 96px) 0 8px; }
.blog-head h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 6vw, 56px); letter-spacing: -0.02em; line-height: 1.06; margin: 14px 0 0;
}
.blog-head p { color: var(--muted); margin: 16px 0 0; max-width: 56ch; font-size: 18px; }
.post-list { list-style: none; padding: 0; margin: clamp(32px, 5vw, 48px) 0 72px; display: flex; flex-direction: column; gap: 18px; }
.post-card {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 28px; box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.post-card .date { color: var(--muted); font-size: 13.5px; }
.post-card h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 23px; letter-spacing: -0.01em; line-height: 1.25; margin: 8px 0 0;
}
.post-card p { color: var(--muted); font-size: 15.5px; margin: 10px 0 0; line-height: 1.6; }
.post-card .more { color: var(--accent); font-weight: 500; font-size: 14.5px; margin-top: 14px; display: inline-block; }

footer.site {
  border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px;
  color: var(--muted); font-size: 14.5px;
}
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.site a { text-decoration: none; }
footer.site a:hover { color: var(--text); }
