/* Martin Ray Vaughan — shared stylesheet (v2).
   Layout: an index of a working life. A big name, then a ruled list of projects with years in film-edge mono,
   a contact-sheet photo strip, and one paint-splash colour (magenta) used sparingly. */
:root {
  --bg: #fbfbfc;
  --surface: #f0f1f4;
  --ink: #16171d;
  --text: #3d404b;
  --muted: #777b88;
  --line: #d9dbe2;
  --accent: #c8127a;
  --accent-ink: #ffffff;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121318; --surface: #1b1d24; --ink: #f2f3f6; --text: #c6c9d3; --muted: #8d91a0;
    --line: #2d3039; --accent: #ff5fb4; --accent-ink: #121318; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121318; --surface: #1b1d24; --ink: #f2f3f6; --text: #c6c9d3; --muted: #8d91a0;
  --line: #2d3039; --accent: #ff5fb4; --accent-ink: #121318; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.65 var(--font-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); color: var(--ink); font-weight: 700; line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }

.wrap {
  max-width: var(--max); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Header */
.site-header { padding-block: 20px; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.logo { font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--text); }
.nav a:hover { color: var(--accent); }

section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); }

/* Intro */
.intro { padding-top: clamp(48px, 9vw, 120px); }
.intro .wrap { display: grid; gap: 28px; }
.intro h1 { font-size: clamp(3.2rem, 11vw, 8.5rem); line-height: 0.92; }
.intro h1 span { color: var(--accent); }
.intro-copy { display: grid; grid-template-columns: minmax(0, 36rem) auto; gap: 24px 48px; align-items: end; justify-content: space-between; }
.intro-copy p { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; padding: 0.8rem 1.3rem; border-radius: 999px; text-decoration: none;
  font: 500 0.98rem/1 var(--font-body); border: 1.5px solid var(--ink); color: var(--ink);
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Projects + Ideas — magazine grid of photo cards; headline overlaid on the image (Chester-style) */
.mag { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.masonry { columns: 2; column-gap: 18px; margin-bottom: -18px; }
.masonry .story { break-inside: avoid; margin-bottom: 18px; width: 100%; }
.story.short .ph span { display: none; }
.story.tall { aspect-ratio: 3 / 4; }
.story.square { aspect-ratio: 1 / 1; }
.story.short { aspect-ratio: 5 / 4; }
.story {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 16px;
  background: var(--surface); aspect-ratio: 1 / 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px 20px 22px; text-decoration: none; color: var(--ink);
}
.story .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; margin: 0; border: 0; transition: transform .5s ease; }
.story::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 80%, transparent) 28%, transparent 62%); }
.story:hover .cover { transform: scale(1.03); }
.story-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; color: var(--muted); }
.story-top span:first-child { background: color-mix(in srgb, var(--surface) 75%, transparent); padding: 1px 6px; margin-left: -6px; border-radius: 4px; }
.story .year { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; align-self: center; }
.story-body { display: grid; gap: 10px; justify-items: start; }
.chip {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 6px; padding: 3px 8px;
}
.story h3 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: clamp(1.8rem, 2.6vw, 2.3rem); line-height: 1; letter-spacing: -0.01em; }
.story p { font-size: 1rem; color: var(--text); max-width: 32rem; }
.story.lead { aspect-ratio: auto; min-height: 420px; padding: 24px 28px 30px; }
.story.lead h3 { font-size: clamp(3rem, 6vw, 5rem); }
.story:hover h3 { color: var(--accent); }
.story /* Photo placeholder (until real images go in) */
.ph { place-items: start center; padding-top: 24%; }

/* Photography — contact sheet */
.photo { background: var(--ink); color: var(--bg); }
.photo h2, .photo .section-head .label { color: var(--bg); }
.photo .label { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.frame { display: grid; gap: 8px; margin: 0; }
.frame img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.frame figcaption { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: color-mix(in srgb, var(--bg) 55%, transparent); }
.photo-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; margin-top: 40px; padding-top: 32px; border-top: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); }
.photo-offer p { max-width: 38rem; color: color-mix(in srgb, var(--bg) 85%, transparent); }
.photo-offer strong { color: var(--bg); font-weight: 600; }
.photo .btn { border-color: var(--bg); color: var(--bg); }
.photo .btn:hover { background: var(--bg); color: var(--ink); }
.photo .btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.ph {
  aspect-ratio: 4 / 5; margin-bottom: 6px; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--surface) 0 12px, color-mix(in srgb, var(--surface) 70%, var(--line)) 12px 24px);
  border: 1px solid var(--line);
}
.ph span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--bg); padding: 4px 8px; }

/* About + resume */
.about { background: var(--surface); }
.about .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
.about-text { display: grid; gap: 18px; max-width: 38rem; }
.about-text h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 8px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; gap: 4px; }
.facts dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; align-items: baseline; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--text); }

@media (max-width: 860px) {
  .intro-copy, .photo-offer, .about .wrap { grid-template-columns: minmax(0, 1fr); }
  .mag { grid-template-columns: minmax(0, 1fr); }
  .story.lead { aspect-ratio: 1 / 1; min-height: 0; }
  .sheet { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .masonry { columns: 1; }
}
