/* ===== NEUE MONTREAL (files are in the fonts folder) ===== */
@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-LightItalic.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cal Sans";
  src: url("fonts/CalSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== COLOURS (change the three theme colours here) ===== */
body {
  --bg: #fff;
  --fg: #000;
  --line: rgba(0,0,0,.35);
}
body[data-theme="yellow"] { --bg: #ffe14a; --fg: #000; --line: rgba(0,0,0,.45); }  /* yellow head */
body[data-theme="white"]  { --bg: #eeeceb; --fg: #000; --line: rgba(0,0,0,.35); }  /* middle head */
body[data-theme="pink"]   { --bg: #ffb3da; --fg: #000; --line: rgba(0,0,0,.45); }  /* pink head */

/* Home-only glowing colour fades around an almost-white centre. */
@property --vignette {
  syntax: "<color>";
  inherits: true;
  initial-value: #d5d7d4;
}
body.home {
  --bg: #fffefa;
  --fg: #000;
  --line: rgba(0,0,0,.35);
  --vignette: #d5d7d4;
  --vignette-shadow: #535d60;
  --hair-shimmer: #fff6fd;
  transition: --vignette 2.2s cubic-bezier(.22,.61,.36,1);
}
body.home[data-theme="yellow"] {
  --vignette: #e4c64e;
}
body.home[data-theme="pink"] {
  --vignette: #f19acb;
}
body.home[data-theme="white"] {
  --vignette: #989493;
}

/* ===== BASIC SETUP ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #fff; }
body {
  color: var(--fg);
  font-family: "Neue Montreal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  min-height: 100vh;
  position: relative;
}
/* the background colour layer (fades between colours) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0;
  background: var(--bg);
  transition: background-color .45s ease;
}
body.home::before {
  background: radial-gradient(ellipse at center,
    var(--bg) 16%,
    color-mix(in srgb, var(--bg) 97%, var(--vignette)) 32%,
    color-mix(in srgb, var(--bg) 88%, var(--vignette)) 48%,
    color-mix(in srgb, var(--bg) 68%, var(--vignette)) 64%,
    color-mix(in srgb, var(--bg) 40%, var(--vignette)) 82%,
    color-mix(in srgb, var(--vignette) 88%, var(--vignette-shadow)) 105%,
    color-mix(in srgb, var(--vignette) 68%, var(--vignette-shadow)) 130%);
}
/* A few mini sparkles on top of the page (pink only). */
body.home::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    url("images/mini-sparkle.svg"),
    url("images/mini-sparkle.svg"),
    url("images/mini-sparkle.svg"),
    url("images/mini-sparkle.svg"),
    url("images/mini-sparkle.svg");
  background-repeat: no-repeat;
  background-size: 28px 28px, 18px 18px, 24px 24px, 15px 15px, 21px 21px;
  background-position: 12% 9%, 31% 4%, 56% 12%, 74% 6%, 90% 14%;
  opacity: 0;
  transition: opacity 2.2s ease;
}
body.home[data-theme="pink"]::after {
  opacity: .9;
  animation: twinkle 3.2s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: .55; }
  to   { opacity: .95; }
}
@media (prefers-reduced-motion: reduce) {
  body.home::after { transition: none; animation: none; }
  body.home { transition: none; }
  body.home.open .head-list { animation: none; }
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between;
  padding: 22px 25px; font-size: 12px; letter-spacing: .02em;
  text-transform: uppercase; color: var(--fg);
  transition: color .45s ease;
}
.nav nav { display: flex; gap: 22px; }
.nav a { opacity: .6; transition: opacity .2s; }
.nav a:hover, .nav a.active { opacity: 1; }
body.home .nav { gap: 24px; letter-spacing: 0; }
body.home .portfolio-name { font-size: clamp(16px, 1.3vw, 20px); text-transform: none; opacity: 1; }
body.home .nav nav a { font-size: 15px; }
.nav-identity { display: flex; flex-direction: column; align-items: flex-start; }
.portfolio-title { margin-top: 3px; font-size: 10px; letter-spacing: .02em; text-transform: none; opacity: .6; }

/* ===== HOME: THE THREE HEADS ===== */
body.home:not(.open) { overflow: hidden; height: 100vh; }
#heads-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none; display: block;
}
#heads-fallback { display: none; position: fixed; z-index: 1; left: 4vw; right: 4vw; top: 20vh; width: 92vw; height: auto; }
.hint {
  position: fixed; bottom: 24px; left: 0; right: 0; z-index: 2; text-align: center; pointer-events: none;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .55; color: var(--fg);
}
/* if WebGL isn't available, show plain text buttons */
.sr-heads.visible { position: fixed; z-index: 3; bottom: 70px; left: 0; right: 0; width: auto; height: auto; clip: auto; overflow: visible; display: flex; justify-content: center; gap: 24px; }
.sr-heads.visible button { font-size: 18px; text-decoration: underline; }

/* ===== PROJECT LIST (opens when you click a head) ===== */
.head-list {
  display: none; position: relative; z-index: 5;
  margin-top: var(--list-top, 40vh);
  background: var(--bg); min-height: 100vh; padding-bottom: 80px;
  transition: background-color .45s ease;
}
body.home .head-list { background: transparent; overflow: clip; }
body.open .head-list { display: block; animation: list-in .5s ease both; }
@keyframes list-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.close-list {
  display: block; margin: 0 25px 18px auto; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .7;
}
.close-list:hover { opacity: 1; }

.sw-list { list-style: none; margin: 0 25px; }
.sw-list li { border: 0; }
.sw-row {
   display: flex; align-items: center; gap: 12px; padding: 4px 12px;
}
.sw-num { font-size: 11px; align-self: flex-start; margin-top: 6px; width: 22px; flex: none; opacity: .7; }
.sw-title {
   flex: 1; min-width: 0; font-size: 30px; line-height: 1.1;
   letter-spacing: 0; text-transform: none; overflow-wrap: anywhere;
}
/* image size: change 18vw / 300px to make bigger or smaller */
.sw-img { flex: none; width: 76px; height: 76px; overflow: hidden; background: transparent; }
.sw-img img { width: 100%; height: 100%; object-fit: cover; }
.sw-arrow { flex: none; width: 26px; height: 26px; align-self: flex-end; margin: 0 0 4px 10px; }
.sw-arrow path { stroke: currentColor; }

/* A selected head opens its projects as a bottom-aligned image strip. */
body.home.open:not(.all) .head-list {
  position: fixed; inset: 0; z-index: 5; margin: 0; padding: 0;
  min-height: 0; height: 100vh; height: 100svh; overflow: visible;
  pointer-events: none;
}
body.home.open:not(.all) .close-list {
  position: absolute; top: 64px; right: 25px; margin: 0;
  width: 32px; height: 32px; font-size: 28px; line-height: 1;
  pointer-events: auto;
}
body.home.open:not(.all) .sw-list {
  position: absolute; left: clamp(14px, 4vw, 56px); right: clamp(14px, 4vw, 56px);
  bottom: clamp(24px, 5vh, 52px); display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(8px, 1.5vw, 22px); margin: 0; pointer-events: auto;
}
body.home.open:not(.all) .sw-list li {
  flex: 0 1 clamp(140px, 22vw, 260px); min-width: 0;
}
body.home.open:not(.all) .sw-row {
  display: flex; flex-direction: column-reverse; align-items: stretch;
  gap: 8px; padding: 0; color: var(--fg);
}
body.home.open:not(.all) .sw-name {
  flex: none; min-height: 2.4em; overflow: hidden;
}
body.home.open:not(.all) .sw-name .sw-title {
  display: block; font-size: clamp(11px, 1.2vw, 15px); line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.home.open:not(.all) .sw-role {
  display: block; margin: 3px 0 0; font-size: 10px; top: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.home.open:not(.all) .sw-img {
  position: relative; z-index: 0; display: block; width: 100%; height: auto;
  aspect-ratio: 1; background: transparent; transition: transform .3s ease;
}
body.home.open:not(.all) .sw-list li:hover .sw-img,
body.home.open:not(.all) .sw-list li:focus-within .sw-img {
  z-index: 1; transform: scale(1.06);
}
body.home.open:not(.all) .sw-img img {
  width: 100%; height: 100%; object-fit: cover;
}
@media (max-width: 640px) {
  body.home.open:not(.all) .close-list { top: 60px; right: 14px; }
  body.home.open:not(.all) .sw-list {
    left: 14px; right: 14px; bottom: 24px; gap: 6px;
  }
  body.home.open:not(.all) .sw-row {
    position: static; flex-direction: column-reverse; align-items: stretch; gap: 3px;
  }
  body.home.open:not(.all) .sw-name {
    position: static; min-height: 0; padding: 0; overflow: visible;
    background: none; color: var(--fg); text-align: left;
  }
  body.home.open:not(.all) .sw-name .sw-title {
    font-size: 10px; white-space: normal; text-overflow: clip;
  }
  body.home.open:not(.all) .sw-role {
    display: block; margin: 3px 0 0; font-size: 9px; line-height: 1.15;
    top: 0; white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.home.open:not(.all) .sw-img { transition: none; }
}

/* ===== OTHER PAGES (about, contact, project) ===== */
.page { position: relative; z-index: 2; padding: 140px 25px 80px; min-height: 100vh; }
.page h1 { font-size: clamp(64px, 12vw, 190px); line-height: .88; letter-spacing: -0.045em; font-weight: 300; margin-bottom: 60px; }
.page p { font-size: clamp(20px, 2.4vw, 36px); line-height: 1.2; letter-spacing: -0.01em; max-width: 28em; margin-bottom: 1em; }
.page .big-link { font-weight: 300; display: block; font-size: clamp(28px, 5vw, 80px); letter-spacing: -0.03em; border-top: 1px solid var(--line); padding: 18px 0; }
.page .big-link:last-child { border-bottom: 1px solid var(--line); }
.page .big-link:hover { opacity: .5; }
.project-images { display: grid; gap: 14px; margin-top: 40px; }
.project-images img { width: 100%; height: auto; }

.project-num { font-size: 12px !important; letter-spacing: .02em; opacity: .6; margin-bottom: 1.4em !important; }
.project h1 { margin-bottom: 24px; }
.project-meta { display: flex; gap: 28px; font-size: clamp(16px, 1.6vw, 24px) !important; margin-bottom: 50px !important; opacity: .8; }
.project-text { max-width: 34em; margin-bottom: 60px; }
.project-text p { margin-bottom: 1em; }
.project-text .big-link { margin-top: 30px; }
.project-images { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; margin-top: 0; }
.project-images video { width: 100%; height: auto; display: block; background: #111; grid-column: 1 / -1; }
.project-images iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; grid-column: 1 / -1; }
.next-project { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 100px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next-project span { font-size: 12px; opacity: .6; text-transform: uppercase; letter-spacing: .02em; }
.next-project strong { font-weight: 300; font-size: clamp(28px, 5vw, 80px); letter-spacing: -0.03em; text-align: right; }
.next-project:hover { background: var(--fg); color: var(--bg); }

@media (max-width: 640px) {
  .nav { padding: 16px 14px; }
  body.home .nav { gap: 12px; }
  body.home .nav nav { gap: 12px; flex-shrink: 0; }
  body.home .nav-identity { max-width: 150px; }
  .close-list { margin-right: 14px; }
  .sw-list { margin: 0 14px; }
  .sw-row { gap: 10px; padding: 6px 8px; min-height: 56px; }
  .sw-num { display: none; }
  .sw-title { font-size: 19px; line-height: 1.15; }
  .sw-img { width: 50px; height: 50px; }
  .sw-arrow { width: 18px; height: 18px; margin-left: 0; }
  .page { padding-left: 14px; padding-right: 14px; }
}

/* ===== "WORKS" LIST: every project in the colour of its head ===== */
.sw-list li.head-yellow { background: #ffe14a; color: #000; --line: rgba(0,0,0,.45); }
.sw-list li.head-normal { background: #ffffff; color: #000; --line: rgba(0,0,0,.35); }
.sw-list li.head-pink   { background: #ffb3da; color: #000; --line: rgba(0,0,0,.45); }
body.home.open:not(.all) .sw-list li { background: transparent; color: var(--fg); }


/* =====================================================================
   WORKS LIST  (click "Works")
   a column of thumbnails; point at one and it widens with its details.
   Text uses the gradient colours of each head's opening-page glow.
   ===================================================================== */
:root {
  /* gradient of each head's opening-page glow:  a = light, b = glow colour, c = deeper (for small text) */
  --g-yellow-a: #f5e39a;  --g-yellow-b: #d7b638;  --g-yellow-c: #8b7112;   /* yellow head -> butter yellow */
  --g-normal-a: #e2dddc;  --g-normal-b: #c7b9b8;  --g-normal-c: #806968;   /* middle head -> warm grey */
  --g-pink-a:   #f9c9e4;  --g-pink-b:   #f19acb;  --g-pink-c:   #c0348a;   /* pink head   -> pink */
}
.head-yellow { --ga: var(--g-yellow-a); --gb: var(--g-yellow-b); --gc: var(--g-yellow-c); }
.head-normal { --ga: var(--g-normal-a); --gb: var(--g-normal-b); --gc: var(--g-normal-c); }
.head-pink   { --ga: var(--g-pink-a);   --gb: var(--g-pink-b);   --gc: var(--g-pink-c); }

/* heads step aside; works are shown as a scrollable two-column gallery */
body.all #heads-canvas, body.all #heads-fallback { opacity: 0; pointer-events: none; }
body.home.all { overflow-x: hidden; overflow-y: auto; height: auto; min-height: 100vh; }
body.all .head-list {
  margin-top: 0; padding: 88px 4vw 56px; min-height: 100vh; height: auto; overflow: visible;
}
body.all .close-list { display: none; }

body.all .sw-list.works-index {
  position: relative; z-index: 2; margin: 0 auto; border: 0;
  width: 100%; max-width: 1600px; columns: 2; column-gap: 20px;
}
body.all .sw-list.works-index li,
body.all .sw-list.works-index li.head-yellow,
body.all .sw-list.works-index li.head-normal,
body.all .sw-list.works-index li.head-pink {
  display: inline-block; width: 100%; min-width: 0; margin: 0 0 36px;
  background: transparent; border: 0; break-inside: avoid;
}
body.all .works-index .sw-row,
body.all .works-index .sw-row:hover {
  display: block; height: 100%; padding: 0; background: none; color: inherit;
}
body.all .works-index .sw-img {
  display: block; width: 100%; height: auto; aspect-ratio: auto;
  background: transparent; overflow: hidden;
}
body.all .works-index .sw-img img {
  width: 100%; height: auto; object-fit: cover; display: block; transform: none;
}
body.all .works-index .sw-img.square-cover { aspect-ratio: 1; }
body.all .works-index .sw-img.square-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Keep project details small and directly beneath each image. */
body.all .works-index .sw-info {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  width: 100%; margin-top: 8px; white-space: normal; pointer-events: none;
}

/* Keep all works-page copy black, including while its background theme changes. */
body.all .works-index .sw-tag,
body.all .works-index .sw-title,
body.all .works-index .sw-meta,
body.all .works-index .sw-count {
  background: none;
  color: #000; -webkit-text-fill-color: #000;
  width: fit-content;
}
body.all .works-index .sw-count { font-size: 11px; }
body.all .works-index .sw-tag   { font-size: 11px; text-transform: none; letter-spacing: 0; }
body.all .works-index .sw-title { font-size: 16px; font-weight: 400; line-height: 1.15; letter-spacing: -.01em; flex: none; overflow-wrap: anywhere; }
body.all .works-index .sw-meta  { font-size: 11px; }
body.all .works-bg,
body.all .works-side { display: none; }

@media (max-width: 640px) {
  body.all .head-list { padding: 80px 14px 40px; }
  body.all .sw-list.works-index { column-gap: 12px; }
  body.all .sw-list.works-index li { margin-bottom: 24px; }
  body.all .works-index .sw-info { margin-top: 6px; }
  body.all .works-index .sw-title { font-size: 14px; }
  body.all .works-index .sw-tag { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  body.all .works-index .sw-info { transition: none; }
}


/* ===== ROLE NEXT TO THE PROJECT NAMES (head lists) ===== */
.sw-name { flex: 1; min-width: 0; line-height: 1.1; }
.sw-name .sw-title { display: inline; flex: none; }
.sw-role {
  display: inline-block; margin-left: 12px; font-size: 12px; line-height: 1; letter-spacing: .01em;
  opacity: .7; vertical-align: top; position: relative; top: 6px; white-space: nowrap;
}
.project-role::before { content: ""; }
@media (max-width: 640px) {
  .sw-role { display: block; margin: 3px 0 0; font-size: 10px; top: 0; }
}

/* the star is drawn (the font has no star character) */
.star { display: inline-block; width: .85em; height: .85em; vertical-align: -.08em; fill: currentColor; }
body.all .works-index .sw-count .star { fill: var(--gc); }

/* everything in Neue Montreal */
html, body, button, input, textarea, select, a { font-family: "Neue Montreal", "Helvetica Neue", Helvetica, Arial, sans-serif; }


/* ===== BIG WORD BEHIND THE HEADS (same font + colours as the Works list) ===== */
.hover-words { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hw {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font-weight: 300; font-size: 58px; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(90deg, var(--ga), var(--gb));
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  opacity: 0; transform: translate(-50%, -50%) translateY(-8px);
  transition: opacity .5s ease, transform .8s cubic-bezier(.22,.61,.36,1);
}
.hover-words .head-yellow { --ga: #c4a12b; --gb: #e2c34c; }
.hover-words .head-normal { --ga: #a79291; --gb: #c9bcbb; }
.hover-words .head-pink { --ga: #b32978; --gb: #d13d91; }
.hw.on { opacity: 1; transform: translate(-50%, -50%); }
body.open .hover-words { display: none; }


/* ===== ABOUT, CONTACT AND PROJECT PAGES: white background, small type ===== */
body:not(.home) .nav { background: var(--bg); }
.page { padding: 96px 25px 60px; }
.page h1 { font-size: clamp(22px, 1.9vw, 30px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 400; margin-bottom: 26px; }
.page p { font-size: clamp(13px, 1vw, 15px); line-height: 1.5; letter-spacing: 0; max-width: 34em; margin-bottom: .9em; }
.page .big-link { font-size: clamp(16px, 1.5vw, 21px); letter-spacing: -.01em; padding: 12px 0; }
.project-num { font-size: 11px !important; margin-bottom: 1em !important; }
.project h1 { margin-bottom: 14px; }
.project-meta { font-size: 12px !important; gap: 18px; margin-bottom: 26px !important; }
.project-text { margin-bottom: 32px; }
.project-text .big-link { margin-top: 18px; }
.next-project { margin-top: 56px; padding: 16px 0; }
.next-project span { font-size: 11px; }
.next-project strong { font-size: clamp(16px, 1.6vw, 22px); }
@media (max-width: 640px) { .page { padding: 84px 14px 48px; } }


/* =====================================================================
   WORK / ABOUT / CONTACT PAGES  (layout after the reference)
   white page, small type: name | nav | action on top, text in the middle column,
   then a line with number / title / role / year, then the big picture.
   ===================================================================== */
body.sub { --pad: clamp(12px, 1.8vw, 26px); background: #fff; min-height: 100vh; }
.sub .top, .sub .meta, .sub .next, .sub .links a { display: grid; grid-template-columns: 42% 1fr auto; }
.a-spot-packaging {
  margin: 18px var(--pad) 0;
  padding: 0;
  background: #fff;
}
.a-spot-packaging p {
  margin: 0 0 18px;
  max-width: none;
  font-size: clamp(18px, 1.75vw, 24px);
  line-height: 1.25;
  letter-spacing: -.005em;
}
.a-spot-packaging .more {
  margin: 0;
  padding: 0;
}
.sub .top { display: flex; justify-content: space-between; padding: 22px 25px 0; align-items: start; }
.sub .top-name { font-size: 12px; line-height: normal; letter-spacing: 0; text-transform: none; opacity: 1; }
.top-nav { font-size: 12px; letter-spacing: .02em; text-transform: uppercase; display: flex; gap: 22px; }
.top-nav a { color: #9b9b9b; transition: color .2s; }
.top-nav a.on, .top-nav a:hover { color: #000; }

.sub .intro { padding: 0 var(--pad); display: grid; grid-template-columns: 42% 1fr; margin: clamp(36px, 6vw, 96px) 0 clamp(36px, 6.5vw, 100px); }
.sub .intro-text { grid-column: 2; max-width: 38em; }
.sub .project-title { margin: 0 0 18px; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; font-weight: 400; letter-spacing: -.02em; }
.sub .intro-text p { font-size: clamp(16px, 1.45vw, 21px); line-height: 1.3; letter-spacing: -.005em; margin-bottom: .9em; }
body.videography-page .text-link,
.sub .text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #ff4eb8; text-decoration: underline; text-decoration-color: #ff4eb8; text-underline-offset: 3px; }
body.videography-page .text-link:hover,
.sub .intro-text p .text-link { font-size: inherit; }
.arr { width: 14px; height: 14px; flex: none; }

.sub .meta { grid-template-columns: 42% 26% 1fr auto auto; gap: 0; padding: 0 var(--pad) 8px; font-size: 12px; align-items: center; }
.m-title { font-size: 12px; font-weight: 500; letter-spacing: 0; }
.m-role, .m-year { color: #8d8d8d; }
.m-year { text-align: right; padding-right: 16px; white-space: nowrap; }
.m-arrow { display: inline-flex; }

.hero, .more { margin-left: var(--pad); margin-right: var(--pad); }
.hero { position: relative; background: #f2f2f2; overflow: hidden; }
.hero-wide img { width: 100%; height: auto; object-fit: contain; display: block; }
.hero-portrait { display: flex; justify-content: center; align-items: center; gap: 8px; height: calc((100vw - 2 * var(--pad)) / 2.2); }
.hero-portrait img { height: 100%; width: auto; max-width: 48%; object-fit: contain; }
.hero-video { background: #111; }
.hero-video video, .hero-video iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }
.hero-heads { background: #fffefa; }
.hero-heads img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; }
.more { display: grid; gap: 6px; margin-top: 6px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.more img { width: 100%; height: auto; display: block; }
.depop-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 6px var(--mpad) 0; align-items: start; }
.depop-pair img { width: 100%; height: auto; display: block; }
.depop-slideshow { margin: 24px var(--mpad) 0; }
.depop-slide-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #222; }
.depop-slideshow-controls { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 13px; }
.depop-slideshow-controls button { text-decoration: underline; text-underline-offset: 3px; }
.depop-slideshow-controls button:disabled { opacity: .35; cursor: default; }
.depop-slide-count { font-variant-numeric: tabular-nums; }
.trace-grid-hint { margin: 0 clamp(18px, 6vw, 120px) 12px; font-size: 16px; }
.trace-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1vw, 16px); margin: 0 clamp(18px, 6vw, 120px); }
.trace-card { display: block; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 22px; background: transparent; color: inherit; text-align: left; }
.trace-card img, .trace-card video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.trace-card video { pointer-events: none; }
.trace-card:hover img, .trace-card:hover video { transform: scale(1.025); }
.trace-card img, .trace-card video { transition: transform .3s ease; }
.trace-card:focus-visible, .trace-dialog-close:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.trace-dialog { width: min(1100px, calc(100vw - 48px)); max-height: min(90svh, 900px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 20px; background: #fff; color: #000; }
.trace-dialog::backdrop { background: rgba(0,0,0,.78); }
.trace-dialog-header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #fff; }
.trace-dialog-title { font-size: 14px; font-weight: 500; }
.trace-dialog-close { width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 50%; font-size: 24px; line-height: 1; }
.trace-dialog-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; padding: 0 20px 20px; }
.trace-dialog-pair figure { min-width: 0; margin: 0; }
.trace-dialog-pair figcaption { margin-bottom: 8px; font-size: 12px; }
.trace-dialog-pair img, .trace-dialog-pair video { display: block; width: 100%; height: min(65svh, 640px); border-radius: 12px; background: #f1f1f1; object-fit: contain; }

.sub .next { margin: 56px var(--pad) 0; padding: 14px 0 18px; border-top: 1px solid #000; font-size: 12px; align-items: baseline; }
.next-label { color: #8d8d8d; }
.next .arr { justify-self: end; }
.sub .next:hover .next-title { text-decoration: underline; text-underline-offset: 3px; }

.links { list-style: none; margin: 0 var(--pad); border-top: 1px solid #000; }
.links li { border-bottom: 1px solid rgba(0,0,0,.2); }
.sub .links a { grid-template-columns: 42% 26% 1fr auto; padding: 12px 0; font-size: 13px; align-items: center; }
.sub .links a:hover .l-title { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 700px) {
  .sub .top { gap: 12px; padding: 16px 14px 0; }
  .sub .top .nav-identity { max-width: 150px; }
  .top-nav { gap: 12px; flex-shrink: 0; }
  .sub .intro { grid-template-columns: 1fr; }
  .sub .intro-text { grid-column: 1; }
  .sub .meta { grid-template-columns: auto 1fr auto; row-gap: 4px; }
  .m-num { grid-column: 1; } .m-title { grid-column: 2; } .m-arrow { grid-column: 3; grid-row: 1; }
  .m-role { grid-column: 2; } .m-year { grid-column: 2; text-align: left; padding: 0; }
  .sub .next { grid-template-columns: auto 1fr auto; gap: 16px; }
  .sub .links a { grid-template-columns: auto 1fr auto; gap: 4px 14px; }
  .sub .links .m-role { grid-column: 2; grid-row: 2; } .sub .links .arr { grid-row: 1; grid-column: 3; }
  .hero-portrait { height: calc((100vw - 2 * var(--pad)) * 0.75); }
}


/* ===== WORK PAGES: black text + blurred head of the category in the left corner ===== */
.top-nav a, .m-role, .m-year, .next-label { color: #000; }
.top-nav a { opacity: .55; }
.top-nav a.on, .top-nav a:hover { opacity: 1; }
.top-nav a.on { font-weight: 500; }
.hw.head-normal.on { opacity: 1; }
.top-nav-about { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
body.sub { position: relative; }
.sub .top, .sub .work { position: relative; z-index: 1; }
body.tacy-page .top-name,
body.videography-page .top-name { color: #fff; }
.contact-page .top { position: relative; z-index: 1; }
.contact-stage { position: relative; display: grid; place-items: center; min-height: calc(100svh - 56px); }
.contact-heads { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: min(100svh, 1300px); max-width: 94vw; width: auto; object-fit: contain; }
.contact-details { position: relative; z-index: 1; text-align: center; }
.contact-details p { margin: 0 0 .45em; font-size: clamp(16px, 2vw, 24px); line-height: 1.3; }
.contact-details .text-link { font-size: inherit; }
.corner-head { position: absolute; top: 0; left: 0; width: 100%; height: 70vh; overflow: hidden; pointer-events: none; z-index: 0; }
.corner-head img { position: absolute; left: -4vw; top: -5vw; width: 34vw; min-width: 280px; filter: blur(38px); opacity: .9; }
.corner-head.pink img   { width: 26vw; min-width: 240px; }
.corner-head.normal img { width: 22vw; min-width: 220px; }
.corner-head.yellow img { width: 38vw; top: -6vw; opacity: 1; }

/* ===== v13: bigger, less blurred corner head; pictures and videos further from the sides ===== */
body.sub { --mpad: clamp(24px, 9vw, 170px); }          /* space left and right of pictures/videos: raise for smaller pictures */
.hero, .more { margin-left: var(--mpad); margin-right: var(--mpad); }
.hero-portrait { height: calc((100vw - 2 * var(--mpad)) / 2.2); }

.corner-head { height: 95vh; }
.corner-head img { left: -7vw; top: -9vw; width: 56vw; min-width: 420px; filter: blur(24px); opacity: 1; }
.corner-head.yellow img { width: 66vw; left: -9vw; top: -8vw; }
.corner-head.pink img   { width: 44vw; left: -5vw; top: -12vw; }
.corner-head.normal img { width: 38vw; left: -4vw; top: -6vw; }
body.tacy-page .corner-head.normal img,
body.videography-page .corner-head.normal img { width: 44vw; min-width: 0; left: -5vw; top: -12vw; }
.corner-head.about-head { height: auto; overflow: visible; }
.corner-head.about-head img { width: 58vw; min-width: 0; left: -6vw; top: -4vw; filter: none; }
body.about-page .about-end { display: flex; justify-content: space-between; align-items: center; }
body.about-page .about-end .cv-link { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
body.about-page .intro-text { position: relative; z-index: 1; isolation: isolate; }
body.about-page .intro-text::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1.5rem -2rem;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.96) 0%, rgba(255,255,255,.82) 52%, rgba(255,255,255,0) 100%);
  filter: blur(18px);
  pointer-events: none;
}
.cv-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #000;
  box-shadow: 0 16px 70px rgba(0,0,0,.18);
}
.cv-dialog::backdrop {
  background: rgba(255,255,255,.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.cv-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px;
}
.cv-dialog-header h2 { font-size: 14px; font-weight: 500; }
.cv-dialog-close {
  width: auto;
  height: auto;
  border: 0;
  font-size: 24px;
  line-height: 1;
}
.cv-dialog iframe { display: block; width: 100%; height: calc(100% - 54px); border: 0; }
.cv-dialog-close:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
body.about-page .work { padding-bottom: 0; }

@media (max-width: 700px) {
  body.sub { --mpad: 18px; }
  .hero-portrait { height: calc((100vw - 2 * var(--mpad)) * 0.75); }
  .corner-head.yellow img { width: 120vw; left: -20vw; top: -12vw; }
  .corner-head.pink img   { width: 80vw;  left: -12vw; top: -18vw; }
  .corner-head.normal img { width: 70vw; }
  body.tacy-page .corner-head.normal img,
  body.videography-page .corner-head.normal img { width: 80vw; left: -12vw; top: -18vw; }
  .corner-head.about-head {
    position: relative; top: auto; left: auto; width: auto; height: auto;
    margin: 0 var(--mpad) 30px; overflow: visible;
  }
  .corner-head.about-head img {
    position: relative; left: auto; top: auto; display: block;
    width: 100%; min-width: 0; max-width: 100%; height: auto;
  }
  body.about-page .work { padding-bottom: 0; }
}

@media (max-width: 760px) {
  .trace-grid-hint { margin-left: var(--mpad); margin-right: var(--mpad); }
  .trace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: var(--mpad); margin-right: var(--mpad); }
  .trace-dialog { width: calc(100vw - 24px); max-height: 92svh; border-radius: 16px; }
  .trace-dialog-pair { grid-template-columns: 1fr; gap: 18px; padding: 0 14px 14px; }
  .trace-dialog-pair img, .trace-dialog-pair video { height: min(42svh, 420px); }
}
