/* wesleyathompson.com
   A photocopy with the lid left open: dark field, blown-out light, one acid
   green. Everything here is hand-written and there are no texture images —
   the grain is generated. Edit freely. */

:root {
  /* The page is an INVERTED photocopy, so the "paper" is dark and the "toner"
     is light. --chalk is the light colour: light bands, borders, and body text. */
  --field: #121210;   /* page background */
  --panel: #1b1b18;   /* raised panels: cards, facts, lightbox */
  --chalk: #ebe8dd;   /* the light colour — header/footer bands, borders, text */
  --text: #ebe8dd;
  --muted: #8f8c81;
  --acid: #c2f53f;    /* only ever a FILL or a background, never text on chalk */

  --halftone: rgba(235, 232, 221, 0.22);
  --tape: rgba(194, 245, 63, 0.24);

  --display: "Rubik Spray Paint", "Arial Black", sans-serif;
  --body: "Cutive Mono", "Courier New", monospace;

  /* texture strength — turn these down to calm the whole site at once */
  --dirt: 0.5;
  --speckle: 0.72;

  --measure: 66ch;
  --gutter: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background-color: var(--field);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
}

/* ---------- THE DIRT ----------
   Three stacked layers, all fixed, all pointer-events: none.
   1. coarse blotchy noise multiplied down into the page
   2. fine white speckle SCREENED over the top — toner dropout goes the other
      way to dirt, and having both is what stops it looking like a filter
   3. a halftone dot grid
   Adjust with --dirt and --speckle above rather than editing these. */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: var(--dirt);
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.032' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='gamma' exponent='2.4'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23a)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23b)' opacity='0.85'/%3E%3C/svg%3E");
  background-size: 620px 620px, 160px 160px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--speckle);
  mix-blend-mode: screen;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='gamma' exponent='5'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23c)'/%3E%3C/svg%3E"),
    repeating-radial-gradient(circle at 0 0, var(--halftone) 0 0.6px, transparent 0.6px 3.2px);
  background-size: 220px 220px, 3.2px 3.2px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--acid); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:hover { background: var(--acid); color: var(--field); text-decoration: none; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0 0 0.45em;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 1.8rem + 7vw, 7rem); }
h2 { font-size: clamp(1.9rem, 1.45rem + 2.4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem); }
p { max-width: var(--measure); }

.wrap { width: min(100% - var(--gutter) * 2, 1080px); margin-inline: auto; }
.narrow { width: min(100% - var(--gutter) * 2, 680px); margin-inline: auto; }

.eyebrow {
  font-family: var(--display); font-size: 1rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--acid); color: var(--field); display: inline-block;
  padding: 0.2rem 0.65rem 0.3rem; margin: 0 0 1.5rem;
  transform: rotate(-1.4deg);
  clip-path: polygon(0 6%, 100% 0, 99% 94%, 1% 100%);
}

/* ---------- header: a torn strip of light tape ---------- */

.site-header {
  background: var(--chalk);
  border-bottom: 5px solid var(--acid);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 96% 100%, 88% 93%, 74% 100%, 61% 94%, 47% 100%, 33% 93%, 19% 100%, 8% 94%, 0 100%);
  padding-bottom: 0.5rem;
}
.site-header > .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.7rem 0; flex-wrap: wrap;
}
.brand {
  font-family: var(--display); font-size: 1.5rem; text-transform: uppercase;
  color: var(--field); text-decoration: none; transform: rotate(-0.6deg);
}
/* The surname is highlightered rather than coloured. The acid green has no
   contrast against --chalk as text, but as a FILL it stays fully saturated
   and the dark text on top does the reading. Same device as .lede strong. */
.brand span, .brand:hover span {
  color: var(--field);
  background: var(--acid);
  padding: 0 0.22em 0.05em;
  clip-path: polygon(0 8%, 100% 0, 99% 92%, 1% 100%);
}
.brand:hover { color: var(--field); background: none; }
.site-nav { display: flex; gap: clamp(0.7rem, 2.5vw, 1.4rem); flex-wrap: wrap; }
.site-nav a {
  font-family: var(--body); font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--field); text-decoration: none; opacity: 0.75;
}
.site-nav a:hover { background: var(--acid); color: var(--field); opacity: 1; }
.site-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 3px; }

/* ---------- hero ---------- */

.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero h1 { max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--acid); }
.hero .lede { font-size: 0.95rem; color: var(--text); max-width: 58ch; }
.hero .lede strong { font-weight: 700; background: var(--acid); color: var(--field); padding: 0 0.2em; }

section { padding: clamp(2rem, 5vw, 3.5rem) 0; }

/* ---------- cards: scraps taped down crooked ---------- */

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem); list-style: none; padding: 0; margin: 0.5rem 0 0;
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); color: var(--text);
  border: 2px solid var(--chalk);
  padding: 1.1rem 1.15rem 1.3rem !important;
  box-shadow: 5px 5px 0 var(--chalk);
}
.card:nth-child(3n) { transform: rotate(-1.3deg); }
.card:nth-child(3n+1) { transform: rotate(0.8deg); }
.card:nth-child(3n+2) { transform: rotate(-0.4deg); }
.card:hover { transform: rotate(0deg) translateY(-2px); box-shadow: 7px 7px 0 var(--acid); }
.card::before {
  content: ""; position: absolute; top: -10px; left: 50%; width: 68px; height: 20px;
  transform: translateX(-50%) rotate(-2.5deg);
  background: var(--tape);
  clip-path: polygon(3% 12%, 100% 0, 97% 88%, 0 100%);
}
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; border: 2px solid var(--chalk); margin-bottom: 0.85rem; filter: grayscale(1) contrast(1.65) brightness(0.92); }
.card-body { padding: 0; }
.card h3 { margin-bottom: 0.35rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { background: none; color: var(--acid); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { color: var(--muted); font-size: 0.85rem; margin: 0; }
.card .meta { font-family: var(--body); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--acid); margin-bottom: 0.4rem; }

/* ---------- interior pages ---------- */

.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1rem; }
.page-head .lede { color: var(--muted); font-size: 0.95rem; }
.banner { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 3px solid var(--chalk); box-shadow: 8px 8px 0 var(--chalk); margin-bottom: 3rem; filter: grayscale(1) contrast(1.65) brightness(0.92); }

.portrait {
  border: 2px solid var(--chalk);
  box-shadow: 6px 6px 0 var(--chalk);
  max-width: 340px;
  margin-bottom: 3rem;
  transform: rotate(-1deg);
  filter: grayscale(1) contrast(1.55) brightness(0.95);
}

.archive-note {
  color: var(--muted);
  border-left: 3px solid var(--acid);
  padding-left: 1rem;
}

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
  gap: 1.1rem 1.75rem; padding: 1.1rem; margin: 0 0 2.25rem;
  border: 2px solid var(--chalk); background: var(--panel); box-shadow: 4px 4px 0 var(--chalk);
}
.facts dt { font-family: var(--body); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--acid); margin-bottom: 0.2rem; }
.facts dd { margin: 0; font-size: 0.85rem; }

.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.6em; }
/* Bullets only — .post-list lives inside .prose too and must not get these. */
.prose ul:not(.post-list) { max-width: var(--measure); padding-left: 0; list-style: none; }
.prose ul:not(.post-list) li { margin-bottom: 0.35em; padding-left: 1.3em; position: relative; }
.prose ul:not(.post-list) li::before { content: "▚"; position: absolute; left: 0; color: var(--acid); font-size: 0.7em; top: 0.35em; }

.shots { display: grid; gap: 1.25rem; margin: 2.5rem 0; }
.shots img { border: 2px solid var(--chalk); box-shadow: 5px 5px 0 var(--chalk); filter: grayscale(1) contrast(1.65) brightness(0.92); }
.shots.pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
figure { margin: 0; }
figcaption { font-family: var(--body); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; color: var(--muted); padding-top: 0.7rem; }

/* ---------- photographs ----------
   Deliberately NOT filtered. The photocopy treatment applies to project
   images and banners; your pictures arrive the way you shot them. */

/* One section per month. The heading uses .eyebrow so the month label is the
   same acid-green torn block as every other section label on the site. */
.photo-month { padding: 0; }
.photo-month + .photo-month { margin-top: clamp(2.5rem, 6vw, 4rem); }
.photo-month .eyebrow { margin-bottom: 0.75rem; }

.photo-grid { columns: 3 250px; column-gap: 1.25rem; margin-top: 2rem; }
.photo-grid figure { break-inside: avoid; margin-bottom: 1.5rem; }
.photo-grid button { display: block; padding: 0; border: 2px solid var(--chalk); background: none; cursor: zoom-in; width: 100%; box-shadow: 5px 5px 0 var(--chalk); }
.photo-grid figure:nth-child(3n) button { transform: rotate(-1deg); }
.photo-grid figure:nth-child(3n+1) button { transform: rotate(0.7deg); }
.photo-grid button:hover { transform: rotate(0deg); box-shadow: 5px 5px 0 var(--acid); }
.photo-grid button:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }

dialog.lightbox { border: 3px solid var(--chalk); padding: 0.6rem; max-width: 96vw; max-height: 96vh; background: var(--panel); color: var(--text); }
dialog.lightbox::backdrop { background: rgba(10, 10, 9, 0.94); }
dialog.lightbox img { max-height: 86vh; width: auto; margin-inline: auto; }
dialog.lightbox .caption { font-family: var(--body); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; color: var(--muted); text-align: center; padding-top: 0.6rem; }

.empty-state { border: 3px dashed var(--chalk); padding: clamp(2rem, 6vw, 3.5rem); text-align: center; color: var(--muted); background: var(--panel); }
.empty-state code { background: var(--acid); color: var(--field); padding: 0.1em 0.4em; }

/* ---------- shelf ---------- */

.post-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.post-list li { border-top: 3px solid var(--chalk); padding: 1.6rem 0; }
.post-list li:last-child { border-bottom: 3px solid var(--chalk); }
.post-list h3 { margin-bottom: 0.25rem; }
.post-list h3 a { color: var(--text); text-decoration: none; }
.post-list h3 a:hover { background: none; color: var(--acid); }
.post-list time,
.post-meta { font-family: var(--body); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--acid); }

/* ---------- footer: the torn strip again, upside down ---------- */

.site-footer {
  border-top: 5px solid var(--acid);
  background: var(--chalk); color: var(--field);
  margin-top: 3.5rem; padding: 1.75rem 0; font-size: 0.85rem;
  clip-path: polygon(0 0, 9% 7%, 21% 1%, 36% 8%, 52% 2%, 67% 8%, 81% 1%, 93% 7%, 100% 0, 100% 100%, 0 100%);
}
.site-footer > .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; align-items: baseline; padding-top: 0.5rem; }
.site-footer p { max-width: none; }
.site-footer a { color: var(--field); }
.site-footer a:hover { background: var(--acid); color: var(--field); }
.site-footer .links { display: flex; gap: 1.25rem; flex-wrap: wrap; font-family: var(--body); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; }

/* ---------- utilities ---------- */

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--acid); color: var(--field); padding: 0.6rem 1rem; z-index: 10000; }
.skip-link:focus { left: 0; }
.back-link { font-family: var(--body); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; text-decoration: none; color: var(--acid); }
.back-link:hover { background: var(--acid); color: var(--field); }
