/* ===== BuckAI Observatory — style.css ===== */

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---- DESIGN TOKENS ---- */
:root {
  --bg: #f6f9f8;
  --surface: #ffffff;
  --surface2: #edf4f1;
  --border: #cfdeda;
  --text: #0c1e1a;
  --muted: #4d6960;
  --teal: #005f4e;
  --teal-hover: #00735f;
  --teal-light: #dff0eb;
  --teal-dark: #00382f;
  --scarlet: #bb0000;
  --scarlet-light: #fef2f2;
  --nav-height: 66px;
  --max-width: 1100px;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(0,80,64,0.09);
  --shadow-hover: 0 6px 24px rgba(0,80,64,0.16);
}

/* ---- LAYOUT ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.page-wrapper {
  min-height: calc(100vh - var(--nav-height));
  padding-top: var(--nav-height);
}

/* ---- NAVIGATION ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,80,64,0.07);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand-logo { height: 38px; width: auto; }
.nav-brand-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.nav-brand-text span {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-links li a {
  display: block;
  padding: 0.4rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  border-bottom: 2px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.nav-links li a:hover {
  background: var(--teal-light);
  color: var(--teal);
  text-decoration: none;
}
.nav-links li a.active {
  color: var(--teal);
  border-radius: 0;
  border-bottom-color: var(--scarlet);
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--teal);
}

/* ---- HERO (index.html) ---- */
.hero {
  background: linear-gradient(140deg, var(--teal-dark) 0%, var(--teal) 55%, #007a65 100%);
  color: #fff;
  padding: 5rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 48px;
  background: var(--bg);
  clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-logo {
  height: 120px;
  width: auto;
  margin: 0 auto 1.5rem;
  filter: brightness(0) invert(1);
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}
.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 580px;
  margin: 0 auto 2.25rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-bottom: 2.5rem;
}
.hero-stat { text-align: center; }
.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.hero-stat-label {
  font-size: 0.74rem;
  opacity: 0.72;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.3);
  align-self: center;
}
.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---- PAGE BANNER (inner pages) ---- */
.page-banner {
  background: var(--teal);
  color: #fff;
  padding: 2.75rem 0 2.25rem;
}
.page-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.page-banner-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.page-banner-sub {
  font-size: 1rem;
  opacity: 0.82;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-white { background: #fff; color: var(--teal); }
.btn-white:hover { background: var(--teal-light); }
.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.28); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-hover); }
.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn-outline:hover { background: var(--teal-light); }

/* ---- SECTIONS ---- */
.section { padding: 4rem 0; }
.section-alt { background: var(--surface2); }
.section-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.section-title::after {
  content: '';
  display: block;
  width: 38px;
  height: 3px;
  background: var(--scarlet);
  margin-top: 0.45rem;
  border-radius: 2px;
}
.section-lead {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 2.25rem;
  margin-top: 0.75rem;
}

/* ---- FEATURE CARDS (index homepage) ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s, border-left-color 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-left-color: var(--scarlet);
}
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.feature-body { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ---- RESEARCH THEME CARDS ---- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}
.theme-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.theme-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.theme-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.theme-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--teal-light);
  color: var(--teal);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}
.theme-icon { font-size: 1.5rem; }
.theme-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.theme-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.theme-projects {
  font-size: 0.85rem;
  color: var(--muted);
  padding-left: 1rem;
}
.theme-projects li { margin-bottom: 0.3rem; list-style: disc; }
.theme-people {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.theme-people strong { color: var(--text); }
.tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  background: var(--teal-light);
  color: var(--teal);
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  margin: 0.2rem 0.15rem 0 0;
}
.tag-scarlet { background: var(--scarlet-light); color: var(--scarlet); }

/* ---- PEOPLE — DIRECTOR ---- */
.director-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}
.director-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--teal-light);
}
.director-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.director-title { font-size: 1rem; color: var(--teal); font-weight: 600; margin-bottom: 0.1rem; }
.director-dept { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.director-bio { font-size: 0.93rem; line-height: 1.7; color: var(--text); margin-bottom: 1rem; }
.person-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.person-links a {
  font-size: 0.8rem;
  color: var(--teal);
  border: 1px solid var(--border);
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.person-links a:hover { background: var(--teal-light); border-color: var(--teal); text-decoration: none; }

/* ---- PEOPLE — SAB ---- */
.sab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.sab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.sab-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.sab-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 2.5px solid var(--teal-light);
  background: var(--surface2);
}
.sab-name { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.15rem; }
.sab-title { font-size: 0.8rem; color: var(--teal); font-weight: 600; margin-bottom: 0.1rem; }
.sab-dept { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.75rem; }
.sab-bio { font-size: 0.8rem; color: var(--muted); line-height: 1.55; text-align: left; }
.sab-links { margin-top: 0.75rem; display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.sab-links a {
  font-size: 0.75rem;
  color: var(--teal);
  border: 1px solid var(--border);
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  text-decoration: none;
}
.sab-links a:hover { background: var(--teal-light); border-color: var(--teal); text-decoration: none; }

/* ---- PEOPLE — AFFILIATED ---- */
.people-dept-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0;
  margin: 2.25rem 0 1rem;
  border-bottom: 1px solid var(--border);
}
.affil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}
.affil-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: box-shadow 0.2s, transform 0.15s;
}
.affil-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.affil-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--teal-light);
  background: var(--surface2);
}
.affil-info { flex: 1; min-width: 0; }
.affil-name { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 0.08rem; }
.affil-title { font-size: 0.74rem; color: var(--teal); font-weight: 600; margin-bottom: 0.04rem; }
.affil-dept { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.4rem; }
.affil-research { font-size: 0.74rem; color: var(--muted); line-height: 1.4; }
.affil-link { font-size: 0.72rem; color: var(--teal); display: inline-block; margin-top: 0.3rem; }
.affil-link:hover { text-decoration: underline; }

/* Photo placeholder (shown when img fails to load) */
.photo-init {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-light);
  color: var(--teal);
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--teal-light);
}

/* ---- NEWS ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.news-date { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.news-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.13rem 0.5rem;
  border-radius: 12px;
  background: var(--teal-light);
  color: var(--teal);
}
.news-category.cat-paper { background: var(--scarlet-light); color: var(--scarlet); }
.news-category.cat-funding { background: #fff8e6; color: #7a5800; }
.news-headline {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.45rem;
  line-height: 1.4;
}
.news-body { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }
.news-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.83rem;
  color: var(--teal);
  font-weight: 600;
}
/* Full news list */
.news-list-full { display: flex; flex-direction: column; gap: 0; margin-top: 2rem; }
.news-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.news-row:last-child { border-bottom: none; }
.news-row-date { font-size: 0.85rem; color: var(--scarlet); font-weight: 700; padding-top: 0.15rem; }
.news-row-headline { font-size: 0.97rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.news-row-body { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }

/* ---- OBJECTIVES LIST (about.html) ---- */
.objectives-list { counter-reset: obj; list-style: none; margin: 1.5rem 0; }
.objectives-list li {
  counter-increment: obj;
  padding: 0.9rem 1.25rem 0.9rem 3.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.7rem;
  position: relative;
  box-shadow: var(--shadow);
}
.objectives-list li::before {
  content: counter(obj);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 26px;
  height: 26px;
  background: var(--teal);
  color: #fff;
  border-radius: 50%;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.obj-title { font-weight: 700; color: var(--teal); display: block; margin-bottom: 0.2rem; }
.obj-body { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ---- INFRA CARDS (about.html) ---- */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.infra-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.infra-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.infra-title { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.infra-body { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ---- CONTACT ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.contact-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.contact-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.contact-icon { flex-shrink: 0; }
.links-list { display: flex; flex-direction: column; gap: 0.5rem; }
.links-list li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--teal);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.links-list li:last-child a { border-bottom: none; }
.links-list li a:hover { text-decoration: underline; }

/* ---- AFFILIATIONS STRIP ---- */
.affil-strip {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.5rem;
  text-align: center;
}
.affil-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.affil-strip-inner .sep { opacity: 0.4; }

/* ---- FOOTER ---- */
footer {
  background: var(--teal-dark);
  color: rgba(255,255,255,0.75);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.84rem;
}
footer p + p { margin-top: 0.4rem; }
footer a { color: rgba(255,255,255,0.88); text-decoration: underline; }
footer a:hover { color: #fff; }

/* ---- UTILITY ---- */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0 !important; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 0.1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 0.6rem 1rem; border-radius: var(--radius); }
  .director-card { grid-template-columns: 1fr; text-align: center; }
  .director-photo { margin: 0 auto; }
  .person-links { justify-content: center; }
  .news-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .hero { padding: 3.5rem 0 4rem; }
}
@media (max-width: 480px) {
  .feature-grid, .sab-grid, .affil-grid, .theme-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1rem 1.5rem; }
  .hero-divider { display: none; }
}
