*, *::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-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); }

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

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

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

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

/* ── 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;
}

/* ── 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;
}

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

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

@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; }

  .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; }
  * {
    transition-duration: 0.01ms !important;
  }
}
