@property --ambient {
  syntax: "<color>";
  inherits: true;
  initial-value: #f0eeeb;
}

:root {
  --bg: #0a0a0b;
  --surface: #131314;
  --surface-2: #1b1b1d;
  --line: #242426;
  --text: #f0eeeb;
  --text-muted: #8f8d8a;
  --text-faint: #55534f;

  --ambient: #f0eeeb;

  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --header-h: 60px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 0%,
    color-mix(in srgb, var(--ambient) 16%, transparent) 0%,
    transparent 55%
  );
  transition: --ambient 0.7s ease;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

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

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.wordmark-mark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: color 0.5s ease;
}

.wordmark-mark circle:first-child {
  transition: stroke 0.5s ease;
  stroke: var(--ambient);
}

.wordmark-mark circle:last-of-type,
.wordmark-mark line,
.wordmark-mark .dot {
  fill: var(--ambient);
  transition: fill 0.5s ease;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
}

.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ambient);
  transition: background 0.5s ease;
}

.gallery-intro {
  padding: 40px 20px 24px;
}

.gallery-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 13vw, 3.4rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.gallery-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 0 20px;
  }
}

@media (min-width: 960px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 0 32px;
  }
}

@media (min-width: 1280px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
  display: block;
  width: 100%;
  border-radius: 2px;
}

.tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile-index {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(10, 10, 11, 0.55);
  border: 1px solid rgba(240, 238, 235, 0.18);
  padding: 3px 7px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.tile-index::before {
  content: "N°";
  color: var(--text-muted);
}

.tile-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 12px 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.tile-label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tile-color, var(--text));
  margin-right: 8px;
  vertical-align: middle;
}

@media (hover: hover) {
  .tile-img {
    filter: saturate(0.92);
  }
  .tile:hover .tile-img {
    transform: scale(1.045);
    filter: saturate(1);
  }
  .tile:hover {
    border-color: var(--tile-color, var(--line));
  }
}

.gallery-empty {
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 60px 20px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 7, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modal-in 0.25s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-image-wrap {
  position: relative;
  width: 100%;
  max-height: 72vh;
  max-height: 72dvh;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 72vh;
  max-height: 72dvh;
  margin: 0 auto;
}

.modal-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 0;
  font-family: var(--font-mono);
}

.modal-index {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.modal-name {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0;
}

.about-main {
  min-height: calc(100dvh - var(--header-h) - 90px);
  display: flex;
  align-items: flex-start;
  padding: 60px 20px 40px;
}

@media (min-width: 640px) {
  .about-main {
    align-items: center;
    padding: 40px 20px;
  }
}

.about-hero {
  max-width: 560px;
  margin: 0 auto;
}

.about-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 16px;
  text-transform: uppercase;
}

.about-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ambient);
  transition: background 0.5s ease;
}

.about-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 10vw, 3rem);
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.about-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 30px;
  max-width: 46ch;
}

.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.discord-link:hover {
  border-color: var(--text-muted);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.site-footer {
  padding: 30px 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  margin-top: 44px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
