/*
 * BioVeL — Biodiversity Science Reference
 * Palette  : #003D4F (deep marine teal) · #6DBE4E (chlorophyll green) · #F7F9F4 (near-white)
 * Fonts    : Zilla Slab (heading) · Fira Sans (body) — self-hosted
 * Prefix   : bv-
 * Archetype: research-hub
 */

/* ── SELF-HOSTED FONTS ─────────────────────────────────────────────────── */
@font-face {
  font-family: 'Zilla Slab';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/zilla-slab-400.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Zilla Slab';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/zilla-slab-600.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/fira-sans-400.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/fira-sans-500.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/fira-sans-600.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ── CUSTOM PROPERTIES ─────────────────────────────────────────────────── */
:root {
  --bv-teal:         #003D4F;
  --bv-teal-dark:    #002A37;
  --bv-teal-mid:     #005A70;
  --bv-green:        #6DBE4E;
  --bv-green-dark:   #4E9935;
  --bv-bg:           #F7F9F4;
  --bv-surface:      #FFFFFF;
  --bv-text:         #1A2E35;
  --bv-muted:        #5A7A84;
  --bv-border:       #D0E4DF;
  --bv-accent-bg:    #EAF5EE;
  --bv-max:          1140px;
  --bv-radius:       6px;
  --bv-f-head:       'Zilla Slab', Georgia, serif;
  --bv-f-body:       'Fira Sans', system-ui, sans-serif;
}

/* ── RESET ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--bv-f-body);
  color: var(--bv-text);
  background: var(--bv-bg);
  line-height: 1.68;
}
img, picture { display: block; max-width: 100%; height: auto; }
a { color: var(--bv-teal-mid); text-decoration: none; }
a:hover { color: var(--bv-green-dark); }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }
table { border-collapse: collapse; width: 100%; }

/* ── TYPOGRAPHY ────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--bv-f-head);
  font-weight: 600;
  line-height: 1.22;
  color: var(--bv-teal);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem);  margin-bottom: .9rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin-top: 2.2rem; margin-bottom: .75rem; }
h3 { font-size: clamp(1.1rem,  2vw, 1.3rem);  margin-top: 1.5rem; margin-bottom: .5rem; color: var(--bv-teal-mid); }
p  { margin-bottom: 1rem; }
strong { color: var(--bv-teal); }

/* ── LAYOUT ────────────────────────────────────────────────────────────── */
.bv-container { max-width: var(--bv-max); margin: 0 auto; padding: 0 1.5rem; }

/* ── HEADER / NAV ──────────────────────────────────────────────────────── */
.bv-header {
  background: var(--bv-teal);
  padding: .85rem 0;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,.28);
}
.bv-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.bv-logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.bv-logo__mark { flex-shrink: 0; }
.bv-logo__text {
  font-family: var(--bv-f-head);
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
}
.bv-logo__text em { font-style: normal; color: var(--bv-green); }
.bv-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.bv-nav a {
  color: rgba(255,255,255,.82);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .01em;
  transition: color .18s;
  white-space: nowrap;
}
.bv-nav a:hover,
.bv-nav a[aria-current="page"] { color: var(--bv-green); }
.bv-nav__burger {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  padding: .3rem .5rem;
  font-size: 1.1rem;
  line-height: 1;
}

/* ── BREADCRUMB ─────────────────────────────────────────────────────────── */
.bv-breadcrumb {
  padding: .65rem 0;
  font-size: .8rem;
  color: var(--bv-muted);
  border-bottom: 1px solid var(--bv-border);
  background: var(--bv-surface);
}
.bv-breadcrumb a { color: var(--bv-muted); }
.bv-breadcrumb a:hover { color: var(--bv-teal-mid); }
.bv-breadcrumb span { margin: 0 .4rem; color: var(--bv-border); }

/* ── HOMEPAGE MASTHEAD ──────────────────────────────────────────────────── */
.bv-masthead {
  background: linear-gradient(140deg, var(--bv-teal) 0%, var(--bv-teal-mid) 100%);
  padding: 3.8rem 0 3.2rem;
  color: #fff;
}
.bv-masthead__eyebrow {
  display: inline-block;
  background: var(--bv-green);
  color: var(--bv-teal);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .22rem .8rem;
  border-radius: 2px;
  margin-bottom: .9rem;
}
.bv-masthead__h1 {
  font-family: var(--bv-f-head);
  font-size: clamp(1.85rem, 4.5vw, 2.9rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.18;
  max-width: 680px;
}
.bv-masthead__sub {
  margin-top: .9rem;
  font-size: 1.05rem;
  color: rgba(255,255,255,.78);
  max-width: 560px;
  line-height: 1.6;
}
.bv-masthead__stats {
  display: flex;
  gap: 2.8rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}
.bv-stat__num {
  font-family: var(--bv-f-head);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--bv-green);
}
.bv-stat__lbl {
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  margin-top: .1rem;
}

/* ── TOPIC CARDS ────────────────────────────────────────────────────────── */
.bv-topics { padding: 3.5rem 0; }
.bv-section-title {
  font-family: var(--bv-f-head);
  font-size: 1.5rem;
  color: var(--bv-teal);
  margin-bottom: 1.5rem;
}
.bv-section-title span { color: var(--bv-green); }
.bv-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
}
.bv-card {
  background: var(--bv-surface);
  border: 1px solid var(--bv-border);
  border-radius: var(--bv-radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.bv-card:hover {
  box-shadow: 0 6px 20px rgba(0,61,79,.14);
  transform: translateY(-2px);
}
.bv-card__thumb {
  aspect-ratio: 4/3;
  background: var(--bv-teal);
  overflow: hidden;
  position: relative;
}
.bv-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bv-card__thumb-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bv-card__body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.bv-card__title {
  font-family: var(--bv-f-head);
  font-size: .98rem;
  font-weight: 600;
  color: var(--bv-teal);
  margin-bottom: .35rem;
  line-height: 1.25;
}
.bv-card__excerpt {
  font-size: .82rem;
  color: var(--bv-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: .75rem;
}
.bv-card__cta {
  font-size: .8rem;
  font-weight: 600;
  color: var(--bv-teal-mid);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: color .15s;
}
.bv-card__cta:hover { color: var(--bv-green-dark); }

/* ── FEATURED ARTICLE ───────────────────────────────────────────────────── */
.bv-featured {
  background: var(--bv-surface);
  border-top: 1px solid var(--bv-border);
  border-bottom: 1px solid var(--bv-border);
  padding: 3rem 0;
}
.bv-featured__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.8rem;
  align-items: center;
}
.bv-featured__img {
  border-radius: var(--bv-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bv-teal);
}
.bv-featured__img img { width: 100%; height: 100%; object-fit: cover; }
.bv-featured__tag {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--bv-green-dark);
  margin-bottom: .5rem;
}
.bv-featured__title {
  font-family: var(--bv-f-head);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--bv-teal);
  line-height: 1.22;
  margin-bottom: .8rem;
}
.bv-featured__desc {
  font-size: .95rem;
  color: var(--bv-muted);
  line-height: 1.65;
  margin-bottom: 1.3rem;
}
.bv-btn {
  display: inline-block;
  padding: .58rem 1.35rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: .88rem;
  transition: background .18s, color .18s;
}
.bv-btn--primary { background: var(--bv-teal); color: #fff; }
.bv-btn--primary:hover { background: var(--bv-teal-mid); color: #fff; }

/* ── ABOUT STRIP ────────────────────────────────────────────────────────── */
.bv-strip {
  background: var(--bv-teal);
  padding: 2.8rem 0;
}
.bv-strip__inner { max-width: 760px; }
.bv-strip h2 {
  font-family: var(--bv-f-head);
  font-size: 1.4rem;
  color: var(--bv-green);
  margin-bottom: .65rem;
}
.bv-strip p { color: rgba(255,255,255,.8); font-size: .97rem; line-height: 1.7; }
.bv-strip a { color: var(--bv-green); }
.bv-strip a:hover { color: #fff; }

/* ── ARTICLE PAGE ───────────────────────────────────────────────────────── */
.bv-page { padding: 2.2rem 0 4rem; }
.bv-page__layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 3rem;
  align-items: start;
}
.bv-article { min-width: 0; }
.bv-page__date { font-size: .8rem; color: var(--bv-muted); margin-bottom: .6rem; }
.bv-page__thumb {
  border-radius: var(--bv-radius);
  overflow: hidden;
  margin-bottom: 1.8rem;
  background: var(--bv-teal);
  aspect-ratio: 16/9;
}
.bv-page__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bv-article p  { margin-bottom: 1.05rem; }
.bv-article ul,
.bv-article ol { margin-bottom: 1.05rem; }
.bv-article h2 {
  border-left: 3px solid var(--bv-green);
  padding-left: .75rem;
}
.bv-article a  { color: var(--bv-teal-mid); border-bottom: 1px solid var(--bv-border); }
.bv-article a:hover { color: var(--bv-green-dark); border-bottom-color: var(--bv-green); }

/* ── INFOGRAPHIC ────────────────────────────────────────────────────────── */
.bv-infographic {
  margin: 2rem 0;
  border: 1px solid var(--bv-border);
  border-radius: var(--bv-radius);
  overflow: hidden;
  background: var(--bv-surface);
}
.bv-infographic img { width: 100%; height: auto; display: block; }
.bv-infographic figcaption {
  padding: .65rem 1rem;
  font-size: .8rem;
  color: var(--bv-muted);
  border-top: 1px solid var(--bv-border);
  background: var(--bv-bg);
}
.bv-infographic details { margin-top: .45rem; }
.bv-infographic summary {
  cursor: pointer;
  color: var(--bv-teal-mid);
  font-size: .78rem;
  font-weight: 600;
  display: inline;
}
.bv-infographic textarea {
  display: block;
  width: 100%;
  margin-top: .4rem;
  font-size: .75rem;
  font-family: ui-monospace, monospace;
  padding: .4rem .6rem;
  border: 1px solid var(--bv-border);
  border-radius: 4px;
  background: var(--bv-surface);
  color: var(--bv-text);
  resize: vertical;
}

/* ── TABLE ──────────────────────────────────────────────────────────────── */
.bv-table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--bv-radius); border: 1px solid var(--bv-border); }
.bv-table-wrap table { margin: 0; }
th { background: var(--bv-teal); color: #fff; padding: .7rem 1rem; text-align: left; font-family: var(--bv-f-head); font-size: .88rem; font-weight: 600; }
td { padding: .65rem 1rem; border-bottom: 1px solid var(--bv-border); font-size: .88rem; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--bv-bg); }

/* ── FAQ ACCORDION ──────────────────────────────────────────────────────── */
.bv-faq { margin-top: 1.8rem; }
.bv-faq__item {
  border: 1px solid var(--bv-border);
  border-radius: var(--bv-radius);
  margin-bottom: .6rem;
  overflow: hidden;
}
.bv-faq__item summary {
  padding: .95rem 1.15rem;
  font-family: var(--bv-f-head);
  font-size: .97rem;
  font-weight: 600;
  color: var(--bv-teal);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bv-surface);
  transition: background .15s;
}
.bv-faq__item summary::-webkit-details-marker { display: none; }
.bv-faq__item summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--bv-green);
  flex-shrink: 0;
  margin-left: .75rem;
}
.bv-faq__item[open] summary {
  background: var(--bv-accent-bg);
}
.bv-faq__item[open] summary::after { content: '−'; }
.bv-faq__answer {
  padding: .85rem 1.15rem 1rem;
  background: var(--bv-surface);
  border-top: 1px solid var(--bv-border);
  font-size: .92rem;
  line-height: 1.65;
}
.bv-faq__answer p { margin-bottom: .6rem; }
.bv-faq__answer p:last-child { margin-bottom: 0; }

/* ── SIDEBAR ────────────────────────────────────────────────────────────── */
.bv-sidebar {}
.bv-sidebar__box {
  background: var(--bv-surface);
  border: 1px solid var(--bv-border);
  border-radius: var(--bv-radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.bv-sidebar__box h3 {
  font-size: .95rem;
  color: var(--bv-teal);
  margin-top: 0;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--bv-green);
}
.bv-sidebar__box ul { list-style: none; padding: 0; margin: 0; }
.bv-sidebar__box li { padding: .42rem 0; border-bottom: 1px solid var(--bv-border); }
.bv-sidebar__box li:last-child { border-bottom: none; }
.bv-sidebar__box a { font-size: .85rem; color: var(--bv-text); line-height: 1.4; }
.bv-sidebar__box a:hover { color: var(--bv-teal-mid); }

/* ── SIMPLE PAGE (about / contact) ─────────────────────────────────────── */
.bv-simple { padding: 2.5rem 0 4rem; max-width: 720px; }
.bv-simple h1 { margin-bottom: 1rem; }

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.bv-footer {
  background: var(--bv-teal-dark);
  color: rgba(255,255,255,.68);
  padding: 2.8rem 0 1.4rem;
}
.bv-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.bv-footer__about .bv-logo__text { font-size: 1.15rem; }
.bv-footer__about p {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  margin-top: .6rem;
  line-height: 1.65;
  max-width: 280px;
}
.bv-footer h4 {
  font-family: var(--bv-f-head);
  font-size: .9rem;
  color: rgba(255,255,255,.88);
  margin-bottom: .7rem;
}
.bv-footer ul { list-style: none; padding: 0; margin: 0; }
.bv-footer li { margin-bottom: .38rem; }
.bv-footer a { font-size: .82rem; color: rgba(255,255,255,.6); }
.bv-footer a:hover { color: var(--bv-green); }
.bv-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.1rem;
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .bv-page__layout  { grid-template-columns: 1fr; }
  .bv-sidebar       { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .bv-featured__grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .bv-nav           { display: none; }
  .bv-nav--open     {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bv-teal-dark);
    padding: 1rem 1.5rem;
    gap: .65rem;
    z-index: 300;
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
  }
  .bv-nav__burger   { display: block; }
  .bv-cards         { grid-template-columns: 1fr 1fr; }
  .bv-footer__grid  { grid-template-columns: 1fr; gap: 1.5rem; }
  .bv-masthead__stats { gap: 1.5rem; }
}
@media (max-width: 480px) {
  .bv-cards         { grid-template-columns: 1fr; }
  .bv-masthead      { padding: 2.5rem 0; }
  .bv-sidebar       { grid-template-columns: 1fr; }
}
