@font-face {
  font-family: Inter;
  src: url("../assets/fonts/inter-var.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-var.woff") format("woff");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #09090b;
  --text: #fafafa;
  --muted: #a1a1aa;
  --line: #27272a;
  --card: #111114;
  --accent: #5b8cff;
  --accent-ink: #071428;
  --header-h: 4rem;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header,
.site-footer,
.player-bar {
  display: flex;
  align-items: center;
  padding-left: max(1.25rem, var(--safe-l));
  padding-right: max(1.25rem, var(--safe-r));
}

.site-header {
  height: calc(var(--header-h) + var(--safe-t));
  padding-top: var(--safe-t);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 2.25rem;
  height: auto;
}

.page {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.intro {
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.intro h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lede {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  min-width: 0;
}

.card:hover,
.card:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.card-thumb {
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1rem 1.1rem;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.badge {
  flex: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  line-height: 1.3;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.card-updated {
  margin: 0;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: 0.65rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  width: 100%;
  border: 0;
  cursor: pointer;
}

.play-btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.site-footer {
  justify-content: center;
  padding-top: 1.25rem;
  padding-bottom: max(1.5rem, var(--safe-b));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

/* Player */
.player-body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.player-bar {
  flex: none;
  height: calc(3.25rem + var(--safe-t));
  padding-top: var(--safe-t);
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
  background: #09090b;
}

.player-bar .back,
.fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  min-width: 2.5rem;
  padding: 0 0.8rem;
  border-radius: 0.55rem;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.player-bar .back:hover,
.fs-btn:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--text);
}

.player-bar h1 {
  margin: 0;
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-stage {
  flex: 1;
  min-height: 0;
  background: #000;
  position: relative;
}

.player-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.player-stage:fullscreen,
.player-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #000;
}

@media (max-width: 520px) {
  .page {
    width: calc(100% - 1.5rem);
    padding-top: 1.4rem;
  }

  .player-bar .back span:not(.back-icon) {
    /* keep the word on slightly wider phones; hide only if extremely tight */
  }
}

@media (max-width: 360px) {
  .player-bar .back span:not(.back-icon) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}
