/* JOIN US PAGE LINKS */
#join-details a {
  color: var(--violet);
  text-decoration: underline;
  transition: color 0.2s;
}

#join-details a:hover {
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #1a1a2e;
  --violet: #5b4fcf;
  --violet-light: #ede9ff;
  --cream: #F4F4F3;
  --mid: #6b6b7b;
  --border: #e0ddd6;
  --white: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: 64px;
}

.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none;
  font-size: 1rem; font-weight: 500; color: var(--ink);
}

.nav-logo .logo-img { height: 50px; object-fit: contain; }
.nav-logo svg { width: 36px; height: 36px; }
.nav-logo span { color: var(--violet); }

.nav-links {
  display: flex; gap: clamp(1rem, 3vw, 2.5rem);
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--mid);
  font-size: .9rem;
  font-weight: 400;
  transition: color .2s;
  padding-bottom: 2px;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active { color: var(--ink); border-bottom: 1.5px solid var(--ink); }

/* hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }

/* ── SECTIONS ── */
section { padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem); }

/* ── HERO ── */
#about {
  text-align: center;
  padding-top: clamp(4rem, 10vw, 7rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

#about .about-image {
  max-width: 100%;
  height: auto;
  margin-top: 0.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.hero-tag {
  display: inline-block;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--violet); font-weight: 500;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: 'Manrope', serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.15;
  max-width: 820px; margin: 0 auto 1.8rem;
  color: var(--ink);
}

.hero-title em { font-style: normal; color: var(--violet); }

.hero-body {
  max-width: 640px; margin: 0 auto 2.5rem;
  color: var(--mid); font-size: 1.05rem; font-weight: 300;
}

.hero-pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
}

.pill {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-size: .82rem; color: var(--mid);
}

/* divider */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 0 clamp(1.25rem, 5vw, 3rem);
}

/* ── PEOPLE ── */
#people { text-align: center; }

.section-label {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--violet); font-weight: 500; margin-bottom: .6rem;
}

.section-title {
  font-family: 'Manrope', serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 3rem;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 960px; margin: 0 auto;
}

.person-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}

.person-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.07); }

.avatar {
  width: 112px; height: 112px; border-radius: 50%;
  background: var(--violet-light);
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Manrope', serif;
  font-size: 1.5rem; color: var(--violet);
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.person-name { font-weight: 500; font-size: 1rem; margin-bottom: .15rem; }
.person-role { font-size: .82rem; color: var(--violet); margin-bottom: .8rem; font-weight: 500; }
.person-bio  { font-size: .875rem; color: var(--mid); line-height: 1.55; }

.people-grid--sm {
  margin-top: 1.5rem;
}

.person-card--sm { padding: 1.5rem 1rem; }

.avatar--sm { width: 72px; height: 72px; }

.person-card--sm .person-role { margin-bottom: 0; }

/* ── PUBLICATIONS ── */
#publications { max-width: 800px; margin: 0 auto; }
#publications .section-title { text-align: center; }

.pub-list { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; }

.pub-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  display: flex; align-items: flex-start; gap: 1rem;
  transition: box-shadow .2s;
}

.pub-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,.06); }

.pub-year {
  min-width: 48px; font-size: .78rem; font-weight: 500;
  color: var(--violet); padding-top: .2rem;
}

.pub-info .pub-title   { font-weight: 500; margin-bottom: .25rem; }
.pub-title-link { color: inherit; text-decoration: none; }
.pub-title-link:hover { text-decoration: underline; }
.pub-info .pub-authors { font-size: .85rem; color: var(--mid); }
.pub-info .pub-venue   { font-size: .82rem; color: var(--violet); margin-top: .2rem; font-style: italic; }

/* ── JOIN US ── */
#join {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  margin: 0 clamp(1.25rem, 5vw, 3rem) clamp(2rem, 5vw, 4rem);
  padding: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 5vw, 4rem);
}

#join .section-title  { color: var(--ink); margin-bottom: 1rem; }
#join p { color: var(--mid); max-width: 520px; margin: 0 auto 2rem; }

.btn {
  display: inline-block;
  background: transparent;
  color: #888;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #ccc;
  padding: .45rem 1.25rem;
  font-size: .8rem; font-weight: 400;
  transition: border-color .2s, color .2s;
}

.btn:hover { border-color: #999; color: #555; }

/* ── JOINING DETAILS PAGE ── */
#join-details {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem);
}


#join-details .section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

#join-details h3 {
  margin-top: 2.5rem;
}

.join-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.join-intro {
  background: var(--violet-light);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.8;
}

.join-intro p {
  margin: 0;
}

.join-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: box-shadow .2s;
}

.join-section:hover { box-shadow: 0 6px 20px rgba(0,0,0,.06); }

.join-section h3 {
  font-family: 'Manrope', serif;
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0;
}

.join-section p {
  color: var(--mid);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.join-section p a {
  color: inherit;
  text-decoration: underline;
}

.join-cta {
  margin-top: 1rem;
}

.join-notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--violet);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.join-notice p {
  font-size: 0.95rem;
  color: var(--mid);
  margin: 0;
  line-height: 1.7;
}

.join-notice strong {
  color: var(--ink);
}

/* ── PUBLICATIONS PAGE ── */
#all-publications {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem);
}

#all-publications .section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.pub-list-full {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub-item-full {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: box-shadow 0.2s;
}

.pub-item-full:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.pub-item-full .pub-year {
  min-width: 48px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--violet);
  padding-top: 0.2rem;
}

.pub-item-full .pub-info .pub-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.pub-item-full .pub-info .pub-authors {
  font-size: 0.85rem;
  color: var(--mid);
}

.pub-item-full .pub-info .pub-venue {
  font-size: 0.82rem;
  color: var(--violet);
  margin-top: 0.2rem;
  font-style: italic;
}

.pub-item .pub-info .pub-note,
.pub-item-full .pub-info .pub-note {
  font-size: 0.82rem;
  color: var(--violet);
  margin-top: 0.4rem;
  font-weight: 500;
}

.best-paper-icon {
  color: #ffd700; /* Gold color */
  font-size: 1.1em;
  vertical-align: middle;
  margin-left: 0.3rem;
}

/* ── DIRECTOR CARD ── */
.director-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2.5rem;
  grid-column: 1 / -1;
  margin-bottom: 2rem;
  align-items: start;
}

.director-left {
  display: flex;
  justify-content: center;
}

.director-image {
  width: 230px;
  min-width: 180px;
}

.director-image img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 3/4;
}

.director-heading {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--violet);
  margin: 0 0 0.8rem 0;
}

.director-heading a {
  color: var(--ink);
  text-decoration: none;
}

.director-heading::after {
  content: '';
}

.director-role {
  display: none;
}

.director-meta {
  display: none;
}

.director-bio {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.director-bio p {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.75;
  margin: 0;
}

.director-bio p.director-heading {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--violet);
  line-height: 1.25;
  margin: 0 0 0.8rem 0;
}

.director-bio p.director-heading a {
  color: var(--ink);
  text-decoration: none;
}

.profile-link {
  margin-top: 0rem !important;
  text-align: right;
}

.profile-link a {
  color: var(--violet);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.profile-link a:hover {
  color: var(--ink);
  border-color: var(--violet);
}

@media (max-width: 600px) {
  .director-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .director-image {
    width: 110px;
    min-width: unset;
    margin: 0 auto;
  }
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem;
  font-size: .82rem; color: var(--mid);
  border-top: 1px solid var(--border);
}

footer a { color: var(--violet); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag                        { animation: fadeUp .6s ease both; }
.hero-title                      { animation: fadeUp .6s ease both; animation-delay: .08s; }
.hero-body                       { animation: fadeUp .6s ease both; animation-delay: .16s; }
.hero-pills                      { animation: fadeUp .6s ease both; animation-delay: .24s; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .nav-links {
    display: none; flex-direction: column; gap: 1rem;
  }
  .nav-links.open {
    display: flex;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    z-index: 99;
  }
  .hamburger { display: flex; }
  .people-grid { grid-template-columns: 1fr 1fr; }
}

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

/* ── ELISA PROFILE PAGE ── */
#elisa-profile {
  max-width: 1100px;
  margin: 0 auto;
}

.profile-container {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.profile-image img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  aspect-ratio: 3/4;
  object-fit: cover;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-title {
  font-family: 'Manrope', serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}

.profile-role {
  color: var(--violet);
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.profile-bio {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-bio p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--mid);
  margin: 0;
}

.profile-bio a {
  color: var(--violet);
  text-decoration: none;
}

.profile-bio a:hover { text-decoration: underline; }

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.profile-link-pill {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .82rem;
  color: var(--violet) !important;
  font-weight: 500;
  text-decoration: none !important;
  transition: background .2s, border-color .2s;
}

.profile-link-pill:hover {
  background: var(--violet-light);
  border-color: var(--violet);
  text-decoration: none !important;
}

@media (max-width: 640px) {
  .profile-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .profile-image img {
    width: 200px;
    aspect-ratio: auto;
  }
}

/* ── PERSON CARD LINKS ── */
.person-name a,
.director-name a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

.person-name a:hover,
.director-name a:hover {
  color: var(--violet);
  text-decoration: underline;
}

/* ── TALKS SECTION ── */
#talks {
  background: var(--white);
  border-radius: 16px;
  padding: clamp(2rem, 6vw, 4rem);
  max-width: 1100px;
  margin: 0 auto;
}

.talks-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.talk-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.talk-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}

.talk-video-link {
  position: relative;
  display: block;
  width: 100%;
  background: #000;
  overflow: hidden;
}

.talk-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.talk-video-link:hover .talk-thumbnail {
  transform: scale(1.02);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 3rem;
  opacity: 0.8;
  transition: opacity 0.2s;
  pointer-events: none;
}

.talk-video-link:hover .play-button {
  opacity: 1;
}

.talk-info {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.talk-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.talk-venue {
  font-size: 0.9rem;
  color: var(--mid);
  font-style: italic;
}

@media (max-width: 600px) {
  .talk-thumbnail {
    height: 180px;
  }
  
  .talk-info {
    padding: 1.2rem 1.4rem;
  }
}

/* ── ACCESSIBILITY ── */

/* Skip to main content link — visually hidden until focused */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--violet);
  color: var(--white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
}

/* Visible keyboard focus indicator for all interactive elements */
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respect user preference to reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-tag,
  .hero-title,
  .hero-body,
  .hero-pills {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
