/* ============================================================
   MINAS Lab — Global Stylesheet
   Design: Charcoal + Red accent, Source Serif 4 + DM Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,300;8..60,400;8..60,600&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --dark:     #1f2028;
  --darker:   #141419;
  --red:      #C8102E;
  --red-dark: #a50d24;
  --offwhite: #f4f3f0;
  --white:    #ffffff;
  --muted:    #8a8a96;
  --border:   #e2e0dc;
  --text:     #1f2028;
  --body:     #555560;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--offwhite); color: var(--text); line-height: 1.6; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { font-family: 'Source Serif 4', serif; line-height: 1.2; }
p { color: var(--body); line-height: 1.8; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 72px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-divider { width: 1px; height: 26px; background: var(--border); flex-shrink: 0; }
.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo-img { height: 38px; width: auto; object-fit: contain; flex-shrink: 0; }
.nav-affil-img { height: 38px; width: auto; object-fit: contain; flex-shrink: 0; }

.nav-links { display: flex; align-items: center; justify-content: center; flex: 1; }
.nav-links a {
  text-decoration: none; font-size: 12px; color: #555;
  padding: 0 9px; height: 72px; display: flex; align-items: center;
  border-bottom: 2px solid transparent; transition: all .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--dark); border-bottom-color: var(--red); }

/* Dropdown for Labs */
.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: pointer; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 72px; left: 0;
  background: var(--white); border: 1px solid var(--border);
  border-top: 2px solid var(--red); min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 12px 18px; height: auto;
  border-bottom: none; border-left: 3px solid transparent;
  font-size: 13px; color: var(--body);
}
.nav-dropdown-menu a:hover { border-left-color: var(--red); background: var(--offwhite); color: var(--dark); }

.nav-lang {
  /* RO temporarily disabled — site stays English-only for now. Code/content untouched;
     remove the display:none below to bring the language switcher back. */
  display: none; border: 1px solid var(--border); overflow: hidden; flex-shrink: 0; margin-left: 16px;
}
.nav-lang a {
  padding: 6px 13px; border: none; cursor: pointer; display: inline-block;
  font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; transition: all .2s; text-decoration: none;
}
.nav-lang .active   { background: var(--dark); color: #fff; }
.nav-lang .inactive { background: transparent; color: #999; }

/* Mobile menu button — hidden on desktop, shown ≤900px */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; background: none; border: none; cursor: pointer;
  padding: 0; flex-shrink: 0; margin-left: 12px;
}
.nav-burger span { display: block; width: 100%; height: 2px; background: var(--dark); transition: transform .2s, opacity .2s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: var(--dark); padding: 60px 64px;
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 220px;
  border-bottom: 3px solid var(--red);
}
.page-hero-eyebrow {
  font-size: 10px; letter-spacing: 3px; color: var(--red);
  text-transform: uppercase; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.page-hero-eyebrow::before { content:''; display:block; width:24px; height:1px; background:var(--red); }
.page-hero h1 { font-size: 46px; font-weight: 300; color: #fff; }
.page-hero h1 strong { font-weight: 600; }
.page-hero p { color: rgba(255,255,255,.55); max-width: 600px; margin-top: 14px; font-size: 15px; }

/* ── PLACEHOLDER SECTION ── */
.placeholder-section {
  padding: 80px 64px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.placeholder-section + .placeholder-section { background: var(--offwhite); }
.placeholder-section + .placeholder-section + .placeholder-section { background: var(--white); }

.section-eyebrow { font-size: 10px; letter-spacing: 3px; color: var(--red); text-transform: uppercase; margin-bottom: 10px; }
.section-title   { font-family: 'Source Serif 4', serif; font-size: 34px; font-weight: 600; color: var(--dark); margin-bottom: 16px; }
.section-lead    { font-size: 15px; color: var(--body); max-width: 640px; line-height: 1.8; margin-bottom: 40px; }

.placeholder-grid { display: grid; gap: 20px; }
.placeholder-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.placeholder-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.placeholder-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.placeholder-card {
  background: var(--offwhite); padding: 32px 28px;
  border-left: 3px solid var(--border); transition: border-color .2s;
  display: flex; flex-direction: column;
}
.placeholder-card:hover { border-left-color: var(--red); }
.placeholder-card .card-photo {
  width: 56px; height: 56px; object-fit: cover; object-position: 50% 22%; display: block;
  margin-bottom: 14px; flex-shrink: 0;
}
.placeholder-card .card-photo-lg { width: 168px; height: 168px; } /* Directors: base 56px + 200% */
.placeholder-card .card-photo-md { width: 140px; height: 140px; } /* Senior Researchers: base 56px + 150% */
.placeholder-card .card-logo-box {
  height: 72px; display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--border);
  margin-bottom: 16px; padding: 10px;
}
.placeholder-card .card-logo { max-width: 100%; max-height: 100%; object-fit: contain; }
.placeholder-card .card-tag  { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.placeholder-card .card-title{ font-family: 'Source Serif 4', serif; font-size: 18px; font-weight: 600; color: var(--dark); }
.placeholder-card .card-body { font-size: 13px; color: var(--body); line-height: 1.7; margin-top: 10px; flex: 1; }
.placeholder-card .card-note { font-size: 11px; color: #bbb; margin-top: 16px; letter-spacing: .5px; font-style: italic; }
.placeholder-card .card-doi { display: inline-block; font-size: 11px; color: var(--red); margin-top: 12px; text-decoration: none; letter-spacing: .3px; }
.placeholder-card .card-doi:hover { text-decoration: underline; }

/* ── CITATION LIST ── */
.citation-list { list-style: none; }
.citation-list li {
  padding: 14px 0 14px 22px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--body); line-height: 1.7; position: relative;
}
.citation-list li::before {
  content: ''; position: absolute; left: 0; top: 22px;
  width: 6px; height: 6px; background: var(--red);
}
.citation-list li:first-child { padding-top: 0; }

/* Content-in-progress notice */
.wip-notice {
  display: flex; align-items: center; gap: 14px;
  background: #fffbf0; border: 1px solid #f0e0a0; border-left: 4px solid #e0a020;
  padding: 14px 20px; margin-bottom: 32px; font-size: 13px; color: #7a6010;
}
.wip-notice .wip-icon { font-size: 18px; flex-shrink: 0; }

/* ── STATS BAR ── */
.stats-bar {
  display: grid; padding: 0; background: var(--border);
  gap: 1px;
}
.stats-bar .stat {
  background: var(--dark); padding: 36px 40px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.stat-num { font-family: 'Source Serif 4', serif; font-size: 52px; font-weight: 300; color: #fff; line-height: 1; }
.stat-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.45); margin-top: 8px; }

/* ── FOOTER ── */
.footer {
  background: var(--darker); padding: 52px 64px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px;
}
.footer-brand .brand-name { font-family: 'Source Serif 4', serif; font-size: 22px; font-weight: 300; color: #fff; }
.footer-brand .brand-name strong { font-weight: 600; }
.footer-brand .brand-sub { font-size: 10px; letter-spacing: 2px; color: var(--red); text-transform: uppercase; display: block; margin-top: 5px; }
.footer-brand hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 20px 0; }
.footer-brand p { font-size: 12px; color: rgba(255,255,255,.35); line-height: 1.9; }
.footer-col h4 { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.5); padding: 4px 0; transition: color .2s; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 13px; color: rgba(255,255,255,.5); line-height: 2; }
.footer-col a.red { color: var(--red); }
.footer-bottom {
  background: var(--darker); padding: 16px 64px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom span, .footer-bottom a { font-size: 11px; color: rgba(255,255,255,.2); text-decoration: none; }

/* ── UTILS ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 64px; }
.btn { display: inline-block; padding: 13px 30px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; cursor: pointer; border: none; transition: all .2s; text-decoration: none; }
.btn-fill  { background: var(--red); color: #fff; }
.btn-fill:hover { background: var(--red-dark); text-decoration: none; }
.btn-outline { border: 1px solid var(--dark); color: var(--dark); background: transparent; }
.btn-outline:hover { background: var(--dark); color: #fff; text-decoration: none; }

/* Nav collapses to the hamburger menu earlier than the rest of the layout —
   10 top-level items + the UTCN/EUT+ logos need more room than 900px gives. */
@media (max-width: 1240px) {
  .nav-divider, .nav-affil-img { display: none; }
  .nav-burger { display: flex; }

  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0; margin-left: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    max-height: calc(100vh - 72px); overflow-y: auto;
    box-shadow: 0 12px 24px rgba(0,0,0,.1); z-index: 150;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    height: auto; padding: 15px 24px; font-size: 14px;
    border-bottom: 1px solid var(--border); border-left: 3px solid transparent;
  }
  .nav-links a:hover, .nav-links a.active { border-bottom-color: var(--border); border-left-color: var(--red); }

  .nav-dropdown { width: 100%; }
  .nav-dropdown > a { justify-content: space-between; }
  .nav-dropdown-menu {
    display: none; position: static; border: none; box-shadow: none;
    background: var(--offwhite); min-width: 0;
  }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a { padding-left: 36px; font-size: 13px; }
}

@media (max-width: 900px) {
  .nav { padding: 0 20px; }
  .page-hero { padding: 40px 24px; }
  .page-hero h1 { font-size: 32px; }
  .placeholder-section { padding: 48px 24px; }
  .placeholder-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .placeholder-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .placeholder-card .card-photo-lg { width: 120px; height: 120px; }
  .placeholder-card .card-photo-md { width: 100px; height: 100px; }
  .footer { grid-template-columns: 1fr; padding: 40px 24px; }
  .footer-bottom { padding: 16px 24px; flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 560px) {
  .nav { padding: 0 16px; }
  .nav-logo-img { height: 32px; }
  .page-hero { padding: 32px 20px; min-height: 160px; }
  .page-hero h1 { font-size: 26px; }
  .page-hero p { font-size: 13px; }
  .placeholder-section { padding: 36px 20px; }
  .placeholder-grid.cols-4, .placeholder-grid.cols-3, .placeholder-grid.cols-2 { grid-template-columns: 1fr; }
  .placeholder-card { padding: 24px 20px; }
  .section-title { font-size: 26px; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .footer { padding: 32px 20px; gap: 32px; }
  .footer-bottom { padding: 14px 20px; }
}
