*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a5242;
  --surface:   #0F6E56;
  --surface2:  rgba(255,255,255,0.07);
  --border:    rgba(255,255,255,0.12);
  --accent:    #5DDAB4;
  --accent-dim:#A8E8D4;
  --text:      #fff;
  --text-muted:#C8EDE3;
  --text-dim:  #88C9B8;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Long identifiers in inline <code> — and runs of them joined by slashes, e.g.
   dataset/featurization/init_method/acquisition_hparams — offer no break
   opportunity, so they forced whole paragraphs wider than a phone viewport.
   `anywhere` rather than `break-word` because only `anywhere` also reduces the
   element's min-content width, which is what lets the parent paragraph shrink. */
code { overflow-wrap: anywhere; }

/* ── Nav ── */
nav {
  background: rgba(10,82,66,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.nav-brand em { font-style: normal; color: var(--accent); }
.nav-logo {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--surface2);
  color: var(--text);
}

/* ── Hero ── */
.hero {
  background: var(--surface);
  padding: 60px 40px 50px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-bg-art {
  position: absolute;
  top: 0; right: 0;
  pointer-events: none;
  opacity: 0.1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  color: var(--accent-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-tagline {
  font-size: 16px;
  color: var(--accent-dim);
  margin-bottom: 28px;
}
.hero-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #E8F9F4;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
}
.pill svg { opacity: 0.8; flex-shrink: 0; }
.pill-link {
  text-decoration: none;
  background: rgba(93,218,180,0.16);
  border-color: rgba(93,218,180,0.4);
  color: #CFF6E9;
  transition: background 0.15s, border-color 0.15s;
}
.pill-link:hover { background: rgba(93,218,180,0.26); border-color: rgba(93,218,180,0.6); }

/* ── Main layout ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

/* ── Section header ── */
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.week-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  margin-top: 36px;
}
.week-header h2 {
  font-size: 20px;
  font-weight: 700;
}
.week-header span {
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Legend ── */
.legend {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-dot.lecture  { background: rgba(93,218,180,0.35); border: 1px solid var(--accent); }
.legend-dot.tutorial { background: rgba(255,180,50,0.25);  border: 1px solid #FFB432; }
.legend-dot.free     { background: rgba(255,255,255,0.08); border: 1px solid var(--border); }

/* ── Schedule grid ── */
/* minmax(0, 1fr) rather than 1fr: a bare 1fr floors each column at its
   min-content width, so a week with longer session titles ends up with
   wider day columns than the other week. minmax(0, …) keeps all five days
   equal, and both weeks aligned with each other, at every screen size. */
.schedule-grid {
  display: grid;
  grid-template-columns: 90px repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
}
/* Wrapper so the grid can scroll sideways on phones instead of being crushed. */
.schedule-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid-header {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  padding: 8px 4px;
  letter-spacing: 0.04em;
}
.grid-header.time-col { text-align: left; color: transparent; }
.grid-header .date {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 0;
}

.time-slot {
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}
.slot-room {
  font-size: 8.5px;
  font-weight: 400;
  color: var(--text-dim);
  opacity: 0.75;
}

/* ── Session cards ── */
.session {
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  text-decoration: none;
  transition: filter 0.15s, transform 0.12s;
  position: relative;
  border: 1px solid transparent;
}
.session:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.session.lecture {
  background: rgba(93,218,180,0.12);
  border-color: rgba(93,218,180,0.3);
}
.session.tutorial {
  background: rgba(255,180,50,0.12);
  border-color: rgba(255,180,50,0.3);
}
.session.introductions {
  background: rgba(123, 192, 255, 0.14);
  border-color: rgba(123, 192, 255, 0.35);
}
.session.free {
  background: var(--surface2);
  border-color: var(--border);
  cursor: default;
}
.session.free:hover { filter: none; transform: none; }
.session.span2 { grid-row: span 2; min-height: 152px; }

.session-type {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lecture  .session-type { color: var(--accent); }
.tutorial .session-type { color: #FFB432; }
.introductions .session-type { color: #7BC0FF; }
.free     .session-type { color: var(--text-dim); }

.session-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.session-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: auto;
}
.session-instructor {
  font-size: 11px;
  color: var(--accent-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 6px;
}
.session-instructor svg { opacity: 0.7; flex-shrink: 0; }
.session-instructor a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(168,232,212,0.3);
  transition: border-color 0.15s, color 0.15s;
}
.session-instructor a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.session-link-icon {
  position: absolute;
  top: 8px; right: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}
.session:hover .session-link-icon { opacity: 0.6; }

.session-room-override {
  font-size: 9.5px;
  font-weight: 700;
  color: #F87171;
  display: flex;
  align-items: center;
  gap: 4px;
}
.session-room-override svg { opacity: 0.85; flex-shrink: 0; }

/* ── Divider ── */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Footer ── */
.footer-announcement {
  background: rgba(0,0,0,0.15);
  border-top: 1px solid var(--border);
  padding: 14px 40px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}
footer {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--border);
  padding: 14px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
}
footer .sep { color: var(--border); }

/* ── Hackathon cards ── */
.session.hackathon {
  background: rgba(99,179,237,0.12);
  border-color: rgba(99,179,237,0.35);
}
.session.hackathon:hover { filter: brightness(1.1); transform: translateY(-1px); }
.hackathon .session-type { color: #63B3ED; }

/* ── Panel cards ── */
.session.panel {
  background: rgba(167,139,250,0.12);
  border-color: rgba(167,139,250,0.35);
  cursor: default;
}
.session.panel:hover { filter: none; transform: none; }
.panel .session-type { color: #A78BFA; }

/* ── Instructor social links (lecture/tutorial detail pages) ── */
.instructor-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.instructor-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
}
.instructor-name svg { opacity: 0.7; flex-shrink: 0; }
.instructor-social {
  display: flex;
  align-items: center;
  gap: 4px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.social-link:hover {
  background: rgba(93,218,180,0.12);
  border-color: rgba(93,218,180,0.4);
  color: var(--accent);
}
.social-link svg { flex-shrink: 0; }

/* ── Break rows ── */
.break-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  font-size: 10.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.break-row .break-label {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.break-row::before, .break-row::after {
  content: '';
  flex: 1;
  border-top: 1px dashed rgba(255,255,255,0.1);
}

/* ── About / goal card ── */
.about-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 30px;
}
.about-card .section-label { margin-bottom: 8px; }
.about-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
  max-width: 820px;
}

/* ── Acknowledgements ── */
.thanks {
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.thanks p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 820px;
}
.thanks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.thanks-list a,
.thanks-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.thanks-list a:hover {
  background: rgba(93,218,180,0.12);
  border-color: rgba(93,218,180,0.4);
  color: var(--accent);
}
.thanks-list svg { opacity: 0.7; flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 800px) {
  nav { padding: 0 20px; }
  .hero { padding: 40px 20px 36px; }
  .hero h1 { font-size: 38px; }
  main { padding: 24px 20px 60px; }
  .schedule-grid { grid-template-columns: 70px repeat(5, minmax(0, 1fr)); font-size: 11px; }
  .session-title { font-size: 10.5px; }
  /* "Week 1 / Foundations of ML & Representations / Aug 10 – 14" is too wide
     for one row on a narrow screen. */
  .week-header { flex-wrap: wrap; gap: 4px 14px; }
}

/* ── Phones ── */
@media (max-width: 700px) {
  .hero h1 { font-size: 32px; }
  .hero-tagline { font-size: 15px; }
  .pill { font-size: 12.5px; padding: 5px 11px; }

  /* Five day-columns cannot fit a phone: at 390px each day would get ~50px,
     leaving ~26px of text after padding. Let the schedule scroll sideways at a
     legible width instead, bleeding to the screen edges to maximise it. */
  .schedule-scroll {
    margin: 0 -20px;
    padding: 0 20px 8px;
  }
  .schedule-scroll .schedule-grid { min-width: 680px; }

  /* Three side-by-side resource buttons leave no room for their labels
     ("Recording (after bootcamp)"); stack them instead. Two-class selector so
     this still wins against the per-page `.resource-btn { flex: 1 }`. */
  .resource-buttons { flex-wrap: wrap; }
  .resource-buttons .resource-btn { flex: 1 1 100%; }
}

@media (max-width: 560px) {
  /* Brand + four nav links do not fit one 56px row. flex-wrap alone is not
     enough: flex children shrink before they wrap, and text cannot shrink past
     min-content, so the nav overflowed instead — which widened the whole
     document and clipped the hero and every section below it. Giving each child
     a 100% basis forces the two rows. */
  nav {
    height: auto;
    flex-wrap: wrap;
    row-gap: 4px;
    padding: 8px 16px;
  }
  .nav-brand {
    flex: 0 0 100%;
    justify-content: center;
    font-size: 14px;
  }
  .nav-links {
    flex: 0 0 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-links a { font-size: 12.5px; padding: 5px 9px; }
  .hero h1 { font-size: 28px; }
}
