/* ===========================
   BioComputer — Theme CSS
   Noto Sans + Inter
   =========================== */

:root {
  --accent: #1a6b4a;
  --accent-light: #e8f5f0;
  --accent-dark: #0f4a33;
  --yellow: #1a6b4a;
  --yellow-light: #e8f5f0;
  --yellow-dark: #0f4a33;
  --sage: #a8d5c2;
  --sage-light: #e8f5f0;
  --peach: #ffd6c2;
  --lavender: #ddd6f3;
  --teal-light: #ddf0f5;
  --white: #ffffff;
  --bg: #f6f7f9;
  --text: #0f1923;
  --muted: #5a6575;
  --border: #e2e5ea;
  --radius: 14px;
  --max: 1100px;
  --font-body: 'Roboto', system-ui, sans-serif;
  --font-title: 'Roboto', system-ui, sans-serif;
  --font-ui: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; border-radius: var(--radius); }

/* ===========================
   HEADER
   =========================== */
.site-header {
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; }
.logo-badge { display: flex; align-items: center; gap: 0.55rem; }
.logo-sticky {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-sticky svg { width: 32px; height: 32px; }
.logo-text {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.nav a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }
.nav .nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 6px 16px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.82rem;
  border: 1.5px solid var(--accent-dark);
}
.nav .nav-cta:hover { background: var(--accent-dark); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}

/* ===========================
   LAYOUT
   =========================== */
.content-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
.content-wrap--single { grid-template-columns: 1fr 300px; }
.content-main { min-width: 0; }
.content-wrap-full {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ===========================
   SECTION LABEL
   =========================== */
.section-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

/* ===========================
   POST GRID & CARDS
   =========================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}


/* Image area — 3:2 ratio */
.post-card-img-wrap {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
}
.post-card-img-wrap::before {
  content: '';
  display: block;
  padding-top: 66.67%;
}
.post-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.3s;
}
.post-card:hover .post-card-img { transform: scale(1.03); }
.post-card-img-placeholder {
  background: var(--bg);
  text-decoration: none;
}
.post-card-img-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-cat {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.5;
}

.post-card-body {
  padding: 1.25rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.cat-pill {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 9px;
  border-radius: 99px;
}
.cat-dna             { background: #e0f0ff; color: #1a4d8f; }
.cat-ai-biology      { background: #e8f5e9; color: #1a6b35; }
.cat-bci             { background: #f3e8ff; color: #6b1a9a; }
.cat-synthetic-biology { background: #fff3e0; color: #a05000; }
.cat-biometrics      { background: #e0f7fa; color: #006b7a; }
.cat-medical         { background: #fce4ec; color: #9a1a3a; }
.cat-longevity       { background: #f9fbe7; color: #5a6b1a; }
.cat-biocomputing    { background: #e8f5f0; color: #0f4a33; }

.post-date {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: auto;
}
.post-card-body h2 {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.post-card-body h2 a:hover { color: var(--muted); }
.post-card-body > p {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.7;
  flex: 1;
}
.post-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  margin-top: auto;
}
.read-more {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  transition: letter-spacing 0.2s;
}
.read-more:hover { letter-spacing: 0.02em; }
.read-time {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ===========================
   PAGINATION
   =========================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3rem;
  list-style: none;
  padding: 0;
}
.pagination a,
.pagination span {
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 0.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  transition: all 0.15s;
  text-decoration: none;
}
.pagination a:hover { background: var(--accent-light); border-color: var(--accent); }
.pagination span.active { background: var(--accent); border-color: var(--accent-dark); color: #fff; font-weight: 700; }

/* ===========================
   SINGLE POST
   =========================== */
.single-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.single-feature-img {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  aspect-ratio: 3 / 2;
}
.single-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}
.single-post { min-width: 0; }
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 0.5px solid var(--border);
}
.post-header h1 {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 0.5rem;
}
.post-desc { color: var(--muted); font-size: 1rem; margin-top: 0.5rem; line-height: 1.75; }
.post-content { font-size: 1rem; line-height: 1.85; }
.post-content h2 { font-family: var(--font-title); font-size: 1.35rem; font-weight: 700; margin: 2.5rem 0 1rem; letter-spacing: -0.01em; }
.post-content h3 { font-family: var(--font-title); font-size: 1.1rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
}
.post-content img { margin: 1.5rem 0; }
.post-content strong { font-weight: 700; }
.post-content hr { border: none; border-top: 0.5px solid var(--border); margin: 2rem 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.post-content th { background: var(--bg); font-family: var(--font-ui); font-weight: 600; padding: 0.6rem 1rem; border: 0.5px solid var(--border); text-align: left; }
.post-content td { padding: 0.6rem 1rem; border: 0.5px solid var(--border); }
.post-content tr:nth-child(even) td { background: var(--bg); }

.post-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 0.5px solid var(--border); }
.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag { font-family: var(--font-ui); font-size: 0.78rem; background: var(--accent-light); color: var(--accent-dark); padding: 3px 10px; border-radius: 99px; }
.tag:hover { background: #c8e6d8; }

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--white);
  border-top: 0.5px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-logo { font-family: var(--font-ui); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.03em; margin-bottom: 1rem; }
.footer-sticky { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; vertical-align: middle; margin-right: 0.35rem; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-links a { font-family: var(--font-ui); font-size: 0.82rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.75rem; color: var(--muted); max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* ===========================
   PLAIN PAGE
   =========================== */
.page-wrap { max-width: 720px; margin: 0 auto; padding: 4rem 2rem 6rem; }
.page-wrap h1 { font-family: var(--font-title); font-size: 2rem; font-weight: 700; margin-bottom: 2rem; letter-spacing: -0.02em; }
.page-content { font-size: 1rem; line-height: 1.85; }
.page-content h2 { font-family: var(--font-title); font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.page-content p { margin-bottom: 1.25rem; color: var(--muted); }
.page-content a { color: var(--accent); text-decoration: underline; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .content-wrap, .content-wrap--single { grid-template-columns: 1fr; padding: 2rem 1.25rem 4rem; }
  .content-wrap-full { padding: 2rem 1.25rem 4rem; }
  .post-grid { grid-template-columns: 1fr; }
  .nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); padding: 1.25rem 2rem; border-bottom: 0.5px solid var(--border); gap: 1.25rem; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ===========================
   SHARE BUTTONS
   =========================== */
.share-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.share-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  border: 0.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  transition: all 0.15s;
  text-decoration: none;
}
.share-btn:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.share-x:hover { border-color: #000; color: #000; }
.share-facebook:hover { border-color: #1877f2; color: #1877f2; }
.share-linkedin:hover { border-color: #0a66c2; color: #0a66c2; }
