/* Revision C: mosaic. Black and white, dense photo wall, huge type, italic serif accents.
   Mood inspired by a black-and-white editorial fashion site; layout and content are original. */
:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #111;
  --ink: #f2f2f0;
  --muted: #a3a3a0;
  --line: #2b2b2b;
  --line-strong: #3a3a3a;
  --ink-soft: #3a3a3a;   /* secondary text on an --ink coloured panel */
  --pulse: rgba(242,242,240,0.5);
  --ok: #7ee2b0;
  --bad: #ff8a80;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

/* Light mode: swap the pair. Everything that uses --bg and --ink inverts together. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ef;
  --panel: #fff;
  --ink: #111;
  --muted: #55554f;
  --line: #d3d2cb;
  --line-strong: #bdbcb4;
  --ink-soft: #cfcfca;
  --pulse: rgba(17,17,17,0.35);
  --ok: #0a7a45;
  --bad: #b3261e;
}
/* The photo viewer and the printed polaroid are always dark and white, like a lightbox and a real print. */
.lightbox, .print {
  --bg: #080808; --ink: #f2f2f0; --muted: #a3a3a0; --ink-soft: #444;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a { color: inherit; }
.defs { position: absolute; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 50; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

.bar { position: sticky; top: 0; z-index: 20; background: var(--bg); display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.mark { font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.1rem; }
nav { display: flex; gap: 22px; }
nav a { text-decoration: none; color: var(--muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; }
nav a:hover, nav a:focus-visible { color: var(--ink); }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.splash { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; padding: 72px 0 56px; }
h1 { margin: 0; font-weight: 900; font-size: clamp(4rem, 16vw, 11.5rem); line-height: 0.84; letter-spacing: -0.05em; filter: url(#rough); }
.splash-text p { margin: 0 0 12px; color: var(--muted); }
.splash-text .serif { color: var(--ink); font-size: 1.6rem; line-height: 1.2; }
.tag { display: inline-block; background: var(--ink); color: var(--bg) !important; font-size: 0.78rem; font-weight: 700; padding: 5px 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.hint-line { color: var(--ink) !important; font-weight: 700; }
/* The mantra: a big italic panel closing out the hero. */
.mantra { margin: 0 0 40px; background: var(--ink); color: var(--bg); padding: 18px 28px 26px;
  font: italic 400 clamp(2.2rem, 6.4vw, 6rem)/1.02 var(--serif); letter-spacing: -0.02em; }

.block { border-top: 1px solid var(--line); padding: 48px 0 24px; scroll-margin-top: 64px; }
/* Section titles sit in rough white panels, like cut-out headlines. */
h2 { margin: 0 0 24px; background: var(--ink); color: var(--bg); padding: 16px 22px 12px; font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 4.6rem); line-height: 0.95; letter-spacing: -0.045em; filter: url(#rough); }
h2 .serif { font-size: 0.5em; letter-spacing: 0; color: var(--ink-soft); margin-left: 10px; }
h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.view-all { margin: 0 0 12px; background: var(--ink); color: var(--bg); padding: 10px 22px 14px;
  font: italic 400 clamp(1.6rem, 4.5vw, 2.8rem)/1.1 var(--serif); }
/* About: a big lead statement on the left, the story on the right. */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about .lead { margin: 0; color: var(--ink); font-size: clamp(1.5rem, 2.6vw, 2.6rem); line-height: 1.16; font-weight: 800; letter-spacing: -0.03em; }
.about-body p { margin: 0 0 16px; font-size: clamp(1.05rem, 1.2vw, 1.25rem); line-height: 1.6; }
.about-body p:last-child { margin-bottom: 0; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stack p { margin: 0 0 14px; }
.learning { margin: 18px 0 0; max-width: 70ch; }
.learning .serif { color: var(--ink); font-size: 1.3rem; margin-right: 6px; }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.panel { background: var(--ink); color: var(--bg); padding: 22px 24px; }
.panel h3 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1; margin-bottom: 14px; }
ul { padding-left: 1.1em; margin: 0; }
li { margin-bottom: 6px; }
.project { border: 1px solid var(--line-strong); background: var(--panel); padding: 20px 22px; }
.project h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.project p:last-child { margin: 0; }
.project:last-child:nth-child(odd) { grid-column: 1 / -1; }
.meta { color: var(--muted); font-size: 0.86rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.note { color: var(--muted); font-size: 0.92rem; }

/* Photo wall: justified rows. Each photo keeps its real shape, and every row fills the width. */
.grid { margin-top: 20px; }
.layout-rows { display: flex; flex-wrap: wrap; gap: 8px; }
.layout-rows::after { content: ""; flex-grow: 100000; }
.layout-rows .tile { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * 260px); aspect-ratio: var(--ar); min-width: 0; }
.tile { position: relative; overflow: hidden; margin: 0; background: #1a1a1a; border: 2px solid var(--ink); }
.tile-btn { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0;
  background: none; color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.tile-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(0.25) contrast(1.05); transition: filter 0.25s; }
.tile-btn:hover img, .tile-btn:focus-visible img { filter: none; }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(34, 34, 34, 0.92); color: #eee;
  font-size: 0.78rem; font-weight: 600; padding: 7px 10px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,0.6); font-family: var(--serif); font-style: italic; filter: grayscale(0.75); }

footer { max-width: 1180px; margin: 96px auto 0; padding: 0 24px 110px; color: var(--muted); font-size: 0.9rem; }
footer p { margin: 0; }
.foot-tag { color: var(--ink); font-size: clamp(1.3rem, 3.5vw, 2rem); margin-bottom: 4px !important; }
.foot-mark { color: var(--ink); font-weight: 900; font-size: clamp(3.4rem, 17vw, 12.5rem); line-height: 1; letter-spacing: -0.06em;
  filter: url(#rough); margin-bottom: 20px !important; padding-bottom: 0.06em; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; }

/* ---- Film ---- */
.reels { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 24px; margin-top: 20px; }
.reel { margin: 0; border: 2px solid var(--ink); background: #000; }
.reel video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.reel figcaption { background: var(--ink); color: var(--bg); padding: 8px 12px; font-size: 0.86rem; font-weight: 700; }

/* ---- Photo viewer ---- */
body.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(4, 4, 4, 0.97); display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; color: var(--muted);
  font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase; }
.lb-close { background: var(--ink); color: var(--bg); border: 0; padding: 8px 16px; font: 700 0.86rem var(--sans); letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer; }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.lb-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding: 0 20px 20px; }
.lb-stage { position: relative; min-height: 0; display: grid; place-items: center; }
.lb-stage img { display: block; max-width: 100%; max-height: calc(100vh - 100px); width: auto; height: auto; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--ink); background: rgba(8, 8, 8, 0.72); color: var(--ink); font-size: 1.9rem; line-height: 1; cursor: pointer; }
.lb-prev { left: 6px; }
.lb-next { right: 6px; }
.lb-info { align-self: end; background: var(--ink); color: var(--bg); padding: 22px 24px 24px; }
.lb-info h3 { margin: 0 0 6px; font: 900 1.6rem/1.08 var(--sans); letter-spacing: -0.03em; }
.lb-info .meta { color: var(--ink-soft); margin: 0; }
.lb-credit { margin: 6px 0 0; font-weight: 700; font-size: 0.95rem; }
.lb-desc { margin: 14px 0 16px; font-size: 1rem; line-height: 1.5; }
.lb-specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; padding-top: 14px; border-top: 1px solid #bbb; }
.lb-specs dt { color: var(--ink-soft); font-size: 0.8rem; letter-spacing: 0.07em; text-transform: uppercase; align-self: center; }
.lb-specs dd { margin: 0; font-weight: 700; font-size: 1.05rem; }

/* ---- Shutter ---- */
.shutter { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 66px; height: 66px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--bg); cursor: pointer; padding: 0; display: grid; place-items: center; animation: pulse 2.4s ease-out infinite; }
.shutter:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.shutter:active { transform: scale(0.94); }
.lens { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #777 0, #222 45%, #000 100%); border: 3px solid var(--ink); }
.tip { position: absolute; right: 80px; bottom: 20px; white-space: nowrap; background: var(--ink); color: var(--bg); font-size: 0.8rem; font-weight: 700; padding: 6px 10px; }
.tip kbd { font: inherit; border: 1px solid var(--bg); padding: 0 5px; margin-left: 4px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--pulse); } 70% { box-shadow: 0 0 0 16px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 60; }
.flash.go { animation: flash 0.28s ease-out; }
@keyframes flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }

.print { position: fixed; right: 20px; bottom: 102px; z-index: 45; width: min(290px, calc(100vw - 40px)); background: var(--ink); color: var(--bg);
  padding: 10px 10px 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.7); transform: rotate(-1.5deg); }
.print[hidden] { display: none; }
.print .frame { aspect-ratio: 1 / 1; background: #000; overflow: hidden; }
.print .frame img, .print .frame .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.print.developing .frame > * { animation: develop 3.2s ease-out forwards; }
@keyframes develop { 0% { filter: brightness(0) contrast(2); opacity: 0.2; } 60% { filter: brightness(0.6) grayscale(1); opacity: 0.8; } 100% { filter: none; opacity: 1; } }
.print .cap { margin: 10px 4px 2px; font-family: var(--serif); font-style: italic; font-size: 1.2rem; }
.print .sub { margin: 0 4px 2px; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.3; }
.print .roll { margin: 4px 4px 0; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #555; }
.close { position: absolute; top: -14px; right: -14px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--bg); background: var(--ink); color: var(--bg); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.close:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .shutter { animation: none; }
  .flash.go { animation: none; }
  .print.developing .frame > * { animation: none; }
}

@media (max-width: 760px) {
  .bar { padding: 12px 16px; flex-wrap: wrap; row-gap: 6px; }
  nav { gap: 12px; }
  nav a { font-size: 0.74rem; letter-spacing: 0.04em; }
  main { padding: 0 16px; }
  .splash { grid-template-columns: 1fr; gap: 24px; padding: 48px 0 32px; }
  .cols, .projects { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  footer { padding: 0 16px 100px; }
  h2 { padding: 12px 16px 9px; }
  .panel { padding: 18px 18px; }
  .layout-rows { gap: 6px; }
  .reels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .layout-rows .tile { flex-basis: calc(var(--ar) * 150px); }
  .lb-top { padding: 10px 16px; }
  /* The photo and its details stack and scroll together, so a tall photo never covers the text. */
  .lb-body { grid-template-columns: 1fr; grid-template-rows: max-content max-content; align-content: start; gap: 12px; padding: 0 12px 20px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .lb-stage img { max-height: 55vh; max-height: 55dvh; }
  .lb-info { align-self: stretch; padding: 16px 18px 18px; }
  .lb-info h3 { font-size: 1.25rem; }
  .lb-nav { width: 44px; height: 44px; }
  .tip { display: none; }
  .shutter { right: 16px; bottom: 16px; }
  .print { right: 16px; bottom: 94px; width: 230px; }
}

/* Wide screens: a little more room and slightly larger text. */
@media (min-width: 1500px) {
  body { font-size: 19px; }
  main, footer { max-width: 1320px; }
}

/* Contact dialog */
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.linkbtn:hover, .linkbtn:focus-visible { color: var(--ink); }
.reveal { background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 0; width: min(92vw, 640px); }
.reveal::backdrop { background: rgba(0, 0, 0, 0.78); }
.rv-top { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.rv-top form { margin: 0; }
.rv-bar { flex: 1; height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; }
.rv-bar span { display: block; height: 100%; width: 33.3%; background: var(--ink); border-radius: 8px; transition: width .35s ease; }
.rv-step { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.rv-pane { padding: 28px 24px 4px; }
.rv-pane[hidden], .reveal-form[hidden] { display: none; }
.reveal h3 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.1; letter-spacing: -0.03em; }
.reveal-help { color: var(--muted); margin: 0 0 22px; }
.reveal-form { display: grid; gap: 10px; }
.reveal-form label { font-size: 0.85rem; font-weight: 600; }
.reveal-form input[type="email"], .reveal-form input[type="text"], .reveal-form textarea { background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font: 1.1rem var(--sans); width: 100%; resize: vertical; }
.reveal-form input:focus-visible, .reveal-form textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.rv-code { display: flex; gap: 10px; margin-bottom: 8px; }
.rv-code input { width: 100%; max-width: 64px; aspect-ratio: 1 / 1.1; text-align: center; font: 700 1.8rem var(--sans); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-bottom-width: 4px; border-radius: 12px; padding: 0; }
.rv-code input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.btn { background: var(--ink); color: var(--bg); border: 0; border-radius: 12px; padding: 15px 20px; margin-top: 8px; font: 700 1rem var(--sans); cursor: pointer; }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn[disabled] { opacity: .5; cursor: wait; }
.rv-verified { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 18px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.9rem; word-break: break-all; }
.rv-verified span:first-child { color: var(--ok); font-weight: 800; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.reveal-out { margin: 4px 0 18px; font-size: 1.4rem; font-weight: 800; word-break: break-all; }
.reveal-msg { min-height: 1.4em; margin: 6px 24px 20px; color: var(--muted); font-size: 0.9rem; }
.reveal-msg.bad { color: var(--bad); }
@media (max-width: 760px) { .rv-code { gap: 6px; } .rv-pane { padding: 22px 16px 4px; } .rv-top { padding: 14px 16px; } .reveal-msg { margin: 6px 16px 18px; } }
.linkbtn[disabled] { opacity: .5; cursor: default; text-decoration: none; }

/* Theme switch in the header */
.theme-btn { background: none; border: 1px solid var(--line-strong); color: var(--muted); width: 40px; height: 40px; padding: 0;
  display: inline-grid; place-items: center; border-radius: 50%; cursor: pointer; }
.theme-btn .i-moon, :root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
.theme-btn:hover, .theme-btn:focus-visible { color: var(--ink); border-color: var(--ink); }
.theme-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.bar-right { display: flex; align-items: center; gap: 22px; }
@media (max-width: 760px) {
  /* Phone header: name and theme switch on the first row, links underneath. */
  .bar-right { display: contents; }
  .mark { order: 1; }
  .theme-btn { order: 2; margin-left: auto; }
  nav { order: 3; width: 100%; }
}
.rv-top { justify-content: space-between; }
.rv-top h3 { margin: 0; }

/* Booking: hero buttons, header button, covered strip, Work with me */
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 18px 0 14px !important; }
.cta { background: var(--ink); color: var(--bg); border: 2px solid var(--ink); padding: 15px 26px; font: 800 1.05rem var(--sans); letter-spacing: -0.01em; cursor: pointer; }
.cta:hover { background: var(--bg); color: var(--ink); }
.cta:focus-visible, .cta-ghost:focus-visible, .nav-cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cta-ghost { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.nav-cta { background: var(--ink); color: var(--bg); border: 0; padding: 10px 18px; font: 800 0.85rem var(--sans); letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.covered { padding: 8px 0 40px; }
.covered-h { margin: 0 0 12px; color: var(--ink); font-size: 1.5rem; }
.covered ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.covered li { border: 1px solid var(--line-strong); padding: 8px 14px; margin: 0; font-size: 0.95rem; }
.work-note { max-width: 62ch; margin: 22px 0 0; font-size: 1.1rem; }
.panel ol { padding-left: 1.2em; margin: 0; }
.panel p { margin: 0; }
@media (max-width: 760px) {
  .nav-cta { order: 2; margin-left: auto; padding: 9px 14px; }
  .theme-btn { margin-left: 0; }
  .cta { width: 100%; }
}
nav { flex-wrap: wrap; }
nav a { white-space: nowrap; }
