/* SD Drive Life — blog styles
   Distinct from money sites (Next.js, dark/urgent), comparison site (Astro, editorial),
   and directory (plain HTML, utility). This is a magazine/blog vibe:
   - Off-white background
   - Slab-serif headlines (Roboto Slab) + sans body (Inter)
   - Single warm accent color (amber)
*/

@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@500;700;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #fbfaf6;
  --bg-alt: #f3efe6;
  --ink: #18181b;
  --ink-soft: #3f3f46;
  --ink-muted: #71717a;
  --line: #e7e5e0;
  --accent: #d97706;
  --accent-dark: #92400e;
  --accent-soft: #fef3c7;
  --content-max: 1180px;
  --narrow-max: 760px;
  --serif: 'Roboto Slab', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow: 0 1px 2px rgba(20,20,20,0.04), 0 4px 12px rgba(20,20,20,0.05);
  --shadow-lift: 0 4px 8px rgba(20,20,20,0.06), 0 12px 32px rgba(20,20,20,0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

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

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

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

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--narrow-max); }

/* ─── HEADER ──────────────────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--accent);
  border-radius: 8px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.5px;
}
.brand-name { letter-spacing: -0.5px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-link {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--bg-alt);
  color: var(--ink);
  text-decoration: none;
}
.nav-link--active {
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.nav-link--alt {
  border-left: 1px solid var(--line);
  margin-left: 6px;
  padding-left: 18px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 12px;
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: 12px 0; }
  .nav-link--alt { border-left: 0; border-top: 1px solid var(--line); margin: 6px 0 0; padding-left: 0; }
}

/* ─── HOMEPAGE HERO ───────────────────────── */
.hero {
  padding: 64px 0 32px;
  background: var(--bg);
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 0 0 14px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -1px;
  max-width: 900px;
}
.hero-tagline {
  font-size: 19px;
  color: var(--ink-muted);
  margin: 0;
  max-width: 700px;
}

/* ─── SECTIONS ─────────────────────────────── */
.featured-section,
.latest-section,
.categories-section { padding: 48px 0; }
.about-strip {
  padding: 48px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}
.about-strip p { font-size: 17px; max-width: 720px; }

.section-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 24px;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.section-heading--lg { font-size: 32px; margin-bottom: 32px; }

/* ─── ARTICLE CARDS ────────────────────────── */
.grid {
  display: grid;
  gap: 32px;
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--3 { grid-template-columns: 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.card-image {
  display: block;
  height: 180px;
  background: var(--bg-alt);
  position: relative;
}
.card-image--sm { height: 160px; }
.card-image-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.card-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--accent-dark); text-decoration: none; }
.card-excerpt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: auto;
  padding-top: 8px;
}

/* Featured card variant */
.card--featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--bg);
  overflow: hidden;
}
.card--featured .card-image { height: 100%; min-height: 320px; }
.card--featured .card-title { font-size: 32px; line-height: 1.15; }
.card--featured .card-excerpt { font-size: 17px; }
.card--featured .card-body { padding: 36px; gap: 18px; justify-content: center; }
@media (max-width: 860px) {
  .card--featured { grid-template-columns: 1fr; }
  .card--featured .card-image { min-height: 220px; }
  .card--featured .card-title { font-size: 26px; }
  .card--featured .card-body { padding: 24px; }
}

/* ─── BADGE ───────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 5px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  text-decoration: none;
  width: fit-content;
}
.badge:hover { text-decoration: none; opacity: 0.85; }
.badge--sm { font-size: 11px; padding: 4px 8px; }

/* ─── CATEGORY GRID (Browse by Topic) ─────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .cat-grid { grid-template-columns: 1fr; } }

.cat-card {
  display: block;
  padding: 24px;
  background: var(--cat-bg);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  border-left: 4px solid var(--cat-color);
  transition: transform 0.2s;
}
.cat-card:hover { transform: translateY(-3px); text-decoration: none; }
.cat-card-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--cat-color);
  margin-bottom: 6px;
}
.cat-card-desc {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  line-height: 1.5;
}
.cat-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--cat-color);
}

/* ─── LAYOUT WITH SIDEBAR ─────────────────── */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 960px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
}
.content { min-width: 0; }

/* ─── SIDEBAR ─────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 32px; }
.sidebar-block {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}
.sidebar-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 14px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  width: fit-content;
}
.sidebar-popular {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sidebar-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.sidebar-rank {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  width: 24px;
}
.sidebar-popular-item a {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  display: block;
}
.sidebar-popular-item a:hover { color: var(--accent-dark); }
.sidebar-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sidebar-list li:last-child { border-bottom: 0; }
.sidebar-list a { color: var(--ink-soft); font-size: 14px; }

.newsletter p {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.newsletter-form input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
}
.newsletter-form button {
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.newsletter-form button:hover { background: var(--accent-dark); }
.newsletter-status { color: var(--accent-dark); font-size: 13px; min-height: 18px; }
.newsletter-fineprint { color: var(--ink-muted); font-size: 12px; margin: 0; }

/* ─── BREADCRUMB ──────────────────────────── */
.breadcrumb { padding: 24px 0 8px; }
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-muted);
}
.crumb a { color: var(--ink-muted); }
.crumb a:hover { color: var(--accent-dark); }
.crumb-sep { padding: 0 6px; color: var(--ink-muted); }
.crumb--current { color: var(--ink-soft); }

/* ─── ARTICLE PAGE ────────────────────────── */
.article-container { padding-bottom: 64px; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: start;
  margin-top: 12px;
}
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; gap: 48px; }
}
.article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 40px clamp(24px, 5vw, 56px);
}
.article-header { margin-bottom: 32px; }
.article-header-meta { margin-bottom: 16px; }
.article-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 24px;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.article-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.article-byline-text strong { font-weight: 600; color: var(--ink); display: block; }
.byline-role { font-size: 13px; color: var(--ink-muted); }
.article-byline-meta {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-muted);
}
.article-hero {
  height: 280px;
  border-radius: 10px;
  margin-bottom: 24px;
}
@media (max-width: 640px) { .article-hero { height: 180px; } }

/* TOC */
.toc {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 32px;
}
.toc-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.toc-item {
  font-size: 14px;
  padding: 4px 0;
}
.toc-item a {
  color: var(--ink-soft);
}
.toc-item a:hover { color: var(--accent-dark); }
.toc-level-3 { padding-left: 16px; font-size: 13px; }

/* Article body — the long-form reading area */
.article-body {
  font-size: 18px;
  line-height: 1.78;
  color: var(--ink-soft);
}
.article-body > * + * { margin-top: 1em; }
.article-body p { margin: 0 0 1.2em; }
.article-body h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.25;
  color: var(--ink);
  margin: 2em 0 0.6em;
  letter-spacing: -0.3px;
}
.article-body h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
  margin: 1.6em 0 0.4em;
}
.article-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-body a:hover { color: var(--accent); }
.article-body ul, .article-body ol {
  margin: 0 0 1.2em;
  padding-left: 24px;
}
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 8px 0 8px 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--ink-soft);
}
.article-body strong { color: var(--ink); }
.article-body code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, monospace;
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  margin-top: 32px;
}
.tag {
  display: inline-block;
  font-size: 13px;
  padding: 6px 12px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  border-radius: 20px;
  text-decoration: none;
}
.tag:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }

/* FAQ */
.faq-section {
  margin-top: 40px;
  padding: 32px;
  background: var(--bg-alt);
  border-radius: 10px;
}
.faq-section .section-heading { margin-bottom: 20px; }
.faq-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq-question {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.2s;
}
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

/* Social share */
.social-share {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 32px;
}
.share-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-muted);
  letter-spacing: 0.5px;
  margin-right: 8px;
}
.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}
.share-btn:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }

/* Author bio */
.author-bio {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  background: var(--bg-alt);
  border-radius: 10px;
  margin-top: 32px;
}
.author-bio-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  flex-shrink: 0;
}
.author-bio-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.author-bio-role {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.author-bio p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Related */
.related-articles { margin-top: 48px; }

/* ─── CATEGORY PAGE ───────────────────────── */
.category-hero {
  padding: 40px 32px;
  background: var(--cat-bg);
  border-left: 6px solid var(--cat-color);
  border-radius: 8px;
  margin-bottom: 40px;
}
.category-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 40px;
  color: var(--cat-color);
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.category-description {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 700px;
  line-height: 1.55;
}
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 15px;
  background: var(--bg-alt);
  border-radius: 10px;
}

/* ─── TAG PAGE ────────────────────────────── */
.tag-hero {
  padding: 32px 0 24px;
  margin-bottom: 24px;
}
.tag-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 36px;
  color: var(--ink);
  margin: 0 0 8px;
}

/* ─── ABOUT PAGE ──────────────────────────── */
.about-page h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 44px;
  margin: 24px 0 16px;
  letter-spacing: -0.8px;
}
.about-page h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  margin: 40px 0 16px;
}
.about-page .lead {
  font-size: 21px;
  color: var(--ink-soft);
  margin-bottom: 24px;
}
.about-page p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 24px 0;
}
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr; } }
.team-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 14px;
}
.team-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 4px;
}
.team-role {
  font-size: 13px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}
.team-bio {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}

/* ─── FOOTER ──────────────────────────────── */
.site-footer {
  margin-top: 80px;
  background: var(--ink);
  color: #d4d4d8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 56px 24px 32px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.brand--footer { color: #fff; margin-bottom: 14px; }
.brand--footer .brand-name { color: #fff; }
.brand--footer .brand-mark { background: var(--accent); color: var(--ink); }
.footer-about p { font-size: 14px; color: #a1a1aa; max-width: 360px; }
.footer-note { color: #71717a; font-size: 13px; }
.footer-col h4 {
  font-family: var(--serif);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin: 0 0 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 4px 0; }
.footer-col a {
  color: #d4d4d8;
  font-size: 14px;
  text-decoration: none;
}
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #27272a;
  padding: 20px 0;
}
.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: #71717a;
  text-align: center;
}
