/* Root theme tokens */
:root {
  --bg: #000000;
  --panel: #000000;
  --surface: #000000;
  --card: #000000;
  /* Lighter text and captions for better contrast on black */
  --text: #f2f3f6;
  --muted: #b3b9c6;
  /* Slightly darker gray for box boundaries */
  --border: #303030;
  /* Gold accent theme (requested) */
  --primary: #EBD99F;
  --primary-600: #d8c486;
  --primary-700: #bda668;
  --accent: #EBD99F;
  --warning: #ffb02e;
  --success: #36d399;
  --danger: #ff6b6b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #ffffff;
  --panel: #ffffff;
  --surface: #ffffff;
  --card: #ffffff;
  --text: #12141c;
  --muted: #555960;
  --border: #e6e9ef;
  /* Keep gold accent in light mode too */
  --primary: #EBD99F;
  --primary-600: #d8c486;
  --primary-700: #bda668;
  --accent: #EBD99F;
  --shadow: 0 10px 25px rgba(10, 10, 10, 0.08);
}

/* CSS reset (concise) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  /* Solid dark background; page-specific glows layered via pseudo elements */
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Global gold glow anchored to the document top so it doesn't shift with nav toggle */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 700px;
  /* taller glow so it fills hero area */
  background:
    radial-gradient(1200px 700px at -10% -10%, rgba(235, 217, 159, 0.28), transparent 60%),
    radial-gradient(1200px 700px at 110% -10%, rgba(235, 217, 159, 0.28), transparent 60%),
    radial-gradient(900px 560px at 50% -12%, rgba(235, 217, 159, 0.16), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Ensure main content sits above the glow */
main {
  position: relative;
  z-index: 1;
}

/* Slightly dim the glow on narrower screens */
@media (max-width: 820px) {
  body::before {
    background:
      radial-gradient(1000px 600px at -10% -10%, rgba(235, 217, 159, 0.20), transparent 60%),
      radial-gradient(1000px 600px at 110% -10%, rgba(235, 217, 159, 0.20), transparent 60%),
      radial-gradient(800px 500px at 50% -12%, rgba(235, 217, 159, 0.10), transparent 65%);
  }
}

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

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

/* Layout */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  /* more horizontal breathing room */
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.col-12 {
  grid-column: span 12;
}

.col-6 {
  grid-column: span 6;
}

.col-4 {
  grid-column: span 4;
}

.col-3 {
  grid-column: span 3;
}

@media (max-width: 980px) {
  .grid {
    gap: 16px;
  }

  .col-6,
  .col-4,
  .col-3 {
    grid-column: span 12;
  }
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  padding: 12px 0;
}

.site-header::before {
  content: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.nav-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.nav-bubble {
  width: 100%;
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 8px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: black;
  box-shadow: var(--shadow);
}

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

.nav-link {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
  background: rgba(235, 217, 159, 0.18);
}

/* Mobile navigation */
@media (max-width: 1040px) {
  .nav {
    flex-wrap: wrap;
    height: auto;
    gap: 8px;
  }

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

  .nav-links {
    display: none;
    width: 100%;
    padding-top: 6px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav-links[data-open="true"] {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 10px;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s, border 0.2s;
}

.btn-icon:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

/* Hero */
.hero {
  padding: 72px 0 16px;
  background: none;
}

.hero h1 {
  font-size: 48px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 820px;
  margin: 0;
}

/* Hero media: plain video matching text width, transparent background */
.hero-media {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
  border: 0;
}

/* Carousel */
.carousel {
  position: relative;
  padding: 0;
  /* override card padding for edge-to-edge media */
  overflow: hidden;
  border: none;
  background: transparent;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 16px;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ffffff;
}

/* Hero video behaves like the carousel image - scale to width, white letterbox */
.hero-video video {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* Hero video: use intrinsic video size instead of forced 16:9 */
.hero-video,
.card.hero-video {
  display: inline-block;
  background: transparent;
  box-shadow: none;
  border: none;
}

.hero-video .carousel-viewport {
  width: auto;
  max-width: 100%;
  aspect-ratio: auto;
  display: inline-block;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s var(--slow, ease);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

.carousel-arrow:hover {
  border-color: var(--primary);
  background: rgba(235, 217, 159, 0.10);
}

/* Height scales automatically via aspect-ratio; no media override needed */

.cta {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent));
  color: #000000;
  box-shadow: var(--shadow);
}

.cta.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Cards */
.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card), var(--surface));
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(235, 217, 159, 0.5);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.4);
}

/* Variant: flush card (no inner padding/border) for edge-to-edge media */
.card.card--flush {
  padding: 0;
  border: none;
}

/* Do not lift/recolor the carousel card on hover */
.card.carousel:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.card .title {
  font-weight: 700;
  margin: 6px 0;
}

.card .muted {
  color: var(--muted);
  font-size: 14px;
}

.card .chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Generic chips container (outside cards) */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  font-size: 12px;
  color: var(--text);
  background: rgba(235, 217, 159, 0.16);
  border: 1px solid rgba(235, 217, 159, 0.4);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  border-color: var(--primary);
  background: rgba(235, 217, 159, 0.24);
}

.chip.is-selected {
  background: rgba(235, 217, 159, 0.32);
  border-color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 6px;
}

.chip-remove {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  width: 16px;
  height: 16px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.chip-remove:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* Selected tags bar wraps naturally via .chips */
.selected-tags {
  margin-top: 8px;
}

.selected-tags:not(:empty) {
  margin-bottom: 12px;
}

/* People */
.avatar {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #22252f;
}

.person-card {
  cursor: pointer;
  user-select: none;
}

.person-card .summary {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
}

.person-card .name {
  font-weight: 700;
}

.person-card .role {
  color: var(--muted);
  font-size: 14px;
}

.person-card .details {
  display: none;
}

.person-card[data-expanded="true"] .details {
  display: block;
}

.person-card:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.links a {
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 10px;
  border-radius: 10px;
  transition: color 0.2s ease, border 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.links a .icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

.links a .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.links a .icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.links a .label {
  line-height: 1;
}

.links a:hover {
  color: var(--text);
  border-color: var(--primary);
}

/* Search input */
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(235, 217, 159, 0.15);
  background: var(--panel);
}

/* Lists */
.list {
  display: grid;
  gap: 12px;
}

/* Logo grid for collaborators */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.logo-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  display: block;
}

.list-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.list-item[role="link"] {
  cursor: pointer;
}

.list-item .title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.list-item:hover .title a,
.list-item:focus-within .title a {
  color: var(--accent);
}

.list-item .date {
  font-size: 12px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 30px 0;
  color: var(--muted);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
}

@media (max-width: 680px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 36px;
  }
}

/* Utilities */
.sp-12 {
  height: 12px;
}

.sp-18 {
  height: 18px;
}

.sp-24 {
  height: 24px;
}

.center {
  display: grid;
  place-items: center;
}

.right {
  margin-left: auto;
}

.muted {
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay[aria-hidden="false"] {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 860px;
  background: linear-gradient(180deg, var(--card), var(--surface));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.modal-header {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: center;
}

.modal-header .avatar {
  width: 96px;
  height: 96px;
  border-radius: 14px;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
}

.modal-sub {
  color: var(--muted);
  font-size: 14px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.modal-body {
  margin-top: 14px;
}

.modal-body p {
  margin: 0 0 10px;
  color: var(--text);
}

.modal-actions {
  margin-top: 14px;
}