/* ── DESIGN SYSTEM ── */
:root {
  --sand: #F5EFE0;
  --sand-dark: #E8DEC8;
  --terra: #C4622D;
  --terra-light: #D4824D;
  --terra-deep: #8B3A18;
  --moss: #5C6B48;
  --ink: #2A1F14;
  --ink-light: #4A3828;
  --muted: #7A6B5A;
  --shell: #FAF6ED;
  --blue: #4A6FA5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--shell);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.1rem 7vw;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(245,239,224,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand-dark);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 600;
  color: var(--ink); text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 1.6rem; }
.nav-cv {
  font-size: 12px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s;
}
.nav-cv:hover { color: var(--terra); }
.nav-back {
  font-size: 12px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s;
}
.nav-back::before { content: '← '; }
.nav-back:hover { color: var(--terra); }

/* ── BLOG HOMEPAGE HERO ── */
.blog-hero {
  background: var(--sand);
  padding: 8rem 7vw 4rem;
  border-bottom: 1px solid var(--sand-dark);
  position: relative;
  overflow: hidden;
}
.blog-hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}
.hero-img-virus {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 52vw; max-width: 720px;
  pointer-events: none; opacity: 0.38;
  display: flex; align-items: center;
  mask-image: radial-gradient(ellipse 85% 80% at 60% 50%, black 28%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 60% 50%, black 28%, transparent 72%);
}
.hero-img-virus img {
  width: 100%; height: auto;
  display: block; object-fit: contain;
  mix-blend-mode: multiply;
}

/* ── PROTEIN DECORATION ── */
.protein-decoration {
  position: absolute; right: -40px; bottom: -20px;
  width: 38vw; max-width: 460px;
  pointer-events: none; opacity: 0.07;
}
.protein-decoration img {
  width: 100%; height: auto; display: block;
  mix-blend-mode: multiply;
}
.eyebrow {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 0.8rem;
}
.blog-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600; line-height: 1.1;
  color: var(--ink); margin-bottom: 1rem;
}
.blog-hero p {
  font-size: 1rem; color: var(--ink-light);
  max-width: 600px; line-height: 1.85;
}

/* ── CATEGORY TABS ── */
.blog-filter {
  padding: 0 7vw;
  background: var(--shell);
  border-bottom: 1px solid var(--sand-dark);
}
.btab-row {
  display: flex; gap: 0; flex-wrap: wrap;
}
.btab {
  background: none; border: none;
  padding: 0.9rem 1.2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.btab:hover { color: var(--ink); }
.btab.active { color: var(--terra); border-bottom-color: var(--terra); }

/* ── POST GRID ── */
.blog-grid-wrap { padding: 3.5rem 7vw 5rem; position: relative; overflow: hidden; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}
.bcard {
  background: var(--sand);
  border-radius: 4px;
  padding: 1.8rem;
  display: flex; flex-direction: column; gap: 0.55rem;
  transition: transform 0.18s;
  text-decoration: none; color: inherit;
}
.bcard:hover { transform: translateY(-3px); }
.bcard.hidden { display: none; }
.btop-opinion  { border-top: 3px solid var(--terra); }
.btop-industry { border-top: 3px solid var(--moss); }
.btop-technical { border-top: 3px solid var(--blue); }
.btop-tutorial { border-top: 3px solid var(--terra-light); }
.bcat {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.bcat.opinion   { color: var(--terra); }
.bcat.industry  { color: var(--moss); }
.bcat.technical { color: var(--blue); }
.bcat.tutorial  { color: var(--terra-light); }
.bstatus {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.bstatus.live { color: var(--moss); }
.btitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 600;
  color: var(--ink); line-height: 1.3;
}
.bdesc {
  font-size: 0.85rem; color: var(--muted);
  line-height: 1.7; margin-top: 0.1rem;
  flex: 1;
}
.bread {
  font-size: 11px; font-weight: 500;
  color: var(--terra); letter-spacing: 0.07em;
  text-transform: uppercase; margin-top: 0.4rem;
}

/* ── POST PAGE ── */
.post-hero {
  background: var(--sand);
  padding: 9rem 7vw 4rem;
  border-bottom: 1px solid var(--sand-dark);
}
.post-meta {
  display: flex; align-items: center;
  gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap;
}
.post-tag {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--moss); background: rgba(92,107,72,0.1);
  padding: 4px 10px; border-radius: 2px;
}
.post-tag.opinion   { color: var(--terra); background: rgba(196,98,45,0.1); }
.post-tag.industry  { color: var(--moss);  background: rgba(92,107,72,0.1); }
.post-tag.technical { color: var(--blue);  background: rgba(74,111,165,0.1); }
.post-tag.tutorial  { color: var(--terra-light); background: rgba(212,130,77,0.1); }
.post-date, .post-readtime { font-size: 12px; color: var(--muted); }
.post-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--sand-dark); display: inline-block;
}
h1.post-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600; line-height: 1.1;
  color: var(--ink); max-width: 820px; margin-bottom: 1.4rem;
}
.post-standfirst {
  font-size: 1.1rem; color: var(--ink-light);
  max-width: 680px; line-height: 1.8;
  font-family: 'Playfair Display', serif; font-style: italic;
}

/* ── POST BODY ── */
.post-body {
  max-width: 680px; margin: 0 auto; padding: 4rem 7vw;
}
.post-body p {
  font-size: 1rem; color: var(--ink-light);
  line-height: 1.9; margin-bottom: 1.6rem;
}
.post-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 600;
  color: var(--ink); margin: 3rem 0 1rem; line-height: 1.25;
}
.post-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem; font-weight: 600;
  color: var(--ink); margin: 2rem 0 0.7rem; font-style: italic;
}
.post-body em { font-style: italic; color: var(--ink); }
.post-body strong { color: var(--ink); font-weight: 500; }
.post-body a { color: var(--terra); }

blockquote {
  border-left: 3px solid var(--terra);
  padding: 0.2rem 0 0.2rem 1.8rem;
  margin: 2.5rem 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-style: italic;
  color: var(--ink-light); line-height: 1.7;
}

.divider {
  width: 40px; height: 2px;
  background: var(--terra); margin: 3rem 0;
}

.source-note {
  font-size: 0.82rem; color: var(--muted); font-style: italic;
  border-left: 2px solid var(--sand-dark);
  padding-left: 1rem; margin: 1.5rem 0; line-height: 1.6;
}

.callout {
  background: var(--sand); border-radius: 4px;
  padding: 1.4rem 1.6rem; margin: 2.2rem 0;
  border-left: 3px solid var(--moss);
}
.callout-label {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--moss); margin-bottom: 0.5rem;
}
.callout p {
  font-size: 0.9rem; color: var(--ink-light);
  line-height: 1.75; margin: 0;
}

/* ── EXPERIENCE BOXES ── */
.experience-box {
  background: var(--sand); border-radius: 4px;
  padding: 1.4rem 1.6rem; margin: 1.8rem 0;
  border-left: 3px solid var(--terra);
}
.experience-box.moss  { border-left-color: var(--moss); }
.experience-box.terra2 { border-left-color: var(--terra-light); }
.exp-label {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.35rem;
}
.exp-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 600;
  color: var(--ink); margin-bottom: 0.7rem;
}
.exp-body {
  font-size: 0.9rem; color: var(--ink-light);
  line-height: 1.8; margin: 0;
}

/* ── AUTHOR BIO ── */
.author-bio {
  background: var(--sand); border-radius: 4px;
  padding: 1.8rem; margin-top: 4rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.author-bio .label {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--terra);
}
.author-bio .name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 600; color: var(--ink);
}
.author-bio .bio {
  font-size: 0.88rem; color: var(--muted); line-height: 1.75;
}
.author-bio a {
  color: var(--terra); text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
}

/* ── RELATED POSTS ── */
.related {
  padding: 4rem 7vw;
  background: var(--sand);
  border-top: 1px solid var(--sand-dark);
}
.sec-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.related-card {
  background: var(--shell); padding: 1.4rem; border-radius: 4px;
}
.related-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 600;
  color: var(--ink); margin-bottom: 0.5rem; line-height: 1.3;
}
.related-card p {
  font-size: 0.83rem; color: var(--muted);
  line-height: 1.65; margin-bottom: 0;
}
.related-card .coming {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.5rem; display: block;
}
.related-card .read-link {
  font-size: 11px; font-weight: 500;
  color: var(--terra); text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-top: 0.5rem; display: inline-block;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(250,246,237,0.35);
  padding: 1.8rem 7vw;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; flex-wrap: wrap; gap: 0.5rem;
}
footer span { color: var(--terra-light); }
footer a {
  color: var(--terra-light); text-decoration: none;
}
footer a:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn-p {
  display: inline-block; padding: 0.7rem 1.7rem;
  background: var(--terra); color: var(--shell);
  border-radius: 2px; font-size: 14px; font-weight: 500;
  text-decoration: none; letter-spacing: 0.04em;
  transition: background 0.2s;
}
.btn-p:hover { background: var(--terra-deep); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .post-hero  { padding: 8rem 6vw 3rem; }
  .post-body  { padding: 3rem 6vw; }
  .related    { padding: 3rem 6vw; }
  .blog-hero  { padding: 7rem 6vw 3rem; }
  .blog-grid-wrap { padding: 2.5rem 6vw 4rem; }
  .blog-filter { padding: 0 6vw; }
  .hero-img-virus { width: 90vw; right: -10vw; top: auto; bottom: -5vh; opacity: 0.1; }
  .protein-decoration { display: none; }
}
