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

:root {
  --bg: #fffbf5;
  --bg-alt: #fff7ed;
  --bg-accent: #fef3c7;
  --ink: #1c1917;
  --ink-mid: #44403c;
  --ink-light: #78716c;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --secondary: #7c3aed;
  --success: #16a34a;
  --rule: #e7e5e4;
  --rule-light: #f5f5f4;
  --max-width: 720px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Header - playful */
header {
  background: var(--bg-alt);
  border-bottom: 3px solid var(--accent);
  padding: 1.5rem;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-name {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
  font-optical-sizing: auto;
}

.site-name:hover {
  color: var(--secondary);
}

.site-tagline {
  font-size: 0.9375rem;
  color: var(--ink-mid);
  font-weight: 400;
}

/* Nav - pill tabs */
nav {
  background-color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-mid);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  transition: all 0.2s ease;
}

nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-accent);
}

/* Breadcrumb */
.breadcrumb {
  max-width: var(--max-width);
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.8125rem;
  color: var(--ink-light);
}

.breadcrumb a {
  color: var(--ink-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* Main */
main {
  max-width: var(--max-width);
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

main.article {
  margin-top: 2rem;
}

/* Section heading - playful line */
.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0px,
    var(--accent) 4px,
    transparent 4px,
    transparent 8px
  );
}

/* Article list */
.article-list {
  list-style: none;
}

.article-list li {
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: var(--bg-alt);
  border: 2px solid var(--rule);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.article-list li:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.1);
}

.article-list a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.15s ease;
}

.article-list a:hover {
  color: var(--accent);
}

/* Category label - fun badge */
.category-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  background: var(--secondary);
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  margin-bottom: 0.625rem;
}

/* Date */
.date {
  font-size: 0.8125rem;
  color: var(--ink-light);
}

/* Article page */
.article-header {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px dashed var(--rule);
}

.article-header .category-label {
  margin-bottom: 0.75rem;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.article-header .article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.article-hero {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 2rem;
  border-radius: 12px;
  border: 2px solid var(--rule);
}

/* Article body */
.article-content h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--ink-mid);
}

.article-content p:last-child {
  margin-bottom: 0;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.article-content a:hover {
  color: var(--secondary);
}

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

.article-content strong {
  font-weight: 700;
  color: var(--ink);
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-accent);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* Word/puzzle highlight box */
.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-accent);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* Source link */
.article-content p:last-of-type em {
  display: block;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 2px dashed var(--rule);
  font-size: 0.875rem;
  color: var(--ink-light);
}

/* Related */
.related {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--rule);
}

.related h3 {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.related ul {
  list-style: none;
}

.related ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule-light);
}

.related ul li:first-child {
  padding-top: 0;
}

.related ul li:last-child {
  border-bottom: none;
}

.related ul li a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

.related ul li a:hover {
  color: var(--accent);
}

/* Footer */
footer {
  border-top: 2px solid var(--rule);
  padding: 1.5rem;
  margin-top: 4rem;
  background: var(--bg-alt);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: var(--ink-light);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Pagination */
.pagination {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 2px dashed var(--rule);
  font-size: 0.875rem;
  display: flex;
  gap: 1rem;
}

.pagination a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.pagination a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .site-name { font-size: 1.75rem; }

  .article-header h1 { font-size: 1.75rem; }
  .article-list a { font-size: 1.125rem; }

  .nav-inner { flex-wrap: wrap; gap: 0.5rem; }
  nav a { font-size: 0.75rem; padding: 0.375rem 0.75rem; }
}
