/* Jost is a free Futura-style typeface. Visitors whose device has Futura
   (all Macs and iPhones) see real Futura; everyone else sees Jost. */
@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,400;0,500;0,600;1,400&display=swap");

/* ---------------------------------------------------
   Joel Pang — minimal, image-first gallery site
--------------------------------------------------- */

:root {
  --font: Futura, "Futura PT", "Jost", "Century Gothic", "Avenir Next", sans-serif;
  --ink: #1c1c1a;
  --paper: #faf9f6;
  --paper-2: #f1efe9;
  --line: #dedad2;
  --muted: #6f6a60;
  --accent: #8c7b60;
  --max-w: 1200px;
  --gap: clamp(1rem, 2.5vw, 2rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: saturate(150%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
}

.brand span {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(1rem, 3vw, 2.2rem);
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  nav.main-nav {
    position: absolute;          /* hangs directly below the header, whatever its height */
    inset: 100% 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  nav.main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  nav.main-nav ul {
    flex-direction: column;
    padding: 1.5rem var(--gap) 2rem;
    gap: 1.1rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 500;
  margin: 0 0 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  /* letter-spacing adds trailing space after the last letter; pull it back so the name stays centered */
  margin-right: -0.22em;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 auto;
  max-width: 40em;
}

/* ---- opening visual (hero.js); with no style set, the hero is just the name ---- */

.hero { position: relative; overflow: hidden; }
.hero-stage { position: absolute; inset: 0; }
.hero-text { position: relative; z-index: 2; }
.hero-text.fade-out { opacity: 0; transition: opacity 10s ease-in-out; }   /* hero.js: the name fades away */

.hero[data-style="rotate"],
.hero[data-style="lines"],
.hero[data-style="collage"] {
  min-height: clamp(26rem, 78vh, 46rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero[data-style] h1 { font-size: clamp(2.2rem, 7vw, 5rem); }
.hero[data-style] p { font-size: clamp(0.95rem, 1.6vw, 1.15rem); letter-spacing: 0.04em; }

/* rotate: artworks crossfade with a slow zoom, name in light type over a soft shade */
.hero[data-style="rotate"] { background: #161513; }
.hero[data-style="rotate"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(14, 13, 11, 0.62), rgba(14, 13, 11, 0.22) 75%, rgba(14, 13, 11, 0.35));
}
.hero[data-style="rotate"] h1,
.hero[data-style="rotate"] p { color: #f6f3ec; text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55); }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-slide.on { opacity: 1; }
.hero-reveal { position: absolute; inset: 0; display: block; }
.hero-slide.zoom { animation: hero-zoom 9s ease-out both; }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero-caption {
  position: absolute;
  z-index: 2;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(0.9rem, 2.5vw, 1.6rem);
  color: rgba(246, 243, 236, 0.85);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-caption:hover { color: #fff; }

/* lines: live canvas behind the name; paper-coloured halo keeps the type readable */
.hero[data-style="lines"] canvas { display: block; }
.hero[data-style="lines"] .hero-text { pointer-events: none; }
.hero[data-style="lines"] h1,
.hero[data-style="lines"] p {
  text-shadow: 0 0 6px var(--paper), 0 0 18px var(--paper), 0 0 36px var(--paper);
}
.hero[data-style="lines"] p { color: var(--ink); }
.hero[data-style="lines"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18%;
  background: linear-gradient(to bottom, transparent, var(--paper));
  pointer-events: none;
}

/* collage: pieces float around the name and drift with the mouse and scroll */
.hero-piece {
  position: absolute;
  display: block;
  transform:
    translate(calc(var(--mx, 0) * var(--d) * 22px), calc(var(--my, 0) * var(--d) * 16px + var(--sy, 0) * var(--d) * -0.25px))
    rotate(var(--r));
  transition: box-shadow 0.25s ease;
  box-shadow: 0 10px 28px rgba(28, 28, 26, 0.18), 0 2px 6px rgba(28, 28, 26, 0.12);
  animation: hero-float 7s ease-in-out infinite;
}
.hero-piece img { width: 100%; height: auto; display: block; }
.hero-piece:hover { box-shadow: 0 16px 40px rgba(28, 28, 26, 0.28); z-index: 3; }
@keyframes hero-float { 50% { margin-top: -8px; } }
.hero[data-style="collage"] h1,
.hero[data-style="collage"] p {
  text-shadow: 0 0 8px var(--paper), 0 0 22px var(--paper), 0 0 42px var(--paper);
}
.hero[data-style="collage"] p { color: var(--ink); }
.hero[data-style="collage"] .hero-text { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-piece { animation: none; }
}

/* ---------- Gallery grid ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.gi-media { position: relative; }

.gi-open {
  display: block;
  width: 100%;
  cursor: zoom-in;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
}

/* the whole piece is always visible: it sits inside the frame instead of being cropped to it */
.gallery-item figure {
  margin: 0;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 4 / 5;
  max-width: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.gi-open:hover img { transform: scale(1.02); }

.gi-caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.gi-text { min-width: 0; }

/* ---------- Photo dots (pieces with several photos) ---------- */

.dots {
  display: flex;
  flex-shrink: 0;
  gap: 0;
  margin-right: -6px; /* align the last dot with the image's right edge */
}

.dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.15s ease, transform 0.15s ease;
}

.dot:hover::before { background: var(--muted); }

.dot[aria-current="true"]::before {
  background: var(--ink);
  transform: scale(1.2);
}

/* on the dark lightbox the dots are light */
.lightbox-dots .dot::before { background: rgba(242, 240, 234, 0.35); }
.lightbox-dots .dot:hover::before { background: rgba(242, 240, 234, 0.7); }
.lightbox-dots .dot[aria-current="true"]::before { background: #f2f0ea; }

.lightbox-dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 0.9rem;
}

.lightbox-dots:empty { display: none; }

.gallery-item .g-title { font-weight: 600; }
.gallery-item .g-meta { color: var(--muted); display: block; margin-top: 0.15rem; }

/* ---------- Inquire link / Available & Sold tags ---------- */

.g-inquire {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.inquire {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.inquire::after { content: " \2192"; transition: margin 0.15s ease; }
.inquire:hover { color: var(--accent); }
.inquire:hover::after { margin-left: 0.2em; }
.avail-tag { color: var(--accent); }
.avail-tag::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.4em;
  vertical-align: 0.1em;
}
.is-sold { color: var(--muted); }
.g-inquire.is-sold::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #a2463b;
  margin-right: 0.4em;
}

/* in the lightbox the link sits on its own line, light on dark */
.lb-inquire {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lb-inquire .inquire { color: #f2f0ea; border-bottom-color: rgba(242, 240, 234, 0.45); }
.lb-inquire .inquire:hover { color: #fff; border-bottom-color: #f2f0ea; }
.lb-inquire .avail-tag { color: #d8c9ad; }

/* a piece linked from an Inquire email gets a brief highlight */
.gallery-item.is-target .gi-media { animation: target-glow 2.4s ease 0.3s; }
@keyframes target-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(140, 123, 96, 0); }
  25%, 60% { box-shadow: 0 0 0 4px rgba(140, 123, 96, 0.55); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-item.is-target .gi-media { animation: none; outline: 3px solid var(--accent); outline-offset: 3px; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 16, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: clamp(1rem, 4vw, 3rem);
}

.lightbox.open { display: flex; }

.lightbox-inner {
  max-width: 1000px;
  width: 100%;
  color: #f2f0ea;
  text-align: center;
}

.lightbox-inner img {
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: #cfcabf;
}

.lightbox-caption strong { color: #f2f0ea; font-weight: 600; }

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: #f2f0ea;
  cursor: pointer;
  font-family: inherit;
}

.lightbox-close {
  top: clamp(0.8rem, 3vw, 1.6rem);
  right: clamp(0.8rem, 3vw, 1.6rem);
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  padding: 0.5rem 0.8rem;
  opacity: 0.75;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: clamp(0.4rem, 2vw, 1.2rem); }
.lightbox-next { right: clamp(0.4rem, 2vw, 1.2rem); }

/* ---------- Generic content sections (about / accomplishments / contact) ---------- */

.page-header {
  padding-block: clamp(2.5rem, 5vw, 4rem) 1rem;
}

.page-header h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  font-weight: 500;
  margin: 0;
}

.about-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: 1rem 4rem;
  align-items: start;
}

@media (max-width: 760px) {
  .about-layout { grid-template-columns: 1fr; }
}

.about-portrait img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--paper-2);
}

.about-text p { margin: 0 0 1.1em; }

.statement-box {
  margin-top: 2rem;
  padding: 1.6rem clamp(1.2rem, 3vw, 2rem);
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
}

.statement-box h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.8rem;
  font-weight: 600;
}

.statement-box p { font-style: italic; margin: 0; }

.edu-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.4rem;
}

@media (max-width: 560px) {
  .edu-tools-grid { grid-template-columns: 1fr; }
}

.mini-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.9rem;
  font-weight: 600;
}

.edu-list,
.tools-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.edu-list li {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.edu-list li strong { font-weight: 600; }

.edu-list li span { color: var(--muted); }

.edu-list .edu-date {
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tools-list li {
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.acc-section { padding-block: 0.5rem 3rem; }

.acc-section h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
  margin: 2.4rem 0 1.2rem;
}

.acc-list { list-style: none; margin: 0; padding: 0; }

.acc-list li {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--line);
}

.acc-list li:last-child { border-bottom: none; }

.acc-year { color: var(--muted); font-variant-numeric: tabular-nums; }
.acc-detail .place,
.acc-detail .org,
.acc-detail .outlet { display: block; color: var(--muted); font-size: 0.92rem; }

.contact-section {
  padding-block: 1rem 4rem;
  max-width: 640px;
}

.contact-section .lead {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-links li { margin-bottom: 0.9rem; }

.contact-links a {
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  font-size: 1.05rem;
}
.contact-links a:hover { color: var(--accent); }

.contact-note {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Work overview: one tile per year ---------- */

.year-index {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem) var(--gap);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

@media (max-width: 860px) {
  .year-index { grid-template-columns: repeat(2, 1fr); }
}

.year-tile {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.year-tile figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  overflow: hidden;
  background: var(--paper-2);
}

.year-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.year-tile:hover img { transform: scale(1.035); }

.year-tile-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  transition: border-color 0.15s ease;
}

.year-tile:hover .year-tile-label,
.year-tile:focus-visible .year-tile-label { border-color: var(--accent); }

.year-tile-year {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.year-tile-count {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Year page ---------- */

.year-header {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }

.year-header h1 {
  margin: 0;
  font-size: clamp(3.2rem, 10vw, 6.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.year-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.year-strip a {
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.year-strip a:hover,
.year-strip a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
}

.year-gallery { padding-bottom: clamp(2rem, 4vw, 3rem); }

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding-block: 3rem;
  color: var(--muted);
}

.year-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-block: 1.4rem clamp(3rem, 6vw, 4.5rem);
}

.year-pager a {
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.year-pager a:hover { color: var(--accent); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .hero-text.fade-out { transition: opacity 10s ease-in-out !important; }   /* a gentle fade, kept on purpose */
}

/* ---------- Footer contact ---------- */

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.footer-contact a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-contact a:hover { color: var(--accent); }

/* ---------- Page transitions ----------
   Uses the browser's View Transitions feature: a soft crossfade between pages, the header
   stays put, and a year's number glides from its homepage tile into the big heading on
   its year page. Browsers without the feature simply switch pages instantly. */

@view-transition { navigation: auto; }

.site-header { view-transition-name: site-header; }

::view-transition-old(root) { animation: page-out 0.22s ease both; }
::view-transition-new(root) { animation: page-in 0.38s ease 0.05s both; }

@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

::view-transition-group(*) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Homepage: transparent header over the opening artwork ----------
   body.home + data-hero="rotate" (set by hero.js). While the artwork is behind it, the header
   is see-through with light type; script.js adds .solid once the artwork has scrolled past. */

.home .site-header {
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.home[data-hero="rotate"] .site-header {
  position: fixed;
  left: 0;
  right: 0;
}
.home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
}
.home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) .brand { color: #f6f3ec; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45); }
.home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) .nav-toggle { border-color: rgba(246, 243, 236, 0.5); }
.home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) .nav-toggle span,
.home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) .nav-toggle span::before,
.home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) .nav-toggle span::after { background: #f6f3ec; }
@media (min-width: 641px) {
  .home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) .main-nav a { color: rgba(246, 243, 236, 0.82); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45); }
  .home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) .main-nav a:hover,
  .home[data-hero="rotate"] .site-header:not(.solid):not(.menu-open) .main-nav a[aria-current="page"] { color: #fff; border-color: #f6f3ec; }
}
/* the artwork now runs up behind the header: a soft shade at the top keeps the menu readable,
   and extra top padding keeps the name centred in the visible part */
.home[data-hero="rotate"] .hero[data-style="rotate"] { padding-top: calc(3rem + 72px); min-height: clamp(30rem, 88vh, 52rem); }
.home[data-hero="rotate"] .hero[data-style="rotate"]::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 160px;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(14, 13, 11, 0.55), rgba(14, 13, 11, 0));
  pointer-events: none;
}

/* ======================================================================
   About / Accomplishments / Contact — ink treatments (pages.js adds motion)
   ====================================================================== */

/* ---------- About ---------- */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 4vw, 3.5rem);
}
@media (max-width: 760px) { .about-hero { grid-template-columns: 1fr; } }
.about-art { margin: 0; position: relative; }
.about-art img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--paper-2); }
.ink-cover { position: absolute; left: 0; top: 0; pointer-events: none; }
.about-art figcaption,
.about-place {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-art figcaption { margin-top: 0.7rem; }
.about-place { margin: 0; }
.about-lede {
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  font-weight: 400;
  line-height: 1.3;
  margin: 0.3rem 0 1.4rem;
  text-wrap: balance;
}
.wrap.about-body { max-width: 820px; padding-block: 1rem clamp(3rem, 6vw, 5rem); }
.about-text p { margin: 0 0 1.1em; font-size: 1.05rem; max-width: 65ch; }

/* the statement hangs off a hatched rail, like the tick-marked edges in the drawings */
.statement { margin: clamp(2.5rem, 5vw, 4rem) 0; padding-left: clamp(1.5rem, 3vw, 2.25rem); position: relative; }
.statement::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3rem; bottom: 0.3rem;
  width: 12px;
  border-left: 1.5px solid var(--ink);
  background: repeating-linear-gradient(to bottom, var(--ink) 0 1.5px, transparent 1.5px 7px) left / 12px 100% no-repeat;
}
.statement blockquote {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
@media (max-width: 560px) { .about-facts { grid-template-columns: 1fr; } }
.about-facts:has(> div:only-child) { grid-template-columns: 1fr; }

/* ---------- Accomplishments: ink timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 1rem 0 clamp(3rem, 6vw, 5rem); }
.tl-year {
  display: grid;
  grid-template-columns: clamp(5.5rem, 14vw, 10rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
}
.tl-year-num {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.tl-items {
  --rail: clamp(1.5rem, 3vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0 0 clamp(2rem, 4vw, 3rem) var(--rail);
  position: relative;
}
.tl-items::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem; bottom: 0;
  width: 1.5px;
  background: var(--ink);
  transform-origin: top;
}
.tl-item { position: relative; display: flex; flex-direction: column; gap: 0.2rem; padding-bottom: 1.5rem; }
/* three hatch ticks across the rail at each entry */
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--rail) - 6px);
  top: 0.35rem;
  width: 13px;
  height: 8px;
  background: repeating-linear-gradient(to bottom, var(--ink) 0 1.5px, transparent 1.5px 3.25px);
}
.tl-kind { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.tl-item[data-kind="award"] .tl-kind { color: #b8327c; }
.tl-title { font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 500; }
.tl-sub { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 520px) {
  .tl-year { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
}
/* pages.js adds .tl-anim, then .in to each year as it scrolls into view */
.tl-anim .tl-items::before { transform: scaleY(0); transition: transform 1.1s cubic-bezier(0.3, 0.6, 0.2, 1); }
.tl-anim .tl-year-num,
.tl-anim .tl-item { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.tl-anim .tl-year.in .tl-items::before { transform: none; }
.tl-anim .tl-year.in .tl-year-num,
.tl-anim .tl-year.in .tl-item { opacity: 1; transform: none; }
.tl-anim .tl-year.in .tl-item:nth-child(2) { transition-delay: 0.15s; }
.tl-anim .tl-year.in .tl-item:nth-child(3) { transition-delay: 0.3s; }
.tl-anim .tl-year.in .tl-item:nth-child(n + 4) { transition-delay: 0.45s; }

/* ---------- Contact: details over live ink lines ---------- */
.contact-band {
  position: relative;
  overflow: hidden;
  min-height: clamp(30rem, 72vh, 44rem);
  display: flex;
  align-items: center;
  background: var(--paper);
}
.contact-stage { position: absolute; inset: 0; }
.contact-stage canvas { display: block; }
.contact-inner { position: relative; z-index: 1; width: 100%; padding-block: 3rem; pointer-events: none; }
.contact-inner a,
.contact-inner button { pointer-events: auto; }
.contact-inner > * { text-shadow: 0 0 6px var(--paper), 0 0 16px var(--paper), 0 0 32px var(--paper); }
.contact-inner h1 {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0.2rem 0 0.8rem;
}
.contact-lead { font-size: 1.1rem; margin: 0 0 2.2rem; }
.contact-email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; }
.contact-email {
  font-size: clamp(1.3rem, 4vw, 2.6rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn {
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-shadow: none;
}
.copy-btn:hover { background: var(--ink); color: var(--paper); }
.contact-ig {
  display: inline-block;
  margin-top: 1.4rem;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}
.contact-inner .contact-note {
  margin: 2.4rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---- homepage signature (hero.js, first visit per session): the name is traced, then the painting comes up ---- */
.hero-stage, .hero[data-style="rotate"]::after, .hero-caption { transition: opacity 1.6s ease; }
.hero.sig-intro .hero-stage,
.hero.sig-intro::after,
.hero.sig-intro .hero-caption { opacity: 0; }
.hero.sig-intro:not(.sig-done) .hero-stage,
.hero.sig-intro:not(.sig-done)::after,
.hero.sig-intro:not(.sig-done) .hero-caption { transition: none; }   /* hidden from the first frame, then fades up */
.hero.sig-intro.sig-done .hero-stage,
.hero.sig-intro.sig-done::after,
.hero.sig-intro.sig-done .hero-caption { opacity: 1; }
.hero.sig-intro h1 { color: transparent; text-shadow: none; }
.hero.sig-intro.sig-done h1 { color: #f6f3ec; transition: color 0.9s ease 0.4s; }
.hero-sig { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.hero-sig text {
  fill: #f6f3ec; fill-opacity: 0; stroke: #f6f3ec; stroke-width: 1;
  stroke-dasharray: var(--dash); stroke-dashoffset: var(--dash);
  animation: sig-draw 2.2s cubic-bezier(0.5, 0.1, 0.3, 1) forwards, sig-fill 0.8s ease 1.9s forwards;
}
@keyframes sig-draw { to { stroke-dashoffset: 0; } }
@keyframes sig-fill { to { fill-opacity: 1; stroke-width: 0; } }
@media (prefers-reduced-motion: reduce) { .hero.sig-intro .hero-stage, .hero.sig-intro::after { opacity: 1; } }

/* ---- loupe (script.js): magnifier over a piece's linework ---- */
.loupe {
  position: fixed; left: 0; top: 0; z-index: 200;
  width: 180px; height: 180px; border-radius: 50%;
  pointer-events: none; background-repeat: no-repeat; background-color: #141310;
  border: 2px solid #f6f3ec;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  opacity: 0; transition: opacity 0.15s ease;
}
.loupe.on { opacity: 1; }
img.loupe-on { cursor: none; }
.lightbox-inner img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
@media (max-width: 600px) { .loupe { width: 150px; height: 150px; } }

/* ---- hero caption: names the piece on screen and links to it ---- */
.hero-caption { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; text-align: right; max-width: min(70vw, 26rem); }
.hero-caption .hc-title { font-size: 0.8rem; letter-spacing: 0.14em; }
.hero-caption .hc-meta { font-size: 0.68rem; letter-spacing: 0.12em; opacity: 0.75; }
.hero-caption::after { content: "View piece \2192"; font-size: 0.64rem; letter-spacing: 0.16em; opacity: 0; transform: translateY(-2px); transition: opacity 0.2s ease, transform 0.2s ease; }
.hero-caption:hover::after, .hero-caption:focus-visible::after { opacity: 0.9; transform: none; }

/* ---------- Year pages: staggered cards that keep each piece's shape (script.js puts cards into columns) ---------- */
.year-gallery { display: flex; align-items: flex-start; gap: var(--gap); }
.gallery-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: clamp(1.75rem, 3vw, 2.5rem); }
.year-gallery .gallery-item figure { aspect-ratio: auto; }
.year-gallery .gallery-item img { height: auto; object-fit: initial; display: block; }

/* ---------- Year links: newest first, one row that swipes sideways on narrow screens ---------- */
.year-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.year-strip::-webkit-scrollbar { display: none; }
.year-strip a { flex: none; }

/* ---------- Homepage: the newest year is a wide featured tile ---------- */
.year-tile.is-feature { grid-column: span 2; }
.year-tile.is-feature figure { aspect-ratio: auto; flex: 1; position: relative; min-height: 0; }
.year-tile.is-feature img { position: absolute; inset: 0; object-position: center 30%; }
@media (max-width: 860px) {
  .year-tile.is-feature figure { flex: none; aspect-ratio: 5 / 4; }
}

/* ---------- One heading style for year, Accomplishments and Contact pages ---------- */
.year-header h1,
.page-header h1,
.contact-inner h1 {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ---------- Footer on phones: email and Instagram on their own line ---------- */
@media (max-width: 600px) {
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .footer-contact { gap: 0.5rem 1.4rem; font-size: 0.92rem; }
}

/* ---------- Previous / next year: centred, a little larger ---------- */
.year-pager { justify-content: center; gap: clamp(2rem, 8vw, 5rem); padding-top: 2rem; }
.year-pager a { font-size: 1rem; color: var(--ink); padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.year-pager a:hover { border-color: var(--accent); }
.year-pager span:empty { display: none; }

/* ---------- Page not found ---------- */
.not-found { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
.not-found .lead { font-size: 1.1rem; color: var(--muted); margin: 1.2rem 0 2rem; max-width: 30em; }
.not-found-links { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; }
.not-found-links a { color: var(--ink); text-decoration: none; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.not-found-links a:hover { color: var(--accent); border-color: var(--accent); }
.not-found figure { margin: 0; }
.not-found img { width: 100%; height: auto; display: block; }
.not-found figcaption { margin-top: 0.6rem; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 700px) { .not-found { grid-template-columns: 1fr; } .not-found figure { max-width: 260px; } }

/* ---------- Homepage: "View work" cue fades in as the name fades out ---------- */
.hero-scroll {
  position: absolute; z-index: 3; left: 50%; bottom: clamp(0.9rem, 2.5vw, 1.6rem); transform: translateX(-50%);
  color: rgba(246, 243, 236, 0.9); text-decoration: none; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 2.5s ease 3s;
}
.hero-scroll span { display: inline-block; margin-left: 0.35em; font-size: 1.15rem; vertical-align: -0.1em; animation: cue-bob 2.4s ease-in-out infinite; }
.hero.name-fading .hero-scroll { opacity: 1; pointer-events: auto; }
.hero-scroll:hover { color: #fff; }
@keyframes cue-bob { 50% { transform: translateY(3px); } }
@media (max-width: 600px) { .hero-scroll { left: clamp(1rem, 3vw, 2rem); transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-scroll span { animation: none; } }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#year-index { scroll-margin-top: 80px; }

/* ---------- Sold: a quiet grey label, no dot ---------- */
.g-inquire.is-sold::before { content: none; }
.g-inquire.is-sold { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; }

/* ---------- Homepage caption: fades out while the next piece draws in, back in with its title ---------- */
.hero .hero-caption.is-changing { opacity: 0; transition-duration: 0.5s; }
