/* Dávid Soboň — portfolio. Gallery wall design (chosen 2026-10-14): bright work on warm white, masonry wall, two-line captions. */
img { max-width: 100%; height: auto; display: block; }
.js .fade { opacity: 0; transition: opacity .6s ease; }
.js .fade.in { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js .fade { opacity: 1; transition: none; } }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(20, 18, 16, .94);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font: 300 44px/1 system-ui, sans-serif; padding: 16px; opacity: .75;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

:root {
  --bg: #fbf9f5; --ink: #1d1b19; --muted: #8a847c; --line: #e8e3da;
  --gap: clamp(16px, 2.4vw, 32px); --side: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.top {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--side); background: rgba(251, 249, 245, .92); backdrop-filter: blur(8px);
}
.logo { font: 700 20px/1 "Bricolage Grotesque", sans-serif; letter-spacing: -.01em; }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 15px; }
.nav a { position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); }

.intro {
  padding: clamp(40px, 9vw, 120px) var(--side) clamp(32px, 6vw, 80px);
  font: 600 clamp(28px, 4.4vw, 60px)/1.08 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em;
  max-width: 20ch; box-sizing: content-box; margin: 0;
}

/* Masonry: JS puts each tile into the currently shortest column. */
.wall { display: flex; gap: var(--gap); padding: 0 var(--side); align-items: flex-start; }
.col { flex: 1; display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.tile { display: block; }
.tile .frame { overflow: hidden; border-radius: 6px; background: var(--line); }
.tile img { width: 100%; transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .6s ease; }
.tile:hover img { transform: scale(1.03); }
.tile .t { margin-top: 12px; font-weight: 600; font-size: 16px; }
.tile .c { color: var(--muted); font-size: 14px; }

.about {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 80px);
  padding: clamp(64px, 10vw, 140px) var(--side); align-items: center;
}
.about img { border-radius: 6px; }
.about h2, .contact h2 { font: 600 14px/1 "Inter", sans-serif; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 20px; }
.about p { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; margin: 0; max-width: 34em; }

.contact { padding: 0 var(--side) clamp(48px, 8vw, 100px); border-top: 1px solid var(--line); padding-top: clamp(48px, 8vw, 100px); }
.contact .mail { font: 600 clamp(26px, 5vw, 64px)/1.1 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; border-bottom: 3px solid var(--ink); word-break: break-word; }
.contact .mail:hover { color: #e4572e; border-color: #e4572e; }
.contact .more { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); }
.contact .more a:hover { color: var(--ink); }
.foot { padding: 24px var(--side); color: var(--muted); font-size: 13px; }

/* Project page */
.p-head { padding: clamp(40px, 7vw, 96px) var(--side) clamp(28px, 4vw, 48px); }
.p-head h1 { font: 600 clamp(32px, 5.5vw, 76px)/1.02 "Bricolage Grotesque", sans-serif; letter-spacing: -.025em; margin: 0 0 12px; max-width: 16ch; }
.p-head .c { color: var(--muted); font-size: 17px; }
.p-pics { display: flex; flex-direction: column; gap: var(--gap); padding: 0 var(--side); max-width: 1280px; margin: 0 auto; }
.p-pics img { width: 100%; border-radius: 6px; }
.p-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
  padding: clamp(56px, 8vw, 110px) var(--side); max-width: 1280px; margin: 0 auto;
}
.p-nav a { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
.p-nav a.next { grid-template-columns: 1fr 96px; text-align: right; }
.p-nav img { border-radius: 4px; aspect-ratio: 1; object-fit: cover; width: 96px; }
.p-nav small { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.p-nav b { font: 600 clamp(16px, 2vw, 22px)/1.2 "Bricolage Grotesque", sans-serif; }

@media (max-width: 700px) {
  .about { grid-template-columns: 1fr; }
  .p-nav { grid-template-columns: 1fr; }
  .p-nav a { grid-template-columns: 64px 1fr; }
  .p-nav a.next { grid-template-columns: 1fr 64px; }
  .p-nav img { width: 64px; }
}

/* Without JavaScript the wall is simple CSS columns; site.js turns it into balanced columns. */
.wall:not(.ready) { display: block; columns: 3 280px; column-gap: var(--gap); }
.wall:not(.ready) .tile { break-inside: avoid; margin-bottom: var(--gap); }
.tile { color: inherit; }
.foot a:hover { color: var(--ink); }
