/* === THE DAILY SCROLL — Mobile-First Stylesheet === */

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

:root {
  --ink: #0a0a0a;
  --paper: #f5f0e8;
  --accent: #e63946;
  --accent-dark: #c5303d;
  --muted: #6b6b6b;
  --rule: #d4cfc4;
  --card-bg: #faf7f2;
  --shadow: rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.syne { font-family: 'Syne', sans-serif; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

/* === MASTHEAD === */
.masthead {
  text-align: center;
  padding: 20px 16px 14px;
  border-bottom: 3px solid var(--ink);
  position: relative;
}

.masthead-date {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.masthead h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 9vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 0.95;
}

.masthead h1 a { color: var(--ink); }
.masthead h1 a:hover { color: var(--ink); }

.masthead-tagline {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 8px;
  color: var(--muted);
}

.thin-rule {
  border: none;
  border-top: 1px solid var(--ink);
  margin: 0;
}

/* === NAV === */
.main-nav {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 100;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 0;
  padding: 0;
  flex-direction: column;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  z-index: 99;
}

.nav-links.active {
  display: flex;
}

.nav-links li a {
  display: block;
  padding: 14px 20px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s, background 0.2s;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--accent);
  background: rgba(230, 57, 70, 0.04);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  padding: 12px 0;
  letter-spacing: -0.5px;
}

/* === AD SLOTS === */
.ad-slot {
  background: var(--card-bg);
  border: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.ad-slot::after {
  content: 'Advertisement';
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rule);
  position: absolute;
}

.ad-slot--leaderboard {
  width: 100%;
  max-width: 320px;
  height: 50px;
  margin: 12px auto;
}

.ad-slot--rectangle {
  width: 300px;
  height: 250px;
  margin: 24px auto;
}

.ad-slot--sidebar {
  width: 160px;
  height: 600px;
  display: none;
}

.ad-slot--in-article {
  width: 100%;
  max-width: 300px;
  height: 250px;
  margin: 28px auto;
}

.ad-slot--footer {
  width: 320px;
  height: 50px;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.ad-slot ins {
  display: block;
  width: 100%;
  height: 100%;
}

/* === CONTAINER === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === HOMEPAGE === */
.hero-article {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--rule);
}

.hero-article .category-label {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.hero-article h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-article h2 a { color: var(--ink); }
.hero-article h2 a:hover { color: var(--accent); }

.hero-article .subtitle {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  font-style: italic;
}

.hero-article .byline {
  font-size: 13px;
  color: var(--muted);
}

.hero-article .byline a {
  color: var(--ink);
  font-weight: 600;
}

/* === ARTICLE GRID === */
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 24px 0 16px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 24px;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.article-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.article-card .category-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.article-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.article-card h3 a { color: var(--ink); }
.article-card h3 a:hover { color: var(--accent); }

.article-card .excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 10px;
}

.article-card .byline {
  font-size: 12px;
  color: var(--muted);
}

.article-card .byline a {
  color: var(--ink);
  font-weight: 600;
}

.article-card-image {
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 4px;
}

.article-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.02);
}

.article-card-content {
  /* Wrapper for text content when image is present */
}

/* === ARTICLE PAGE === */
.article-featured-image {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 32px;
  overflow: hidden;
  border-radius: 8px;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  display: block;
}
.article-header {
  padding: 32px 0 24px;
  max-width: 720px;
  margin: 0 auto;
}

.article-header .category-label {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.article-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.article-header .subtitle {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
  font-style: italic;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 720px;
  margin: 0 auto 32px;
}

.article-byline .author-initial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.article-byline .author-info {
  font-size: 14px;
  line-height: 1.4;
}

.article-byline .author-name {
  font-weight: 600;
}

.article-byline .author-meta {
  color: var(--muted);
  font-size: 12px;
}

/* Article Content */
.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.article-content p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: var(--ink);
}

.article-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin: 40px 0 16px;
  letter-spacing: -0.5px;
}

.article-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 28px 0;
  background: rgba(0,0,0,0.02);
  font-style: italic;
  font-size: 18px;
  line-height: 1.7;
}

.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
  font-size: 17px;
  line-height: 1.8;
}

.article-content li {
  margin-bottom: 8px;
}

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

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  max-width: 720px;
  margin: 0 auto;
}

.article-tags a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 0.2s;
}

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

/* === RELATED ARTICLES === */
.related-section {
  border-top: 2px solid var(--ink);
  padding: 32px 0 48px;
  margin-top: 32px;
}

.related-section .section-title {
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.related-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.related-card h4 {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.related-card h4 a { color: var(--ink); }
.related-card h4 a:hover { color: var(--accent); }

.related-card .byline {
  font-size: 12px;
  color: var(--muted);
}

/* === AUTHOR PAGE === */
.author-header {
  padding: 40px 0 32px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-direction: column;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 36px;
  flex-shrink: 0;
}

.author-info h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.author-beat {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.author-bio {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 600px;
}

.author-quote {
  margin-top: 16px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: rgba(0,0,0,0.02);
  font-style: italic;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.author-social {
  margin-top: 12px;
  font-size: 14px;
}

.author-social a {
  color: var(--accent);
  font-weight: 600;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 32px 0 48px;
}

.pagination a, .pagination span {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--ink);
  color: var(--paper);
}

.pagination .current {
  background: var(--ink);
  color: var(--paper);
}

.pagination .disabled {
  border-color: var(--rule);
  color: var(--rule);
  pointer-events: none;
}

/* === CATEGORY PAGE === */
.category-header {
  padding: 40px 0 24px;
  text-align: center;
  border-bottom: 2px solid var(--ink);
}

.category-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
}

.category-header .category-count {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* === FOOTER === */
.site-footer {
  border-top: 3px solid var(--ink);
  padding: 40px 16px 80px;
  text-align: center;
  margin-top: 40px;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--muted);
}

.footer-writers {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.footer-writer {
  font-size: 13px;
  font-weight: 600;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state h2 {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  color: var(--muted);
}

/* === LAYOUT WITH SIDEBAR (desktop) === */
.content-with-sidebar {
  display: flex;
  gap: 0;
}

.content-main {
  flex: 1;
  min-width: 0;
}

.content-sidebar {
  display: none;
  width: 300px;
  flex-shrink: 0;
  padding-left: 32px;
  border-left: 1px solid var(--rule);
}

.sidebar-sticky {
  position: sticky;
  top: 60px;
  padding-top: 24px;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-section h4 {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.sidebar-article {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.sidebar-article h5 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 2px;
}

.sidebar-article h5 a { color: var(--ink); }
.sidebar-article h5 a:hover { color: var(--accent); }

.sidebar-article .byline {
  font-size: 11px;
  color: var(--muted);
}

/* === 404 / ERROR === */
.error-page {
  text-align: center;
  padding: 100px 24px;
}

.error-page h1 {
  font-family: 'Syne', sans-serif;
  font-size: 72px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.error-page p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 24px;
}

.error-page a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.2s;
}

.error-page a:hover {
  background: var(--accent);
  color: white;
}

/* === STRUCTURED DATA / SEO (hidden) === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* === TABLET (768px+) === */
@media (min-width: 768px) {
  .masthead {
    padding: 32px 24px 18px;
  }

  .masthead h1 {
    font-size: clamp(48px, 9vw, 80px);
  }

  .nav-inner {
    justify-content: center;
  }

  .hamburger { display: none; }
  .nav-logo { display: none; }

  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    width: auto;
    border: none;
    gap: 0;
  }

  .nav-links li a {
    padding: 12px 16px;
    border-bottom: none;
    font-size: 12px;
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 32px;
  }

  .article-card {
    padding: 24px 0;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 24px;
  }

  .ad-slot--leaderboard {
    max-width: 728px;
    height: 90px;
  }

  .ad-slot--in-article {
    max-width: 468px;
    height: 60px;
  }

  .ad-slot--footer {
    width: 728px;
    height: 90px;
  }

  .author-header {
    flex-direction: row;
    align-items: center;
  }

  .author-avatar {
    width: 100px;
    height: 100px;
    font-size: 44px;
  }
}

/* === DESKTOP (1024px+) === */
@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }

  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 32px;
  }

  .related-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 24px;
  }

  .content-sidebar {
    display: block;
  }

  .ad-slot--sidebar {
    display: flex;
  }

  .nav-links li a {
    padding: 14px 20px;
    font-size: 13px;
  }

  .hero-article h2 {
    font-size: clamp(32px, 4vw, 48px);
  }
}

/* === PRINT === */
@media print {
  .ad-slot, .main-nav, .site-footer, .ad-slot--footer { display: none; }
  .article-content { max-width: 100%; }
  body { background: white; }
}

/* Bottom padding for sticky footer ad */
body { padding-bottom: 60px; }

@media (min-width: 768px) {
  body { padding-bottom: 100px; }
}
