:root {
  --ink: #17191f;
  --muted: #5c6370;
  --paper: #f7f7f4;
  --surface: #ffffff;
  --line: #deded8;
  --red: #c8102e;
  --red-dark: #8f0b20;
  --teal: #1d7771;
  --gold: #b9852c;
  --navy: #202b44;
  --shadow: 0 24px 70px rgba(23, 25, 31, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration-color: rgba(200, 16, 46, 0.45);
  text-underline-offset: 0.2em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 14px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(23, 25, 31, 0.82);
  color: #fff;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  min-width: 56px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--red);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 0.98rem;
}

.brand-text small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: #fff;
}

.site-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(600px, 88vh, 820px);
  overflow: hidden;
  color: #fff;
}

.hero-image,
.hero-overlay,
.hero-content {
  grid-area: 1 / 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 12, 18, 0.88) 0%, rgba(9, 12, 18, 0.58) 43%, rgba(9, 12, 18, 0.18) 100%),
    linear-gradient(0deg, rgba(9, 12, 18, 0.36), rgba(9, 12, 18, 0));
}

.hero-content {
  align-self: center;
  width: min(780px, calc(100% - 40px));
  margin-left: clamp(20px, 7vw, 92px);
  padding: 96px 0 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffb7c4;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 8vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--red);
  color: #fff;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--red);
  font-weight: 800;
}

.page-hero {
  padding: clamp(86px, 13vw, 150px) clamp(20px, 5vw, 64px) clamp(54px, 8vw, 92px);
  background:
    linear-gradient(90deg, rgba(23, 25, 31, 0.9), rgba(32, 43, 68, 0.72)),
    url("assets/hero-dsai-lab.png") center / cover;
  color: #fff;
}

.page-hero .eyebrow {
  color: #ffb7c4;
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.04;
}

.page-hero-copy {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 700;
  line-height: 1.55;
}

.section {
  padding: clamp(64px, 10vw, 118px) clamp(20px, 5vw, 64px);
}

.section-heading {
  width: min(960px, 100%);
  margin-bottom: clamp(28px, 5vw, 52px);
}

.section-heading h2 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.intro-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.intro-grid article,
.project-card {
  min-height: 250px;
  padding: clamp(24px, 4vw, 38px);
  background: var(--surface);
}

.intro-grid h3,
.project-card h3,
.profile h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.intro-grid p,
.project-card p,
.profile p,
.timeline p {
  color: var(--muted);
  line-height: 1.7;
}

.research-gallery {
  background:
    linear-gradient(180deg, #fff 0%, #f2f5f4 100%);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  display: grid;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 52px rgba(23, 25, 31, 0.08);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.gallery-card div {
  padding: clamp(22px, 4vw, 34px);
}

.gallery-card span {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.gallery-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.15;
}

.gallery-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.people {
  background: #fff;
}

.people-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
}

.profile {
  display: flex;
  gap: 18px;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.lead-profile {
  display: grid;
  gap: 22px;
  min-height: 100%;
  background: var(--navy);
  color: #fff;
}

.lead-profile p {
  color: rgba(255, 255, 255, 0.75);
}

.student-grid {
  display: grid;
  gap: 24px;
}

.profile-photo {
  flex: 0 0 132px;
  width: 132px;
  height: 132px;
  object-fit: cover;
  object-position: center top;
  background: #edf2f1;
}

.lead-profile .profile-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.avatar {
  display: grid;
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  place-items: center;
  background: #edf2f1;
  color: var(--teal);
  font-weight: 800;
}

.lead-profile .avatar {
  background: var(--red);
  color: #fff;
}

.role {
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.alumni {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.alumni ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.projects {
  background: #f0f2ee;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card:nth-child(5) {
  grid-column: span 2;
}

.project-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: center;
  padding: clamp(34px, 6vw, 58px) 0;
  border-bottom: 1px solid var(--line);
}

.project-detail img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.project-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.22;
}

.project-copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.project-index {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.news {
  background: var(--ink);
  color: #fff;
}

.timeline {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.timeline article {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.timeline time {
  color: #ffb7c4;
  font-weight: 800;
}

.timeline p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.collaborators {
  background: #fff;
}

.logo-row,
.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.logo-row span {
  display: grid;
  min-height: 112px;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.logo-row span:last-child {
  border-right: 0;
}

.logo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.logo-grid figure {
  display: grid;
  min-height: 170px;
  place-items: center;
  margin: 0;
  padding: 28px;
  background: #fff;
}

.logo-grid img {
  display: block;
  max-width: min(100%, 230px);
  max-height: 92px;
  object-fit: contain;
}

.logo-grid figure:nth-child(5) img,
.logo-grid figure:nth-child(7) img {
  max-height: 116px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  padding: 42px clamp(20px, 5vw, 64px);
  background: #0e1015;
  color: #fff;
}

.site-footer h2 {
  margin-bottom: 8px;
}

.site-footer p,
.site-footer address,
.footer-links {
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
}

.contact-panel {
  background: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.contact-grid article {
  padding: clamp(28px, 5vw, 48px);
  background: var(--surface);
}

.contact-grid h2 {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.contact-grid p {
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 20px;
    left: 20px;
    display: none;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(23, 25, 31, 0.96);
  }

  .site-nav.is-open {
    display: grid;
  }

  .intro-grid,
  .project-grid,
  .project-detail,
  .gallery-grid,
  .gallery-card,
  .people-layout,
  .contact-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .project-card:nth-child(5) {
    grid-column: auto;
  }

  .project-detail img {
    max-height: none;
  }

  .alumni ul,
  .logo-row,
  .logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    align-self: end;
    padding-bottom: 54px;
  }

  .profile {
    display: grid;
  }

  .alumni ul,
  .logo-row,
  .logo-grid {
    grid-template-columns: 1fr;
  }

  .logo-row span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .logo-row span:last-child {
    border-bottom: 0;
  }
}
