/* =====================================================
   InterestCal — Static Site Design System
   ===================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:          hsl(222, 22%, 5%);
  --bg-card:     hsl(220, 20%, 9%);
  --bg-muted:    hsl(220, 16%, 12%);
  --bg-input:    hsl(220, 16%, 13%);
  --border:      hsl(220, 16%, 16%);
  --fg:          hsl(210, 20%, 92%);
  --fg-muted:    hsl(215, 14%, 50%);
  --fg-subtle:   hsl(215, 14%, 38%);
  --primary:     hsl(160, 84%, 39%);
  --primary-fg:  hsl(222, 22%, 5%);
  --primary-dim: hsl(160, 84%, 39%, 0.12);
  --accent:      hsl(38, 92%, 50%);
  --red:         hsl(0, 72%, 51%);
  --radius:      0.75rem;
  --radius-sm:   0.5rem;
  --shadow-card: 0 4px 24px -4px hsl(0 0% 0% / 0.5);
  --font-body:   'DM Sans', system-ui, sans-serif;
  --font-head:   'Space Grotesk', system-ui, sans-serif;
  --transition:  0.15s ease;
  --max-w:       1200px;
  --container-px: 1.25rem;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--fg);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--fg-muted); }
strong { color: var(--fg); font-weight: 600; }

.gradient-text {
  background: linear-gradient(135deg, hsl(160,84%,39%), hsl(160,84%,55%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.container--narrow { max-width: 760px; }
main { flex: 1; }

.section { padding: 3rem 0; }
.section--sm { padding: 1.5rem 0; }

/* ── Grid System ── */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsl(220, 22%, 6%, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.logo { flex: 1; justify-content: flex-start; display: flex; align-items: center; gap: 0.5rem; }
.logo img { height: 30px; }
.logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.125rem; color: var(--fg); }
.logo-text span { color: var(--primary); }

.site-nav { flex: 0 0 auto; display: flex; justify-content: center; align-items: center; gap: 1.5rem; }
.header-actions { flex: 1; justify-content: flex-end; display: flex; align-items: center; gap: 0.75rem; }
.site-nav a {
  font-size: 0.875rem;
  color: var(--fg-muted);
  transition: color var(--transition);
}
.site-nav a:hover, .site-nav a.active { color: var(--fg); text-decoration: none; }

/* ── Header Actions (Search & Currency) ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.search-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
}
.search-btn:hover {
  border-color: var(--fg-muted);
  color: var(--fg);
}
.search-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search-btn kbd {
  background: rgba(255,255,255,0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: inherit;
  color: var(--fg-muted);
}
.currency-picker {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-picker select {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.currency-picker select:hover {
  border-color: var(--fg-muted);
}
.currency-picker select:focus {
  outline: none;
  border-color: var(--accent-green);
}
.currency-picker svg {
  position: absolute;
  right: 0.5rem;
  width: 14px;
  height: 14px;
  stroke: var(--fg-muted);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}
.mobile-header-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
/* Mobile layout rules */
@media (max-width: 768px) {
  .site-nav, .header-actions { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg-muted);
  padding: 0.25rem;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh; /* Replaces bottom: 0 to guarantee it spans the whole height */
  width: 60%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 5rem 1.5rem 2rem;
  border-right: 1px solid var(--border);
  border-bottom: none;
  background: hsl(220, 22%, 6%, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateX(-100%);
  opacity: 1;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}
.mobile-nav.open { 
  transform: translateX(0);
  visibility: visible;
}
.mobile-nav a { 
  display: block;
  font-size: 1.125rem; 
  font-weight: 500; 
  color: var(--fg-muted); 
  padding: 0.75rem 1rem; 
  margin: 0.25rem 0; /* Adding margin for spacing between blocks */
  border-radius: var(--radius-sm, 0.5rem);
  background: rgba(255, 255, 255, 0.03); /* Default background block state */
  transition: all var(--transition);
}
.mobile-nav a:hover, .mobile-nav a.active { 
  color: var(--fg); 
  text-decoration: none; 
  background: rgba(255, 255, 255, 0.1); /* Brighter un-muted active state */
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 2rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}
.footer-links a { font-size: 0.8125rem; color: var(--fg-muted); }
.footer-links a:hover { color: var(--fg); text-decoration: none; }
.footer-copy { font-size: 0.75rem; color: var(--fg-subtle); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: hsl(160, 84%, 39%, 0.3);
  box-shadow: 0 8px 32px -4px hsl(160, 84%, 39%, 0.1);
}
.card--link { display: block; color: inherit; }
.card--link:hover { text-decoration: none; }

/* ── Calculator Card ── */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: block;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.calc-card:hover {
  border-color: hsl(160, 84%, 39%, 0.35);
  box-shadow: 0 8px 32px -4px hsl(160, 84%, 39%, 0.1);
  text-decoration: none;
}
.calc-card__badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.calc-card__title { font-size: 0.9375rem; font-weight: 600; color: var(--fg); margin-bottom: 0.375rem; }
.calc-card__desc { font-size: 0.8125rem; color: var(--fg-muted); line-height: 1.5; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), background var(--transition);
  text-decoration: none;
}
.btn:hover { text-decoration: none; opacity: 0.9; }
.btn--primary { background: var(--primary); color: var(--primary-fg); }
.btn--ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover { color: var(--fg); border-color: var(--fg-muted); opacity: 1; }
.btn--sm { font-size: 0.8125rem; padding: 0.375rem 0.875rem; }

/* ── Badge / Tag ── */
.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2em 0.65em;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--fg-muted);
}
.badge--investment { background: hsl(160, 84%, 39%, 0.12); color: hsl(160, 84%, 39%); }
.badge--retirement { background: hsl(280, 80%, 65%, 0.12); color: hsl(280, 80%, 75%); }
.badge--debt { background: hsl(0, 72%, 51%, 0.12); color: hsl(0, 80%, 65%); }
.badge--planning { background: hsl(38, 92%, 50%, 0.12); color: hsl(38, 92%, 50%); }
.badge--crypto { background: hsl(210, 100%, 60%, 0.12); color: hsl(210, 100%, 70%); }

/* ── Form Controls ── */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
}
.input-wrap { position: relative; }
.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8125rem;
  color: var(--fg-subtle);
  pointer-events: none;
}
.input-prefix { left: 0.75rem; }
.input-suffix { right: 0.75rem; }
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 16px; /* 16px to prevent iOS auto-zoom */
  padding: 0.75rem 1rem; /* Improved touch padding */
  transition: border-color var(--transition);
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(160, 84%, 39%, 0.15);
}
.form-input.has-prefix { padding-left: 2rem; }
.form-input.has-suffix { padding-right: 2.5rem; }
.form-error { font-size: 0.75rem; color: var(--red); }

/* ── Result Cards ── */
.results-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.result-card--highlight {
  border-color: hsl(160, 84%, 39%, 0.35);
  background: hsl(160, 84%, 39%, 0.06);
}
.result-card__label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fg-muted);
  margin-bottom: 0.25rem;
}
.result-card__value {
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}
.result-card--highlight .result-card__value { color: var(--primary); }

/* ── Calculator Layout ── */
.calc-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .calc-layout { grid-template-columns: 2fr 3fr; }
}
.calc-inputs-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: fit-content;
}
.calc-inputs-panel h2 { font-size: 1rem; color: var(--fg-muted); margin-bottom: 0.25rem; }
.calc-outputs-panel { display: flex; flex-direction: column; gap: 1rem; }
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.chart-canvas-wrap { height: 280px; position: relative; }

/* ── Content / Article ── */
.article-body { font-size: 0.9375rem; line-height: 1.75; }
.article-body h2 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.25rem; }
.article-body h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.article-body p { margin-bottom: 1rem; color: var(--fg-muted); }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--fg-muted); }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.35rem; }
.article-body strong { color: var(--fg); }

/* ── Breadcrumbs ── */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--fg-muted); }
.breadcrumbs a:hover { color: var(--fg); text-decoration: none; }
.breadcrumbs__sep { margin: 0 0.1rem; color: var(--fg-subtle); }
.breadcrumbs__current { color: var(--fg); }

/* ── FAQ ── */
.faq-item { border-top: 1px solid var(--border); padding: 1rem 0; }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-q {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0;
}
.faq-q svg { flex-shrink: 0; transition: transform var(--transition); color: var(--fg-muted); }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-a { font-size: 0.875rem; color: var(--fg-muted); margin-top: 0.75rem; line-height: 1.7; }
.faq-a[hidden] { display: none; }

/* ── Hero ── */
.hero {
  padding: 4rem 0 2rem;
  text-align: center;
}
.hero h1 { margin-bottom: 1rem; }
.hero p { font-size: 1.0625rem; max-width: 540px; margin: 0 auto 1.75rem; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ── Stats Bar ── */
.stats-bar { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 120px;
}
.stat-item__value { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--fg); }
.stat-item__label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted); margin-top: 0.15rem; }

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-header h2 { font-size: 1.125rem; }
.section-header a { font-size: 0.8125rem; color: var(--primary); }

/* ── Category Filter ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.filter-btn {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

/* ── Content List Items ── */
.content-list { display: flex; flex-direction: column; gap: 0.75rem; }
.content-list-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: block;
  transition: border-color var(--transition);
}
.content-list-item:hover { border-color: hsl(160,84%,39%,0.3); text-decoration: none; }
.content-list-item h3 { font-size: 0.9375rem; color: var(--fg); margin-bottom: 0.25rem; }
.content-list-item p { font-size: 0.8125rem; color: var(--fg-muted); }

/* ── Ads ── */
.ad-slot {
  width: 100%;
  overflow: hidden;
  text-align: center;
  border-radius: var(--radius-sm);
  min-height: 90px;
}
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--sidebar { min-height: 250px; }

/* ── Related Content ── */
.related-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ── Blog Article Grid ── */
.blog-article-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .blog-article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .blog-article-grid { grid-template-columns: 1fr; }
}
.related-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: all var(--transition);
}
.related-item:hover { color: var(--fg); border-color: hsl(160,84%,39%,0.3); text-decoration: none; }

/* ── Page header ── */
.page-title-section { padding: 2rem 0 1.5rem; }
.page-title-section h1 { margin-bottom: 0.5rem; }
.page-title-section p { font-size: 1rem; }

/* ── Comparison Table ── */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.compare-table th, .compare-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.compare-table th { font-family: var(--font-head); font-weight: 600; color: var(--fg-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.compare-table td { color: var(--fg-muted); }
.compare-table tr:last-child td { border-bottom: none; }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-muted { color: var(--fg-muted); }
.text-primary { color: var(--primary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.pt-4 { padding-top: 1rem; }
.pb-8 { padding-bottom: 2rem; }
.py-8 { padding: 2rem 0; }
.py-12 { padding: 3rem 0; }
.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Reset button styles for calc controls ── */
.calc-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 2.5rem 0 1.5rem; }
  .stats-bar { gap: 0.625rem; }
  .stat-item { min-width: 100px; padding: 0.75rem 1rem; }
  h1 { font-size: 1.75rem; }
  .calc-inputs-panel, .chart-container { padding: 1rem; }
  .chart-canvas-wrap { height: 240px; }
}
@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
  :root { --container-px: 2rem; }
}
@media (min-width: 1024px) {
  :root { --container-px: 2.5rem; }
}

/* ── Search Modal ── */
.search-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; justify-content: center; align-items: flex-start; padding-top: 10vh; opacity: 0; visibility: hidden; transition: all 0.2s ease; }
.search-modal.open { opacity: 1; visibility: visible; }
.search-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.search-modal-content { position: relative; width: 100%; max-width: 600px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 20px 40px rgba(0,0,0,0.4); overflow: hidden; transform: translateY(-20px); transition: transform 0.2s ease; }
.search-modal.open .search-modal-content { transform: translateY(0); }
.search-header { display: flex; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); gap: 0.75rem; }
.search-header svg { color: var(--fg-muted); }
.search-header input { flex: 1; background: transparent; border: none; font-size: 1.125rem; color: var(--fg); outline: none; }
.search-header input::placeholder { color: var(--fg-subtle); }
.search-header button { background: var(--bg-muted); border: 1px solid var(--border); color: var(--fg-muted); padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem; cursor: pointer; }
.search-results { max-height: 400px; overflow-y: auto; }
.search-item { display: block; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); transition: background 0.15s ease; }
.search-item:hover { background: rgba(255,255,255,0.03); text-decoration: none; }
.search-item-title { font-weight: 600; color: var(--primary); margin-bottom: 0.25rem; }
.search-item-desc { font-size: 0.8125rem; color: var(--fg-muted); }

/* ── Author Bio Card ── */
.author-bio-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition);
}
.author-bio-card:hover {
  border-color: hsl(160, 84%, 39%, 0.3);
}
.author-bio-card__img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.author-bio-card__content {
  flex: 1;
}
.author-bio-card__name {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}
.author-bio-card__name a {
  color: var(--fg);
  text-decoration: none;
}
.author-bio-card__name a:hover {
  color: var(--primary);
}
.author-bio-card__role {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.author-bio-card__text {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 560px) {
  .author-bio-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
  }
}
