/* =========================================================================
   TOKENS
   ========================================================================= */
:root {
  --ink: #121110;
  --ink-raised: #1a1917;
  --line: rgba(244, 241, 234, 0.14);
  --line-strong: rgba(244, 241, 234, 0.28);
  --text: #f4f1ea;
  --text-mute: #9c968a;
  --accent: #c69a4c;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --space-xs: 1rem;
  --space-sm: 1.5rem;
  --space-md: clamp(2rem, 3vw, 3rem);
  --space-lg: clamp(3rem, 6vw, 5rem);
  --content-pad: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================================
   RESET
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, picture, video { display: block; max-width: 100%; }
img { height: auto; }
button { background: none; border: 0; cursor: pointer; color: inherit; font: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection { background: var(--accent); color: #2a2013; }

.font-display { font-family: var(--font-display); font-optical-sizing: auto; font-weight: 380; }

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-sm);
  z-index: 1000;
  background: var(--accent);
  color: #2a2013;
  padding: 0.7em 1.1em;
  border-radius: 2px;
}
.skip-link:focus { top: var(--space-sm); }

/* =========================================================================
   HEADER / FOOTER — the only "personal info" on the page
   ========================================================================= */
.site-header {
  padding: var(--space-md) var(--content-pad) var(--space-sm);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5em 1em;
}
.site-header h1 {
  font-size: clamp(1.5rem, 2.2vw + 1rem, 2.25rem);
  font-weight: 380;
  letter-spacing: -0.01em;
}
.header-email {
  font-size: 0.95rem;
  color: var(--text-mute);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.header-email:hover { color: var(--accent); border-color: var(--accent); }

.site-footer {
  padding: var(--space-lg) var(--content-pad) var(--space-md);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5em 1em;
  color: var(--text-mute);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  margin-top: var(--space-lg);
}
.site-footer a:hover { color: var(--accent); }

/* =========================================================================
   PHOTOGRAPHY — masonry gallery
   ========================================================================= */
#photography { padding: 0 var(--content-pad) var(--space-lg); }

.masonry {
  column-count: 1;
  column-gap: var(--space-sm);
}
@media (min-width: 620px) { .masonry { column-count: 2; } }
@media (min-width: 980px) { .masonry { column-count: 3; } }
@media (min-width: 1400px) { .masonry { column-count: 4; } }

.masonry-item { break-inside: avoid; margin-bottom: var(--space-sm); }

.gallery-item-btn {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ink-raised);
}
.gallery-item-btn img {
  width: 100%;
  height: auto;
  transition: transform 500ms var(--ease);
}
.gallery-item-btn:hover img { transform: scale(1.03); }
.gallery-item-btn:focus-visible { outline-offset: 3px; }

/* =========================================================================
   VIDEO — large, native controls
   ========================================================================= */
#video { padding: var(--space-lg) var(--content-pad); }

.video-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 1400px;
  margin-inline: auto;
}
.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 2px;
  overflow: hidden;
}
.video-frame video {
  width: 100%;
  height: 100%;
}

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 9, 8, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3.5rem);
}
.lightbox-img-wrap {
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lightbox.is-open .lightbox-img-wrap { opacity: 1; transform: scale(1); }
.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 88svh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255,255,255,0.08);
  color: var(--accent);
}
.lightbox-close { top: clamp(0.75rem, 3vw, 2rem); right: clamp(0.75rem, 3vw, 2rem); }
.lightbox-prev { left: clamp(0.25rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: clamp(0.25rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg { width: 22px; height: 22px; }
@media (max-width: 620px) {
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
}

body.lightbox-locked { overflow: hidden; }
