:root {
  --ink: #000;
  --ink-soft: #0f0e0e;
  --paper: #fff;
  --paper-soft: #fafafa;
  --accent: #ff0031;

  --giant: min(200px, 13.9vw);
  --title: min(170px, 11.8vw);
  --lead: clamp(17px, 2.08vw, 30px);
  --small: 12px;
  --gutter: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: var(--small);
  line-height: 1.25;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

p { margin: 0; }

button { font: inherit; text-transform: inherit; }

/* ---------- Type ---------- */

.giant,
.title {
  margin: 0;
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.035em;
  text-align: center;
}

.giant { font-size: var(--giant); }
.title { font-size: var(--title); }

.pre {
  display: flex;
  margin: 0;
  font-weight: 400;
  gap: 20px;
  font-size: var(--small);
}

.lead {
  max-width: 970px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-size: var(--lead);
  line-height: 1.17;
  letter-spacing: -0.01em;
  text-align: center;
}

.lead p + p { margin-top: 1.17em; }

.lead strong { font-weight: 500; }

.lead-narrow { max-width: 970px; }

/* ---------- Name roller ---------- */

.roller { height: 240vh; }

.sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.roller .giant {
  display: flex;
  flex-direction: column;
  align-items: center;
  white-space: nowrap;
}

.roller-window {
  display: block;
  height: 0.82em;
  overflow: hidden;
}

.roller-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

/* ---------- Tattoo chapters ---------- */

.chapter {
  position: relative;
  padding: 250px 0 400px;
}

.chapter-head {
  --flower-h: calc(var(--giant) * 2.2);
  --flower-gap: 60px;
  position: relative;
  display: grid;
  place-items: center;
  /* The gap under the title is where the flower rests before it drifts up. */
  margin-bottom: calc(var(--flower-h) + var(--flower-gap) * 2);
}

.chapter-head .pre,
.project-head .pre,
.works-title .pre,
.about-intro .pre {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
}

.chapter-title {
  position: relative;
  display: grid;
  place-items: center;
}

/* Drawings are cropped to their ink and centered on their own axis, so all three
   share one height and sit centered in the gap between title and text. */
.flower {
  position: absolute;
  top: calc(100% + var(--flower-gap));
  left: 0;
  right: 0;
  width: auto;
  height: var(--flower-h);
  margin: 0 auto;
  pointer-events: none;
  will-change: transform;
}

/* ---------- Works ---------- */

.works { padding: 100px 0 0; }

.works-title {
  position: relative;
  padding: 250px 0 300px;
}

.works-title .giant span { display: block; }

.project { padding: 0 0 320px; }

.marquee {
  display: flex;
  overflow: hidden;
  margin-bottom: 90px;
}

.marquee-track {
  display: flex;
  flex: none;
  animation: marquee var(--marquee-duration, 40s) linear infinite;
}

.marquee-set {
  display: flex;
  flex: none;
}

.marquee img,
.marquee video {
  flex: none;
  width: 310px;
  height: 207px;
  margin-right: 20px;
  object-fit: cover;
}

/* 16:9 sources (video thumbnails) keep their full frame instead of being cropped. */
.marquee .wide { width: 368px; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.project-head {
  position: relative;
  margin-bottom: 110px;
}

/* "PROTOCOL" ends in an L whose ink sits left of its cell, so when the title
   stacks it reads ~0.1em left of "OFFLINE". Nudge it back (main.js sets the class). */
.optical span { position: relative; }
.optical.is-stacked span:last-child { left: 0.1em; }

/* ---------- About ("still curious?") ---------- */

.about {
  background: var(--paper-soft);
  padding: 250px 0 200px;
}

.about-intro {
  position: relative;
  margin-bottom: 300px;
}

.about-intro .pre { top: 0.5em; transform: none; }

.curio {
  padding: 0 var(--gutter) 260px;
}

/* The section's own bottom padding already separates Art from what follows. */
.curio:last-child { padding-bottom: 0; }

.curio .title { margin-bottom: 60px; }

/* Text and image sit side by side as one centered group. */
.curio-body {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
}

.curio-text {
  flex: 0 1 350px;
}

.curio-text p + p { margin-top: 1.25em; }

.curio-body img {
  flex: none;
  width: 240px;
  aspect-ratio: 450 / 596;
  object-fit: cover;
}

.dot-link {
  display: inline-flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
}

.dot-link::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--ink);
  transition: background 0.2s;
}

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

/* ---------- An idiot, in motion (press, talks, writing) ---------- */

.in-motion {
  padding: 250px var(--gutter) 160px;
}

.in-motion-title {
  margin-bottom: 160px;
  line-height: 1.05; /* room for the comma at the end of line one */
}

.in-motion-title span { display: block; }

/* Hanging comma: it takes a full monospace cell but almost no ink, so it sits
   outside the line and "AN IDIOT" centers on its letters. */
.in-motion-title .hang { display: inline; position: absolute; }

/* Link previews: each outlet's own share image, cut to the project-strip tile shape. */
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 56px 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.press-card { display: block; }

.press-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 15%;
  background: var(--paper-soft);
  transition: opacity 0.2s;
}

.press-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
}

.press-title {
  display: block;
  margin-top: 6px;
  max-width: 34em;
}

.press-card:hover img { opacity: 0.85; }
.press-card:hover .press-title { color: var(--accent); }

/* ---------- Contact + footer ---------- */

.contact {
  display: grid;
  place-items: center;
  padding: 120px 0 70px;
}

.contact .giant { white-space: nowrap; letter-spacing: 0.01em; }

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: var(--gutter) var(--gutter) 150px;
  color: var(--ink-soft);
}

.socials {
  display: flex;
  gap: 20px;
}

.socials svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: fill 0.2s;
}

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

/* ---------- Reveal + cursor ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* The bracketed-flowers mark is the pointer everywhere, links included.
   Hotspot is the middle of the mark. */
html,
a,
button {
  cursor: url("assets/cursor.png") 32 12, auto;
  cursor: image-set(url("assets/cursor.png") 1x, url("assets/cursor@2x.png") 2x) 32 12, auto;
}

/* ---------- Small screens ---------- */

@media (max-width: 809px) {
  .chapter { padding: 160px 0 200px; }

  .chapter-head .pre,
  .project-head .pre,
  .works-title .pre,
  .about-intro .pre {
    position: static;
    transform: none;
    justify-content: center;
    margin-bottom: 24px;
  }

  .chapter-head { display: flex; flex-direction: column; align-items: center; }

  .works-title { padding: 160px 0 200px; }
  .project { padding-bottom: 200px; }
  .marquee { margin-bottom: 60px; }
  .marquee img,
  .marquee video { width: 220px; height: 147px; margin-right: 12px; }
  .marquee .wide { width: 261px; }
  .project-head { margin-bottom: 60px; }

  .about { padding: 160px 0 120px; }
  .about-intro { margin-bottom: 200px; }
  .curio { padding-bottom: 180px; }
  .curio:last-child { padding-bottom: 0; }
  .curio .title { margin-bottom: 36px; }
  .curio-body { flex-direction: column; gap: 28px; }
  .curio-text { flex: none; max-width: 320px; order: 2; }
  .curio-body img { width: 100%; max-width: 240px; }


  .in-motion { padding: 160px var(--gutter) 100px; }
  .in-motion-title { margin-bottom: 80px; }
  .press-grid { gap: 40px 12px; }

  .site-footer { padding-bottom: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
