/* Dark, minimal portfolio — layout inspired by Levon Biss, dark theme kept */

:root {
  --bg: #111111;
  --bg-alt: #161616;
  --bg-deep: #0a0a0a;
  --text: #ececec;
  --muted: #9a9a9a;
  --soft: #c8c8c8;
  --line: #2a2a2a;
  --focus: #f4f4f4;
  --gutter: 1.1rem;
  --page-pad: clamp(1.25rem, 3.5vw, 3.25rem);
  --font: "Poppins", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

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

html {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: 1.15rem var(--page-pad);
  background: var(--bg-deep);
}

.site-title {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 1.35rem;
}

.site-nav a {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Home album sections */

.album-section {
  padding: 2.75rem var(--page-pad) 3.75rem;
}

.album-section:nth-child(odd) {
  background: var(--bg);
}

.album-section:nth-child(even) {
  background: var(--bg-alt);
}

.album-section-inner {
  max-width: 92rem;
  margin: 0 auto;
}

.album-copy {
  margin-top: 2.25rem;
  max-width: 40rem;
}

.album-copy h2,
.page-header h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.album-subtitle {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--soft);
}

.view-album {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--muted);
}

.view-album:hover {
  color: #fff;
}

.view-album span {
  margin-left: 0.15rem;
}

/* Masonry grid (CSS columns) */

.masonry {
  column-count: 4;
  column-gap: var(--gutter);
}

.masonry > a {
  display: block;
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 var(--gutter);
  background: #000;
}

.masonry picture,
.masonry img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.masonry-item:hover img,
.photo-link:hover img {
  opacity: 0.92;
}

.photo-link {
  cursor: zoom-in;
}

/* Album / about / contact pages */

.page-main {
  flex: 1;
  padding: 2.25rem var(--page-pad) 4.5rem;
  background: var(--bg);
}

.page-header {
  margin: 0 0 2.25rem;
}

.page-header .photo-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 300;
}

.prose {
  max-width: 34rem;
  padding-top: 0.5rem;
}

.prose h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--soft);
  font-size: 1rem;
  font-weight: 300;
}

.prose a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* Footer */

.site-footer {
  padding: 1.5rem var(--page-pad) 2rem;
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.site-footer p {
  margin: 0;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.94);
  padding: 3.5rem 3.5rem 4rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 7.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-caption {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.lightbox-btn {
  position: absolute;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.6rem;
  font-family: inherit;
  font-weight: 300;
}

.lightbox-close {
  top: 0.6rem;
  right: 0.6rem;
}

.lightbox-prev {
  left: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-btn:hover {
  color: #fff;
}

.lightbox-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

body.lightbox-open {
  overflow: hidden;
}

/* Responsive: 4 → 2 → 1 columns */

@media (max-width: 960px) {
  .masonry {
    column-count: 2;
  }

  .site-title {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .masonry {
    column-count: 1;
  }

  .site-header {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 0.3rem 1rem;
  }

  .album-section {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }

  .album-copy {
    margin-top: 1.6rem;
  }

  .lightbox {
    padding: 3.25rem 1rem 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .masonry-item img,
  .photo-link img {
    transition: none;
  }
}
