/* =========================================================
   Colors and sizes, borrowed from the McGill Quantum Centre site.
   Change a value here and it updates everywhere it's used.
   ========================================================= */
:root {
  --bg: #f7f9fc;          /* page background (very light blue-grey) */
  --bg2: #eef3f8;         /* slightly darker background */
  --surface: #ffffff;     /* cards and boxes */
  --border: rgba(25, 70, 110, 0.15);
  --accent: #008fbf;      /* MQC blue */
  --accent2: #6d4bd1;     /* MQC purple */
  --red: #cc0033;         /* McGill red, as used on the MQC site */
  --text: #102030;
  --muted: #5f7182;       /* grey for secondary text */

  --nav-height: 76px;     /* used to keep content from hiding under the fixed nav */

  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'Instrument Sans', Arial, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
}

a {
  color: var(--accent);
}

/* ---------- Top navigation bar ---------- */
.navbar {
  /* "fixed" pins the bar to the top of the window while you scroll */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;           /* keeps the bar on top of everything else */
  height: var(--nav-height);

  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0 2.5rem;

  /* Semi-transparent background + blur = the "frosted glass" look */
  background: rgba(247, 249, 252, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  text-decoration: none;  /* no underline on the link */
  white-space: nowrap;    /* keep the name on one line */
}

/* Site name in the top-left, same style as on the MQC website */
.nav-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text);
  transition: color 0.2s;
}

.nav-brand:hover .nav-title {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin-left: auto;      /* pushes the links to the right side */
}

.nav-links a,
.lang-switch {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.lang-switch {
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
}

.lang-switch:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Thin red → blue → purple line under the nav */
.stripe {
  margin-top: var(--nav-height);
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 40%, var(--accent) 60%, var(--accent2) 100%);
}

/* ---------- Title area ---------- */
.hero {
  position: relative;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2.5rem 3.5rem;
}

/* Small uppercase label in blue, used above titles */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 400;
  /* clamp(smallest, preferred, largest): the title shrinks on small screens */
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  line-height: 1.05;
  max-width: 850px;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Faint blue grid in the corner of the title area */
.grid-decoration {
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  opacity: 0.08;
  background-image:
    linear-gradient(var(--accent) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ---------- Page layout: sidebar on the left, content on the right ---------- */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2.5rem 5rem;
  display: flex;
  align-items: flex-start;
  gap: 3.5rem;
}

.sidebar {
  flex: 0 0 250px;
  /* This is what makes the box follow you as you scroll.
     It sticks just below the fixed nav bar. */
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}

.info-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  padding: 1.6rem;
}

.info-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.deadline-list {
  margin-top: 0.6rem;
  margin-bottom: 1.8rem;
}

.deadline-item {
  margin-bottom: 1.1rem;
}

.deadline-name {
  display: block;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.deadline-date {
  display: block;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.info-value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 1.2rem;
}

/* Smaller address line under the location name */
.info-address {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: -0.9rem;    /* pulls it up closer to the location name above */
  margin-bottom: 1.2rem;
}

/* Blue button with one clipped corner, like the MQC site's buttons */
.register-btn {
  display: block;
  margin-top: 0.4rem;
  padding: 0.85rem 1rem;
  text-align: center;
  background-color: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background-color 0.2s, transform 0.2s;
}

.register-btn:hover {
  background-color: #007aa3;
  transform: translateY(-1px);
}

/* ---------- Main content ---------- */
.content {
  flex: 1;
  min-width: 0;
}

.content section {
  padding-bottom: 3.5rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
  /* When you click a nav link, stop the heading below the fixed nav bar */
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

.content section:last-child {
  border-bottom: none;
}

.content p {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* ".content p" above would turn the labels grey, so set them back to blue.
   (A rule with two class names beats a rule with one class + a tag name.) */
.content .eyebrow {
  color: var(--accent);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1.8rem;
}

/* Smaller headings inside a section ("Conference topics", "Student Volunteers"…) */
.sub-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 2.5rem 0 1rem;
}

/* Conference topics shown as small outlined tags */
.topic-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.topic-list li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background-color: rgba(0, 143, 191, 0.06);
  border: 1px solid rgba(0, 143, 191, 0.25);
  padding: 0.4rem 0.9rem;
}

/* Grid of cards for speakers and committee members */
.card-grid {
  display: grid;
  /* As many columns as fit, each at least 160px wide (4 across on a laptop) */
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.2rem;
}

.person-card {
  position: relative;
  overflow: hidden;       /* keeps the photo inside the card's edges */
  background-color: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}

/* Photo at the top of each card */
.person-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;    /* always a square, whatever shape the original photo is */
  object-fit: cover;      /* fills the square by trimming the edges instead of stretching */
  object-position: center 25%;  /* keeps faces in view when trimming tall photos */
  background-color: var(--bg2);  /* grey square shows if a photo is missing */
}

/* Text part of the card, under the photo */
.person-info {
  padding: 1.2rem 1.4rem 1.4rem;
}

/* Blue bar that grows down the left edge on hover */
.person-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.3s;
}

.person-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 143, 191, 0.35);
}

.person-card:hover::before {
  height: 100%;
}

.person-name {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.25;      /* tighter spacing when a long name wraps onto two lines */
  margin-bottom: 0.4rem;
}

.content .person-detail {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

/* "Website ↗" link on speaker cards */
.person-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.person-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Student volunteers: plain names, split into columns on wide screens */
.name-list {
  list-style: none;
  columns: 2 180px;       /* up to 2 columns, each at least 180px wide */
  color: var(--muted);
}

.name-list li {
  padding: 0.35rem 0;
  break-inside: avoid;    /* never split one name across two columns */
}

/* Schedule */
.content .schedule-note {
  font-style: italic;
  margin-bottom: 2rem;
}

.day-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 2rem 0 0.6rem;
}

.day-title:first-of-type {
  margin-top: 0;
}

.schedule {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--surface);
  border: 1px solid var(--border);
}

.schedule th,
.schedule td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

/* Header row ("Time / Program") */
.schedule th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background-color: var(--bg2);
}

.schedule td:first-child {
  width: 150px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 300;
}

.footer a {
  text-decoration: none;
}

.footer .footer-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.footer-right {
  text-align: right;
  font-family: var(--font-mono);
}

/* ---------- Tablets: hide the section links to save space ---------- */
@media (max-width: 900px) {
  .navbar {
    padding: 0 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .lang-switch {
    margin-left: auto;    /* keeps the language button on the right */
  }

  .grid-decoration {
    display: none;
  }
}

/* ---------- Phones: stack the info box above the content ---------- */
@media (max-width: 760px) {
  .hero {
    padding: 3rem 1.25rem 2rem;
  }

  .page {
    flex-direction: column;
    gap: 2.5rem;
    padding: 0 1.25rem 3rem;
  }

  .sidebar {
    position: static;
    flex: none;
    width: 100%;
  }

  .footer {
    padding: 2.5rem 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-right {
    text-align: center;
  }
}
