/* blog.css — Shared styles for CroquetClaude blog posts, contact, and standalone pages */

:root {
  /* Paper + ink — aligned to homepage canonical palette (project_croquetclaude_brand_font) */
  --bg: #f4eedb;                       /* paper */
  --bg-alt: #ece4cc;                   /* paper-deep */
  --text: #1a1612;                     /* ink */
  --text-secondary: #4d423a;           /* ink-soft */
  --text-muted: #847565;                /* ink-faint */
  --accent: #ad4f52;                    /* alarm-pink — Quadrant accent */
  --accent-hover: #963f42;
  --accent-faint: rgba(173, 79, 82, 0.08);
  --border: #d8cea9;                    /* rule */
  --ink: #1a1612;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --display: 'Bricolage Grotesque', Georgia, serif;
  --max-width: 720px;
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 3.5rem;
  --space-xl: 5rem;
}

/* Legacy theme attributes are no-ops — light is the only theme.
   The toggle JS still flips data-theme but the variables don't change. */
[data-theme="light"], [data-theme="dark"] {
  --bg: #f4eedb;
  --bg-alt: #ece4cc;
  --text: #1a1612;
  --text-secondary: #4d423a;
  --text-muted: #847565;
  --accent: #ad4f52;
  --accent-hover: #963f42;
  --accent-faint: rgba(173, 79, 82, 0.08);
  --border: #d8cea9;
  --ink: #1a1612;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* FOCUS STATES */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 0.3s ease;
}

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

.nav-brand {
  font-family: var(--display);
  font-variation-settings: 'opsz' 96;
  font-weight: 700;
  font-style: italic;
  font-synthesis: style;
  letter-spacing: -0.025em;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

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

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ARTICLE */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-s) var(--space-l);
}

.article-header {
  margin-bottom: var(--space-l);
}

.article-header h1 {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.article-meta {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-s);
  align-items: center;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* PROSE */
.article-body {
  line-height: 1.85;
  font-size: 1.05rem;
}

.article-body p {
  margin-bottom: var(--space-s);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-m) 0;
}

.article-body em {
  font-style: italic;
}

.article-body strong {
  font-weight: 600;
}

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: var(--space-m);
  margin-bottom: var(--space-s);
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: var(--space-m);
  margin-bottom: var(--space-xs);
}

.article-body p a {
  color: var(--accent);
  text-decoration-color: rgba(90, 173, 116, 0.4);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.article-body p a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

[data-theme="light"] .article-body p a {
  text-decoration-color: rgba(61, 138, 85, 0.4);
}

/* ARTICLE IMAGES */
.article-image {
  max-width: 100%;
  border-radius: 6px;
  margin: var(--space-s) 0;
  display: block;
}

/* ARTICLE REFERENCE CARDS */
.article-ref {
  display: block;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: var(--space-s) var(--space-m);
  margin: var(--space-m) 0;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.article-ref:hover {
  transform: translateX(3px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.article-ref-source {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.article-ref-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.article-ref-detail {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* VIDEO */
.article-body video {
  width: 100%;
  border-radius: 6px;
  margin: var(--space-s) 0;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  margin: var(--space-m) 0;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
}

/* FURTHER READING */
.further-reading {
  margin-top: var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--border);
}

.further-reading h2 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-m);
}

.post-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-s);
}

.post-link {
  display: block;
  background: var(--bg-alt);
  border-radius: 8px;
  padding: var(--space-s) var(--space-m);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.post-link-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.post-link-date {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* BACK LINK */
.back-link {
  display: inline-block;
  margin-top: var(--space-m);
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--accent-hover);
}

/* CLOSING CTA */
.closing-cta {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: var(--space-m);
  margin-top: var(--space-m);
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* FOOTER */
footer {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-m) var(--space-s);
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.7;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* RESPONSIVE */
@media (max-width: 700px) {
  .post-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  html { font-size: 16px; }

  .article-header h1 {
    font-size: 2rem;
  }

  .nav-inner {
    padding: var(--space-xs) 0.75rem;
  }

  main {
    padding: var(--space-l) 0.75rem var(--space-m);
  }
}

@media (max-width: 375px) {
  .article-header h1 {
    font-size: 1.75rem;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* THEME TOGGLE SCRIPT — shared across all blog pages */
/* Include blog-theme.js after this stylesheet */
