/* HuCo Lab site stylesheet
   Quiet, academic look: serif headings, a near-monochrome palette, and flat
   surfaces (no shadows, minimal corner rounding). Color is used sparingly —
   the lab's accent lives in the logo mark, not the UI chrome. */

:root {
  --color-black: #16181f;
  --color-accent: #dc4b35;
  --color-accent-dark: #9a3525;
  --color-gray-bg: #f5f5f4;
  --color-gray-bg-deep: #ececeb;
  --color-text: #24262d;
  --color-muted: #6b6f78;
  --color-border: #dcdedd;
  --color-banner-bg: #f5f5f4;    /* neutral light gray for hero / page banners */
  --color-banner-border: #e2e3e1;
  --radius: 3px;
  --radius-sm: 2px;
  --shadow-soft: none;
  --shadow-med: 0 1px 3px rgba(22, 24, 31, 0.12);
  --font-heading: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.65;
  background: #ffffff;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  color: var(--color-black);
  letter-spacing: 0;
}

a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 2px;
}
a:hover { color: var(--color-accent); text-decoration-color: currentColor; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 12px;
}

/* ---------- Navigation ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 50;
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-black);
  text-decoration: none;
  padding: 14px 0;
}
.brand-mark { flex-shrink: 0; height: 52px; width: auto; object-fit: contain; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-black);
  margin: 5px 0;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.site-nav a.active {
  color: var(--color-accent-dark);
  border-bottom-color: var(--color-accent);
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(to right, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.68) 32%, rgba(255,255,255,0.55) 55%, rgba(255,255,255,0.38) 78%, rgba(255,255,255,0.32) 100%),
    url('../images/hero-bg.jpg') center / cover no-repeat;
  border-bottom: 1px solid var(--color-banner-border);
  padding: 96px 0 76px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  position: relative;
  z-index: 1;
  text-align: left;
  max-width: 680px;
}
.hero h1 {
  font-size: 3.1rem;
  margin-bottom: 18px;
  font-weight: 700;
  color: var(--color-black);
}
.hero h1 .accent { font-style: italic; color: var(--color-accent); }
.hero .hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-muted);
  margin-bottom: 34px;
  max-width: 560px;
}

.page-hero {
  background: var(--color-banner-bg);
  border-bottom: 1px solid var(--color-banner-border);
  padding: 56px 0;
}
.page-hero h1 {
  font-size: 2.3rem;
  margin: 0;
  color: var(--color-black);
}
.page-hero p {
  color: var(--color-muted);
  margin: 14px 0 0;
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-accent:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  text-decoration: none;
}
.btn-outline-dark {
  background: transparent;
  color: var(--color-black);
  border-color: var(--color-black);
}
.btn-outline-dark:hover {
  background: var(--color-black);
  color: #fff;
  text-decoration: none;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
section { padding: 68px 0; }
.section-alt { background: var(--color-gray-bg); }
.section-heading {
  text-align: left;
  margin-bottom: 40px;
  max-width: 680px;
}
.section-heading h2 {
  font-size: 2.1rem;
}
.section-heading p {
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.about-text {
  max-width: 760px;
  font-size: 1.08rem;
}

/* ---------- Cards / Grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.thrust-img {
  display: block;
  width: calc(100% + 52px);
  height: 170px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -28px -26px 20px -26px;
}
.thrust-meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}
.thrust-block + .thrust-block {
  margin-top: 18px;
}
.thrust-meta h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin: 0 0 8px;
}
.thrust-team-list {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0;
}
.thrust-meta ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text);
}
.thrust-meta ul li { margin-bottom: 10px; }
.thrust-meta ul li:last-child { margin-bottom: 0; }
.card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.card p { color: var(--color-text); margin: 0; }
.card .learn-more {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- News ---------- */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 780px;
}
.news-list li {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}
.news-date {
  flex-shrink: 0;
  padding: 4px 10px;
  background: var(--color-black);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news-title { font-weight: 500; color: var(--color-text); }
a.news-title:hover { color: var(--color-accent); text-decoration: none; }
.news-more {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Blog / News page ---------- */
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 780px;
}
.blog-post {
  padding: 34px 0;
  border-bottom: 2px solid var(--color-border);
}
.blog-post:first-child { padding-top: 0; }
.blog-post h2 {
  font-size: 1.4rem;
  margin: 14px 0 10px;
}
.blog-post p {
  color: var(--color-text);
  margin: 0;
}
.blog-title-btn {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  color: var(--color-black);
  cursor: pointer;
}
.blog-title-btn:hover { color: var(--color-accent); }
.news-more {
  background: none;
  border: none;
  cursor: pointer;
}
.blog-post .news-more { margin-top: 14px; }
.news-detail-template { display: none; }

.news-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.news-photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
@media (max-width: 640px) {
  .news-photo-grid { grid-template-columns: 1fr; }
}

/* ---------- News detail modal ---------- */
.news-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.news-modal.is-open { display: flex; }
body.news-modal-open { overflow: hidden; }
.news-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.8);
}
.news-modal-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-med);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
}
.news-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.news-modal-close:hover { background: var(--color-black); color: #fff; }
.news-modal-body h2 {
  font-size: 1.5rem;
  margin: 0 0 12px;
  padding-right: 36px;
}
.news-modal-body p { color: var(--color-text); margin: 14px 0 0; }
@media (max-width: 640px) {
  .news-modal-panel { padding: 28px 20px; }
}

/* ---------- Team ---------- */
.member-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  padding: 28px 0 22px;
}
.avatar {
  width: 80%;
  max-width: 190px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: var(--radius);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  color: #fff;
}
.avatar-photo {
  object-fit: cover;
  object-position: center 20%;
  background: var(--color-gray-bg);
}
.member-card h3 {
  margin: 0 16px 6px;
  font-size: 1.1rem;
}
.member-role {
  display: inline-block;
  margin: 0 0 12px;
  background: var(--color-black);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
}
.member-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 16px;
  flex-wrap: wrap;
}
.member-links a {
  color: var(--color-black);
  font-size: 0.82rem;
  font-weight: 600;
}
.member-links a:hover { color: var(--color-accent); }

.pi-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 40px;
  align-items: start;
  background: var(--color-gray-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 52px;
}
.pi-card .avatar {
  width: 190px;
  height: 190px;
  border-radius: var(--radius);
  font-size: 2rem;
  margin: 0;
}
.pi-card h2 { margin-bottom: 4px; font-size: 1.8rem; }
.pi-card .member-role,
.pi-card .member-links {
  margin-left: 0;
  margin-right: 0;
}
.education-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.education-list li {
  padding: 1px 0;
  font-size: 0.95rem;
  color: var(--color-text);
}

.past-members {
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.past-members h3 { font-size: 1.1rem; }
.past-members ul { padding-left: 20px; color: var(--color-muted); }

/* ---------- Publications ---------- */
.pub-toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--color-gray-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 12px;
}
.pub-toolbar input[type="search"],
.pub-toolbar select {
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: #fff;
}
.pub-toolbar input[type="search"]:focus,
.pub-toolbar select:focus {
  outline: 2px solid var(--color-black);
  outline-offset: 1px;
}
.pub-toolbar input[type="search"] { flex: 1; min-width: 220px; }
.pub-count { color: var(--color-muted); font-size: 0.88rem; margin: 0 0 20px; }

.pub-group h2 {
  font-size: 1.4rem;
  margin-top: 44px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}
.pub-list { list-style: none; padding: 0; margin: 18px 0 0; counter-reset: pub-counter; }
.pub-item {
  counter-increment: pub-counter;
  padding: 16px 0 16px 36px;
  position: relative;
  border-bottom: 1px solid var(--color-border);
}
.pub-item::before {
  content: counter(pub-counter) ".";
  position: absolute;
  left: 0;
  color: var(--color-muted);
  font-family: var(--font-heading);
  font-weight: 700;
}
.pub-item .pub-title { font-weight: 500; }
.pub-item .pub-venue {
  color: var(--color-muted);
  font-style: italic;
}
.pub-item .pub-badge {
  display: inline-block;
  margin-left: 8px;
  background: var(--color-black);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  vertical-align: middle;
}
.pub-item.is-hidden { display: none; }
.pub-empty { display: none; color: var(--color-muted); padding: 24px 0; }

.scholar-note {
  text-align: left;
  color: var(--color-muted);
  margin-top: 44px;
}

/* ---------- Join callout ---------- */
.callout {
  background: var(--color-black);
  color: #f5f5f5;
  border-radius: var(--radius);
  padding: 48px;
}
.callout h2 { color: #fff; margin-bottom: 12px; }
.callout p { color: #c9c9c9; margin: 0 0 24px; }
.callout ul {
  margin: 0 0 28px;
  color: #c9c9c9;
  padding-left: 20px;
}
/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-black);
  color: #c9c9c9;
  padding: 44px 0;
  margin-top: 40px;
  border-top: 4px solid var(--color-accent);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-inner h3 { color: #fff; font-size: 1.1rem; margin-bottom: 8px; }
.footer-address { color: #c9c9c9; font-size: 0.9rem; }
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #d6d8dd;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.footer-links a:hover { color: var(--color-accent); }
.footer-bottom {
  text-align: left;
  color: #8a8a8a;
  font-size: 0.8rem;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333333;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .pi-card { grid-template-columns: 1fr; text-align: left; }
  .pi-card .avatar { width: 140px; height: 140px; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-wrap { flex-wrap: wrap; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 56px 0 44px; }
  .footer-inner { flex-direction: column; }
  .callout { padding: 32px 24px; }
}
