/* ============================================================
   AMG Lab Website — Stylesheet
   ============================================================ */

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

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

body {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  color: #2c2c2c;
  background: #fff;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: #1a5fa8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ---------- Layout ---------- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 72px 0;
}

section:nth-child(even) {
  background: #f7f9fc;
}

/* ---------- Section Headings ---------- */
.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 40px;
  padding-bottom: 12px;
  border-bottom: 3px solid #1a5fa8;
  display: inline-block;
}

/* ---------- Navbar ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #1a3a5c;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

#navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

#navbar .nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

#navbar .nav-logo img {
  height: 38px;
  width: auto;
  border-radius: 4px;
}

#navbar nav {
  display: flex;
  gap: 6px;
}

#navbar nav a {
  color: #ccd9e8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

#navbar nav a:hover,
#navbar nav a.active {
  background: #1a5fa8;
  color: #fff;
}

/* Hamburger (mobile) */
#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

#nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---------- Hero ---------- */
#home {
  padding-top: 120px;
  padding-bottom: 72px;
  background: linear-gradient(135deg, #1a3a5c 0%, #1a5fa8 100%);
  color: #fff;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-text h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-text .subtitle {
  font-size: 1.15rem;
  color: #a8c8f0;
  margin-bottom: 20px;
  font-weight: 400;
}

.hero-text p {
  font-size: 1rem;
  color: #cce0f5;
  max-width: 560px;
  line-height: 1.75;
}


/* ---------- Hero Publications Panel ---------- */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.hero-logo-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.hero-logo-inline img {
  height: 132px;
  width: auto;
  object-fit: contain;
}

.hero-logo-info p {
  font-size: 0.95rem;
  color: #cce0f5;
  line-height: 1.8;
  margin: 0;
}

.hero-logo-info p:first-child {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.hero-cv-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #7ab4e8;
  text-decoration: none;
}

.hero-cv-link:hover {
  color: #fff;
  text-decoration: underline;
}

.hero-publications {
  background: #fff;
  border-radius: 10px;
  padding: 24px 26px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

.hero-publications h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a3a5c;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
  border-bottom: 2px solid #1a5fa8;
  padding-bottom: 10px;
}

.hero-publications ul {
  list-style: none;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.hero-publications ul::-webkit-scrollbar {
  width: 5px;
}
.hero-publications ul::-webkit-scrollbar-track {
  background: #f0f4f8;
  border-radius: 4px;
}
.hero-publications ul::-webkit-scrollbar-thumb {
  background: #a0bcd8;
  border-radius: 4px;
}

.hero-publications li {
  font-size: 14px;
  color: #2c2c2c;
  padding: 6px 0;
  border-bottom: 1px solid #e8eef4;
  line-height: 1.5;
}

.hero-publications li:last-child {
  border-bottom: none;
}

.hero-publications strong {
  color: #1a5fa8;
}

.hero-pub-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #1a5fa8;
  text-decoration: none;
}

.hero-pub-link:hover {
  text-decoration: underline;
}

/* ---------- Research ---------- */
.research-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.research-card {
  background: #fff;
  border: 1px solid #dde6f0;
  border-radius: 8px;
  padding: 28px;
  border-top: 4px solid #1a5fa8;
}

.research-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 10px;
}

.research-card p {
  font-size: 0.93rem;
  color: #444;
}

.research-topics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.topic-tag {
  background: #e8f0fa;
  color: #1a5fa8;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Members ---------- */
.team-photo {
  margin: 0 auto 36px;
  width: 25%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 6px 20px rgba(0, 0, 0, 0.2);
  transform: perspective(900px) rotateX(4deg) rotateY(-3deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.team-photo:hover {
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.12);
}

.team-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.member-card {
  text-align: center;
}

.member-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 3px solid #dde6f0;
  background: #eaf0f8;
  flex-shrink: 0;
}

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

.member-card .member-name {
  font-weight: 700;
  font-size: 1rem;
  color: #1a3a5c;
  margin-bottom: 2px;
}

.member-card .member-title {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}

.member-card a {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a5fa8;
}

/* ---------- Publications ---------- */
.publications-list {
  list-style: none;
}

.publications-list li {
  padding: 16px 0;
  border-bottom: 1px solid #e4eaf2;
  font-size: 0.94rem;
  line-height: 1.6;
}

.publications-list li:last-child {
  border-bottom: none;
}

.publications-list .pub-title {
  font-weight: 600;
  color: #1a3a5c;
}

.publications-list .pub-journal {
  color: #1a3a5c;
  font-style: italic;
  font-weight: 700;
}

.publications-list .pub-year {
  display: inline-block;
  background: #1a5fa8;
  color: #fff;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
}

/* ---------- Software ---------- */
.software-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a5fa8;
  margin-top: 36px;
  margin-bottom: 14px;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.software-card {
  background: #fff;
  border: 1px solid #dde6f0;
  border-radius: 8px;
  padding: 20px 22px;
}

.software-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 6px;
}

.software-card p {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 10px;
}

.software-card a {
  font-size: 0.82rem;
  font-weight: 600;
}

.software-retired {
  margin-top: 12px;
}

.software-retired p {
  font-size: 0.88rem;
  color: #666;
}

/* ---------- News ---------- */
.news-list {
  list-style: none;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid #e4eaf2;
  align-items: flex-start;
}

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

.news-date {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: #1a5fa8;
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.news-text {
  font-size: 1.41rem;
  color: #333;
}

/* ---------- Contact ---------- */
#contact {
  background: #1a3a5c;
  color: #cce0f5;
}

#contact .section-title {
  color: #fff;
  border-bottom-color: #1a5fa8;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info p {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.contact-info strong {
  color: #fff;
}

.contact-info a {
  color: #7ab4e8;
}

.funding-section h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 12px;
}

.funding-section p {
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ---------- Footer ---------- */
footer {
  background: #111e2d;
  color: #667d95;
  text-align: center;
  padding: 20px;
  font-size: 0.82rem;
}

footer a {
  color: #7ab4e8;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  #nav-toggle {
    display: flex;
  }

  #navbar nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #1a3a5c;
    padding: 12px 24px 20px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  #navbar nav.open {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-text p {
    max-width: 100%;
  }

  .research-cards {
    grid-template-columns: 1fr;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

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

  .hero-logo-row {
    flex-wrap: wrap;
  }

  .hero-logo-inline img {
    height: 80px;
  }

  .hero-publications ul {
    max-height: none;
    overflow-y: visible;
  }
}
