:root {
  --bg: #000000;
  --panel: #141414;
  --text: #ffffff;
  --text-dim: #9a9a9a;
  --gap: 40px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Header ---------- */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
 padding: 40px 20px 24px;
}

.site-header .logo {
  width: 100%;
  max-width: 1200px;
  height: 200px;
  display: block;
}

/* ---------- Project list (main page) ---------- */
.project-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 60px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.project-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #1a1a1a;
}

.project-card:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Placeholder thumbnail art — swap for a real <video> or <img> once assets exist */
/* Generic placeholder gradients — remove once real video/poster art is in place */
.thumb-bg-1 { background: linear-gradient(135deg, #5b8def, #a06be0 45%, #e05fc0); }
.thumb-bg-2 { background: linear-gradient(135deg, #3a3a3a, #6b6b6b); }
.thumb-bg-3 { background: linear-gradient(135deg, #2a2a2a, #4a4a4a); }

.project-card .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card .thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 20px;
}

.project-card .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.project-card .play-icon::after {
  content: "";
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.85);
  margin-left: 4px;
}

.project-card .card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.project-card .card-label {
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  overflow-y: auto;
}

.modal[hidden] { display: none; }

.modal-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 80px;
  position: relative;
}

.modal-close {
  position: fixed;
  top: 20px;
  right: max(20px, calc((100vw - var(--max-width)) / 2 + 20px));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--panel);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 101;
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  margin: 60px 0 24px;
}

.modal-media {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.media-block .media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #1a1a1a;
}

.media-block .media-frame video,
.media-block .media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-block .media-frame.image-frame {
  aspect-ratio: auto;
}

.media-block .media-frame.image-frame img {
  position: static;
  width: 100%;
  height: auto;
  display: block;
}

.media-block .caption {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
}

.media-block .caption a {
  color: var(--text);
  text-decoration: underline;
}

.media-block .caption a:hover {
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .modal-title { font-size: 22px; margin-top: 50px; }
  .project-card .card-label { font-size: 17px; }
}
