:root {
  --ink: #172033;
  --muted: #586174;
  --paper: #ffffff;
  --soft: #f4f6f8;
  --line: #dfe4ea;
  --accent: #7b4d12;
  --accent-dark: #543309;
  --green: #1d4f3f;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.09);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
img { max-width: 100%; }
code {
  padding: .12rem .35rem;
  border-radius: 5px;
  background: #edf0f3;
  font-size: .9em;
}
.container { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.section { padding: 6.5rem 0; scroll-margin-top: 78px; }
.section-alt { background: var(--soft); }
.eyebrow {
  margin: 0 0 .7rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(2.8rem, 6vw, 5.7rem); max-width: 950px; }
h2 { margin: 0 0 1.4rem; font-size: clamp(2rem, 4vw, 3.55rem); }
h3 { margin-top: 0; }
p { color: var(--muted); }
.section-intro { max-width: 780px; margin: 0 0 2.5rem; font-size: 1.08rem; }

.skip-link {
  position: fixed; top: -60px; left: 1rem; z-index: 1000;
  background: var(--ink); color: white; padding: .75rem 1rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(223,228,234,.85);
}
.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 10px; background: var(--green); color: white; font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .75rem; }
.primary-nav { display: flex; align-items: center; gap: 1.15rem; font-size: .88rem; font-weight: 700; }
.primary-nav a { text-decoration: none; }
.primary-nav a:hover, .primary-nav a:focus { color: var(--accent); }
.nav-toggle { display: none; border: 0; background: transparent; padding: .5rem; }
.nav-toggle span { display: block; width: 25px; height: 2px; margin: 5px; background: var(--ink); }

.hero {
  min-height: calc(100vh - 76px);
  display: grid; align-items: center;
  padding: 6rem 0;
  background:
    radial-gradient(circle at 84% 18%, rgba(123,77,18,.14), transparent 25%),
    linear-gradient(135deg, #fff 0%, #f6f7f9 100%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.7fr); gap: 4rem; align-items: center; }
.hero-lead { max-width: 820px; font-size: clamp(1.08rem, 2vw, 1.35rem); }
.hero-actions, .quick-links, .filter-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-actions { margin-top: 2rem; }
.quick-links { margin-top: 1.6rem; }
.quick-links a { color: var(--green); font-weight: 700; text-underline-offset: 4px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.1rem; border-radius: 999px;
  font-weight: 800; text-decoration: none; border: 1px solid var(--ink);
}
.button.primary { background: var(--ink); color: white; }
.button.primary:hover { background: var(--green); border-color: var(--green); }
.button.secondary { background: transparent; color: var(--ink); }

.profile-card, .info-panel, .application-card, .contact-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: white; box-shadow: var(--shadow);
}
.profile-card { padding: 1.1rem; }
.portrait-placeholder {
  aspect-ratio: 4 / 4.7; display: grid; place-content: center; text-align: center;
  border-radius: calc(var(--radius) - 5px);
  background: linear-gradient(145deg, var(--green), #2c725d);
  color: white;
}
.portrait-placeholder span { font-size: 4rem; font-weight: 900; letter-spacing: -.08em; }
.portrait-placeholder small { opacity: .82; }
.profile-card dl { margin: 1rem 0 0; }
.profile-card dl div { padding: .8rem .2rem; border-bottom: 1px solid var(--line); }
.profile-card dl div:last-child { border: 0; }
.profile-card dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.profile-card dd { margin: .15rem 0 0; font-weight: 700; }

.two-column, .opportunity-grid, .contact-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: start;
}
.info-panel, .application-card, .contact-card { padding: 2rem; }
.clean-list { padding-left: 1.1rem; color: var(--muted); }
.clean-list li { margin-bottom: .7rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .55rem; }
.tag-list span {
  padding: .45rem .7rem; border-radius: 999px;
  background: var(--soft); color: var(--ink); font-size: .86rem; font-weight: 700;
}

.feature-grid, .card-grid, .people-grid, .course-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.15rem;
}
.feature-card, .project-card, .person-card, .course-card {
  padding: 1.55rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: white;
}
.feature-card { min-height: 250px; }
.feature-number { display: block; color: var(--accent); font-weight: 900; margin-bottom: 3rem; }
.project-card, .person-card { box-shadow: 0 8px 25px rgba(23,32,51,.055); }
.project-card .status, .person-card .role, .course-card .level {
  display: inline-block; margin-bottom: .85rem; color: var(--accent);
  font-size: .73rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
}
.project-card ul { padding-left: 1.1rem; color: var(--muted); }
.project-card a { color: var(--green); font-weight: 800; }

.filter-row { margin-bottom: 1.6rem; }
.filter-button {
  border: 1px solid var(--line); border-radius: 999px; padding: .55rem .9rem;
  background: white; color: var(--ink); font-weight: 800; cursor: pointer;
}
.filter-button.active, .filter-button:hover { background: var(--ink); color: white; border-color: var(--ink); }
.person-avatar {
  width: 68px; height: 68px; display: grid; place-items: center;
  margin-bottom: 1.1rem; border-radius: 50%; background: var(--green);
  color: white; font-weight: 900; font-size: 1.2rem;
}
.person-card[hidden] { display: none; }

.publication-list { display: grid; gap: 1rem; margin-bottom: 2rem; }
.publication-item {
  display: grid; grid-template-columns: 90px 1fr; gap: 1.2rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--line);
}
.publication-year { color: var(--accent); font-size: 1.3rem; font-weight: 900; }
.publication-item h3 { margin-bottom: .35rem; font-size: 1.06rem; }
.publication-item p { margin: .2rem 0; }
.publication-item a { color: var(--green); font-weight: 800; }
.center { text-align: center; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th, td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eef1f3; font-size: .77rem; letter-spacing: .07em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }

.course-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.course-card .course-code { font-weight: 900; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding: .45rem 0 .45rem 1.7rem; color: var(--muted); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.application-card ol { padding-left: 1.3rem; color: var(--muted); }
.application-card .button { margin-top: 1rem; }

.contact-section { background: var(--ink); color: white; }
.contact-section p { color: rgba(255,255,255,.72); }
.contact-card { display: grid; gap: .45rem; color: var(--ink); font-style: normal; }
.contact-card a { color: var(--green); font-weight: 800; }

.site-footer { padding: 1.5rem 0; background: #101725; color: rgba(255,255,255,.78); }
.footer-wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer p { margin: 0; color: inherit; }
.site-footer a { color: white; }

@media (max-width: 1050px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; top: 76px; left: 0; right: 0; display: none;
    padding: 1rem; background: white; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start;
  }
  .primary-nav.open { display: flex; }
  .hero-grid, .two-column, .opportunity-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .profile-card { max-width: 450px; }
  .feature-grid, .card-grid, .people-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .section { padding: 4.5rem 0; }
  .hero { padding: 4rem 0; }
  .hero-grid { gap: 2.5rem; }
  .feature-grid, .card-grid, .people-grid, .course-grid { grid-template-columns: 1fr; }
  .publication-item { grid-template-columns: 1fr; gap: .25rem; }
  .brand small { display: none; }
}

/* Student presentation gallery */

.student-gallery-section {
  background: white;
}

.gallery-section-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 2rem;
}

.gallery-section-header .section-intro {
  margin: 0;
}

.student-presentation-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: repeat(2, 240px);
  gap: 1rem;
}

.student-presentation-card {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  box-shadow: 0 8px 25px rgba(23, 32, 51, 0.055);
}

.student-presentation-featured {
  grid-row: 1 / span 2;
}

.student-presentation-card:last-child {
  grid-column: 2 / span 2;
}

.student-presentation-card a {
  display: block;
  width: 100%;
  height: 100%;
}

.student-presentation-card img {
  display: block;
  width: 100%;
  height: 100%;
  /* object-fit: contain; */
  background: #f4f6f8;
  object-fit: cover;
  object-position: 10% 10%;
  transition:
    transform 0.35s ease,
    filter 0.35s ease;

}

.student-presentation-card:hover img {
  transform: scale(1.04);
  filter: brightness(0.72);
}

.student-presentation-card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 0.2rem;
  padding: 4rem 1.25rem 1.1rem;
  color: white;
  background: linear-gradient(
    to top,
    rgba(10, 17, 28, 0.92),
    rgba(10, 17, 28, 0)
  );
}

.student-presentation-card figcaption strong {
  font-size: 1rem;
}

.student-presentation-card figcaption span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
}

@media (max-width: 1050px) {
  .gallery-section-header {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .student-presentation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 320px 220px;
  }

  .student-presentation-featured {
    grid-column: 1 / span 2;
    grid-row: auto;
  }

  .student-presentation-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .student-presentation-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .student-presentation-card,
  .student-presentation-featured,
  .student-presentation-card:last-child {
    grid-column: auto;
    grid-row: auto;
    height: 260px;
  }
}
