:root {
  --bg-void: #0a0f1c;
  --bg-panel: #111a2c;
  --bg-panel-2: #16233a;
  --line: #28374f;
  --line-soft: #1c2a41;
  --cyan: #5be0e8;
  --crimson: #dc143c;
  --text: #edf1f7;
  --muted: #9aa6ba;
  --white: #fff;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-void);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.grid-background {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
  opacity: 0.38;
  pointer-events: none;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--cyan);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 1px;
  background: var(--cyan);
  content: '';
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 15, 28, 0.9);
  backdrop-filter: blur(10px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
}

.logo-mark {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1.5px solid var(--cyan);
  border-radius: 4px;
  color: var(--cyan);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.logo-mark::after {
  position: absolute;
  inset: -4px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  content: '';
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--crimson);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}

.button:hover {
  background: #a80f2e;
}

.button:active {
  transform: scale(0.98);
}

.nav-links .button-nav {
  background: #1a8b93;
  color: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.nav-links .button-nav:hover {
  background: #14747b;
}

.button-secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--cyan);
  background: rgba(91, 224, 232, 0.08);
}

.menu-button {
  display: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.history-hero {
  position: relative;
  display: flex;
  min-height: auto;
  align-items: flex-end;
  overflow: hidden;
  padding: 80px 0 56px;
}

.history-hero-media,
.history-hero-overlay {
  position: absolute;
  inset: 0;
}

.history-hero-media {
  background: url('../images/FT101.jpg') center 40% / cover no-repeat;
  transform: scale(1.02);
}

.history-hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 15, 28, 0.97) 0%, rgba(10, 15, 28, 0.82) 48%, rgba(10, 15, 28, 0.3) 100%),
    linear-gradient(0deg, rgba(10, 15, 28, 0.92) 0%, transparent 48%);
}

.history-hero .grid-background {
  z-index: 1;
}

.history-hero-content {
  position: relative;
  z-index: 2;
}

.history-hero h1 {
  max-width: 1180px;
  color: var(--white);
  font-size: clamp(46px, 5.7vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.history-hero h1 span {
  color: var(--cyan);
}

.hero-intro {
  display: grid;
  gap: 9px;
  max-width: 720px;
  margin: 22px 0 20px;
}

.hero-intro p {
  margin: 0;
  color: #d8dfeb;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.58;
  text-wrap: pretty;
}

.hero-intro p:last-child {
  color: #bec9d9;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}

.text-link span {
  color: var(--cyan);
}

.catalog-heading h2,
.history-close h2 {
  color: var(--white);
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -0.02em;
}

.catalog-section {
  padding: 72px 0 112px;
  border-top: 1px solid var(--line-soft);
}

.catalog-heading {
  margin-bottom: 34px;
}

.catalog-toolbar {
  position: sticky;
  z-index: 50;
  top: 77px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-bottom-color: rgba(91, 224, 232, 0.3);
  border-radius: var(--radius);
  background: rgba(17, 26, 44, 0.88);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.filter-field {
  display: grid;
  gap: 7px;
}

.filter-field label {
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 38px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-void);
  color: var(--text);
  cursor: pointer;
}

.filter-field select:disabled {
  color: #6f7b8f;
  cursor: not-allowed;
  opacity: 0.75;
}

.filter-field.is-active select {
  border-color: rgba(91, 224, 232, 0.82);
  box-shadow: 0 0 0 1px rgba(91, 224, 232, 0.12);
  color: var(--white);
}

.reset-button {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.reset-button:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.catalog-status {
  min-height: 28px;
  margin: 0 0 34px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.history-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.history-card:hover {
  border-color: rgba(91, 224, 232, 0.7);
  transform: translateY(-3px);
}

.history-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0d1728;
}

.history-card-image-button,
.history-card-video-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: zoom-in;
}

.history-card-video-button {
  cursor: pointer;
}

.history-card-image-button:focus-visible,
.history-card-video-button:focus-visible {
  outline-offset: -4px;
}

.history-card-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(3, 7, 14, 0.66));
  content: '';
  pointer-events: none;
}

.history-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
  transition: transform 0.35s ease;
}

.history-card:hover .history-card-media img {
  transform: scale(1.025);
}

.history-card-expand {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  left: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(220, 230, 245, 0.55);
  border-radius: 50%;
  background: rgba(10, 15, 28, 0.82);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}

.history-card-image-button:hover .history-card-expand,
.history-card-image-button:focus-visible .history-card-expand {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #04262a;
}

.history-card-play {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(220, 230, 245, 0.7);
  border-radius: 50%;
  background: rgba(10, 15, 28, 0.88);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  transform: translate(-50%, -50%);
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}

.history-card-video-button:hover .history-card-play,
.history-card-video-button:focus-visible .history-card-play {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #04262a;
  transform: translate(-50%, -50%) scale(1.04);
}

.history-card-gallery-button {
  position: absolute;
  z-index: 4;
  bottom: 12px;
  left: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(220, 230, 245, 0.55);
  border-radius: 50%;
  background: rgba(10, 15, 28, 0.82);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  cursor: zoom-in;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}

.history-card-gallery-button:hover,
.history-card-gallery-button:focus-visible {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #04262a;
}

.history-card-category {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  border: 1px solid rgba(91, 224, 232, 0.75);
  border-radius: 20px;
  background: rgba(10, 15, 28, 0.82);
  color: var(--cyan);
  font-size: 9.5px;
  text-transform: uppercase;
}

.history-card-body {
  padding: 20px;
}

.history-card-meta {
  margin-bottom: 9px;
  color: var(--cyan);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.history-card h3 {
  margin-bottom: 17px;
  color: var(--white);
  font-size: 21px;
  line-height: 1.2;
}

.history-card-details {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.history-card-details div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
}

.history-card-details dt {
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.history-card-details dd {
  margin: 0;
  color: #d9e1ed;
  font-size: 13.5px;
  line-height: 1.45;
}

.history-card-body > p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

.empty-state {
  padding: 72px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state .eyebrow {
  justify-content: center;
}

.empty-state h3 {
  color: var(--white);
  font-size: 26px;
}

.empty-state > p:not(.eyebrow) {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

body.lightbox-open {
  overflow: hidden;
}

.trajectory-lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 7, 14, 0.94);
  backdrop-filter: blur(8px);
}

.trajectory-lightbox.open {
  display: flex;
}

.trajectory-lightbox-dialog {
  position: relative;
  display: flex;
  width: min(1120px, 100%);
  max-height: 100%;
  align-items: center;
  justify-content: center;
}

.trajectory-lightbox.open .trajectory-lightbox-dialog {
  animation: trajectory-lightbox-in 0.18s ease-out;
}

@keyframes trajectory-lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.trajectory-lightbox-figure {
  position: relative;
  margin: 0;
}

.trajectory-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 112px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.trajectory-lightbox-close,
.trajectory-lightbox-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(220, 230, 245, 0.55);
  border-radius: 50%;
  background: rgba(10, 15, 28, 0.88);
  color: var(--white);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}

.trajectory-lightbox-close {
  top: 12px;
  right: 12px;
}

.trajectory-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.trajectory-lightbox-prev {
  left: 14px;
}

.trajectory-lightbox-next {
  right: 14px;
}

.trajectory-lightbox-close:hover,
.trajectory-lightbox-nav:hover {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #04262a;
}

.trajectory-lightbox-nav[hidden] {
  display: none;
}

.trajectory-lightbox-caption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 15, 28, 0.88);
  color: #dce6f5;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.45;
}

.trajectory-lightbox-count {
  flex: 0 0 auto;
  color: var(--cyan);
}

.trajectory-video-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 7, 14, 0.94);
  backdrop-filter: blur(8px);
}

.trajectory-video-modal.open {
  display: flex;
}

.trajectory-video-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.trajectory-video-modal.open .trajectory-video-dialog {
  animation: trajectory-lightbox-in 0.18s ease-out;
}

.trajectory-video-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(220, 230, 245, 0.65);
  border-radius: 50%;
  background: #101c30;
  color: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.48);
  cursor: pointer;
}

.trajectory-video-close:hover,
.trajectory-video-close:focus-visible {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #04262a;
}

.trajectory-video-header {
  padding: 24px 78px 20px 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 15, 28, 0.46);
}

.trajectory-video-header span {
  display: block;
  margin-bottom: 7px;
  color: var(--cyan);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trajectory-video-header h2 {
  color: var(--white);
  font-size: clamp(23px, 3vw, 34px);
}

.trajectory-video-body {
  padding: 24px;
}

.trajectory-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #050912;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.trajectory-video-frame.portrait {
  width: min(390px, 100%);
  aspect-ratio: 9 / 16;
  max-height: 68vh;
  margin: 0 auto;
}

.trajectory-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.history-close {
  position: relative;
  overflow: hidden;
  padding: 90px 0;
  border-top: 1px solid var(--line-soft);
  background: #0c1424;
}

.close-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
}

.close-panel h2 {
  max-width: 770px;
}

footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 34px;
}

.footer-column h2 {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 18px;
}

.footer-column h3 {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-column p,
.footer-column a {
  display: block;
  max-width: 320px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.footer-column a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12.5px;
}

::selection {
  background: var(--cyan);
  color: #04262a;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .nav-links {
    position: fixed;
    top: 65px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-panel);
    opacity: 0;
    transform: translateY(-130%);
    transition:
      transform 0.25s ease,
      opacity 0.2s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links .button-nav {
    width: 100%;
  }

  .menu-button {
    display: flex;
  }

  .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-toolbar {
    top: 64px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reset-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 36px, 1180px);
  }

  .history-hero {
    min-height: auto;
    padding: 56px 0 36px;
  }

  .history-hero-media {
    background-position: 64% center;
  }

  .history-hero-overlay {
    background: linear-gradient(90deg, rgba(10, 15, 28, 0.96), rgba(10, 15, 28, 0.68));
  }

  .history-hero h1 {
    max-width: 12ch;
    font-size: clamp(38px, 10.5vw, 52px);
    letter-spacing: -0.025em;
  }

  .hero-intro {
    gap: 9px;
    margin: 18px 0;
  }

  .hero-intro p {
    font-size: 16px;
    line-height: 1.55;
  }

  .catalog-section {
    padding: 52px 0 68px;
  }

  .close-panel {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .catalog-toolbar {
    position: sticky;
    top: 64px;
    display: flex;
    gap: 10px;
    margin: 0 -18px 16px;
    padding: 12px 18px;
    overflow-x: auto;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }

  .catalog-toolbar .filter-field {
    flex: 0 0 174px;
  }

  .catalog-toolbar .reset-button {
    flex: 0 0 auto;
    width: auto;
    align-self: end;
    white-space: nowrap;
  }

  .history-grid {
    grid-template-columns: 1fr;
  }

  .history-close {
    padding: 68px 0;
  }

  .close-panel .button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .trajectory-lightbox {
    padding: 14px;
  }

  .trajectory-lightbox-image {
    max-height: calc(100vh - 132px);
  }

  .trajectory-lightbox-close {
    top: 8px;
    right: 8px;
  }

  .trajectory-lightbox-nav {
    top: auto;
    bottom: 64px;
    transform: none;
  }

  .trajectory-lightbox-prev {
    left: calc(50% - 52px);
  }

  .trajectory-lightbox-next {
    right: calc(50% - 52px);
  }

  .trajectory-lightbox-caption {
    right: 8px;
    bottom: 8px;
    left: 8px;
    font-size: 10.5px;
  }

  .trajectory-video-modal {
    padding: 12px;
  }

  .trajectory-video-dialog {
    max-height: calc(100vh - 24px);
  }

  .trajectory-video-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }

  .trajectory-video-header {
    padding: 20px 64px 18px 18px;
  }

  .trajectory-video-body {
    padding: 14px;
  }

  .trajectory-video-frame {
    border-radius: 8px;
  }

  .trajectory-video-frame.portrait {
    max-height: 66vh;
  }
}

@media (max-width: 420px) {
  .history-hero .text-link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
