:root{
  --navy:#12233F;
  --navy-deep:#0A1728;
  --paper:#E9EFF0;
  --paper-card:#FBFAF6;
  --ink:#12233F;
  --ink-soft:#4A5B72;
  --seal:#A32E2A;
  --seal-deep:#7E211E;
  --line: rgba(18,35,63,0.16);
  --line-soft: rgba(18,35,63,0.09);
  --display: 'Fraunces', Georgia, serif;
  --body: 'IBM Plex Sans', -apple-system, sans-serif;
}

html[data-theme="dark"]{
  --paper:#0D1626;
  --paper-card:#141F33;
  --ink:#E8ECF1;
  --ink-soft:#9BACC2;
  --line: rgba(232,236,241,0.14);
  --line-soft: rgba(232,236,241,0.08);
}
html[data-theme="dark"] body{ background:var(--paper); }

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family:var(--body);
  color:var(--ink);
  background:var(--paper);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  transition:background .2s ease, color .2s ease;
}
img,svg{display:block; max-width:100%;}
a{color:inherit;}
button{font-family:inherit; cursor:pointer;}
.wrap{ max-width:1080px; margin:0 auto; padding:0 32px; }
.wrap-narrow{ max-width:720px; margin:0 auto; padding:0 32px; }
@media (max-width:640px){ .wrap, .wrap-narrow{padding:0 20px;} }

/* ---- Top bar (shared) ---- */
.topbar{
  background:var(--navy-deep);
  color:#F2F4F0;
  padding:20px 0;
  position:sticky;
  top:0;
  z-index:200;
  border-bottom:1px solid rgba(237,239,234,0.12);
}
.topbar::after{
  content:"";
  position:absolute; left:0; right:0; bottom:0; height:1px;
  background:repeating-linear-gradient(90deg, rgba(242,244,240,0.35) 0 10px, transparent 10px 20px);
}
.topbar-row{
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:16px;
}
.brand{ font-family:var(--display); font-weight:500; font-size:1.1rem; text-decoration:none; letter-spacing:0.02em; color:#F2F4F0; }
.brand span{ color:#B9C4D4; font-family:var(--body); font-size:0.76rem; display:block; font-weight:400; margin-top:2px; }

.nav-right{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.nav-links{ display:flex; align-items:center; gap:2px; flex-wrap:wrap; }
.nav-links a{
  color:#D9DFE8;
  text-decoration:none;
  font-size:0.9rem;
  padding:9px 14px;
  border-radius:2px;
  transition:background .2s ease, color .2s ease;
}
.nav-links a:hover{ background:rgba(237,239,234,0.08); color:#fff; }

.theme-toggle{
  background:transparent;
  border:1px solid rgba(237,239,234,0.4);
  color:#EDEFEA;
  width:38px;
  height:38px;
  border-radius:2px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:background .2s ease, border-color .2s ease;
  margin-left:6px;
  flex-shrink:0;
}
.theme-toggle:hover{ background:rgba(237,239,234,0.08); border-color:#EDEFEA; }
.theme-toggle svg{ width:16px; height:16px; }
.theme-toggle .icon-sun{ display:none; }
html[data-theme="dark"] .theme-toggle .icon-moon{ display:none; }
html[data-theme="dark"] .theme-toggle .icon-sun{ display:block; }

/* ---- Page header ---- */
.page-head{ padding:56px 0 20px; }
.page-head .eyebrow{ font-size:0.85rem; color:var(--ink-soft); }
.page-head .eyebrow a{ text-decoration:none; color:var(--ink-soft); border-bottom:1px solid var(--line); }
.page-head .eyebrow a:hover{ color:var(--seal); }
.page-head h1{
  font-family:var(--display); font-weight:500;
  font-size:clamp(1.8rem, 3.6vw, 2.6rem);
  line-height:1.2; margin-top:14px; max-width:22ch;
}
.page-head p.lead{ margin-top:14px; color:var(--ink-soft); max-width:56ch; font-size:1.02rem; }

/* ---- Blog index cards ---- */
.post-grid{
  display:grid;
  grid-template-columns:1fr;
  border-top:1px solid var(--line);
  margin-top:20px;
}
.post-card{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:26px;
  padding:32px 0;
  border-bottom:1px solid var(--line);
  text-decoration:none;
  color:var(--ink);
}
@media (max-width:640px){ .post-card{ grid-template-columns:1fr; gap:10px; } }
.post-card .tag{
  font-size:0.78rem;
  color:var(--ink-soft);
  letter-spacing:0.02em;
  align-self:start;
  padding-top:4px;
}
.post-card h2{
  font-family:var(--display);
  font-weight:500;
  font-size:1.35rem;
  line-height:1.3;
}
.post-card .excerpt{ margin-top:10px; color:var(--ink-soft); font-size:0.96rem; max-width:60ch; }
.post-card .meta{ margin-top:12px; font-size:0.8rem; color:#7C8CA1; }
.post-card:hover h2{ color:var(--seal); }

/* ---- Article ---- */
.article{ padding:8px 0 80px; }
.article-body{ font-size:1.05rem; color:var(--ink); }
.article-body p{ margin-bottom:20px; line-height:1.75; max-width:70ch; }
.article-body h2{
  font-family:var(--display); font-weight:500; font-size:1.5rem;
  margin:40px 0 14px; max-width:24ch;
}
.article-body ul{ margin:0 0 22px 22px; }
.article-body li{ margin-bottom:10px; line-height:1.6; max-width:66ch; }
.article-meta{ margin:16px 0 36px; font-size:0.85rem; color:var(--ink-soft); border-bottom:1px solid var(--line); padding-bottom:24px; }

.cta-box{
  margin-top:48px;
  background:var(--paper-card);
  border:1px solid var(--line);
  padding:32px;
}
.cta-box h3{ font-family:var(--display); font-weight:500; font-size:1.25rem; margin-bottom:10px; }
.cta-box p{ color:var(--ink-soft); margin-bottom:18px; max-width:56ch; }
.btn-primary{
  background:var(--seal); color:#FBF3EC; border:none;
  padding:13px 24px; font-size:0.95rem; font-weight:600;
  border-radius:2px; text-decoration:none; display:inline-block;
  transition:background .2s ease;
}
.btn-primary:hover{ background:var(--seal-deep); }

/* ---- Footer (shared) ---- */
footer{ background:var(--navy-deep); color:#B9C4D4; padding:44px 0 32px; font-size:0.88rem; }
.footer-grid{
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:28px;
  padding-bottom:24px; border-bottom:1px solid rgba(185,196,212,0.18); margin-bottom:20px;
}
.footer-grid .fname{ font-family:var(--display); color:#EDEFEA; font-size:1.05rem; }
.footer-grid .fcol div{ margin-top:6px; }
footer a{ text-decoration:none; color:#B9C4D4; }
footer a:hover{ color:#EDEFEA; }
.wa-link{ display:inline-flex; align-items:center; gap:8px; color:#EDEFEA !important; font-weight:600; }
.footer-legal{ font-size:0.78rem; color:#8C9AB0; line-height:1.7; max-width:76ch; }
.footer-legal a{ color:#A9B7C8; text-decoration:underline; }

/* ---------- WHATSAPP FLOAT ---------- */
.wa-float{
  position:fixed;
  left:20px;
  bottom:20px;
  z-index:9999;
  width:58px;
  height:58px;
  border-radius:50%;
  background:#25D366;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 26px rgba(10,23,40,0.32);
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease;
}
.wa-float:hover{ transform:scale(1.07); box-shadow:0 12px 30px rgba(10,23,40,0.4); }
.wa-float svg{ width:29px; height:29px; }
@media (max-width:640px){
  .wa-float{ left:16px; bottom:16px; width:52px; height:52px; }
  .wa-float svg{ width:26px; height:26px; }
}
