:root {
  --ink: #1c1915;
  --muted: #6d655c;
  --paper: #f3efe7;
  --paper-2: #e7e0d4;
  --card: #fffdf9;
  --line: rgba(28, 25, 21, 0.12);
  --pine: #243028;
  --pine-2: #314037;
  --copper: #9a4634;
  --serif: "Literata", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --shadow: 0 16px 40px rgba(36, 28, 18, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(154, 70, 52, 0.08), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

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

button, a { font: inherit; }

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

.site-header {
  background: var(--pine);
  color: #f6f1e8;
}

.site-header__inner,
.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 20px;
}

.brand {
  color: inherit;
  text-decoration: none;
}

.brand small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 241, 232, 0.62);
}

.brand strong {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.header-mail {
  color: rgba(246, 241, 232, 0.8);
  text-decoration: none;
  font-size: 0.92rem;
}

.header-mail:hover { color: white; }

.hero {
  padding: 42px 0 8px;
}

.hero h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero p {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 28px 0 64px;
}

.year-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.year-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.year-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.55s ease;
}

.year-card:hover img { transform: scale(1.06); }

.year-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px 16px;
}

.year-card__label {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.year-card__title { font-weight: 500; }

.year-card__place {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.35;
}

.year-card__count {
  color: var(--muted);
  font-size: 0.88rem;
}

.album-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 18px;
}

.album-bar h1 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.back {
  color: var(--copper);
  text-decoration: none;
  font-size: 0.92rem;
}

.back:hover { text-decoration: underline; }

.album-note {
  margin: 4px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.btn:hover { border-color: rgba(28, 25, 21, 0.28); }

.btn[aria-pressed="true"] {
  background: var(--pine);
  color: #f6f1e8;
  border-color: var(--pine);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
  padding-bottom: 72px;
}

.grid a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-2);
}

.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.grid a:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #121410;
  color: #f6f1e8;
}

.lightbox[hidden] { display: none; }

.lightbox__top,
.lightbox__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.lightbox__count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.icon-btn {
  appearance: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(246, 241, 232, 0.85);
  background: rgba(246, 241, 232, 0.16);
  color: #fff;
  cursor: pointer;
}

.icon-btn:hover { background: rgba(246, 241, 232, 0.16); }

.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 64px;
}

.lightbox__stage .nav-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.lightbox__stage [data-prev] { left: 16px; }
.lightbox__stage [data-next] { right: 16px; }

.lightbox__stage img {
  justify-self: center;
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 180px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.filmstrip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 16px 16px;
  scroll-behavior: smooth;
}

.filmstrip button {
  appearance: none;
  flex: 0 0 auto;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  opacity: 0.55;
}

.filmstrip button[aria-current="true"] {
  border-color: #f6f1e8;
  opacity: 1;
}

.filmstrip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
}

.site-footer a { color: var(--copper); }

@media (max-width: 860px) {
  .years { grid-template-columns: 1fr 1fr; }
  .header-mail { display: none; }
}

@media (max-width: 640px) {
  .years { grid-template-columns: 1fr; }
  .album-bar { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox__stage { padding: 0 8px; }
  .lightbox__stage img { max-height: calc(100vh - 210px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .year-card img,
  .grid img { transition: none; }
}
