:root {
  color-scheme: dark;
  --bg: #080a0d;
  --ink: #f4efe4;
  --muted: #9aa3ad;
  --line: rgba(244, 239, 228, 0.13);
  --line-strong: rgba(244, 239, 228, 0.26);
  --panel: rgba(17, 22, 28, 0.78);
  --panel-solid: #12171d;
  --accent: #c8994d;
  --accent-dark: #e0b66d;
  --charcoal: #11161b;
  --shadow: 0 24px 60px rgba(3, 5, 8, 0.42);
  --radius: 8px;
  --font-sans: "Avenir Next", "Geist", "Satoshi", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "Geist Mono", "Roboto Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 22% 18%, rgba(200, 153, 77, 0.15), transparent 28%),
    linear-gradient(130deg, rgba(200, 153, 77, 0.1), transparent 34%),
    linear-gradient(310deg, rgba(70, 81, 92, 0.22), transparent 42%),
    var(--bg);
  background-attachment: fixed;
}

body::before {
  position: fixed;
  inset: -18vmax;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image: url("Panda Heads Pattern.png");
  background-position: top center;
  background-repeat: repeat;
  background-size: 980px auto;
  opacity: 0.72;
  transform: rotate(-4deg);
  transform-origin: center;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(8, 10, 13, 0.68), rgba(8, 10, 13, 0.9)),
    linear-gradient(180deg, rgba(8, 10, 13, 0.04), rgba(8, 10, 13, 0.64)),
    linear-gradient(90deg, rgba(244, 239, 228, 0.035), transparent 68%);
}

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

button,
input {
  font: inherit;
}

.button-reset {
  appearance: none;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px max(24px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid rgba(244, 239, 228, 0.08);
  background: rgba(8, 10, 13, 0.84);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-mark span {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  width: min(840px, calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0 44px;
}

.intro-panel {
  display: grid;
  gap: 24px;
}

.intro-copy {
  padding: 12px 0 4px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 13.5ch;
  margin-bottom: 20px;
  font-size: 56px;
  line-height: 0.95;
  letter-spacing: 0;
}

.dek {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.video-module {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.module-heading {
  padding: 18px 18px 0;
}

.module-heading h2 {
  margin-bottom: 16px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(17, 22, 28, 0.96), rgba(48, 36, 20, 0.94)),
    var(--charcoal);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  padding: 20px;
  color: #fffaf1;
  background-color: var(--charcoal);
  background-position: center;
  background-size: cover;
}

.video-poster::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(32, 37, 42, 0.06), rgba(32, 37, 42, 0.88)),
    linear-gradient(90deg, rgba(32, 37, 42, 0.84), transparent 70%);
}

.video-poster > * {
  position: relative;
}

.video-poster span {
  color: rgba(255, 250, 241, 0.76);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.video-poster strong {
  display: block;
  max-width: 28ch;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.12;
}

.video-poster small {
  display: block;
  margin-top: 10px;
  color: rgba(255, 250, 241, 0.76);
  font-family: var(--font-mono);
  font-size: 12px;
}

.video-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px;
}

.video-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.video-actions a:hover,
.video-actions a:focus-visible {
  border-color: var(--line-strong);
  background: rgba(244, 239, 228, 0.08);
  outline: none;
}

.video-actions a:active {
  transform: translateY(1px) scale(0.99);
}

.video-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.links-panel {
  min-width: 0;
}

.links-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  gap: 24px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.links-header h2 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.search-control {
  display: grid;
  gap: 8px;
}

.search-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-control input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 22, 28, 0.72);
  color: var(--ink);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.search-control input::placeholder {
  color: rgba(154, 163, 173, 0.76);
}

.search-control input:focus {
  border-color: rgba(200, 153, 77, 0.66);
  background: rgba(20, 26, 32, 0.95);
  box-shadow: 0 0 0 4px rgba(200, 153, 77, 0.16);
}

.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 14px;
}

.filter-strip button {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 22, 28, 0.58);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.filter-strip button:hover,
.filter-strip button:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink);
  outline: none;
}

.filter-strip button[aria-pressed="true"] {
  border-color: rgba(200, 153, 77, 0.74);
  background: linear-gradient(145deg, rgba(65, 47, 23, 0.92), rgba(22, 27, 33, 0.96));
  color: #fffaf1;
}

.filter-strip button:active {
  transform: translateY(1px) scale(0.99);
}

.link-groups {
  display: grid;
  gap: 34px;
}

.link-group {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  animation: rise-in 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--index) * 55ms);
}

.group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.group-heading h3 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.group-heading span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.link-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.link-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 22, 28, 0.68);
  box-shadow: 0 1px 0 rgba(255, 250, 241, 0.06) inset;
  cursor: pointer;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(200, 153, 77, 0.52);
  background: rgba(22, 28, 34, 0.94);
  box-shadow: 0 18px 34px rgba(3, 5, 8, 0.34);
  outline: none;
  transform: translateY(-2px);
}

.link-card:active {
  transform: translateY(1px) scale(0.99);
}

.link-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(200, 153, 77, 0.18), rgba(18, 23, 29, 0.9)),
    var(--panel-solid);
  color: var(--accent-dark);
}

.link-icon svg,
.link-arrow svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.link-copy {
  min-width: 0;
}

.link-title {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.link-host {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: rgba(244, 239, 228, 0.52);
}

.empty-state {
  padding: 28px 0;
  color: var(--muted);
  font-weight: 750;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 14px;
  border: 1px solid rgba(244, 239, 228, 0.14);
  border-radius: var(--radius);
  background: rgba(17, 22, 28, 0.96);
  color: #fffaf1;
  box-shadow: var(--shadow);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .page-shell {
    gap: 34px;
    padding-top: 42px;
  }

  h1 {
    max-width: 12.5ch;
    font-size: 48px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: auto;
    padding: 12px 14px;
  }

  .page-shell,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .page-shell {
    padding-top: 32px;
  }

  h1 {
    max-width: 11ch;
    font-size: 40px;
  }

  .dek {
    font-size: 16px;
  }

  .links-header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .links-header h2 {
    font-size: 30px;
  }

  .group-heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .link-card {
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    min-height: 64px;
    padding: 10px;
  }

  .link-icon {
    width: 38px;
    height: 38px;
  }

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