/* nikoJart website — gallery style: quiet ground, the work first. */
:root {
  --bg: #f6f4f0;
  --ink: #1d1c1a;
  --muted: #6d6a64;
  --line: #dcd8d0;
  --accent: #9b2b1f;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (max-width: 640px) { html { scroll-padding-top: 16px; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--ink); color: var(--bg); padding: 6px 12px; z-index: 10; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 18px var(--gutter);
  background: rgba(246, 244, 240, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: 500 28px/1 var(--serif);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.wordmark span { color: var(--accent); }
.site-header ul { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0; padding: 0; list-style: none; }
.site-header nav a {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--muted);
}
.site-header nav a:hover { color: var(--ink); }

/* Intro */
.intro { padding: clamp(56px, 10vw, 128px) var(--gutter) clamp(32px, 6vw, 72px); max-width: 1100px; }
.intro h1 { font: 400 clamp(44px, 7vw, 88px)/1.02 var(--serif); margin: 0 0 18px; letter-spacing: -0.01em; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; margin: 0; }

/* Works */
.works { padding: 0 var(--gutter) clamp(56px, 8vw, 104px); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 36px;
}
.section-head h2, .text h2 { font: 400 clamp(30px, 3.4vw, 42px)/1.1 var(--serif); margin: 0; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

.grid { columns: 3 300px; column-gap: clamp(24px, 3vw, 44px); }
.work { break-inside: avoid; margin: 0 0 clamp(32px, 4vw, 52px); }
.work-link { display: block; cursor: zoom-in; }
.work img { width: auto; max-width: 100%; max-height: 720px; background: #e9e6df; transition: opacity .2s; }
.work-link:hover img { opacity: .9; }
.work figcaption, .lightbox figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.45; }
.title { font: italic 400 19px/1.3 var(--serif); display: block; }
.meta { color: var(--muted); }

/* Text sections */
.text { padding: 0 var(--gutter) clamp(56px, 8vw, 104px); }
.text h2 { border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 28px; }
.text p { max-width: 38em; }
#statement p:not(.series) { font: 400 clamp(19px, 1.8vw, 23px)/1.55 var(--serif); }
.series { color: var(--muted); font-size: 14px; }
.about-body { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 38em); gap: clamp(24px, 4vw, 56px); align-items: start; }
.about-body img { width: 100%; filter: grayscale(0.1); }
.about-body p:first-child { margin-top: 0; }
.email { font: 400 clamp(24px, 3vw, 34px)/1.2 var(--serif); margin: 28px 0; }
.social { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 0; list-style: none; font-size: 14px; }

.site-footer { padding: 28px var(--gutter) 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer p { margin: 0; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(20, 19, 18, 0.96); color: #f1eee8;
}
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox::backdrop { background: rgba(20, 19, 18, 0.96); }
.lightbox figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; padding: 48px 0 32px; }
.lightbox img { max-height: calc(100vh - 150px); max-width: 100%; width: auto; object-fit: contain; }
.lightbox .meta { color: #b9b4ab; }
.lightbox figcaption { text-align: center; }
.lightbox button {
  background: none; border: 0; color: #f1eee8; font: 300 44px/1 var(--sans); cursor: pointer; padding: 12px; height: 100%;
}
.lightbox button:hover { color: #fff; }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 8px; right: 12px; height: auto !important; font-size: 36px !important; }

@media (max-width: 640px) {
  .site-header { position: static; padding-top: 14px; padding-bottom: 12px; }
  .site-header ul { gap: 4px 16px; }
  .about-body { grid-template-columns: 1fr; }
  .about-body img { max-width: 180px; }
  .lightbox[open] { grid-template-columns: 40px 1fr 40px; }
  .lightbox button { font-size: 34px; padding: 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
