@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Josefin+Sans:wght@100;200;300&display=swap');

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

:root {
  --bg: #0d0d0d;
  --ink: #f0f0eb;
  --gray-mid: rgba(240,240,235,0.42);
  --gray-light: rgba(240,240,235,0.12);
  --placeholder: #1c1c1c;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Josefin Sans', sans-serif;
  --nav-h: 60px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* ========== NAV ========== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: var(--bg);
  border-bottom-color: var(--gray-light);
}

.nav-logo {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(240,240,235,0.65);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-logo:hover { color: var(--ink); }
.nav-logo.light { color: rgba(240,240,235,0.65); }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(240,240,235,0.58);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a.light-link { color: rgba(240,240,235,0.58); }
.nav-links a.light-link:hover { color: var(--ink); }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  color: rgba(240,240,235,0.7);
}

.nav-toggle span {
  display: block;
  width: 20px; height: 1px;
  background: currentColor;
  transition: all 0.3s var(--ease);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0;
  background: var(--bg);
  z-index: 99;
  padding: 40px 32px;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}

.nav-mobile.open { transform: translateX(0); }

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-mobile a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 32px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.nav-mobile a:hover { opacity: 1; }

/* ========== PHOTO ========== */

.photo {
  position: relative;
  overflow: hidden;
  background: var(--placeholder);
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) contrast(1.05);
  transition: transform 0.6s var(--ease);
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.photo { pointer-events: auto; }

@media (hover: hover) {
  .photo:hover img { transform: scale(1.03); }
}

/* ========== REVEAL ========== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========== FOOTER ========== */

footer {
  padding: 28px 40px;
  border-top: 1px solid var(--gray-light);
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240,240,235,0.22);
}

.footer-sep {
  font-size: 10px;
  color: rgba(240,240,235,0.12);
}

.footer-built {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240,240,235,0.22);
}

.footer-built a {
  color: rgba(240,240,235,0.32);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(240,240,235,0.18);
  transition: color 0.2s;
}

.footer-built a:hover { color: rgba(240,240,235,0.7); }

/* ========== EXPAND ICON ========== */

.photo-expand-icon {
  position: absolute;
  top: 10px; right: 10px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 2;
}

.photo:hover .photo-expand-icon { opacity: 1; }

.photo-expand-icon svg {
  width: 12px; height: 12px;
  stroke: rgba(240,240,235,0.9);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ========== LIGHTBOX ========== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  cursor: zoom-out;
}

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

.lightbox-inner {
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.lightbox-inner img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  filter: grayscale(100%) contrast(1.05);
  display: block;
  user-select: none;
}

.lightbox-close {
  position: fixed;
  top: 18px; right: 24px;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  color: rgba(240,240,235,0.35);
  font-size: 20px;
  font-weight: 200;
  transition: color 0.2s;
  z-index: 1001;
  padding: 0;
}

.lightbox-close:hover { color: rgba(240,240,235,0.9); }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(240,240,235,0.1);
  color: rgba(240,240,235,0.7);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  z-index: 1001;
  padding: 0;
}

.lightbox-nav:hover {
  color: rgba(240,240,235,0.95);
  background: rgba(0,0,0,0.65);
  border-color: rgba(240,240,235,0.25);
}

.lightbox-nav svg {
  width: 22px; height: 22px;
  pointer-events: none;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(240,240,235,0.5);
  z-index: 1001;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

/* ========== SWIPE HINT ========== */

.lightbox-swipe-hint {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(240,240,235,0.3);
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
  white-space: nowrap;
}

@media (hover: none) {
  .lightbox-swipe-hint.visible { opacity: 1; }
}

/* ========== GALLERY MASONRY ========== */

.gallery-masonry {
  padding: 0 40px 80px;
  columns: 3;
  column-gap: 10px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 10px;
  display: inline-block;
  width: 100%;
}

.gallery-item .photo { width: 100%; }

.gallery-item .photo img {
  height: auto;
  object-fit: initial;
}

/* ========== GALLERY SELECTOR ========== */

.selector-section {
  height: 100svh;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  background: #080808;
}

.selector-bgs {
  position: absolute;
  inset: 0;
}

.selector-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.selector-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05) brightness(0.6);
}

.selector-bg--default {
  opacity: 1;
}

.selector-section.hovered .selector-bg--default {
  opacity: 0;
}

.selector-bg.active { opacity: 1; }

.selector-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 96% 102%, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 28%, transparent 60%);
  pointer-events: none;
  z-index: 5;
}

.selector-content {
  position: absolute;
  right: 5%;
  bottom: 10%;
  z-index: 10;
  text-align: right;
}

.selector-items {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.selector-item {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.selector-item-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  color: rgba(240,240,235,0.92);
  letter-spacing: 0.01em;
  line-height: 1;
  transition: color 0.25s ease;
  display: block;
  text-shadow: 0 2px 20px rgba(0,0,0,0.95), 0 0 40px rgba(0,0,0,0.8), 0 4px 8px rgba(0,0,0,0.9);
}

.selector-item:hover .selector-item-name { color: rgba(240,240,235,1); }

.selector-sep {
  width: 24px;
  height: 1px;
  background: rgba(240,240,235,0.2);
  margin: 6px 0;
  align-self: flex-end;
}

/* ========== GRID SECTION ========== */

.grid-section { background: var(--bg); }

.grid-header {
  display: flex;
  align-items: center;
  padding: 96px 40px 36px;
  gap: 24px;
}

.grid-back {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-mid);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  font-family: var(--font-ui);
  font-weight: 300;
  white-space: nowrap;
  flex-shrink: 0;
}

.grid-back:hover { color: var(--ink); }

.grid-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(22px, 2.8vw, 36px);
  letter-spacing: 0.02em;
}

/* ========== PAGE TOP SPACER ========== */

.page-top { padding-top: var(--nav-h); }

/* ========== ABOUT PAGE ========== */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.about-image-col { position: relative; overflow: hidden; }

.about-image-col .photo {
  height: 100%;
  min-height: 480px;
}

.about-text-col {
  padding: 80px 60px 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-label {
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 28px;
}

.about-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.93;
  letter-spacing: 0.01em;
  margin-bottom: 36px;
}

.about-body {
  color: var(--gray-mid);
  font-size: 13px;
  line-height: 1.9;
  max-width: 400px;
}

.about-body p + p { margin-top: 16px; }

.about-links {
  margin-top: 44px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.about-links a {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-mid);
  text-decoration: none;
  transition: color 0.2s;
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid var(--gray-light);
}

.about-links a:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.about-links a:hover { color: var(--ink); }

/* ========== RESPONSIVE ========== */

@media (min-width: 2200px) {
  .gallery-masonry { columns: 5; }
}

@media (min-width: 1600px) and (max-width: 2199px) {
  .gallery-masonry { columns: 4; }
}

@media (max-width: 960px) {
  .gallery-masonry { columns: 2; padding: 0 20px 60px; }
  .about-layout { grid-template-columns: 1fr; }
  .about-image-col .photo { min-height: 300px; }
  .about-text-col { padding: 56px 24px 72px; }
  .grid-header { padding: 80px 20px 28px; }
}

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: block; }
  footer { padding: 28px 20px; }
  .selector-content { right: 5%; bottom: 8%; }
  .grid-header { gap: 16px; padding: 80px 20px 28px; }
  .grid-title { font-size: 22px; }
  /* Always show expand icon on touch devices */
  .photo-expand-icon { opacity: 0.6; }
  /* Lightbox nav — full-width tap zones on mobile */
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

@media (max-width: 520px) {
  .gallery-masonry { columns: 1; }
  .selector-item-name { font-size: 34px; }
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}
