:root {
  --bg: #0b0c10;
  --bg-soft: #121419;
  --panel: #15171e;
  --line: #262a35;
  --text: #e8e9ee;
  --muted: #9aa0ad;
  --faint: #6b7280;
  --accent: #9c8ad6;
  --accent-soft: #b9abe4;
  --accent-2: #6ad0c9;
  --radius: 14px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(106, 208, 201, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(156, 138, 214, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Outfit", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover { color: var(--accent-soft); }

/* ---------- Header ---------- */
.site-header {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 28px 8px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-name {
  font-family: "Syne", sans-serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-name .brand-to {
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}

.brand-name .brand-accent { color: var(--accent); }

.tagline {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 15px;
  max-width: 60ch;
}

/* ---------- Grid (masonry via CSS columns) ---------- */
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 28px 80px;
}

.grid {
  column-count: 4;
  column-gap: 18px;
}

@media (max-width: 1100px) { .grid { column-count: 3; } }
@media (max-width: 760px)  { .grid { column-count: 2; } }
@media (max-width: 460px)  { .grid { column-count: 1; } }

.tile {
  break-inside: avoid;
  margin-bottom: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.5s ease forwards;
}

.tile[hidden] { display: none; }

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

.tile:hover {
  transform: translateY(-4px);
  border-color: var(--faint);
  box-shadow: var(--shadow);
}

.tile-link {
  display: block;
  position: relative;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  outline-offset: 3px;
}

/* Visually hidden but available to screen readers and crawlers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tile-media {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: bottom;
}

.tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0.1) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tile:hover .tile-overlay { opacity: 1; }

.tile-title {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 28px 60px;
  color: var(--faint);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.site-footer a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Focus / lightbox ---------- */
.focus {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.focus.open { visibility: visible; opacity: 1; }

.focus-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 9, 0.82);
  backdrop-filter: blur(8px);
}

.focus-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  width: min(1100px, 100%);
  max-height: calc(100vh - 56px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: scale(0.98);
  transition: transform 0.25s ease;
}

.focus.open .focus-panel { transform: scale(1); }

@media (max-width: 820px) {
  .focus-panel { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
}

.focus-media {
  background: #07080b;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  overflow: hidden;
}

.focus-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.focus-stage img,
.focus-stage video {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 56px);
  object-fit: contain;
}

.focus-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(11, 12, 16, 0.7);
  padding: 4px 9px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.focus-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--line);
}

.focus-thumb {
  flex: 0 0 auto;
  width: 66px;
  height: 50px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #07080b;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.18s ease, border-color 0.18s ease;
}

.focus-thumb:hover { opacity: 0.85; }
.focus-thumb.active { opacity: 1; border-color: var(--accent); }

.focus-thumb img,
.focus-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.focus-body {
  padding: 32px 30px;
  overflow-y: auto;
}

.focus-title {
  font-family: "Syne", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.15;
  margin: 0 0 20px;
}

.focus-desc {
  line-height: 1.65;
  color: #d3d6de;
  font-size: 15px;
  margin: 0 0 24px;
}

.focus-details {
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  font-size: 13.5px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.focus-details dt {
  color: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-top: 2px;
}

.focus-details dd { margin: 0; color: var(--text); }

.focus-details { margin-bottom: 28px; }

.focus-nav { display: flex; justify-content: space-between; gap: 10px; }

.focus-arrow {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.focus-arrow:hover { border-color: var(--faint); background: #1b1e27; }

.focus-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(11, 12, 16, 0.7);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.18s ease;
}

.focus-close:hover { background: var(--text); color: var(--bg); }
