html {
  scroll-behavior: smooth;
}

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

:root {
  --primary-green: #2c5f2d;
  --accent-orange: #d97a34;
  --text-dark: #2d2d2d;
  --text-light: #666;
  --background-light: #f8f8f8;
  --white: #ffffff;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--white);
}

.header {
  background-color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-green);
}

.site-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-green);
}

/* Dropdown menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a::after {
  content: ' ▾';
  font-size: 0.75em;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  min-width: 160px;
  z-index: 1001;
  padding: 0.5rem 0;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
  background-color: var(--background-light);
  color: var(--primary-green);
}

/* Scroll offset for anchor links under fixed header */
section[id] {
  scroll-margin-top: 100px;
}

/* Hero */
/* ...existing code... */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url('images/HomePage.jpg');
  background-size: cover;
  background-position: center top;
  color: var(--white);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* ...existing code... */

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.3rem;
  font-weight: 300;
  max-width: 800px;
  margin: 0 auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 3rem;
  text-align: center;
}

.section {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--accent-orange);
  margin-bottom: 1.5rem;
}

.content-block {
  background-color: var(--background-light);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 160px;
  grid-auto-flow: dense;
  gap: 0.75rem;
}

.gallery-item {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f1f1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.span-col-1 {
  grid-column: span 1;
}

.span-col-2 {
  grid-column: span 2;
}

.span-row-1 {
  grid-row: span 1;
}

.span-row-2 {
  grid-row: span 2;
}

.team-member {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: start;
}
.member-image {
  width: 100%;
  border-radius: 8px;
  background-color: #ddd;
  object-fit: contain;
}

.education-badge {
  background-color: #f5d5c4;
  padding: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-self: flex-start;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 1rem;
  aspect-ratio: 1.5 / 1;
}

.education-badge h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

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

.publications-list li {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  position: relative;
  line-height: 1.6;
}

.publications-list li::before {
  content: attr(data-number);
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--primary-green);
}

.google-scholar-link {
  display: inline-block;
  background-color: var(--primary-green);
  color: var(--white);
  padding: 0.75rem 2rem;
  text-decoration: none;
  border-radius: 4px;
  margin-bottom: 2rem;
  transition: background-color 0.3s ease;
}

.google-scholar-link:hover {
  background-color: #1e4520;
}

.research-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.research-area {
  background-color: var(--background-light);
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent-orange);
}

/* ...existing code... */
.research-area h3 {
  font-size: 1.8rem;
  color: var(--accent-orange);
  margin-bottom: 1rem;
}

.research-area h4 {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 1rem;
}
/* ...existing code... */

.lab-philosophy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.philosophy-section h3 {
  font-size: 1.5rem;
  color: var(--primary-green);
  margin-bottom: 1rem;
}

.philosophy-section ul {
  list-style: none;
  padding-left: 0;
}

.philosophy-section li {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.philosophy-section li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-orange);
  font-size: 1.5rem;
  line-height: 1;
}

.philosophy-section strong {
  color: var(--text-dark);
  display: block;
  margin-bottom: 0.25rem;
}

.contact-box {
  background-color: var(--background-light);
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.contact-box h3 {
  font-size: 1.5rem;
  color: var(--primary-green);
  margin-bottom: 1rem;
}

.contact-box ol {
  padding-left: 1.5rem;
}

.contact-box li {
  margin-bottom: 0.5rem;
}

.footer {
  background-color: var(--primary-green);
  color: var(--white);
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

.footer p {
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
    .dropdown-menu {
        left: auto !important;
        right: 0 !important;
        max-width: 100vw;
    }
    .gh-menu {
        left: 0 !important;
        right: auto !important;
        max-width: 100vw;
    }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 140px;
  }

  .span-col-2 {
    grid-column: span 2;
  }

  .team-member {
    grid-template-columns: 1fr;
  }

  .lab-philosophy {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 2rem 1rem;
  }
}

@media (min-width: 1400px) {
  .header-content {
    max-width: 1400px;
    padding: 1.5rem 3rem;
  }

  .site-title {
    font-size: 1.4rem;
  }

  .site-subtitle {
    font-size: 1rem;
  }
  
  .nav a {
    font-size: 1.1rem;
  }

  .footer {
    padding: 3rem;
    font-size: 1.1rem;
  }

  .gh-btn svg,
  .gh-btn img {
    width: 28px;
    height: 28px;
  }

  .gh-btn {
    font-size: 1.5rem;
    gap: 8px;
  }

}

.repo-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .repo-tile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
  }

  .repo-tile:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }

  .repo-tile__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .repo-tile__name {
    font-weight: 600;
    font-size: 1rem;
    color: #1a1a2e;
    word-break: break-word;
  }

  .repo-tile__language {
    display: none;
  }

  .repo-tile__desc {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.45;
    flex: 1;
    margin: 0;
  }

  .repo-tile__no-desc {
    color: #aaa;
    font-style: italic;
  }

  .repo-tile__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.25rem;
  }

  .repo-tile__stars {
    color: #d97706;
    font-weight: 500;
  }

  .repo-tiles__empty {
    color: #888;
    font-style: italic;
  }

  .gh-dropdown { position: relative; }

  .gh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 6px 8px;
    border-radius: 6px;
  }
  .gh-btn:hover { background: rgba(0,0,0,0.06); }

  .gh-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-width: 170px;
    z-index: 100;
    overflow: hidden;
  }
  .gh-menu.open { display: block; }

  .gh-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #111;
    text-decoration: none;
    white-space: nowrap;
  }
  .gh-menu a:hover { background: #f5f5f5; }

  .gh-menu hr {
    margin: 0 10px;
    border: none;
    border-top: 1px solid #eee;
  }