/* Layout and motion follow levonbiss.com: name left, nav right, 3-column
   masonry, grey intro band per set, grey footer, 1.5s fade-in on load,
   images fading in as they arrive, and a pale lightbox over the page. */
:root {
  --bg: #fff;
  --ink: #111;
  --mute: #6f6f6f;
  --band: #f4f4f3;
  --accent: #2f6b4f; /* fern green from the forest photos */
  --line: rgba(0, 0, 0, .1);
  --side: 30px;
  --gap: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.6 "Poppins", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }

/* page-load fade, staggered across the header like the reference */
.fade { opacity: 1; transition: opacity 1.5s ease; }
body.loading .fade, body.loading #main, body.loading .foot { opacity: 0; }
#main, .foot { transition: opacity 1.5s ease; }
.nav .fade:nth-child(2) { transition-delay: .03s; }
.nav .fade:nth-child(3) { transition-delay: .06s; }
.nav .fade:nth-child(4) { transition-delay: .09s; }
#main.swap { opacity: 0; transition: none; }

/* header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px var(--side) 30px;
  background: var(--bg);
}
.name { font-size: 19px; font-weight: 400; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.nav > a, .work-btn { padding: 2px 0; border-bottom: 1px solid transparent; }
.nav > a:hover, .work-btn:hover, .nav [aria-current="page"] { border-bottom-color: currentColor; }
.ig { display: flex; margin-left: 6px; border: 0 !important; }
.work { position: relative; }
.work-menu {
  position: absolute; top: 100%; left: -18px; z-index: 30;
  list-style: none; margin: 8px 0 0; padding: 12px 18px;
  min-width: 170px; background: var(--bg); border: 1px solid var(--line);
  display: none;
}
.work:hover .work-menu, .work:focus-within .work-menu, .work-menu.open { display: block; }
.work-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.work-menu a { display: block; padding: 5px 0; white-space: nowrap; }
.work-menu a:hover, .work-menu a[aria-current="page"] { color: var(--accent); }
.burger { display: none; width: 26px; height: 16px; position: relative; }
.burger span { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink); }
.burger span:first-child { top: 3px; }
.burger span:last-child { bottom: 3px; }

.mobile-menu { position: fixed; inset: 70px 0 0; z-index: 25; background: var(--bg); padding: 16px var(--side) 40px; overflow-y: auto; font-size: 22px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { display: block; padding: 8px 0; }
#mm-work a { font-size: 17px; padding: 6px 0 6px 16px; color: var(--mute); }

main { min-height: 70vh; }
.view[hidden] { display: none !important; }

/* masonry: columns filled by JS, shortest column first */
.masonry { display: flex; gap: var(--gap); align-items: flex-start; padding: 0 var(--side) 90px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.tile { display: block; background: #f1f0ee; overflow: hidden; }
.tile img { width: 100%; height: auto; opacity: 0; transition: opacity 1s ease; }
.tile img.in { opacity: 1; }
.tile:hover img.in { opacity: .88; transition-duration: .3s; }

/* set intro band */
.intro { background: var(--band); padding: 26px var(--side) 30px; margin-bottom: 30px; }
.note { color: var(--accent); font-size: 15px; max-width: 900px; margin: 0; }
.meta { color: var(--mute); font-size: 13px; margin: 8px 0 0; }

/* about */
.page { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 440px); justify-content: space-between; gap: 60px; padding: 10px var(--side) 100px; max-width: 1340px; margin: 0 auto; }
.page h1 { color: var(--accent); font-weight: 600; font-size: 44px; line-height: 1.15; margin: 0 0 30px; }
.page-text p { margin: 0 0 1.1em; font-size: 15.5px; }
.page-text a, .foot a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.page-img { margin-top: 84px; background: #f1f0ee; }
.page-img img { width: 100%; height: auto; opacity: 0; transition: opacity 1s ease; }
.page-img img.in { opacity: 1; }

.foot { background: var(--band); padding: 46px var(--side); text-align: center; font-size: 13.5px; }
.foot p { margin: 0; }

/* lightbox: pale overlay over the page, photo fades in, crossfades on step */
.viewer { position: fixed; inset: 0; z-index: 40; background: rgba(255, 255, 255, .86); opacity: 0; transition: opacity .45s ease; }
.viewer.open { opacity: 1; }
.viewer[hidden] { display: none; }
.stage { position: absolute; inset: 40px 80px; }
.stage { pointer-events: none; }
.stage img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; opacity: 0; transition: opacity .7s ease; pointer-events: auto; cursor: pointer; }
.stage img.in { opacity: 1; }
.nav-arrow, .close { position: absolute; color: #333; padding: 14px; }
.nav-arrow { top: 50%; transform: translateY(-50%); }
.nav-arrow svg { width: 12px; height: 24px; display: block; }
.nav-arrow.prev { left: 20px; }
.nav-arrow.next { right: 20px; }
.close { top: 10px; right: 14px; }
.close svg { width: 18px; height: 18px; display: block; }
.nav-arrow:hover, .close:hover { color: #000; }

@media (max-width: 900px) {
  :root { --side: 16px; --gap: 6px; }
  .top { padding: 22px var(--side); position: sticky; top: 0; z-index: 26; }
  .name { font-size: 17px; }
  .nav { display: none; }
  .burger { display: block; }
  .intro { padding: 20px var(--side) 22px; margin-bottom: 16px; }
  .page { grid-template-columns: 1fr; gap: 28px; padding-bottom: 70px; }
  .page h1 { font-size: 34px; margin-bottom: 20px; }
  .page-img { margin-top: 0; }
  .foot { padding: 34px var(--side); }
  .stage { inset: 56px 12px; }
  .viewer { background: rgba(255, 255, 255, .96); }
  .nav-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fade, #main, .foot, .tile img, .page-img img, .viewer, .stage img { transition: none !important; }
}
