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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Navbar ---------- */
#navbar {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    background 0.3s,
    box-shadow 0.3s;
}

#navbar.scrolled {
  border-bottom-color: rgba(100, 116, 139, 0.12);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

/* ---------- Hero ---------- */
.hero-section {
  background: #f4f7f4;
  min-height: 100vh;
}

.hero-bg {
  background:
    radial-gradient(
      ellipse 80% 60% at 70% 40%,
      rgba(79, 132, 82, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 40% at 20% 80%,
      rgba(20, 184, 166, 0.06) 0%,
      transparent 60%
    );
}

.hero-pattern {
  background-image: radial-gradient(
    circle,
    rgba(79, 132, 82, 0.08) 1px,
    transparent 1px
  );
  background-size: 40px 40px;
}

/* Scroll indicator */
.scroll-dot {
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(6px);
    opacity: 0.4;
  }
}

/* ---------- Expertise Tags ---------- */
.expertise-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #c8dbc9;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #325535;
  text-align: center;
  transition: all 0.2s;
}

.expertise-tag:hover {
  background: #4f8452;
  border-color: #4f8452;
  color: white;
  transform: translateY(-1px);
}

/* ---------- Research Tags (Members) ---------- */
.research-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  background: #e4ede4;
  color: #325535;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- Scholar / Profile Links ---------- */
.scholar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scholar-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.2s;
}

.scholar-icon:hover {
  background: #4f8452;
  border-color: #4f8452;
  color: white;
}

.scholar-icon.orcid-icon:hover {
  background: #a6ce39;
  border-color: #a6ce39;
  color: white;
}
.scholar-icon.rg-icon:hover {
  background: #00ccbb;
  border-color: #00ccbb;
  color: white;
}
.scholar-icon.dblp-icon:hover {
  background: #004f9f;
  border-color: #004f9f;
  color: white;
}

/* ---------- Member Photo ---------- */
.member-photo-wrap {
  min-height: 300px;
}

.member-photo-container {
  width: 220px;
  height: 280px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  background: #e4ede4;
}

.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}

.member-card:hover .member-photo {
  transform: scale(1.03);
}

/* ---------- Section Fade-In ---------- */
.section-fade {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.section-fade.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Stat Cards (Hero) ---------- */
.stat-card {
  animation: card-float 4s ease-in-out infinite;
}

.stat-card:nth-child(2) {
  animation-delay: 1s;
}
.stat-card:nth-child(3) {
  animation-delay: 2s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.5s;
}

@keyframes card-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .member-photo-container {
    width: 160px;
    height: 200px;
  }

  .member-photo-wrap {
    min-height: auto;
    padding: 1.5rem;
  }

  .hero-section {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }
}

/* ---------- Print & Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus outline for keyboard nav */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #4f8452;
  outline-offset: 3px;
  border-radius: 4px;
}
