:root {
  --ink: #1a1b25;
  --muted: #767681;
  --line: #e6e6ea;
  --surface: #f7f7f9;
  --accent: #662d91;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Be Vietnam Pro', sans-serif;
  color: var(--ink);
  background: white;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.navbar {
  background: white;
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.07);
}
.nav-name { font-size: 24px; font-weight: 400; color: black; white-space: nowrap; }
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 18px; font-weight: 400; color: black; }
.nav-links a:hover { opacity: 0.6; transition: opacity 0.15s; }
.nav-cta {
  background: var(--ink);
  color: white;
  font-weight: 700;
  font-size: 15px;
  padding: 9px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.85; }
.nav-cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: black;
  padding: 8px;
  align-items: center;
  justify-content: center;
}
.nav-hamburger .icon-close { display: none; }
.nav-hamburger.open .icon-burger { display: none; }
.nav-hamburger.open .icon-close { display: block; }
.mobile-menu { display: none; }

.gallery-header {
  padding: 48px 100px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.gallery-title { font-size: 56px; font-weight: 700; color: black; margin: 0; line-height: 1; }
.gallery-subtitle { font-size: 16px; font-weight: 400; color: #888; margin: 8px 0 0; }
.photo-count { font-size: 15px; font-weight: 400; color: #aaa; padding-bottom: 6px; white-space: nowrap; }

.filter-row {
  padding: 0 100px 28px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}
#year-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-pill {
  border: 2px solid black;
  background: transparent;
  color: black;
  padding: 7px 22px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.filter-pill.active, .filter-pill:hover { background: black; color: white; }
.filter-pill.private::after { content: "private"; font-size: 10px; color: inherit; opacity: 0.62; text-transform: uppercase; }

.tag-menu { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.tag-control { position: relative; display: inline-flex; }
.tag-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 45px -12px rgba(26, 27, 37, 0.30);
  padding: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: max-content;
  max-width: min(440px, calc(100vw - 40px));
}
.tag-panel[hidden] { display: none; }
.tag-pill {
  border: 2px solid rgba(0,0,0,0.22);
  background: white;
  color: black;
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.tag-pill.active { background: black; border-color: black; color: white; }
.tag-count[hidden] { display: none; }

.gallery {
  column-count: 4;
  column-gap: 14px;
  padding: 0 100px 80px;
}
.gallery-layout.has-tag-pinned {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 14px;
  align-items: start;
  padding: 0 100px 80px;
}
.gallery-layout.has-tag-pinned .gallery {
  grid-column: 1 / span 3;
  column-count: 3;
  padding: 0;
}
.tag-pinned-media { grid-column: 4; grid-row: 1; display: grid; gap: 14px; }
.tag-pinned-media img, .tag-pinned-media video { width: 100%; display: block; height: auto; }

.photo-card {
  break-inside: avoid;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.25s;
}
.photo-card.no-hover { cursor: default; }
.photo-card.is-linked { outline: 3px solid var(--accent); outline-offset: 3px; }
.photo-card img, .photo-card video {
  width: 100%;
  height: auto;
  display: block;
  background: #ececec;
}
.photo-card video { background: #111; }
.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 27, 37, 0.72);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 56px 20px 18px;
  opacity: 0;
  transition: opacity 0.2s;
}
.photo-card:hover .photo-overlay,
.photo-card:focus-visible .photo-overlay,
.photo-card:focus-within .photo-overlay,
.photo-card.is-revealed .photo-overlay { opacity: 1; }
.overlay-category {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 4px;
}
.overlay-label { font-size: 16px; font-weight: 700; color: white; margin: 0; }
.overlay-location {
  position: absolute;
  top: 14px;
  right: 14px;
  max-width: calc(100% - 28px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: white;
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  text-align: right;
}
.video-audio-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: rgba(0,0,0,0.62);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  cursor: pointer;
}
.photo-card:hover .video-audio-toggle,
.photo-card:focus-within .video-audio-toggle,
.photo-card.is-revealed .video-audio-toggle { opacity: 1; pointer-events: auto; }
.video-audio-toggle svg { width: 20px; height: 20px; display: block; }
.video-audio-toggle .icon-sound { display: none; }
.video-audio-toggle.is-on .icon-muted { display: none; }
.video-audio-toggle.is-on .icon-sound { display: block; }

.status-panel {
  margin: 0 100px 80px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  max-width: 560px;
}
.status-panel h2 { margin: 0 0 8px; font-size: 22px; }
.status-panel p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.status-panel form { display: flex; gap: 10px; flex-wrap: wrap; }
.status-panel input {
  min-width: 220px;
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.status-panel button {
  border: 0;
  background: var(--ink);
  color: white;
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
}
.status-error { color: #b4232a; font-weight: 700; }

.footer { background: var(--ink); height: 220px; display: flex; align-items: center; justify-content: center; }
.footer-inner { display: flex; gap: 80px; align-items: center; }
.footer-copy { font-size: 22px; font-weight: 700; color: #eaeaea; white-space: nowrap; margin: 0; }
.footer-socials { display: flex; gap: 28px; align-items: center; color: #eaeaea; }
.footer-socials a { color: currentColor; display: flex; }
.footer-socials a:hover { opacity: 0.6; transition: opacity 0.15s; }

@media (min-width: 768px) and (max-width: 1120px) {
  .navbar { gap: clamp(18px, 3vw, 32px); padding: 16px 24px; }
  .nav-name { font-size: 21px; }
  .nav-links { gap: 20px; font-size: 16px; }
  .nav-cta { font-size: 14px; padding: 8px 16px; }
  .gallery-header, .filter-row { padding-left: 40px; padding-right: 40px; }
  .gallery { padding-left: 40px; padding-right: 40px; }
  .gallery-layout.has-tag-pinned { padding-left: 40px; padding-right: 40px; }
  .status-panel { margin-left: 40px; margin-right: 40px; }
}

@media (max-width: 767px) {
  .navbar { justify-content: space-between; padding: 13px 20px; gap: 0; }
  .nav-name { font-size: 19px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; margin-right: -8px; }
  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 99;
    flex-direction: column;
    padding: 4px 20px 22px;
    border-top: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 16px 28px -18px rgba(26,27,37,0.28);
  }
  .mobile-menu.open { display: flex; }
  .mobile-link {
    font-size: 16px;
    font-weight: 700;
    color: black;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
  }
  .mobile-link-cta { color: var(--accent); border-bottom: none; }
  .gallery-header { padding: 36px 20px 16px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .gallery-title { font-size: 38px; }
  .gallery-subtitle { font-size: 14px; }
  .filter-row { padding: 0 20px 24px; gap: 8px; }
  .filter-pill { font-size: 13px; padding: 6px 16px; }
  .tag-menu { margin-left: 0; align-items: flex-start; }
  .tag-panel { left: 0; right: auto; width: calc(100vw - 40px); gap: 8px; }
  .tag-pill { font-size: 13px; padding: 6px 14px; }
  .gallery, .gallery-layout.has-tag-pinned .gallery { column-count: 1; padding: 0; }
  .gallery { padding: 0 20px 56px; }
  .gallery-layout.has-tag-pinned { display: flex; flex-direction: column; gap: 14px; padding: 0 20px 56px; }
  .tag-pinned-media { order: -1; width: 100%; }
  .photo-card .photo-overlay {
    background: linear-gradient(to top, rgba(26,27,37,0.78), rgba(26,27,37,0.24) 46%, transparent 72%);
    padding: 52px 16px 14px;
  }
  .status-panel { margin: 0 20px 56px; }
  .footer { height: auto; padding: 44px 20px; }
  .footer-inner { flex-direction: column; gap: 22px; }
  .footer-copy { font-size: 17px; }
}
