:root {
  color-scheme: dark;
  --paper: #050505;
  --paper-soft: #111111;
  --ink: #efeee9;
  --ink-muted: #8b8b86;
  --ink-dim: #5f5f5a;
  --line: #20201d;
  --rail: #030303;
  --accent: #d8d6cd;
  --focus: #d8d6cd;
  --rail-width: 224px;
  --content-max: 1210px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.is-lightbox-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

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

[hidden] {
  display: none !important;
}

.gallery-view[hidden],
.about-view[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--ink);
  color: #050505;
  transform: translateY(-140%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  width: var(--rail-width);
  padding: 48px 34px 34px;
  border-right: 1px solid var(--line);
  background: var(--rail);
  display: flex;
  flex-direction: column;
}

.identity {
  display: grid;
  gap: 2px;
}

.wordmark {
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.identity p,
.kicker {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  gap: 12px;
  margin-top: 84px;
}

.primary-nav a,
.mobile-nav a {
  color: var(--ink-muted);
  font-size: 0.82rem;
  transition:
    color 180ms var(--ease),
    transform 180ms var(--ease);
}

.primary-nav a:hover,
.mobile-nav a:hover {
  color: var(--ink);
}

.primary-nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
  color: var(--ink);
}

.primary-nav a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: 9px;
  vertical-align: middle;
  background: var(--accent);
}

.mobile-bar {
  display: none;
}

.page-shell {
  min-height: 100vh;
  margin-left: var(--rail-width);
  padding: 52px 58px 72px;
}

.gallery-view,
.about-view {
  max-width: var(--content-max);
  margin: 0 auto;
}

.view-heading {
  max-width: 500px;
  margin: 4px 0 46px;
}

h1 {
  margin: 8px 0 12px;
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.view-heading p:last-child,
.about-copy p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
  max-width: 100%;
  overflow-wrap: break-word;
}

.photo-grid {
  column-count: 3;
  column-gap: 30px;
}

.gallery-sections {
  display: block;
}

.photo-section {
  margin-top: 12px;
}

.gallery-sections > .photo-section:first-child {
  margin-top: 0;
}

.photo-section-title {
  margin: 0 0 28px;
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.06em;
}

.photo-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 46px;
  break-inside: avoid;
  animation: rise-in 540ms var(--ease) both;
}

.photo-button {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
}

.photo-button:focus,
.photo-button:focus-visible {
  outline: none;
}

.photo-button picture {
  display: block;
}

.photo-button,
.photo-button picture,
.photo-card img,
.lightbox-frame,
.lightbox-frame img {
  -webkit-touch-callout: none;
  user-select: none;
}

.photo-card img {
  width: 100%;
  height: auto;
  background: var(--paper-soft);
}

.about-view {
  min-height: calc(100vh - 128px);
  display: grid;
  align-items: center;
}

.about-copy {
  max-width: 620px;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.avatar {
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-soft);
  -webkit-touch-callout: none;
  user-select: none;
}

.about-copy p + p {
  margin-top: 18px;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.contact-list a {
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink), transparent 60%);
  text-underline-offset: 5px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 18px;
  padding: 42px;
  background: rgba(0, 0, 0, 0.96);
  color: var(--ink);
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-frame {
  display: grid;
  justify-items: center;
  min-width: 0;
  margin: 0;
}

.lightbox-frame img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  background: #090909;
  cursor: default;
}

.lightbox button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-nav {
  min-height: 44px;
  color: rgba(239, 238, 233, 0.66);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.previous {
  text-align: left;
}

.next {
  text-align: right;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1020px) {
  .photo-grid {
    column-count: 2;
    column-gap: 28px;
  }

  .page-shell {
    padding-right: 38px;
    padding-left: 38px;
  }
}

@media (max-width: 760px) {
  .site-rail {
    display: none;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    gap: 14px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.94);
    backdrop-filter: blur(12px);
  }

  .mobile-nav {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mobile-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .page-shell {
    margin-left: 0;
    padding: 28px 22px 54px;
  }

  .view-heading {
    margin-top: 0;
    margin-bottom: 34px;
    max-width: 32rem;
  }

  .view-heading p:last-child {
    max-width: 30ch;
  }

  h1 {
    font-size: 0.98rem;
  }

  .photo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: calc(100vw - 44px);
    column-count: initial;
  }

  .photo-section {
    margin-top: 18px;
  }

  .photo-section-title {
    margin-bottom: 22px;
    font-size: 0.74rem;
  }

  .photo-card,
  .photo-card:nth-child(2n),
  .photo-card:nth-child(5n) {
    display: block;
    margin-top: 0;
    margin-bottom: 34px;
  }

  .about-view {
    min-height: auto;
    align-items: start;
  }

  .about-header {
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
  }

  .avatar {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
  }

  .contact-list {
    display: grid;
    gap: 14px;
  }

  .lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 52px 18px 22px;
  }

  .lightbox-frame {
    grid-column: 1 / -1;
  }

  .lightbox-frame img {
    max-height: calc(100vh - 170px);
  }

  .previous,
  .next {
    min-height: 48px;
  }

  .next {
    justify-self: end;
  }
}

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