/* ===================== MAY GROUP — MODERN RED THEME ===================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #c8102e;   /* UH Scarlet — group lucky red */
  --primary-dk: #960b22;
  --dark:       #1a1a1a;
  --dark2:      #2d2d2d;
  --light:      #f7f7f8;
  --white:      #ffffff;
  --gray:       #6b7280;
  --gray-lt:    #9ca3af;
  --border:     #e5e7eb;
  --text:       #1a1a2e;
  --link:       #c8102e;
  --max-w:      1100px;
  --radius:     8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ===================== TOP BANNER ===================== */
.top-banner {
  background: var(--dark);
  color: #aaa;
  font-size: 13px;
  text-align: center;
  padding: 6px 20px;
  letter-spacing: 0.4px;
}
.top-banner a { color: #ddd; }
.top-banner a:hover { color: #fff; }

/* ===================== HEADER / NAV ===================== */
header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 24px;
}
.site-title {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.site-title:hover { text-decoration: none; }
.site-title img.uh-logo {
  height: 44px;
  width: auto;
  border-radius: 4px;
}
.site-title-text {
  display: flex;
  flex-direction: column;
}
.site-title-text .lab-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.site-title-text .dept {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  letter-spacing: 0.5px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
}
nav ul li a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
nav ul li a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}
nav ul li.current a {
  background: rgba(0,0,0,0.25);
  color: #fff;
}

/* ===================== PAGE HERO (inner pages) ===================== */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #8a0a1e 100%);
  color: #fff;
  padding: 48px 24px 40px;
}
.page-hero .section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-hero h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 16px;
  margin-top: 8px;
}

/* ===================== HOME HERO ===================== */
.hero {
  background: linear-gradient(160deg, #1a1a1a 0%, #2d2d2d 60%, #333 100%);
  color: #fff;
  padding: 72px 24px 60px;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-text h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero-text h1 span { color: var(--primary); }
.hero-text p {
  font-size: 17px;
  color: #b0b0b0;
  line-height: 1.75;
  max-width: 480px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero-image-wrap img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.hero-image-caption {
  text-align: center;
  color: #888;
  font-size: 13px;
  margin-top: 10px;
}

/* ===================== BUTTONS ===================== */
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--primary-dk); text-decoration: none; }
.btn-outline {
  border: 1.5px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  display: inline-block;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); text-decoration: none; }

/* ===================== SECTIONS ===================== */
section {
  padding: 64px 24px;
}
section.alt-bg {
  background: var(--light);
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  line-height: 1.25;
}
.section-subtitle {
  font-size: 16px;
  color: var(--gray);
  max-width: 680px;
  margin-bottom: 40px;
}

/* ===================== ABOUT / CONTACT ===================== */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-body p {
  color: #374151;
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.contact-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.contact-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.contact-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-row p {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}
.logo-small {
  width: 90px;
  margin: 20px auto 0;
}

/* ===================== RESEARCH CARDS ===================== */
.research-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.research-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.research-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}
.card-img img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: #f5f0f0;
}
.card-body {
  padding: 22px;
}
.card-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.card-body p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.65;
}
.card-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* ===================== PUBLICATIONS ===================== */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pub-item {
  background: var(--white);
  border-left: 4px solid var(--primary);
  padding: 18px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.pub-item p {
  font-size: 14.5px;
  color: #374151;
  line-height: 1.7;
}
.pub-item a {
  font-weight: 600;
  color: var(--primary);
}
.pub-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-lt);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.pub-image {
  margin-top: 12px;
  max-width: 500px;
}
.pub-image img {
  max-width: 100%;
  border-radius: 4px;
}

/* ===================== MEMBERS ===================== */
.member-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin: 48px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}
.member-section-title:first-of-type {
  margin-top: 0;
}
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.member-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.member-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.member-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #f0f0f0;
}
.member-info {
  padding: 18px;
}
.member-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.member-info .role {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}
.member-info p {
  font-size: 13.5px;
  color: var(--gray);
  line-height: 1.6;
}

/* PI card is special — horizontal */
.pi-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 32px;
}
.pi-card img {
  width: 220px;
  height: 100%;
  object-fit: cover;
}
.pi-card .member-info {
  padding: 28px;
}
.pi-card .member-info h3 {
  font-size: 20px;
  margin-bottom: 6px;
}
.pi-card .member-info .role {
  font-size: 14px;
}
.pi-card .member-info ul {
  margin-top: 12px;
  padding-left: 18px;
}
.pi-card .member-info ul li {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 4px;
}
.awards-toggle {
  margin-top: 16px;
}
.awards-toggle summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}
.awards-toggle ul {
  margin-top: 8px;
}

/* ===================== TEACHING ===================== */
.course-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.course-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.course-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}
.course-card ul {
  list-style: none;
  padding: 0;
}
.course-card ul li {
  margin-bottom: 6px;
}
.course-card ul li a {
  font-size: 14px;
  color: #374151;
  padding: 6px 0;
  display: inline-block;
  transition: color 0.15s;
}
.course-card ul li a:hover {
  color: var(--primary);
}
.course-card ol {
  padding-left: 20px;
}
.course-card ol li {
  margin-bottom: 4px;
}
.course-card ol li a {
  font-size: 14px;
  color: #374151;
}
.course-card ol li a:hover { color: var(--primary); }

/* ===================== ACTIVITIES / NEWS ===================== */
.news-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.news-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:first-child { border-top: 1px solid var(--border); }
.news-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-align: right;
  padding-top: 2px;
}
.news-text {
  font-size: 14.5px;
  color: #374151;
  line-height: 1.65;
}
.news-text a { color: var(--primary); font-weight: 500; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.photo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.photo-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}
.photo-card .caption {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

/* ===================== LINKS PAGE ===================== */
.links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.link-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.link-group h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}
.link-group ul {
  list-style: none;
  padding: 0;
}
.link-group ul li {
  margin-bottom: 8px;
}
.link-group ul li a {
  font-size: 14px;
  color: #374151;
  transition: color 0.15s;
}
.link-group ul li a:hover { color: var(--primary); }

/* ===================== JOIN US BAND ===================== */
.join-band {
  background: linear-gradient(120deg, var(--dark) 0%, #2d2d2d 100%);
  padding: 56px 24px;
  text-align: center;
  color: #fff;
}
.join-band h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}
.join-band p {
  color: #aaa;
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 28px;
}

/* ===================== FOOTER ===================== */
footer {
  background: #111;
  color: #888;
  padding: 40px 24px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .lab-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.footer-brand p { font-size: 13.5px; line-height: 1.7; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: #ccc;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: #888;
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: #ccc; }
.footer-bottom {
  max-width: var(--max-w);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid #2a2a2a;
  font-size: 12.5px;
  color: #555;
}

/* ===================== CONTENT PROSE ===================== */
.prose { max-width: 800px; }
.prose p {
  font-size: 15.5px;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 16px;
}
.prose h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin: 40px 0 16px;
}
.prose h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin: 32px 0 12px;
}
.prose img {
  margin: 20px 0;
  max-width: 100%;
  border-radius: 4px;
}
.prose blockquote {
  border-left: 3px solid var(--primary);
  margin: 16px 0;
  padding: 0 20px;
  color: #374151;
}

/* ===================== INDEX PAGE (modified class names) ===================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.header .container { padding: 0 24px; }
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 24px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-left .uh-logo {
  height: 44px;
  width: auto;
  order: 2; /* display to the right of site title text */
  border-radius: 4px;
}
.header-left .site-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
}
.main-nav ul li a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav ul li a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}
.main-nav ul li a.active {
  background: rgba(0,0,0,0.25);
  color: #fff;
}

/* Hero — index page variant */
.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero-title .highlight { color: var(--primary); }
.hero-subtitle {
  font-size: 17px;
  color: #b0b0b0;
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 8px;
}
.cta-buttons {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.btn {
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s;
}
.btn.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn.btn-primary:hover { background: var(--primary-dk); text-decoration: none; }
.btn.btn-secondary {
  border: 1.5px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  background: transparent;
}
.btn.btn-secondary:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.hero-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

/* About section — index variant */
.about { background: var(--light); }
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-text h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
}
.about-text p {
  color: #374151;
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.contact-info p {
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 10px;
}
.contact-info a { color: var(--link); }

/* Research highlights — index variant */
.research-highlights { background: var(--white); }
.research-highlights h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 32px;
}
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.research-image img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: #f5f0f0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.research-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin: 16px 0 8px;
}
.research-card > p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.65;
}

/* Recent publications — index variant */
.recent-publications { background: var(--light); }
.recent-publications h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
}
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.publication-item {
  background: var(--white);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.publication-item h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}
.publication-item p {
  font-size: 14.5px;
  color: #374151;
  line-height: 1.7;
}
.read-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.publications-cta {
  margin-top: 28px;
}

/* Footer — index variant */
.footer { background: #111; color: #888; padding: 40px 24px; }
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: #ccc;
  margin-bottom: 14px;
}
.footer-section p {
  font-size: 13.5px;
  line-height: 1.7;
}
.footer-section ul {
  list-style: none;
  padding: 0;
}
.footer-section ul li { margin-bottom: 8px; }
.footer-section ul li a {
  color: #888;
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-section ul li a:hover { color: #ccc; }
.footer-section a { color: #aaa; }
.footer .footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #2a2a2a;
  font-size: 12.5px;
  color: #555;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .hero-inner, .hero-content { grid-template-columns: 1fr; }
  .hero-image-wrap, .hero-image { display: none; }
  .about-grid, .about-content { grid-template-columns: 1fr; }
  .research-cards, .research-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner, .footer-content { grid-template-columns: 1fr 1fr; }
  .course-grid { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: 1fr; }
  .pi-card { grid-template-columns: 1fr; }
  .pi-card img { width: 100%; height: 300px; }
}
@media (max-width: 600px) {
  .header-inner, .header-content { flex-direction: column; height: auto; padding: 14px 16px; gap: 12px; }
  nav ul, .main-nav ul { flex-wrap: wrap; justify-content: center; }
  .research-cards, .research-grid { grid-template-columns: 1fr; }
  .footer-inner, .footer-content { grid-template-columns: 1fr; }
  .hero-text h1, .hero-title { font-size: 28px; }
  .member-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
}
