:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f1f5fb;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #f97316;
  --primary-soft: #ffedd5;
  --line: #e5e7eb;
  --shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% -5%, #fff3e8 0%, var(--bg) 45%), var(--bg);
  line-height: 1.6;
}

.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(247, 249, 252, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-weight: 760;
  letter-spacing: 0.1px;
}
.brand span { color: var(--primary); }

.menu { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.menu a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: 0.2s ease;
}
.menu a:hover { color: var(--primary); background: var(--primary-soft); }
.menu a.active { color: #c2410c; background: var(--primary-soft); }

main { padding: 2rem 0 3rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.hero {
  background: linear-gradient(125deg, #ffffff 0%, #f8fbff 65%, #eef5ff 100%);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-soft);
  color: #c2410c;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h2 { margin-top: 0; font-size: 1.3rem; }
h3 { margin-top: 0; font-size: 1.1rem; }

p.lead { margin: 0.9rem 0 1rem; color: var(--muted); max-width: 64ch; }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.62rem 1rem;
  border-radius: 11px;
  transition: 0.2s ease;
}
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn:hover { transform: translateY(-1px); }

.panel {
  background: var(--surface-soft);
  border: 1px solid #e4ecfb;
  border-radius: 14px;
  padding: 1rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }

.tile {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
}
.tile h4 { margin: 0 0 0.4rem; font-size: 1rem; }
.tile p { margin: 0; color: var(--muted); }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.list li { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0.75rem 0.8rem; }

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #9a3412;
  background: #fff7ed;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.5rem;
}

footer {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .hero, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* --- About page styles (updated to match requested format) --- */
.about-page {
  background: #f3f4f6;
}

.about-page header {
  background: rgba(243, 244, 246, 0.95);
  border-bottom: 1px solid #d1d5db;
}

.about-main {
  padding-top: 1.9rem;
}

.about-overview {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.4rem 0.1rem 1.2rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.2rem;
  align-items: start;
}

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

.about-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  margin: 0 auto 1.2rem;
  display: block;
}

.about-name {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  line-height: 1.2;
}

.about-role {
  margin: 0.28rem 0;
  font-size: 1.05rem;
}

.social-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding: 0;
  margin: 1.35rem 0 0;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #9ca3af;
  background: #ffffff;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-1px);
  border-color: #6b7280;
}

.social-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.about-right p {
  margin: 0 auto 1.1rem;
  max-width: 64ch;
  color: #111827;
  font-size: 1.06rem;
  line-height: 1.8;
  text-align: justify;
}

.about-right {
  padding-top: 1.9rem;
}

.timeline-wrap {
  background: transparent;
  border: none;
  box-shadow: none;
  border-top: 1px solid #9ca3af;
  border-radius: 0;
  margin-top: 0.35rem;
  padding: 1.45rem 0.1rem 0.3rem;
}

.timeline-title {
  font-size: clamp(1.85rem, 2.4vw, 2rem);
  margin: 0 0 1.35rem;
}

.timeline {
  display: grid;
  gap: 0.72rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 210px 90px 1fr;
  align-items: start;
  gap: 1rem;
}

.timeline-date {
  font-size: 1.02rem;
  white-space: nowrap;
  padding-top: 0.2rem;
}

.timeline-axis {
  position: relative;
  min-height: 62px;
}

.timeline-axis::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: -14px;
  width: 1px;
  background: #8b8f94;
  transform: translateX(-50%);
}

.timeline-item:last-child .timeline-axis::before {
  bottom: 50%;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0f2912;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot.marker-icon {
  width: 54px;
  height: 54px;
  top: 0;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #d1d5db;
}

.timeline-dot.marker-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.timeline-event {
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0;
}

.timeline-event a {
  color: #111827;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .about-right p {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.72;
  }

  .about-right {
    padding-top: 0.2rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    border-left: 2px solid #8b8f94;
    padding-left: 1rem;
    margin-left: 0.45rem;
  }

  .timeline-axis,
  .timeline-axis::before {
    display: none;
  }

  .timeline-date,
  .timeline-event {
    font-size: 0.98rem;
  }
}



/* --- Team page styles --- */
.team-section {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.team-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center;
}

.team-meta h3 {
  margin: 0 0 0.35rem;
}

.team-role {
  margin: 0 0 0.25rem;
  font-weight: 700;
  color: #c2410c;
}

.team-affiliation {
  margin: 0 0 0.5rem;
  font-size: 0.94rem;
  color: var(--muted);
}

.team-meta p {
  margin-top: 0;
}

@media (max-width: 960px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

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

  .team-photo {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}


/* --- AlgeSPACE project page styles --- */

.algespace-logo {
  width: min(240px, 55%);
  height: auto;
  margin-bottom: 0.5rem;
}

.algespace-overview-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
}

.algespace-animation-grid {
  align-items: stretch;
}

.algespace-animation-card {
  padding: 0.8rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.algespace-animation-card img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #dbe4f0;
  margin-bottom: 0.7rem;
  display: block;
}

.algespace-animation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(31, 41, 55, 0.11);
}

@media (max-width: 960px) {
  .algespace-logo {
    width: min(260px, 80%);
  }
}

.algespace-hero {
  background: linear-gradient(125deg, #ffffff 0%, #f8fbff 65%, #eef5ff 100%);
}

.algespace-subtitle {
  margin-top: 0.5rem;
  color: #c2410c;
}

.algespace-questions {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.algespace-questions li {
  padding-left: 0.2rem;
}

.algespace-outputs a {
  margin-left: 0.35rem;
  font-weight: 600;
}

.algespace-team-grid .tile p {
  margin-bottom: 0.55rem;
}

.tile h4 a {
  color: inherit;
  text-underline-offset: 3px;
}
