:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --line: rgb(255 255 255 / 0.09);
  --fg: #f2f0eb;
  --muted: #9b978f;
  --accent: #d8b67e;
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1520px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gap: 8px;
  --row: 300px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #333 var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 300 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* A faint film grain over everything keeps large dark areas from looking flat. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: #111; }

a { color: inherit; }

img { max-width: 100%; }

h1, h2, h3 { font-weight: 400; }

em { font-style: italic; color: var(--accent); }

.eyebrow {
  margin: 0;
  color: var(--muted);
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Fade photos in over their blurred placeholder once decoded. */
/* (The viewer's image is excluded: gallery.js handles its fade itself.) */
.js :not(.stage) > picture img:not(.loaded) { opacity: 0; }
picture img { transition: opacity 0.6s ease, transform 1.2s var(--ease); }

/* Scroll reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease) var(--delay, 0ms), transform 0.9s var(--ease) var(--delay, 0ms);
}
.js [data-reveal].revealed { opacity: 1; transform: none; }

/* Hero text rises in on page load. */
.hero-in {
  animation: rise 1.1s var(--ease) both;
  animation-delay: calc(0.25s + var(--d, 0) * 0.12s);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
}

/* Smooth cross-page navigation; album covers morph into the album header. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.6s; animation-timing-function: var(--ease); }

/* Top bar */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, height 0.4s var(--ease);
}

.nav.scrolled {
  height: 60px;
  background: rgb(10 10 11 / 0.72);
  border-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  font: 400 24px/1 var(--serif);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-links { display: flex; gap: clamp(16px, 3vw, 36px); }

.nav-links a, .footer-links a {
  position: relative;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgb(242 240 235 / 0.8);
  transition: color 0.3s;
}

.nav-links a::after, .footer-links a::after {
  content: "";
  position: absolute;
  inset: auto 0 -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav-links a:hover, .footer-links a:hover { color: var(--fg); }
.nav-links a:hover::after, .footer-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Home hero: type over a slowly drifting aurora of warm colour, no photo. */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse 120% 80% at 50% 110%, #19150f, var(--bg) 65%);
}

.aurora {
  position: absolute;
  inset: -10%;
  z-index: -2;
  filter: blur(70px) saturate(120%);
  will-change: transform;
}

.blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.b1 {
  left: -8%;
  top: 8%;
  width: 58vmax;
  height: 58vmax;
  background: radial-gradient(circle, rgb(216 170 100 / 0.5), transparent 62%);
  animation: drift-a 24s ease-in-out infinite alternate;
}

.b2 {
  right: -10%;
  top: -18%;
  width: 52vmax;
  height: 52vmax;
  background: radial-gradient(circle, rgb(64 112 92 / 0.55), transparent 62%);
  animation: drift-b 28s ease-in-out infinite alternate;
}

.b3 {
  left: 28%;
  bottom: -38%;
  width: 56vmax;
  height: 56vmax;
  background: radial-gradient(circle, rgb(150 72 44 / 0.42), transparent 62%);
  animation: drift-c 32s ease-in-out infinite alternate;
}

@keyframes drift-a { to { transform: translate(18vw, 12vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-16vw, 18vh) scale(0.9); } }
@keyframes drift-c { to { transform: translate(-10vw, -16vh) scale(1.1); } }

/* A soft light that trails the mouse across the hero. */
.spotlight {
  position: absolute;
  left: 0;
  top: 0;
  width: 44vmax;
  height: 44vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(242 230 205 / 0.16), transparent 60%);
  transform: translate(calc(var(--mx, 50vw) - 22vmax), calc(var(--my, 40vh) - 22vmax));
  transition: transform 1.2s var(--ease);
}

/* Faint column rules give the hero an editorial grid. */
.hero-lines {
  position: absolute;
  inset: 0 var(--pad);
  z-index: -1;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  border-right: 1px solid var(--line);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}

.hero-content {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--pad) 0;
}

.hero .hero-title {
  margin: 22px 0 30px;
  font-size: clamp(64px, 14.5vw, 240px);
  line-height: 0.86;
  letter-spacing: -0.03em;
  text-shadow: none;
}

.word { display: inline-block; white-space: nowrap; }
.word.last { font-style: italic; color: var(--accent); padding-right: 0.06em; }

/* The name's letters rise into place one after another. */
.char {
  display: inline-block;
  animation: char-rise 1.2s var(--ease) both;
  animation-delay: calc(0.3s + var(--i) * 45ms);
}

@keyframes char-rise {
  from { opacity: 0; transform: translateY(0.45em) rotate(6deg); filter: blur(10px); }
}

.hero-intro {
  max-width: 30em;
  margin: 0;
  color: rgb(242 240 235 / 0.75);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(216 182 126 / 0.6); }
  70%, 100% { box-shadow: 0 0 0 12px rgb(216 182 126 / 0); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(0 0 0 / 0.55), transparent 22%),
    linear-gradient(to top, rgb(0 0 0 / 0.75), rgb(0 0 0 / 0.15) 45%, transparent 70%),
    linear-gradient(to right, rgb(0 0 0 / 0.45), transparent 60%);
}

.album-hero .eyebrow { color: rgb(242 240 235 / 0.85); text-shadow: 0 1px 12px rgb(0 0 0 / 0.5); }

.hero-title {
  text-shadow: 0 2px 40px rgb(0 0 0 / 0.25);
  margin: 12px 0 28px;
  font: 400 clamp(56px, 11vw, 176px)/0.92 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgb(255 255 255 / 0.06);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.button:hover { background: var(--fg); color: #111; border-color: var(--fg); }

.button.solid { background: var(--fg); color: #111; border-color: var(--fg); }
.button.solid:hover { background: var(--accent); border-color: var(--accent); }

.hero-footer {
  position: absolute;
  inset: auto var(--pad) 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.scroll-cue {
  position: relative;
  display: block;
  width: 1px;
  height: 56px;
  background: rgb(255 255 255 / 0.2);
  overflow: hidden;
}

.scroll-cue span {
  position: absolute;
  inset: 0;
  background: var(--fg);
  animation: cue 2.2s var(--ease) infinite;
}

@keyframes cue {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--pad) 0;
  scroll-margin-top: 40px;
}

.section-head { margin-bottom: clamp(32px, 5vw, 64px); }

.section-head h2, .about h2 {
  margin: 14px 0 0;
  font: 400 clamp(40px, 6vw, 84px)/1 var(--serif);
  letter-spacing: -0.015em;
}

/* Selected work: an editorial grid with alternating wide and narrow images. */
.features {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.feature {
  position: relative;
  grid-column: span var(--span, 4);
  height: clamp(280px, 36vw, 600px);
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface) center / cover no-repeat;
  text-decoration: none;
}

.feature img, .album-cover img, .next-album img, .album-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.65), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s;
}

.feature-caption {
  position: absolute;
  inset: auto 24px 20px;
  z-index: 1;
  display: grid;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.feature-title { font: 400 28px/1.15 var(--serif); }
.feature-album { color: rgb(242 240 235 / 0.7); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }

@media (hover: hover) {
  .feature:hover img { transform: scale(1.05); }
  .feature:hover::after, .feature:focus-visible::after { opacity: 1; }
  .feature:hover .feature-caption, .feature:focus-visible .feature-caption { opacity: 1; transform: none; }
}

@media (hover: none) {
  .feature::after { opacity: 1; }
  .feature-caption { opacity: 1; transform: none; }
}

/* Album cards */
.albums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 4vw, 56px) 24px;
}

.album {
  display: block;
  text-decoration: none;
}

/* One album fills the width as a feature banner instead of a lone small card. */
.album:only-child { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; }

.album-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface) center / cover no-repeat;
}

.album-info {
  display: grid;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.album:only-child .album-info { margin: 0; }

.album-number { color: var(--accent); font: italic 400 20px/1 var(--serif); }

.album h3 {
  margin: 4px 0 0;
  font: 400 clamp(36px, 4vw, 56px)/1.05 var(--serif);
}

.album p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.album-cta {
  display: inline-flex;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.album-cta span { transition: transform 0.4s var(--ease); }

@media (hover: hover) {
  .album:hover img { transform: scale(1.04); }
  .album:hover .album-cta span { transform: translateX(6px); }
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 120px);
  align-items: end;
}

.about-text p:not(.eyebrow) {
  max-width: 36em;
  margin: 24px 0 0;
  color: rgb(242 240 235 / 0.78);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.65;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px 24px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.stat { display: grid; gap: 6px; }

.stat-value {
  white-space: nowrap;
  font: 400 clamp(56px, 6vw, 88px)/1 var(--serif);
  font-variant-numeric: tabular-nums;
}

.stat-unit { margin-left: 0.12em; font-size: 0.4em; color: var(--muted); }

.stat-label { color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }

/* Album page header */
.album-hero {
  position: relative;
  height: 82svh;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

.album-hero-media {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  will-change: transform;
}

.album-hero-content {
  position: absolute;
  inset: auto var(--pad) clamp(40px, 7vh, 80px);
}

.album-hero .hero-title { margin: 14px 0 0; font-size: clamp(56px, 10vw, 150px); }

.back {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgb(242 240 235 / 0.8);
}

.back:hover { color: var(--fg); }

.lede {
  max-width: 34em;
  margin: 18px 0 0;
  color: rgb(242 240 235 / 0.85);
  font: italic 400 clamp(20px, 2vw, 26px)/1.35 var(--serif);
}

.album-hero .eyebrow { margin-top: 22px; }

.album-main { padding: var(--gap) var(--gap) 0; }

/* Justified rows: each tile grows in proportion to its aspect ratio, so every
   tile in a row ends up the same height and the row fills the full width. */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.grid::after {
  content: "";
  flex-grow: 1e6;
}

.tile {
  position: relative;
  flex: calc(var(--ratio) * 100) 1 calc(var(--ratio) * var(--row));
  min-width: 0;
  aspect-ratio: var(--ratio);
  overflow: hidden;
  background: var(--surface) center / cover no-repeat;
  border-radius: 3px;
  outline-offset: 3px;
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
}

.tile-caption {
  position: absolute;
  inset: auto 16px 12px;
  z-index: 1;
  font: 400 20px/1.2 var(--serif);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}

@media (hover: hover) {
  .tile:hover img { transform: scale(1.04); }
  .tile:hover::after, .tile:focus-visible::after { opacity: 1; }
  .tile:hover .tile-caption, .tile:focus-visible .tile-caption { opacity: 1; transform: none; }
}

/* Next album banner */
.next-album {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  height: 56vh;
  margin-top: clamp(64px, 10vw, 140px);
  overflow: hidden;
  background: center / cover no-repeat;
  text-decoration: none;
  text-align: center;
}

.next-album picture { position: absolute; inset: 0; }
.next-album picture::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / 0.5); }
.next-label, .next-title { position: relative; }
.next-label { color: rgb(242 240 235 / 0.75); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; }
.next-title { font: 400 clamp(44px, 7vw, 110px)/1 var(--serif); }

@media (hover: hover) {
  .next-album:hover img { transform: scale(1.05); }
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: clamp(80px, 12vw, 160px) auto 0;
  padding: 48px var(--pad) 40px;
  border-top: 1px solid var(--line);
}

.next-album + .site-footer { margin-top: 0; border-top: 0; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.footer-brand {
  font: 400 clamp(32px, 4vw, 48px)/1 var(--serif);
  text-decoration: none;
}

.footer-tagline { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding-top: 10px;
}

.copyright { margin: 48px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 1100px) { :root { --row: 240px; } }

@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
  .feature { grid-column: auto; height: auto; aspect-ratio: 4 / 3; }
  .album:only-child, .about { grid-template-columns: 1fr; }
  .album:only-child .album-info { margin-top: 0; }
  .hero-footer .scroll-cue, .hero-footer .eyebrow:last-child { display: none; }
}

@media (max-width: 640px) {
  :root { --gap: 4px; }
  .tile { flex-basis: 100%; }
  .tile::after, .tile-caption { opacity: 1; transform: none; }
  .nav-links { gap: 14px; }
  .nav-links a { letter-spacing: 0.1em; font-size: 11px; }
  .brand { font-size: 20px; }
}

@media (max-width: 400px) {
  .nav-links a[href$="#work"] { display: none; }
}

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: var(--fg);
  overflow: hidden;
  outline: none;
}

.lightbox::backdrop { background: #000; }

.lightbox[open] { animation: fade 0.25s ease-out; }

@keyframes fade { from { opacity: 0; } }

.stage {
  position: absolute;
  inset: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.25s;
}

.stage img.pending { opacity: 0; }

.lightbox.zoomed .stage {
  display: block;
  overflow: auto;
  cursor: grab;
  touch-action: auto;
  overscroll-behavior: contain;
}

.lightbox.zoomed .stage.dragging { cursor: grabbing; }

.lightbox.zoomed .stage img {
  max-width: none;
  max-height: none;
  cursor: inherit;
}

.bar {
  position: absolute;
  inset: auto 0 0;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 24px;
}

.info { flex: 1; min-width: 0; }

.info .title {
  margin: 0;
  font: 400 22px/1.2 var(--serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info .meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.counter {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
}

.btn, .nav-arrow {
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: inherit;
  background: none;
  cursor: pointer;
  border-radius: 999px;
}

.btn { width: 44px; height: 44px; }

.btn:hover, .btn:focus-visible { background: rgb(255 255 255 / 0.1); }

.lightbox.zoomed .zoom { background: rgb(255 255 255 / 0.18); }
.lightbox.zoomed .zoom-plus { display: none; }

.lightbox svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-arrow {
  position: absolute;
  top: calc(50% - 36px);
  width: 52px;
  height: 52px;
  translate: 0 -50%;
  background: rgb(0 0 0 / 0.35);
  opacity: 0.75;
}

.nav-arrow svg { width: 28px; height: 28px; }
.nav-arrow:hover, .nav-arrow:focus-visible { opacity: 1; background: rgb(0 0 0 / 0.6); }
.lightbox .prev { left: 12px; }
.lightbox .next { right: 12px; }
.lightbox.zoomed .nav-arrow { display: none; }

/* Controls fade out after a few seconds without input, leaving just the photo. */
.bar, .nav-arrow { transition: opacity 0.4s, background 0.2s; }
.lightbox.idle .bar,
.lightbox.idle .nav-arrow { opacity: 0; pointer-events: none; }
.lightbox.idle .stage, .lightbox.idle .stage img { cursor: none; }

@media (max-width: 640px) {
  .nav-arrow { display: none; }
  .bar { padding-left: 16px; }
  .counter { display: none; }
}

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