/* ===== Nature/Science Journal Inspired Academic Theme ===== */

:root {
  --color-primary: #1a3c5e;
  --color-accent: #2a6496;
  --color-accent-light: #3a7ab8;
  --color-text: #1a1a1a;
  --color-text-light: #555;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-border: #d4d8dd;
  --color-highlight: #c8102e;
  --font-serif: 'Merriweather', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 960px;
  --section-gap: 3.5rem;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-highlight); }

img { max-width: 100%; height: auto; }

/* ===== Top Navigation Bar (Nature-style thin bar) ===== */
.top-bar {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 52px;
}

.top-bar .site-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.top-bar nav { display: flex; gap: 0.2rem; }

.top-bar nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.7rem;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}

.top-bar nav a:hover,
.top-bar nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ===== Hero / Header Section ===== */
.hero {
  background: linear-gradient(135deg, #0d2137 0%, #1a3c5e 40%, #1e5080 100%);
  color: #fff;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.hero-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255,255,255,0.6);
}

.hero-text { text-align: left; }

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.hero-text .subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.hero-text .affiliation {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.hero-contact {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.hero-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  background: rgba(255,255,255,0.1);
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.hero-contact a:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ===== Main Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Section Styles (Nature article-like) ===== */
section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--color-border);
}

section:last-of-type { border-bottom: none; }

.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-highlight);
  display: inline-block;
}

/* ===== About / Research Overview ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.about-image {
  text-align: center;
}

.about-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.image-caption {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.research-hero {
  margin-bottom: 2rem;
  text-align: center;
}

.research-hero img {
  max-width: 700px;
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

.research-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.research-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  padding: 1.2rem 1.4rem;
  border-radius: 3px;
  transition: box-shadow 0.2s;
}

.research-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.research-card h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.research-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ===== Awards / Highlights ===== */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.award-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem;
  background: var(--color-bg-alt);
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.award-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.9rem;
}

.award-item h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.15rem;
}

.award-item p {
  font-size: 0.82rem;
  color: var(--color-text-light);
}

/* ===== Publications (Nature reference style) ===== */
.pub-metrics {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.2rem 1.5rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.metric {
  text-align: center;
}

.metric .number {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
}

.metric .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
}

.pub-featured {
  margin-bottom: 2rem;
  text-align: center;
}

.pub-featured img {
  max-width: 700px;
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.pub-featured .image-caption {
  margin-top: 0.5rem;
}

.pub-list { list-style: none; }

.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.pub-item:last-child { border-bottom: none; }

.pub-number {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.9rem;
  flex-shrink: 0;
  width: 28px;
  text-align: right;
}

.pub-content { flex: 1; }

.pub-content .pub-title {
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pub-content .pub-authors {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 0.2rem;
}

.pub-content .pub-authors strong {
  color: var(--color-text);
}

.pub-content .pub-journal {
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.pub-content .pub-journal em {
  color: var(--color-highlight);
  font-style: italic;
  font-weight: 600;
}

.pub-content .pub-journal .year {
  color: var(--color-text-light);
}

/* ===== Education & Experience Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.8rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--color-accent);
  z-index: 1;
}

.timeline-item .period {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-item h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--color-primary);
  margin: 0.15rem 0;
}

.timeline-item .institution {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

/* ===== Teaching ===== */
.teaching-list {
  list-style: none;
}

.teaching-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.teaching-item:last-child { border-bottom: none; }

.course-code {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-primary);
  white-space: nowrap;
}

.course-name {
  flex: 1;
  font-size: 0.92rem;
}

.course-term {
  font-size: 0.82rem;
  color: var(--color-text-light);
  white-space: nowrap;
}

/* ===== Lab / Group ===== */
.group-photo {
  margin-bottom: 2rem;
  text-align: center;
}

.group-photo img {
  max-width: 700px;
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.group-category h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--color-border);
}

.member {
  padding: 0.5rem 0;
}

.member .name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
}

.member .details {
  font-size: 0.82rem;
  color: var(--color-text-light);
}

/* ===== Service ===== */
.service-list {
  list-style: none;
}

.service-list li {
  padding: 0.4rem 0;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.92rem;
  color: var(--color-text);
}

.service-list li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ===== Footer ===== */
footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.82rem;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
}

.footer-logo {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

footer a { color: rgba(255,255,255,0.9); }
footer a:hover { color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-text { text-align: center; }

  .hero-contact { justify-content: center; }

  .hero-photo { width: 140px; height: 140px; font-size: 3rem; }

  .hero-text h1 { font-size: 1.7rem; }

  .top-bar nav { display: none; }
  .top-bar nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  .menu-toggle { display: block; }

  .about-content { grid-template-columns: 1fr; }

  .pub-metrics { flex-wrap: wrap; gap: 1rem; }

  .teaching-item {
    flex-direction: column;
    gap: 0.2rem;
  }

  .section-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero-text h1 { font-size: 1.4rem; }
  .research-areas { grid-template-columns: 1fr; }
  .awards-grid { grid-template-columns: 1fr; }
  .group-grid { grid-template-columns: 1fr; }
}
