:root {
  --bg: #0b0c10;
  --bg-elevated: #12141a;
  --surface: #181b22;
  --text: #f4f1ea;
  --muted: #9a9488;
  --line: rgba(244, 241, 234, 0.08);
  --accent: #c9a96e;
  --accent-soft: rgba(201, 169, 110, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(201, 169, 110, 0.08), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(90, 110, 140, 0.12), transparent 45%),
    var(--bg);
  color: var(--text);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(11, 12, 16, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}

.logo {
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 22px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  width: min(1180px, calc(100% - 40px));
  margin: 72px auto 48px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 48px;
  align-items: end;
}

.eyebrow {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.92;
  font-weight: 500;
  margin: 0 0 18px;
}

.lede {
  max-width: 38ch;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.featured {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 36px;
}

.featured-frame {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.featured-frame img {
  width: 100%;
  height: min(62vh, 680px);
  object-fit: cover;
}

.featured-frame figcaption {
  position: absolute;
  left: 24px;
  bottom: 22px;
}

.featured-frame h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 500;
}

.featured-frame p {
  margin: 4px 0 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-meta {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: grid;
  gap: 10px;
  padding-bottom: 8px;
}

.hero-meta strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.toolbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters a,
.filters span {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.filters a:hover,
.filters a.is-active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.count {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.gallery {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 80px;
  columns: 3 280px;
  column-gap: 16px;
}

.card {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: saturate(0.92) contrast(1.05);
}

.card:hover img {
  transform: scale(1.08);
  filter: saturate(1.05) contrast(1.08);
}

.card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 18px 16px;
  background: linear-gradient(to top, rgba(8, 9, 12, 0.92), transparent);
  font-family: "Inter", system-ui, sans-serif;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card:hover figcaption,
.card:focus-within figcaption {
  opacity: 1;
  transform: translateY(0);
}

.card h3 {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.card p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 50;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.lightbox .close {
  position: absolute;
  top: 22px;
  right: 28px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 999px;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer > span:last-child {
  text-align: right;
}

.hit-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text);
}

.hit-counter strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  line-height: 1;
}

.hit-counter span {
  color: var(--muted);
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    margin-top: 40px;
    gap: 24px;
  }

  .nav-links {
    display: none;
  }

  .gallery {
    columns: 2 160px;
  }
}

@media (max-width: 520px) {
  .gallery {
    columns: 1;
  }
}
