/* Portfolio site styles. Colors and fonts live in :root so they are easy to change. */
:root {
  --bg: #0F1522;        /* deep blue-hour navy */
  --raise: #172036;     /* placeholder behind loading photos, cards */
  --line: #253049;      /* hairlines and button borders */
  --ink: #ECE7DE;       /* main text, warm paper white */
  --soft: #A7AFC0;      /* secondary text */
  --faint: #7A85A0;     /* quiet labels */
  --amber: #E9B44C;     /* the one accent: links and focus */
  --amber-ink: #1B1406;

  --display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(16px, 4vw, 56px);
  --gap: 6px;           /* space between photos */
  --max: 1640px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lb-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 60; }
.skip:focus { left: var(--pad); background: var(--amber); color: var(--amber-ink); padding: .5em 1em; font-family: var(--display); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; font-family: var(--display); }
.brand { font-weight: 500; font-size: 1rem; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-page="home"] .nav:not(.scrolled) .brand { visibility: hidden; }
.nav ul { display: flex; align-items: center; gap: clamp(18px, 3vw, 32px); list-style: none; margin: 0; padding: 0; font-size: .9rem; letter-spacing: .01em; }
.nav .link { display: block; color: var(--soft); text-decoration: none; padding: 6px 0; }
.nav .link:hover, .nav .link[aria-current="page"] { color: var(--ink); }

/* ---------- Albums dropdown ---------- */
.nav .has-menu { display: flex; align-items: center; gap: 2px; }
.menu-toggle { display: grid; place-items: center; width: 22px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--soft); cursor: pointer; }
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { color: var(--ink); }
.menu-toggle svg { width: 15px; height: 15px; transition: transform .2s ease; }
.menu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.amenu {
  position: fixed; z-index: 40;
  width: min(320px, calc(100vw - 32px));
  padding: 6px;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgb(0 0 0 / .45);
  display: none;
  left: 0; top: 0;
}
.amenu.open { display: block; animation: amenu-in .15s ease; }
@keyframes amenu-in { from { opacity: 0; translate: 0 -4px; } }
/* Each row is 56px, so seven show before the list scrolls. */
.nav .amenu-list { display: block; gap: 0; font-size: inherit; letter-spacing: 0; list-style: none; margin: 0; padding: 0; max-height: calc(7 * 56px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nav .amenu-list.more { -webkit-mask-image: linear-gradient(#000 calc(100% - 44px), rgb(0 0 0 / .15)); mask-image: linear-gradient(#000 calc(100% - 44px), rgb(0 0 0 / .15)); }
.amenu-list a { display: flex; align-items: center; gap: 12px; height: 56px; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.amenu-list a:hover, .amenu-list a:focus-visible { background: rgb(255 255 255 / .06); outline: none; }
.amenu-list img { flex: none; width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.amenu-list .t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .92rem; letter-spacing: 0; }
.amenu-list .c { flex: none; color: var(--faint); font-size: .8rem; font-variant-numeric: tabular-nums; }
.amenu-all { display: block; margin-top: 6px; padding: 10px 8px 6px; border-top: 1px solid var(--line); color: var(--soft); font-size: .85rem; text-decoration: none; }
.amenu-all:hover, .amenu-all:focus-visible { color: var(--ink); }

/* ---------- Home hero ---------- */
.hero { padding: clamp(40px, 7vw, 112px) 0 clamp(48px, 6vw, 88px); }
.hero-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 6vw, 96px); align-items: end; }
.hero h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.5rem, 5.4vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -.04em;
  margin: 0 0 .4em -.03em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.tagline { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.5; color: var(--soft); margin: 0; max-width: 34ch; }
.bio { max-width: 52ch; color: var(--soft); font-size: 1rem; line-height: 1.75; }
.bio p { margin: 0 0 1em; }
.bio p:last-child { margin-bottom: 0; }
.links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 1.6em 0 0; font-family: var(--display); font-size: .92rem; letter-spacing: .01em; }
.links a { text-decoration: none; border-bottom: 1px solid var(--amber); padding-bottom: 2px; }
.links a:hover { color: var(--amber); }
@media (max-width: 760px) { .hero-body { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .nav ul { gap: 14px; font-size: .9rem; } .nav .wrap { gap: 14px; } }

/* ---------- Sections ---------- */
.sec { padding-bottom: clamp(64px, 9vw, 128px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; font-family: var(--display); }
.sec-head h2 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); font-weight: 500; letter-spacing: -.01em; margin: 0; }
.sec-head .meta { color: var(--faint); font-size: .88rem; }
.sec-head a.meta { color: var(--soft); text-decoration: none; }
.sec-head a.meta:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 4px; }

.btn {
  font-family: var(--display); font-size: .9rem; font-weight: 500; letter-spacing: .01em;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .72em 1.5em; cursor: pointer;
}
.btn:hover { border-color: var(--soft); }
.more { display: block; margin: 32px auto 0; }
.empty { color: var(--faint); padding: 24px 0 8px; margin: 0; }

/* ---------- Justified photo rows ----------
   Each tile is sized by JavaScript from the photo's real width and height,
   so portraits, panoramas and squares all keep their shape. */
.jg { display: flex; flex-wrap: wrap; gap: var(--gap); }
.tile { position: relative; display: block; flex: none; overflow: hidden; background: var(--raise); cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.tile.loaded img { opacity: 1; }
.tile:hover img { filter: brightness(1.07); }
.tile:focus-visible { outline-offset: 2px; z-index: 1; }

/* ---------- Photo strip (home page) ----------
   One row at a fixed height; widths come from each photo's shape.
   Tall enough to enjoy a photo, capped so it never takes over the screen. */
.strip-sec { padding-bottom: clamp(44px, 5.5vw, 80px); }
.strip { position: relative; }
.strip-view { height: min(clamp(130px, 12vw, 200px), 26vh); overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.strip-view:active { cursor: grabbing; }
.strip.static .strip-view { cursor: default; }
.strip-track { display: flex; gap: var(--gap); height: 100%; width: max-content; will-change: transform; }
.strip-item { flex: none; height: 100%; display: block; overflow: hidden; background: var(--raise); cursor: zoom-in; -webkit-touch-callout: none; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.strip-item.loaded img { opacity: 1; }
.strip-item:focus-visible { outline-offset: -2px; }
.strip-btn {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid rgb(255 255 255 / .14); border-radius: 50%;
  background: rgb(15 21 34 / .62); color: var(--ink); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: .8; transition: opacity .2s ease, background-color .2s ease;
}
.strip-btn svg { width: 15px; height: 15px; }
.strip:hover .strip-btn, .strip-btn:focus-visible { opacity: 1; }
.strip-btn:hover { background: rgb(15 21 34 / .85); }
.strip-prev { left: 8px; }
.strip-next { right: 8px; }

/* ---------- Latest: album covers in justified rows ---------- */
.atile { cursor: pointer; }
.atile-cap {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: 1px;
  padding: 40px 14px 12px;
  background: linear-gradient(to top, rgb(8 11 18 / .78), rgb(8 11 18 / 0));
  font-family: var(--display); color: #fff;
}
.atile-cap .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 1rem; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.atile-cap .c { flex: none; font-size: .8rem; color: rgb(255 255 255 / .72); }
@media (max-width: 560px) { .atile-cap { padding: 28px 10px 8px; } .atile-cap .t { font-size: .9rem; } .atile-cap .c { display: none; } }

/* ---------- Album cards ---------- */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: clamp(28px, 3.5vw, 48px) clamp(16px, 2vw, 28px); }
.acard { display: block; text-decoration: none; }
.acard .cv { aspect-ratio: 3 / 2; overflow: hidden; background: var(--raise); }
.acard .cv img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.acard:hover .cv img { transform: scale(1.03); }
.acard h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 14px 0 3px; font-family: var(--display); font-weight: 500; font-size: 1.08rem; letter-spacing: -.01em; line-height: 1.3; }
.acard h3 span { flex: none; font-weight: 400; font-size: .85rem; letter-spacing: 0; color: var(--faint); }
.acard p { margin: 0; color: var(--soft); font-size: .92rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Page headers (albums list, single album) ---------- */
.phead { padding: clamp(24px, 6vw, 88px) 0 clamp(28px, 4.5vw, 60px); }
.phead h1 { font-family: var(--display); font-weight: 300; font-size: clamp(2.3rem, 5vw, 4.25rem); line-height: 1.02; letter-spacing: -.04em; margin: 0 0 .4em -.03em; overflow-wrap: anywhere; text-wrap: balance; }
.phead .desc { max-width: 60ch; color: var(--soft); font-size: 1.02rem; margin: 0; white-space: pre-line; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 18px; font-family: var(--display); font-size: .88rem; color: var(--faint); }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; font-family: var(--display); font-size: .88rem; color: var(--soft); text-decoration: none; }
.back:hover { color: var(--ink); }
.back svg { width: 18px; height: 18px; }

/* ---------- Footer / contact ---------- */
.foot { border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 104px) 0 32px; }
.foot h2 { font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 2.75rem); font-weight: 300; letter-spacing: -.035em; line-height: 1.1; margin: 0 0 .45em; }
.foot .note { color: var(--soft); max-width: 52ch; margin: 0 0 24px; font-size: 1rem; }
.foot .email { font-family: var(--display); font-weight: 400; font-size: clamp(1.1rem, 2vw, 1.4rem); text-decoration: none; border-bottom: 1px solid var(--amber); overflow-wrap: anywhere; }
.foot .email:hover { color: var(--amber); }
.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: clamp(48px, 6vw, 80px); font-family: var(--display); font-size: .85rem; color: var(--faint); }
.foot .row-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot .row a { color: var(--soft); text-decoration: none; }
.foot .row a:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(7 10 17 / .97); color: var(--ink);
}
.lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lb::backdrop { background: rgb(7 10 17 / .6); }
.lb-stage { position: relative; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 60px clamp(8px, 7vw, 104px) 8px; touch-action: pan-y; }
.lb-img { flex: none; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-select: none; }
.lb-info { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 40px; padding: 14px var(--pad) 22px; }
.lb-text { min-width: 0; max-width: 72ch; }
.lb-title { font-family: var(--display); font-size: 1rem; font-weight: 500; letter-spacing: -.01em; margin: 0; }
.lb-cap { color: var(--soft); margin: 2px 0 0; font-size: .95rem; }
.lb-title:empty, .lb-cap:empty { display: none; }
.lb-side { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; font-family: var(--display); font-size: .84rem; color: var(--faint); }
.lb-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.lb-meta a { color: var(--soft); text-decoration-color: var(--amber); text-underline-offset: 3px; }
.lb-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-buy { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--amber); padding-bottom: 1px; white-space: nowrap; }
.lb-buy:hover { color: var(--amber); }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--soft); cursor: pointer; }
.lb-btn:hover { color: var(--ink); background: rgb(255 255 255 / .07); }
.lb-btn svg { width: 26px; height: 26px; }
.lb-close { top: 8px; right: 8px; }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { display: none; } /* swipe instead */
  .lb-stage { padding-left: 0; padding-right: 0; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
