:root {
  --paper: #f6f5f2;
  --ink: #11110f;
  --muted: #817f79;
  --line: #d9d7d1;
  --sidebar: 304px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { color: inherit; font: inherit; }
button { border: 0; }
.site-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  padding: 38px 30px 26px;
  overflow-y: auto;
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.brand {
  display: block;
  width: 174px;
  padding: 0;
  margin: 0 0 56px;
  background: transparent;
  cursor: pointer;
}
.brand img { display: block; width: 100%; height: auto; }
nav { display: flex; flex-direction: column; gap: 3px; }
.nav-group { margin: 23px 0 17px; }
.nav-heading, .nav-link {
  margin: 0;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: 1.14;
}
.nav-heading {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 235px;
  padding: 0;
  margin-bottom: 9px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.nav-heading span, .nav-link span { white-space: nowrap; text-transform: none; }
.nav-heading::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}
.nav-heading:hover::after, .nav-heading.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-heading.is-active { color: var(--muted); }
.nav-link {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 238px;
  padding: 5px 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}
.nav-link:hover::after, .nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-link.is-active { color: var(--muted); }
.nav-sub {
  margin-left: 18px;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
}
.nav-sub::before { content: "○"; position: absolute; left: -18px; }
.sidebar-footer {
  margin-top: auto;
  padding-top: 42px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.sidebar-footer a, .sidebar-footer button {
  padding: 0;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.sidebar-footer a:hover, .sidebar-footer button:hover { text-decoration: underline; }
.sidebar-footer p:not(.footer-heading) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sidebar-footer .footer-heading {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}
.instagram-icon {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}
.instagram-icon::before {
  content: "";
  position: absolute;
  top: 3.5px;
  left: 3.5px;
  width: 5px;
  height: 5px;
  border: 1.25px solid currentColor;
  border-radius: 50%;
}
.instagram-icon::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 2px;
  height: 2px;
  background: currentColor;
  border-radius: 50%;
}
.about-link { margin-top: 8px; }

.content { margin-left: var(--sidebar); padding: 24px; }
.content-header {
  height: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.content-header p { margin: 0; }
.masonry { column-count: 3; column-gap: 12px; }
.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
  break-inside: avoid;
  background: #eae8e2;
  cursor: zoom-in;
  animation: reveal 420ms ease both;
}
.gallery-card[hidden] { display: none; }
.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 650ms cubic-bezier(.22, 1, .36, 1), filter 300ms ease;
}
.gallery-card::after {
  content: attr(data-label);
  position: absolute;
  inset: auto 0 0;
  padding: 24px 12px 10px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .58));
  font-size: 9px;
  letter-spacing: .11em;
  text-align: left;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(5px);
  transition: 220ms ease;
}
.gallery-card:hover img { transform: scale(1.018); filter: brightness(.91); }
.gallery-card:hover::after, .gallery-card:focus-visible::after { opacity: 1; transform: translateY(0); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 34px;
  display: grid;
  place-items: center;
  background: rgba(18, 18, 16, .94);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  display: block;
  max-width: min(90vw, 1500px);
  max-height: calc(100vh - 68px);
  object-fit: contain;
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 1;
  padding: 5px;
  color: #fff;
  background: transparent;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.mobile-menu, .menu-backdrop { display: none; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  :root { --sidebar: 280px; }
  .sidebar { padding-inline: 25px; }
  .masonry { column-count: 2; }
}

@media (max-width: 760px) {
  :root { --sidebar: min(88vw, 334px); }
  .mobile-menu {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 40;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 13px 11px;
    align-content: center;
    gap: 6px;
    background: var(--paper);
    border: 1px solid var(--line);
    cursor: pointer;
  }
  .mobile-menu span { display: block; height: 1px; background: var(--ink); }
  .sidebar {
    z-index: 35;
    transform: translateX(-102%);
    transition: transform 300ms cubic-bezier(.22, 1, .36, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, .07);
  }
  .sidebar.is-open { transform: translateX(0); }
  .brand { margin-bottom: 40px; }
  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    width: 100%;
    background: rgba(16, 16, 15, .32);
  }
  .menu-backdrop.is-open { display: block; }
  .content { margin-left: 0; padding: 18px; }
  .content-header { padding-right: 56px; height: 42px; }
  .masonry { column-gap: 8px; }
  .gallery-card { margin-bottom: 8px; }
  .gallery-card::after { display: none; }
}

@media (max-width: 480px) {
  .content { padding: 12px; }
  .masonry { column-count: 1; }
  .content-header { height: 48px; }
  .lightbox { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
