/* ===== Microcardix — clean modern static site ===== */

:root {
  --color-primary: #0b4f6c;       /* deep teal-blue */
  --color-primary-dark: #073447;
  --color-accent: #14a098;        /* teal accent */
  --color-text: #1a1a1a;
  --color-text-soft: #555;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f7f9;
  --color-border: #e2e8ec;
  --color-white: #ffffff;

  --font-head: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1140px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.10);
  --header-h: 72px;
  --section-pad: clamp(3.5rem, 7vw, 6rem);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--color-accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; font-weight: 700; color: var(--color-primary-dark); }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--color-primary); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 1rem;
}
.logo img { height: 126px; width: auto; }
.primary-nav ul { list-style: none; display: flex; gap: 1.75rem; }
.primary-nav a {
  font-family: var(--font-head); font-weight: 500; font-size: 0.95rem;
  color: var(--color-text); letter-spacing: 0.01em;
}
.primary-nav a:hover { color: var(--color-primary); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px; flex-direction: column;
  justify-content: space-between; align-items: stretch;
}
.nav-toggle-bar {
  display: block; height: 2px; background: var(--color-primary-dark);
  border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: clamp(440px, 70vh, 640px);
  display: flex; align-items: center; color: #fff; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("../img/hero.jpg") center/cover no-repeat;
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(7, 52, 71, 0.82) 0%, rgba(11, 79, 108, 0.62) 60%, rgba(20, 160, 152, 0.35) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 760px; padding-top: 2rem; padding-bottom: 2rem; }
.hero h1 {
  color: #fff; font-size: clamp(2.6rem, 6vw, 4.25rem); font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 1rem;
}
.hero-tagline {
  font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.5; max-width: 40em;
  color: rgba(255, 255, 255, 0.94); margin-bottom: 2rem;
}
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: 0.85rem 1.75rem; border-radius: 999px; transition: transform 0.15s ease, background 0.15s ease;
}
.btn-light { background: #fff; color: var(--color-primary-dark); }
.btn-light:hover { background: var(--color-accent); color: #fff; transform: translateY(-2px); }

/* ===== Sections ===== */
.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; letter-spacing: -0.01em;
  margin-bottom: 2.25rem; position: relative; padding-bottom: 0.75rem;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px;
  background: var(--color-accent); border-radius: 2px;
}
.subsection-title { font-size: 1.5rem; margin: 2.5rem 0 1.25rem; }

.prose p { margin-bottom: 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.patent-note { font-weight: 700; color: var(--color-primary); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.figure { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-sm); }
.figure img { border-radius: 6px; }

/* ===== Team ===== */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.team-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-photo { aspect-ratio: 3 / 3.2; overflow: hidden; background: var(--color-bg-alt); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1.2rem; margin: 0 1.25rem 0.25rem; padding-top: 1.1rem; }
.team-card .role { font-family: var(--font-head); font-weight: 500; color: var(--color-primary); margin: 0 1.25rem; font-size: 0.98rem; }
.team-card .creds { color: var(--color-text-soft); font-size: 0.9rem; margin: 0.15rem 1.25rem 1.25rem; }

/* ===== Publications ===== */
.pub-list { list-style: none; counter-reset: pub; max-width: 60rem; }
.pub-list > li {
  counter-increment: pub; position: relative; padding: 1.5rem 0 1.5rem 3rem;
  border-bottom: 1px solid var(--color-border);
}
.pub-list > li::before {
  content: counter(pub); position: absolute; left: 0; top: 1.5rem;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--color-primary); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.pub-citation { margin-bottom: 0.5rem; }
.pub-list a { font-weight: 600; }

/* ===== News ===== */
.news-list { display: flex; flex-direction: column; gap: 2rem; max-width: 50rem; }
.news-item {
  background: #fff; border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent);
  border-radius: var(--radius); padding: 1.5rem 1.75rem;
}
.news-item time { font-family: var(--font-head); font-weight: 700; color: var(--color-accent); font-size: 0.9rem; letter-spacing: 0.02em; }
.news-item h4 { font-size: 1.25rem; margin: 0.35rem 0 0.6rem; }
.news-item p { margin-bottom: 0.75rem; }
.news-item p:last-child { margin-bottom: 0; }
.news-loading { color: var(--color-text-soft); font-style: italic; }

/* ===== Contact ===== */
.contact-section { background: var(--color-primary-dark); color: #fff; text-align: center; }
.contact-section .section-title { color: #fff; }
.contact-section .section-title::after { background: var(--color-accent); left: 50%; transform: translateX(-50%); }
.contact-email { font-size: clamp(1.4rem, 3vw, 2rem); }
.contact-email a { color: #fff; font-family: var(--font-head); font-weight: 700; border-bottom: 2px solid var(--color-accent); padding-bottom: 2px; }
.contact-email a:hover { color: var(--color-accent); }

/* ===== Footer ===== */
.site-footer { background: #052633; color: rgba(255, 255, 255, 0.75); padding: 2rem 0; font-size: 0.9rem; }
.footer-credit { margin-bottom: 0.25rem; }
.footer-credit-small { font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .figure { order: -1; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--color-border);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
    box-shadow: var(--shadow-md);
  }
  .primary-nav.open { max-height: 320px; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 0; }
  .primary-nav li { border-top: 1px solid var(--color-border); }
  .primary-nav li:first-child { border-top: none; }
  .primary-nav a { display: block; padding: 0.9rem 1.25rem; font-size: 1.05rem; }
}
@media (max-width: 560px) {
  .team-grid { grid-template-columns: 1fr; }
  .logo img { height: 102px; }
  .hero { min-height: 480px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
