/* =====================================================================
   COLORS & FONTS  —  change these to restyle the whole site at once.
   ===================================================================== */
:root {
  --paper:  #FFFFFF;   /* page background (mosz.com uses pure white) */
  --ink:    #1A1A1A;   /* text */
  --muted:  #8A8782;   /* light text (captions, nav) */
  --accent: #2B50FF;   /* the one bright color, for links/hover */
  --line:   #ECEAE4;   /* hairline borders */
  --gap:    18px;      /* space between artworks */

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --tag:     "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------- header: centered logo + thin nav (the mosz pattern) ---------- */
.site-header { padding: 40px 0 26px; text-align: center; border-bottom: 1px solid var(--line); }
.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  display: inline-block;
}
.site-nav { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.site-nav a {
  font-family: var(--tag);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent); }

/* ---------- intro line on the home page ---------- */
.intro { text-align: center; padding: 46px 0 10px; }
.intro h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 6vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.intro p { max-width: 560px; margin: 16px auto 0; color: var(--muted); font-size: 18px; }

/* =====================================================================
   THE GALLERY — masonry via CSS columns.
   Images keep their NATURAL shape (tall, wide, square) and are never
   cropped. They pack into columns like a wall.
   ===================================================================== */
.gallery { padding: 38px 0 70px; column-gap: var(--gap); columns: 3; }
@media (max-width: 1024px) { .gallery { columns: 2; } }
@media (max-width: 620px)  { .gallery { columns: 1; } }

.piece {
  break-inside: avoid;          /* don't split a piece across columns */
  margin: 0 0 var(--gap);
  display: inline-block;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.piece img {
  width: 100%;
  height: auto;                 /* <-- this is what preserves orientation */
  border-radius: 4px;
  background: var(--line);
  transition: opacity .25s ease, transform .25s ease;
}
.piece:hover img { opacity: .9; transform: translateY(-2px); }

.caption { padding: 9px 2px 4px; }
.caption .t { font-family: var(--display); font-weight: 600; font-size: 15px; }
.caption .m { font-family: var(--tag); font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- text pages (about / contact) ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 64px 28px 90px; }
.page h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.page p { font-size: 18px; margin-bottom: 16px; }
.page a { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 60px;
  text-align: center;
  font-family: var(--tag);
  font-size: 12px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; margin: 0 8px; }
.site-footer a:hover { color: var(--accent); }

/* ---------- lightbox (full-screen viewer) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(20,18,16,.94); }
.lightbox.open { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 4px; }
.lb-cap {
  position: absolute; bottom: 22px; left: 0; right: 0; text-align: center;
  font-family: var(--tag); font-size: 13px; color: #EDEAE3;
}
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #EDEAE3; font-size: 44px;
  cursor: pointer; padding: 10px 18px; opacity: .8;
}
.lb-btn:hover { opacity: 1; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-close { position: absolute; top: 16px; right: 22px; font-size: 30px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .piece img { transition: none; }
}
