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

:root {
  --accent-red: #c4201a;
  --accent-gold: #ffb400;
  --text-primary: #f2f2f4;
  --text-muted: #a9abb3;
  --accent: var(--accent-gold);
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: #07070a;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.025) 3px,
      rgba(255, 255, 255, 0.025) 4px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.02) 3px,
      rgba(255, 255, 255, 0.02) 4px
    ),
    radial-gradient(ellipse at 50% 0%, rgba(196, 32, 26, 0.22), transparent 60%),
    linear-gradient(180deg, #07070a 0%, #14151a 45%, #14151a 55%, #07070a 100%);
  background-attachment: fixed;
}

a {
  color: var(--accent-gold);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: #14151a;
  color: var(--text-primary);
  z-index: 10000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.site-header {
  padding: 2.5rem 1rem 0;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.logo-link {
  display: block;
  line-height: 0;
}

.site-logo {
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

@media (min-width: 768px) {
  .site-logo {
    max-width: 300px;
  }

  .site-header {
    padding-top: 3rem;
    gap: 1.5rem;
  }
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-gold);
}

.site-main {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.site-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .site-hero {
    padding: 3rem 0 2.5rem;
  }
}

.site-title {
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-wrap: balance;
}

.title-divider {
  display: block;
  width: 120px;
  height: 3px;
  margin: 0 auto 1.75rem;
  border: none;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-gold));
}

.dean-line {
  margin: 0 auto;
  font-size: clamp(1.05rem, 2.2vw, 1.12rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.65;
  max-width: 60ch;
  color: var(--text-muted);
}

.gallery-section {
  --row-h: 140px;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .gallery-section {
    --row-h: 180px;
    margin-top: 2.5rem;
  }
}

@media (min-width: 1280px) {
  .gallery-section {
    --row-h: 240px;
  }
}

@media (min-width: 1920px) {
  .gallery-section {
    --row-h: 300px;
  }
}

.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}

.gallery-grid::after {
  content: "";
  flex-grow: 1000000;
  height: 0;
}

.gallery-item {
  margin: 0;
  min-width: 0;
  display: flex;
}

.gallery-item--full {
  flex: 1 1 100%;
  width: 100%;
  min-width: 100%;
}

.gallery-tile {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: outline-color 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
  overflow: hidden;
}

.gallery-tile:hover,
.gallery-tile:focus-within {
  outline: 1px solid var(--accent-gold);
  outline-offset: 0;
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.thumb-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.thumb-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.caption-overlay {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 0.65rem 0.55rem 0.55rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 70%, transparent 100%);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  border-left: 3px solid var(--accent-red);
}

@media (hover: hover) {
  .has-caption .gallery-tile:hover .caption-overlay,
  .has-caption .gallery-tile:focus-within .caption-overlay {
    display: block;
  }
}

@media (hover: none) {
  .has-caption .caption-overlay {
    display: none !important;
  }
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer::before {
  content: "";
  display: block;
  width: min(200px, 60vw);
  height: 2px;
  margin: 0 auto 1.5rem;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(196, 32, 26, 0.45), rgba(255, 180, 0, 0.45));
}

.site-footer p {
  margin: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none !important;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.96);
}

.lb-stage {
  position: relative;
  z-index: 2;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 3.25rem 2rem;
  pointer-events: none;
}

.lb-image-wrap {
  pointer-events: auto;
  touch-action: none;
  overflow: hidden;
  max-width: calc(100vw - 4rem);
  max-height: calc(100vh - 7rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-image {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-caption {
  pointer-events: none;
  margin: 1rem 0 0;
  max-width: min(48rem, 92vw);
  text-align: center;
  font-size: 0.92rem;
  color: #e8e9ed;
  background: transparent;
  padding: 0.75rem 0.5rem 0;
  border-radius: 0;
  position: relative;
}

.lb-caption::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: 0 auto 0.65rem;
  background: var(--accent-gold);
  border-radius: 1px;
}

.lb-caption[hidden] {
  display: none !important;
}

.lb-nav,
.lb-close {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 12, 16, 0.75);
  color: var(--text-primary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  border-radius: 50%;
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lb-close {
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1.5rem;
  border-radius: 6px;
}

.lb-prev {
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lb-nav:hover,
.lb-close:hover,
.lb-nav:focus-visible,
.lb-close:focus-visible {
  background: rgba(24, 24, 30, 0.92);
  border-color: var(--accent-gold);
}

/* 404 */
.page-404 .site-main.narrow {
  max-width: 28rem;
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.page-404 h1 {
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

.page-404 p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.page-404 a {
  font-weight: 500;
}