/* ============================================================
   Doctor With Data - base theme styles (assets/css/theme.css)
   Loaded on every page. Self-hosted fonts first, then base
   typography, header, footer, article chrome, author box.
   Landing-page sections live in landing.css; the calculator
   library lives in library.css.
   ============================================================ */

/* ---------- self-hosted fonts (no Google Fonts requests) ---------- */
@font-face{
  font-family:"Fraunces";
  src:url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight:100 900;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"Inter";
  src:url("../fonts/inter-var.woff2") format("woff2");
  font-weight:100 900;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"IBM Plex Mono";
  src:url("../fonts/ibmplexmono-400.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"IBM Plex Mono";
  src:url("../fonts/ibmplexmono-600.woff2") format("woff2");
  font-weight:600;
  font-style:normal;
  font-display:swap;
}

/* ---------- base ---------- */
:root{
  --dwd-navy:#0F1B2D;
  --dwd-navy-soft:#16273D;
  --dwd-paper:#FAF7F2;
  --dwd-paper-dim:#F3EDE3;
  --dwd-ink:#1B2A3D;
  --dwd-muted:#5B6B7E;
  --dwd-orange:#FF8A00;
  --dwd-orange-deep:#B45309;
  --dwd-teal:#14B8A6;
  --dwd-teal-deep:#0E7C70;
  --dwd-line:#E7DCCB;
  --dwd-radius:14px;
  --dwd-serif:"Fraunces",Georgia,"Times New Roman",serif;
  --dwd-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --dwd-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}
html{scroll-behavior:smooth}
body{
  background:var(--dwd-paper);
  color:var(--dwd-ink);
  font-family:var(--dwd-sans);
  -webkit-font-smoothing:antialiased;
}
a{color:var(--dwd-teal-deep)}
a:hover{color:var(--dwd-orange-deep)}

/* ---------- site header ---------- */
.dwd-site-header{
  background:var(--dwd-navy);
  color:var(--dwd-paper);
  padding:14px 0;
  position:sticky;
  top:0;
  z-index:50;
}
.dwd-site-header .dwd-header-inner{
  max-width:1120px;
  margin:0 auto;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}
.dwd-brand,
.dwd-brand a{
  font-family:var(--dwd-serif);
  font-weight:700;
  font-size:1.3rem;
  color:#fff;
  text-decoration:none;
  letter-spacing:-0.01em;
}
.dwd-brand a:hover{color:var(--dwd-orange)}
.dwd-brand .dwd-brand-accent{color:var(--dwd-orange)}
.dwd-menu{list-style:none;margin:0;padding:0;display:flex;gap:22px;flex-wrap:wrap}
.dwd-menu a{
  color:#C9D4E2;
  text-decoration:none;
  font-size:.95rem;
  font-weight:600;
}
.dwd-menu a:hover{color:#fff}

/* ---------- shared section chrome ---------- */
.dwd-wrap{max-width:1120px;margin:0 auto;padding-left:20px;padding-right:20px}
.dwd-eyebrow{
  font-family:var(--dwd-mono);font-size:.78rem;letter-spacing:.14em;
  text-transform:uppercase;color:var(--dwd-orange-deep);font-weight:600;
}
.dwd-section-title{
  font-family:var(--dwd-serif);font-weight:600;color:var(--dwd-navy);
  font-size:1.9rem;line-height:1.2;letter-spacing:-0.01em;margin:12px 0 0;
}
.dwd-section-sub{color:var(--dwd-muted);font-size:1.02rem;max-width:620px;margin:12px 0 0}

/* ---------- post meta (byline + reviewed line) ---------- */
.dwd-post-meta{
  font-family:var(--dwd-mono);
  font-size:.82rem;
  color:var(--dwd-muted);
  margin:14px 0 26px;
}
.dwd-post-meta a{color:var(--dwd-teal-deep);text-decoration:none;font-weight:600}
.dwd-post-meta a:hover{color:var(--dwd-orange-deep)}

/* ---------- author box ---------- */
.dwd-author-card{
  display:flex;flex-direction:column;gap:20px;background:#fff;
  border:1px solid var(--dwd-line);border-radius:var(--dwd-radius);
  padding:30px;margin:48px 0 0;
}
.dwd-avatar{
  width:84px;height:84px;border-radius:50%;flex:none;
  background:var(--dwd-navy);color:var(--dwd-orange);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--dwd-serif);font-weight:700;font-size:1.7rem;
}
.dwd-author-card h3{
  font-family:var(--dwd-serif);font-weight:600;font-size:1.35rem;color:var(--dwd-navy);margin:8px 0 0;
}
.dwd-author-role{font-family:var(--dwd-mono);font-size:.8rem;color:var(--dwd-muted);margin:4px 0 0}
.dwd-author-bio{color:var(--dwd-muted);font-size:.98rem;margin:12px 0 0;max-width:640px}
.dwd-author-reviewed{
  font-family:var(--dwd-mono);font-size:.8rem;color:var(--dwd-teal-deep);font-weight:600;margin:14px 0 0;
}
.dwd-meter-link{
  display:inline-block;margin-top:4px;font-weight:600;font-size:.92rem;
  color:var(--dwd-teal-deep);text-decoration:none;border-bottom:2px solid transparent;
}
.dwd-meter-link:hover{border-color:var(--dwd-teal-deep)}
@media (min-width:768px){
  .dwd-author-card{flex-direction:row;align-items:flex-start}
}

/* ---------- related posts ---------- */
.dwd-related{margin:56px 0 0}
.dwd-related-grid{display:grid;grid-template-columns:1fr;gap:16px;margin-top:24px}
.dwd-related-card{
  background:#fff;border:1px solid var(--dwd-line);border-radius:var(--dwd-radius);padding:22px;
}
.dwd-related-card h3{font-family:var(--dwd-serif);font-size:1.15rem;margin:0}
.dwd-related-card h3 a{color:var(--dwd-navy);text-decoration:none}
.dwd-related-card h3 a:hover{color:var(--dwd-orange-deep)}
.dwd-related-meta{font-family:var(--dwd-mono);font-size:.78rem;color:var(--dwd-muted);margin:8px 0 0}
@media (min-width:768px){.dwd-related-grid{grid-template-columns:repeat(3,1fr)}}

/* ---------- site footer ---------- */
.dwd-site-footer{background:var(--dwd-navy);color:#A9B8CC;padding:56px 0 32px}
.dwd-footer-grid{display:grid;grid-template-columns:1fr;gap:32px;max-width:1120px;margin:0 auto;padding:0 20px}
.dwd-footer-brand{font-family:var(--dwd-serif);font-size:1.25rem;color:#fff;font-weight:600}
.dwd-footer-tag{font-size:.9rem;margin:8px 0 0;max-width:300px}
.dwd-site-footer h4{
  font-family:var(--dwd-mono);font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;
  color:var(--dwd-orange);margin:0 0 14px;font-weight:600;
}
.dwd-site-footer .dwd-menu{flex-direction:column;gap:10px}
.dwd-site-footer .dwd-menu a{font-weight:400;font-size:.94rem}
.dwd-footer-base{
  max-width:1120px;margin:44px auto 0;padding:22px 20px 0;
  border-top:1px solid rgba(250,247,242,.14);
  font-size:.82rem;display:flex;flex-direction:column;gap:8px;
}
@media (min-width:768px){
  .dwd-footer-grid{grid-template-columns:1.4fr 1fr 1fr}
  .dwd-footer-base{flex-direction:row;justify-content:space-between;align-items:center}
}

/* ---------- article body ---------- */
.dwd-article-body{font-size:1.05rem;line-height:1.75}
.dwd-article-body h2,.dwd-article-body h3{color:var(--dwd-navy);margin-top:2em}
.dwd-article-body img{border-radius:10px}
.dwd-article-body blockquote{
  border-left:3px solid var(--dwd-orange);margin-left:0;padding-left:20px;color:var(--dwd-muted);font-style:italic;
}

/* ---------- 404 ---------- */
.dwd-404{text-align:center;padding:80px 20px}
.dwd-404 h1{font-family:var(--dwd-serif);font-size:3rem;color:var(--dwd-navy);margin:0}
.dwd-404 p{color:var(--dwd-muted);max-width:520px;margin:16px auto 0}
.dwd-404 .dwd-hero-ctas{justify-content:center}

/* ---------- search / archive cards ---------- */
.dwd-loop-card{
  background:#fff;border:1px solid var(--dwd-line);border-radius:var(--dwd-radius);
  padding:26px;margin-bottom:20px;
}
.dwd-loop-card h2{font-family:var(--dwd-serif);margin:0 0 8px;font-size:1.5rem}
.dwd-loop-card h2 a{color:var(--dwd-navy);text-decoration:none}
.dwd-loop-card h2 a:hover{color:var(--dwd-orange-deep)}
.dwd-loop-card p{color:var(--dwd-muted);margin:0}

/* ---------- buttons ---------- */
.dwd-btn{
  display:inline-block;font-weight:700;font-size:1rem;text-decoration:none;
  padding:14px 30px;border-radius:10px;transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease;
}
.dwd-btn:hover{transform:translateY(-3px)}
.dwd-btn-primary{background:var(--dwd-orange);color:var(--dwd-navy)}
.dwd-btn-primary:hover{box-shadow:0 10px 24px rgba(255,138,0,.35);color:var(--dwd-navy)}
.dwd-btn-ghost{border:1.5px solid rgba(250,247,242,.45);color:var(--dwd-paper)}
.dwd-btn-ghost:hover{border-color:var(--dwd-paper);color:#fff}
.dwd-hero-ctas{display:flex;flex-wrap:wrap;gap:14px;margin-top:30px}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}
