:root {
  color-scheme: dark;
  --ink: #f3f0e5;
  --muted: #c8c1ad;
  --paper: #171a16;
  --surface: rgba(17, 20, 17, 0.78);
  --surface-strong: rgba(9, 11, 9, 0.84);
  --line: rgba(237, 229, 199, 0.2);
  --accent: #d6c36a;
  --accent-strong: #fff0a6;
  --warm: #d99a64;
  --subtitle: #e5b17c;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
  --type-publication: #e69f00;
  --type-audio: #56b4e9;
  --type-multimedia: #009e73;
  --floating-glass: linear-gradient(180deg, rgba(17, 20, 17, 0.58), rgba(9, 11, 9, 0.46));
  --floating-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

@font-face {
  font-family: "SF Gothican";
  src: url("../assets/font/SF-Gothican.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  z-index: -2;
  background: url("../assets/img/background.jpg") center / cover no-repeat;
}

body::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 12, 10, 0.7), rgba(10, 12, 10, 0.28)),
    radial-gradient(circle at 20% 22%, rgba(214, 195, 106, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(5, 6, 5, 0.12), rgba(5, 6, 5, 0.62));
}

a {
  color: inherit;
}

.site-header {
  width: 100%;
  margin: 0;
}

.timeline-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 6vw, 80px);
}

.brand-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.brand,
.brand-divider,
.kicker {
  color: var(--ink);
  font-family: "SF Gothican", "Cooper Black", Georgia, serif;
  font-synthesis: weight;
  font-weight: 700;
  line-height: 1;
  text-shadow:
    0 3px 4px rgba(0, 0, 0, 0.48),
    0 0 1px rgba(255, 255, 255, 0.35);
}

.brand {
  font-size: 1.7rem;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent-strong);
  outline: none;
  text-decoration-line: underline;
}

.brand-divider {
  font-size: 1.7rem;
  opacity: 0.72;
}

.timeline-shell {
  padding: 38px 0 86px;
}

.timeline-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 520px);
  align-items: end;
  gap: 28px;
  margin-bottom: 54px;
}

.timeline-copy {
  max-width: 760px;
}

.timeline-controls {
  position: fixed;
  top: 84px;
  right: max(20px, calc((100vw - 1120px) / 2));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--floating-glass);
  box-shadow: var(--floating-shadow);
  backdrop-filter: blur(16px);
  text-align: right;
}

.back-to-top {
  position: fixed;
  right: max(20px, calc((100vw - 1120px) / 2));
  bottom: 24px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--floating-glass);
  color: var(--accent-strong);
  box-shadow: var(--floating-shadow);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.back-to-top-icon {
  display: block;
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.9;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: rgba(255, 240, 166, 0.72);
  background: linear-gradient(180deg, rgba(25, 29, 24, 0.68), rgba(12, 14, 12, 0.56));
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.kicker {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(1.35rem, 2.8vw, 2.6rem);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.93;
  letter-spacing: 0;
}

.intro-subtitle {
  max-width: 600px;
  margin: 28px 0 0;
  color: var(--subtitle);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.22rem, 2.2vw, 1.72rem);
  font-style: italic;
  line-height: 1.28;
}

.timeline-legend {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.timeline-legend span {
  white-space: nowrap;
}

.timeline-filters {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.filter-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-control select {
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 34px 9px 12px;
  background: rgba(17, 20, 17, 0.84);
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

.filter-control select:focus-visible {
  border-color: rgba(214, 195, 106, 0.72);
  outline: none;
}

.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.timeline-legend .legend-item.publication {
  border-color: rgba(230, 159, 0, 0.46);
  background:
    linear-gradient(90deg, rgba(230, 159, 0, 0.14), transparent 72%),
    var(--surface);
}

.timeline-legend .legend-item.audio {
  border-color: rgba(86, 180, 233, 0.46);
  background:
    linear-gradient(90deg, rgba(86, 180, 233, 0.14), transparent 72%),
    var(--surface);
}

.timeline-legend .legend-item.multimedia {
  border-color: rgba(0, 158, 115, 0.48);
  background:
    linear-gradient(90deg, rgba(0, 158, 115, 0.15), transparent 72%),
    var(--surface);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.publication {
  background: var(--type-publication);
}

.legend-dot.audio {
  background: var(--type-audio);
}

.legend-dot.multimedia {
  background: var(--type-multimedia);
}

.timeline-stage {
  position: relative;
  min-height: var(--timeline-height);
  padding: 52px 0;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background:
    linear-gradient(180deg, transparent, rgba(255, 240, 166, 0.88) 4%, rgba(255, 240, 166, 0.88) 96%, transparent);
  box-shadow: 0 0 24px rgba(255, 240, 166, 0.18);
  transform: translateX(-50%);
}

.timeline-line span {
  position: absolute;
  left: 50%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  transform: translateX(-50%);
}

.year-top {
  top: 0;
}

.year-bottom {
  bottom: 0;
}

.year-marker {
  top: var(--pos);
  scroll-margin-top: 120px;
}

.timeline-year-mobile {
  display: none;
}

.timeline-item {
  position: absolute;
  top: var(--pos);
  width: calc(50% - 54px);
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  right: 0;
}

.timeline-card {
  position: relative;
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.timeline-item[hidden],
.timeline-year-mobile[hidden] {
  display: none;
}

.timeline-item.publication .timeline-card {
  border-color: rgba(230, 159, 0, 0.56);
  background:
    linear-gradient(90deg, rgba(230, 159, 0, 0.18), transparent 58%),
    var(--surface);
}

.timeline-item.publication .timeline-card::before {
  border-color: #ffe5a3;
  background: var(--type-publication);
  box-shadow: 0 0 18px rgba(230, 159, 0, 0.44);
}

.timeline-item.publication .timeline-card time {
  color: #ffc866;
}

.timeline-item.publication .timeline-card small {
  color: #d9c7b2;
}

.timeline-item.audio .timeline-card {
  border-color: rgba(86, 180, 233, 0.56);
  background:
    linear-gradient(90deg, rgba(86, 180, 233, 0.18), transparent 58%),
    var(--surface);
  padding-right: 74px;
}

.timeline-item.audio .timeline-card::before {
  border-color: #dff4ff;
  background: var(--type-audio);
  box-shadow: 0 0 18px rgba(86, 180, 233, 0.44);
}

.timeline-item.audio .timeline-card time {
  color: #9edaff;
}

.timeline-item.audio .timeline-card small {
  color: #c7d7df;
}

.timeline-item.multimedia .timeline-card {
  border-color: rgba(0, 158, 115, 0.58);
  background:
    linear-gradient(90deg, rgba(0, 158, 115, 0.19), transparent 58%),
    var(--surface);
  padding-right: 74px;
}

.timeline-item.multimedia .timeline-card::before {
  border-color: #a8f4db;
  background: var(--type-multimedia);
  box-shadow: 0 0 18px rgba(0, 158, 115, 0.46);
}

.timeline-item.multimedia .timeline-card time {
  color: #73e3bf;
}

.timeline-item.multimedia .timeline-card small {
  color: #d8cddd;
}

.timeline-audio-icon,
.timeline-video-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  padding: 7px;
  border: 1px solid rgba(216, 238, 252, 0.42);
  border-radius: 8px;
  background: rgba(86, 180, 233, 0.15);
  object-fit: contain;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.timeline-video-icon {
  border-color: rgba(168, 244, 219, 0.46);
  background: rgba(0, 158, 115, 0.15);
}

.timeline-card::before {
  position: absolute;
  top: 22px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent-strong);
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 18px rgba(255, 240, 166, 0.28);
  content: "";
}

.left .timeline-card::before {
  right: -62px;
}

.right .timeline-card::before {
  left: -62px;
}

.timeline-card:hover,
.timeline-card:focus-visible {
  border-color: rgba(214, 195, 106, 0.58);
  background: rgba(24, 28, 23, 0.88);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.timeline-item.audio .timeline-card:hover,
.timeline-item.audio .timeline-card:focus-visible {
  border-color: rgba(86, 180, 233, 0.82);
  background:
    linear-gradient(90deg, rgba(86, 180, 233, 0.23), transparent 58%),
    rgba(24, 28, 23, 0.88);
}

.timeline-item.publication .timeline-card:hover,
.timeline-item.publication .timeline-card:focus-visible {
  border-color: rgba(230, 159, 0, 0.84);
  background:
    linear-gradient(90deg, rgba(230, 159, 0, 0.24), transparent 58%),
    rgba(24, 28, 23, 0.88);
}

.timeline-item.multimedia .timeline-card:hover,
.timeline-item.multimedia .timeline-card:focus-visible {
  border-color: rgba(0, 158, 115, 0.84);
  background:
    linear-gradient(90deg, rgba(0, 158, 115, 0.24), transparent 58%),
    rgba(24, 28, 23, 0.88);
}

.timeline-card time,
.timeline-card strong,
.timeline-card small {
  display: block;
}

.timeline-card time {
  margin-bottom: 8px;
  color: var(--warm);
  font-size: 0.82rem;
  font-weight: 800;
}

.timeline-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.36rem);
  line-height: 1.18;
}

.timeline-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .site-header,
  .timeline-shell {
    width: min(100% - 32px, 1120px);
  }

  .timeline-intro {
    display: block;
  }

  .timeline-controls {
    position: sticky;
    top: 12px;
    right: auto;
    z-index: 20;
    align-items: stretch;
    margin-top: 22px;
    padding: 12px;
    text-align: left;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
    font-size: 1.55rem;
  }

  .timeline-legend {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .timeline-stage {
    min-height: auto;
    padding: 28px 0 0 72px;
  }

  .timeline-filters,
  .filter-control {
    width: 100%;
  }

  .filter-control {
    justify-content: space-between;
  }

  .filter-control select {
    min-width: 0;
    width: min(230px, 62vw);
  }

  .timeline-line {
    left: 48px;
  }

  .timeline-line span {
    display: none;
  }

  .timeline-year-mobile {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    margin: 20px 0 12px -72px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
  }

  .timeline-line + .timeline-year-mobile {
    margin-top: 0;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    margin: 0 0 14px;
    text-align: left;
  }

  .left .timeline-card::before,
  .right .timeline-card::before {
    left: -31px;
    right: auto;
  }
}

/* Anchored site menu replacing the old breadcrumb. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  overflow: visible;
  border-bottom: 1px solid rgba(237, 229, 199, 0.08);
  background: linear-gradient(180deg, rgba(12, 14, 12, 0.5), rgba(12, 14, 12, 0.18));
  backdrop-filter: blur(8px);
}

.site-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(14px, 2vw, 24px);
  overflow: visible;
}

.brand-menu-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.brand-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 90;
  display: grid;
  gap: 4px;
  min-width: 178px;
  padding: 10px;
  border: 1px solid rgba(237, 229, 199, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 20, 17, 0.9), rgba(8, 10, 8, 0.82));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: blur(14px);
}

.brand-menu-item::after {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
  content: "";
}

.brand-menu-item:hover .brand-submenu,
.brand-menu-item:focus-within .brand-submenu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

.brand-submenu a {
  color: var(--ink);
  font-family: "SF Gothican", "Cooper Black", Georgia, serif;
  font-synthesis: weight;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-shadow:
    0 3px 4px rgba(0, 0, 0, 0.48),
    0 0 1px rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.brand-submenu a:hover,
.brand-submenu a:focus-visible {
  color: var(--accent-strong, var(--accent, #fff0a6));
  outline: none;
  text-decoration-line: underline;
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-menu {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .brand,
  .brand-submenu a {
    font-size: 1.32rem;
    white-space: nowrap;
  }
}

/* Collapsible menu for mobile. */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  border: 1px solid rgba(237, 229, 199, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 20, 17, 0.62), rgba(8, 10, 8, 0.42));
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
}

.menu-toggle span + span {
  display: none;
}

@media (max-width: 760px) {
  .site-menu {
    position: relative;
    display: grid;
    justify-items: start;
    gap: 0;
    max-width: min(360px, calc(100vw - 28px));
    overflow: visible;
    padding-bottom: 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-menu > :not(.menu-toggle) {
    display: none;
  }

  .site-menu.is-open {
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(237, 229, 199, 0.16);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(17, 20, 17, 0.88), rgba(8, 10, 8, 0.76));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
  }

  .site-menu.is-open > .brand {
    display: block;
  }

  .site-menu.is-open > .brand-menu-item {
    display: grid;
    gap: 4px;
  }

  .site-menu.is-open .brand-menu-item::after {
    content: none;
  }

  .site-menu.is-open .brand-submenu {
    position: static;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 0 0 2px 18px;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: none;
    backdrop-filter: none;
  }

  .site-menu.is-open .brand-submenu a {
    font-size: 1.12rem;
    opacity: 0.86;
  }
}

/* Mobile menu floats over the page instead of pushing content. */
@media (max-width: 760px) {
  .site-header {
    left: 0;
    right: 0;
    width: 100vw;
    max-width: none;
    min-height: 58px;
    margin: 0;
    padding: 10px clamp(14px, 4vw, 22px);
    background: linear-gradient(180deg, rgba(12, 14, 12, 0.54), rgba(12, 14, 12, 0.2));
  }

  .site-menu {
    position: absolute;
    top: 10px;
    left: clamp(14px, 4vw, 22px);
    z-index: 95;
    width: max-content;
    max-width: min(360px, calc(100vw - 28px));
  }

  .site-menu.is-open {
    width: min(360px, calc(100vw - 28px));
  }

  .header-tools {
    margin-top: 52px;
  }
}

