/* ===========================================
   CHRISTABEL CANE — ACADEMIC WEBSITE
   Each section has its own accent colour,
   drawn from a muted, gallery-friendly palette.
   =========================================== */

/* --- CUSTOM PROPERTIES --- */
:root {
  /* Per-section accent colours — tasteful, distinct */
  --col-home:      #2c5f8a;   /* slate blue       */
  --col-research:  #5a3e7a;   /* plum violet      */
  --col-teaching:  #2d7a5a;   /* sage green       */
  --col-talks:     #8a3a2c;   /* terracotta       */
  --col-awards:    #b07a20;   /* warm gold        */
  --col-service:   #3a5a7a;   /* steel blue       */
  --col-standup:   #6d3a7a;   /* deep magenta     */
  --col-podcast:   #2d5a5a;   /* teal             */

  /* Neutrals */
  --ink:     #1a1a1a;
  --ink-mid: #444;
  --ink-lite:#888;
  --paper:   #faf9f7;
  --paper-tint: #f3f1ed;
  --border:  #ddd8d0;
  --white:   #ffffff;

  /* Type */
  --serif:  'EB Garamond', Georgia, serif;
  --sans:   'DM Sans', Helvetica Neue, sans-serif;

  /* Layout */
  --max-w:  1060px;
  --nav-h:  62px;
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.75;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}

a:hover { opacity: 0.72; }

/* --- NAV --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 28px;
}

.nav-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-mid);
  padding: 6px 14px;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: var(--paper-tint);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  margin-left: auto;
}

/* --- PAGES --- */
.page {
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 80px;
  padding-left: 32px;
  padding-right: 32px;
}

.page-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* --- SECTION HEADER --- */
.section-header {
  margin-bottom: 48px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--current-col, var(--ink));
}

.section-header h2 {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 400;
  font-style: italic;
  color: var(--current-col, var(--ink));
  letter-spacing: -0.01em;
}

/* --- PER-SECTION ACCENT COLOURS --- */

.page-home    { --current-col: var(--col-home); }
.page-research { --current-col: var(--col-research); }
.page-teaching { --current-col: var(--col-teaching); }
.page-talks   { --current-col: var(--col-talks); }
.page-awards  { --current-col: var(--col-awards); }
.page-service { --current-col: var(--col-service); }
.page-standup { --current-col: var(--col-standup); }
.page-podcast { --current-col: var(--col-podcast); }

/* Alternating page backgrounds — very subtle */
.page-home,
.page-teaching,
.page-awards,
.page-standup  { background: var(--paper); }

.page-research,
.page-talks,
.page-service,
.page-podcast  { background: var(--paper-tint); }

/* Thin left border stripe per section — the colour signature */
.page::before {
  content: '';
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 4px;
  height: 100vh;
  background: var(--current-col, transparent);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

/* -- HOME -- */
.home-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  align-items: center;
}

.home-photo {
  aspect-ratio: 3/4;
  background: #e8e4de;
  overflow: hidden;
}

.home-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% center;
}

.home-photo.photo-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-lite);
  font-family: var(--sans);
  font-size: 0.8rem;
}

.home-photo.photo-missing::after {
  content: 'photo-home.jpg';
}

.home-text h1 {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--col-home);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 28px;
}

.home-text p {
  margin-bottom: 18px;
  font-size: 1.05rem;
}

.home-text a {
  color: var(--col-home);
  text-decoration-color: var(--col-home);
}

.photo-credit {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-lite);
  line-height: 1.4;
}

.photo-credit span {
  display: block;
  opacity: 0.7;
}

/* Buttons */
.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--current-col, var(--col-home));
  color: var(--current-col, var(--col-home));
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--current-col, var(--col-home));
  color: var(--white);
  opacity: 1;
}

.btn-download { --current-col: var(--col-home); }
.btn-podcast  { --current-col: var(--col-podcast); }

.inline-download {
  color: var(--col-home);
}

/* -- RESEARCH -- */
.research-photo-wrap {
  max-width: 320px;
  margin-bottom: 40px;
}

.research-photo-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
}

.research-layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.research-block h3 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--col-research);
  margin-bottom: 20px;
}

.pub-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.pub-year {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--col-research);
  font-weight: 500;
  padding-top: 3px;
}

.pub-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.pub-journal {
  color: var(--ink-mid);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.pub-doi {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--col-research);
  text-decoration: none;
}

.pub-doi:hover { text-decoration: underline; }

.wip-list {
  list-style: none;
  border-top: 1px solid var(--border);
}

.wip-list li {
  padding: 14px 0 14px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 1rem;
}

.wip-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--col-research);
}

.research-contact {
  background: var(--white);
  border-left: 3px solid var(--col-research);
  padding: 20px 24px;
  font-size: 0.95rem;
  color: var(--ink-mid);
}

.research-contact a { color: var(--col-research); }

/* -- TEACHING -- */
.teaching-layout {
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.teaching-block {
  padding-bottom: 52px;
  border-bottom: 1px solid var(--border);
}

.teaching-block:last-child {
  border-bottom: none;
}

.teaching-block h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--col-teaching);
  margin-bottom: 4px;
}

.date-range {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-lite);
  letter-spacing: 0.02em;
}

.role-label {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-lite);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.teaching-list {
  list-style: none;
}

.teaching-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.96rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.module {
  font-weight: 500;
}

.terms {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--col-teaching);
}

.note {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-lite);
  font-style: italic;
}

/* -- TALKS -- */
.talks-photo-wrap {
  margin-bottom: 44px;
}

.talks-photo-wrap img {
  max-height: 600px;
  width: 100%;
  object-fit: cover;
  object-position: center top;
}

.talks-list {
  list-style: none;
  counter-reset: none;
}

.talk-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.talk-date {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--col-talks);
  font-weight: 500;
  padding-top: 4px;
  white-space: nowrap;
}

.talk-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.talk-venue {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-mid);
}

/* -- AWARDS -- */
.awards-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.awards-photo-wrap img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.awards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.award-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.award-year {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--col-awards);
  font-weight: 500;
  padding-top: 4px;
}

.award-title {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 4px;
}

.award-desc {
  font-size: 0.92rem;
  color: var(--ink-mid);
}

/* -- SERVICE -- */
.service-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 10px;
  align-items: end;
}

.service-photo-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: 80% center;
  /*filter: grayscale(100%);*/
}

.service-list {
  list-style: none;
}

.service-list li {
  padding: 16px 0 16px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.98rem;
}

.service-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--col-service);
}

/* -- STAND UP -- */
.section-intro {
  font-size: 1.05rem;
  color: var(--ink-mid);
  margin-bottom: 36px;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.video-card {
  text-decoration: none;
  color: inherit;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #111;
  overflow: hidden;
  display: block;
}

.video-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.72);
}

.video-play::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-35%, -50%);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 17px solid var(--white);
}

.video-caption {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--col-standup);
}

.video-card:hover .video-wrap img,
.video-card:focus-visible .video-wrap img {
  transform: scale(1.03);
}

.video-card:hover .video-play,
.video-card:focus-visible .video-play {
  background: rgba(109, 58, 122, 0.92);
}

.video-wrap img,
.video-play {
  transition: transform 0.25s ease, background 0.25s ease;
}

.video-card:focus-visible {
  outline: 2px solid var(--col-standup);
  outline-offset: 4px;
}

/* -- PODCAST -- */
.podcast-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.podcast-photo-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center top;
}

.podcast-text {
  font-size: 1.1rem;
}

.podcast-text p {
  margin-bottom: 28px;
}

/* -- FOOTER -- */
.site-footer {
  background: var(--ink);
  color: #aaa;
  text-align: center;
  padding: 28px 32px;
  font-family: var(--sans);
  font-size: 0.8rem;
}

.site-footer a {
  color: #ccc;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-photo {
    max-width: 340px;
  }

  .awards-layout,
  .service-layout,
  .podcast-layout {
    grid-template-columns: 1fr;
  }

  .awards-photo-wrap img {
    aspect-ratio: 16/9;
    max-height: 320px;
  }

  .service-photo-wrap img,
  .podcast-photo-wrap img {
    max-height: 480px;
  }

  .talks-photo-wrap img {
    max-height: 280px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  html { font-size: 16px; }

  .page {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: calc(var(--nav-h) + 40px);
  }

  .site-nav {
    padding: 0 20px;
  }

  .nav-name { font-size: 0.95rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 20px 20px;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .nav-links a {
    padding: 8px 4px;
    font-size: 0.85rem;
  }

  .home-text h1 { font-size: 2.1rem; }

  .section-header h2 { font-size: 1.9rem; }

  .pub-item { grid-template-columns: 1fr; }
  .pub-year { padding: 0; }

  .talk-item { grid-template-columns: 64px 1fr; }
  .award-item { grid-template-columns: 56px 1fr; }
}

/* ============================================
   PRINT
   ============================================ */

@media print {
  .site-nav, .nav-toggle { display: none; }
  .page { padding-top: 24px; min-height: unset; }
  .page::before { display: none; }
  .video-wrap { display: none; }
}
