/* ═══════════════════════════════════════════════════════════════
   AI POTENTIAL — Blog Stylesheet
   Theme: Navy + Teal, light reading surface
   Fonts: Fraunces (display) + DM Sans (body)
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Dark surfaces (header, footer, CTA) */
  --bg: #0B1220;
  --surface: #111A2E;
  --surface-2: #172341;
  --text-on-dark: #F5F7FB;
  --text-on-dark-2: #C8D0E3;
  --muted-on-dark: #8A95AE;
  --border-dark: rgba(245,247,251,.12);
  --border-dark-strong: rgba(245,247,251,.22);

  /* Light reading surface */
  --reading-bg: #FAFBFC;
  --reading-surface: #FFFFFF;
  --reading-text: #1A1D26;
  --reading-text-2: #3D4254;
  --reading-muted: #6B7186;
  --reading-border: rgba(11,18,32,.08);
  --reading-border-strong: rgba(11,18,32,.14);

  /* Accent */
  --accent: #2EC4B6;
  --accent-2: #1D7E7A;
  --accent-dark: #228F85;
  --accent-text: #0B1220;

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --fs-900: clamp(2.25rem, 4vw + .5rem, 3.25rem);
  --fs-800: clamp(1.75rem, 3vw + .25rem, 2.5rem);
  --fs-700: clamp(1.25rem, 1.5vw + .5rem, 1.5rem);
  --fs-600: 1.25rem;
  --fs-500: 1.0625rem;
  --fs-400: 0.975rem;
  --fs-300: 0.875rem;
  --fs-200: 0.8125rem;
  --fs-100: 0.75rem;

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;

  --ls-tight: -0.025em;
  --ls-caps: 0.08em;
  --ls-wide: 0.04em;

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.25rem; --s-6: 1.5rem; --s-7: 2rem; --s-8: 2.5rem;
  --s-9: 3rem; --s-10: 4rem; --s-11: 5rem; --s-12: 6rem;

  --r-1: 10px; --r-2: 16px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --sh-2: 0 1px 2px rgba(0,0,0,.06), 0 16px 40px rgba(0,0,0,.10);
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-out: cubic-bezier(0,.55,.45,1);
  --dur-1: 140ms; --dur-2: 220ms; --dur-3: 360ms;

  --maxw: 1100px;
  --maxw-narrow: 720px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

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

body {
  font-family: var(--font-body);
  background: var(--reading-bg);
  color: var(--reading-text);
  line-height: var(--lh-normal);
  font-size: var(--fs-400);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--reading-text); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

/* ═══════════════════════════════════════
   SITE HEADER
   ═══════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(11,18,32,.95);
  border-bottom: 1px solid var(--border-dark);
}
.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-4) 0;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-on-dark);
}
.site-brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid var(--border-dark-strong);
  display: grid; place-items: center;
  color: var(--accent-text);
  font-weight: 800;
  font-size: var(--fs-200);
  flex-shrink: 0;
}
.site-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-400);
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.site-nav a {
  text-decoration: none;
  color: var(--text-on-dark-2);
  font-size: var(--fs-300);
  font-weight: 500;
  transition: color var(--dur-1) var(--ease);
}
.site-nav a:hover { color: var(--text-on-dark); }
.site-nav .nav-cta {
  padding: 0.45rem 0.85rem;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: var(--fs-200);
  transition: filter var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.site-nav .nav-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: var(--accent-text);
}

/* ═══════════════════════════════════════
   ARTICLE HEADER — dark band
   ═══════════════════════════════════════ */
.article-header-band {
  background: var(--bg);
  padding: var(--s-11) 0 var(--s-10);
  position: relative;
}
.article-header-band::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(800px 500px at 20% 80%, rgba(46,196,182,.08), transparent 65%),
    radial-gradient(600px 400px at 80% 20%, rgba(138,149,174,.05), transparent 60%);
}
.article-header { position: relative; z-index: 1; }
.article-category {
  font-family: var(--font-body);
  font-size: var(--fs-100);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--s-5);
}
.article-category::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: var(--accent);
}
.article-title {
  font-size: var(--fs-900);
  line-height: var(--lh-tight);
  margin-bottom: var(--s-3);
  color: var(--text-on-dark);
}
.article-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-600);
  color: var(--text-on-dark-2);
  margin-bottom: var(--s-6);
  font-weight: 300;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-size: var(--fs-200);
  color: var(--muted-on-dark);
  font-weight: 500;
}
.article-meta .sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--muted-on-dark);
  opacity: 0.5;
}
.article-meta .meta-author {
  color: var(--text-on-dark);
  font-weight: 600;
}

/* ═══════════════════════════════════════
   READING AREA
   ═══════════════════════════════════════ */
.article-reading { padding: var(--s-10) 0 var(--s-12); }

/* ═══════════════════════════════════════
   KEY TAKEAWAYS
   ═══════════════════════════════════════ */
.takeaways {
  background: var(--reading-surface);
  border: 1px solid var(--reading-border);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--r-2) var(--r-2);
  padding: var(--s-7) var(--s-7) var(--s-6);
  margin-bottom: var(--s-9);
  box-shadow: var(--sh-1);
}
.takeaways-label {
  font-family: var(--font-body);
  font-size: var(--fs-200);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: var(--s-5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.takeaways-label::before { content: '◆'; font-size: 0.6em; }
.takeaways ul { list-style: none; padding: 0; }
.takeaways li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: var(--s-3);
  font-size: var(--fs-500);
  color: var(--reading-text-2);
  line-height: var(--lh-relaxed);
}
.takeaways li:last-child { margin-bottom: 0; }
.takeaways li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ═══════════════════════════════════════
   BLOG BODY
   ═══════════════════════════════════════ */
.blog-body {
  font-size: var(--fs-500);
  line-height: var(--lh-relaxed);
  color: var(--reading-text-2);
}
.blog-body > * + * { margin-top: var(--s-6); }
.blog-body p { max-width: 68ch; }

.blog-body h2 {
  font-size: var(--fs-800);
  line-height: var(--lh-tight);
  margin-top: var(--s-11);
  margin-bottom: var(--s-4);
  padding-top: var(--s-9);
  position: relative;
  color: var(--reading-text);
}
.blog-body h2::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2.5rem; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.blog-body h3 {
  font-size: var(--fs-700);
  line-height: var(--lh-snug);
  margin-top: var(--s-8);
  margin-bottom: var(--s-3);
  color: var(--reading-text);
}
.blog-body h4 {
  font-size: var(--fs-600);
  line-height: var(--lh-snug);
  margin-top: var(--s-7);
  margin-bottom: var(--s-2);
  font-weight: 500;
  color: var(--reading-text);
}
.blog-body a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color var(--dur-2) var(--ease);
}
.blog-body a:hover {
  color: var(--reading-text);
  text-decoration: underline;
}

/* Blockquote */
.blog-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--s-5);
  margin: var(--s-7) 0;
  font-style: italic;
  color: var(--reading-muted);
}
.blog-body blockquote p { font-size: var(--fs-400); }

/* Pull quote */
.blog-body .pullquote {
  border-left: none; border: none;
  padding: var(--s-9) 0;
  margin: var(--s-10) 0;
  text-align: center;
  font-style: normal;
  position: relative;
}
.blog-body .pullquote::before {
  content: '';
  display: block;
  width: 4rem; height: 3px;
  background: var(--accent);
  margin: 0 auto var(--s-7);
  border-radius: 2px;
}
.blog-body .pullquote::after {
  content: '';
  display: block;
  width: 4rem; height: 3px;
  background: var(--accent);
  margin: var(--s-7) auto 0;
  border-radius: 2px;
}
.blog-body .pullquote p {
  font-family: var(--font-display);
  font-size: var(--fs-800);
  font-weight: 400;
  font-style: italic;
  color: var(--reading-text);
  line-height: var(--lh-snug);
  max-width: 52ch;
  margin: 0 auto;
}
.blog-body .pullquote cite {
  display: block;
  margin-top: var(--s-4);
  font-family: var(--font-body);
  font-size: var(--fs-300);
  font-style: normal;
  color: var(--reading-muted);
}

/* Lists */
.blog-body ul, .blog-body ol { padding-left: 1.4rem; max-width: 68ch; }
.blog-body li { margin-bottom: var(--s-2); line-height: var(--lh-relaxed); }
.blog-body li::marker { color: var(--accent); }

/* Inline code */
.blog-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--reading-border-strong);
  border-radius: 6px;
  background: rgba(11,18,32,.03);
  color: var(--reading-text);
}

/* Code blocks */
.blog-body pre {
  background: var(--bg);
  border: 1px solid var(--reading-border);
  border-radius: var(--r-1);
  padding: var(--s-5) var(--s-6);
  overflow-x: auto;
  margin: var(--s-7) 0;
}
.blog-body pre code {
  font-size: var(--fs-300);
  padding: 0; border: none; border-radius: 0;
  background: none; color: var(--text-on-dark-2);
  line-height: 1.6;
}

/* Figure / image */
.blog-body figure { margin: var(--s-9) 0; }
.blog-body figure img {
  border-radius: var(--r-2);
  border: 1px solid var(--reading-border);
  width: 100%;
}
.blog-body figcaption {
  margin-top: var(--s-3);
  font-size: var(--fs-200);
  color: var(--reading-muted);
  text-align: center;
  font-style: italic;
}

/* Callout */
.blog-body .callout {
  background: var(--reading-surface);
  border: 1px solid var(--reading-border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r-2) var(--r-2) 0;
  padding: var(--s-6) var(--s-7);
  margin: var(--s-8) 0;
  box-shadow: var(--sh-1);
}
.blog-body .callout-label {
  font-family: var(--font-body);
  font-size: var(--fs-200);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent-dark);
  margin-bottom: var(--s-3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.blog-body .callout-label::before { content: '→'; font-size: 0.85em; }
.blog-body .callout p {
  font-size: var(--fs-400);
  color: var(--reading-text-2);
  line-height: var(--lh-relaxed);
}
.blog-body .callout p + p { margin-top: var(--s-3); }

/* HR */
.blog-body hr {
  border: none;
  height: 1px;
  background: var(--reading-border);
  margin: var(--s-9) 0;
}
.blog-body strong { color: var(--reading-text); font-weight: 600; }
.blog-body em { font-style: italic; }

/* ═══════════════════════════════════════
   ARTICLE FOOTER — dark band
   ═══════════════════════════════════════ */
.article-footer-band {
  background: var(--bg);
  padding: var(--s-10) 0 var(--s-12);
  color: var(--text-on-dark);
}
.article-footer-rule {
  width: 3.75rem; height: 2px;
  background: var(--accent);
  margin-bottom: var(--s-6);
}
.article-author-name {
  font-family: var(--font-display);
  font-size: var(--fs-600);
  font-weight: 600;
  color: var(--text-on-dark);
  margin-bottom: var(--s-2);
}
.article-author-bio {
  font-size: var(--fs-300);
  color: var(--muted-on-dark);
  max-width: 50ch;
  line-height: var(--lh-relaxed);
}

/* CTA */
.article-cta {
  margin-top: var(--s-10);
  background: var(--surface-2);
  border: 1px solid var(--border-dark-strong);
  border-radius: var(--r-2);
  padding: var(--s-9) var(--s-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.article-cta h3 {
  font-size: var(--fs-800);
  margin-bottom: var(--s-3);
  margin-top: 0;
  color: var(--text-on-dark);
}
.article-cta p {
  font-size: var(--fs-400);
  color: var(--text-on-dark-2);
  max-width: 48ch;
  margin: 0 auto var(--s-7);
  line-height: var(--lh-relaxed);
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.8rem;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-body);
  font-size: var(--fs-300);
  font-weight: 700;
  text-decoration: none;
  transition: filter var(--dur-2) var(--ease), transform var(--dur-2) var(--ease),
              box-shadow var(--dur-3) var(--ease);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.cta-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(46,196,182,.30), 0 4px 14px rgba(0,0,0,.3);
  color: var(--accent-text);
}

/* More in category */
.article-more { margin-top: var(--s-10); }
.article-more-heading {
  font-size: var(--fs-600);
  margin-bottom: var(--s-6);
  margin-top: 0;
  color: var(--text-on-dark);
}
.article-more-card {
  display: block;
  text-decoration: none;
  padding: var(--s-5) var(--s-6);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid var(--border-dark);
  border-radius: var(--r-1);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease);
}
.article-more-card:hover {
  border-color: var(--border-dark-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  transform: translateY(-1px);
}
.article-more-card + .article-more-card { margin-top: var(--s-3); }
.article-more-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.article-more-card-title {
  font-family: var(--font-display);
  font-size: var(--fs-500);
  font-weight: 600;
  color: var(--text-on-dark);
  line-height: var(--lh-snug);
}
.article-more-card:hover .article-more-card-title { color: var(--accent); }
.article-more-card-type {
  font-size: var(--fs-100);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--muted-on-dark);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--r-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.article-more-card-desc {
  font-size: var(--fs-300);
  color: var(--muted-on-dark);
  margin-top: var(--s-2);
  line-height: var(--lh-normal);
}

/* ═══════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════ */
.site-footer {
  background: var(--bg);
  padding: var(--s-7) 0;
  border-top: 1px solid var(--border-dark);
}
.site-footer-content {
  font-size: var(--fs-200);
  color: var(--muted-on-dark);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --s-11: 3.5rem;
    --s-10: 3rem;
    --s-9: 2.5rem;
  }
  .article-meta { flex-wrap: wrap; gap: var(--s-2); }
  .article-meta .sep { display: none; }
  .blog-body .pullquote p { font-size: var(--fs-700); }
  .site-nav { gap: var(--s-3); }
  .site-nav .nav-label { display: none; }
  .article-cta { padding: var(--s-7) var(--s-6); }
  .article-more-card-top { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; }
}
