/* Pauline Kess — portfolio
   Colours, type and spacing live in these variables. */
:root {
  --bg: #0b0b0c;
  --fg: #ece8df;
  --muted: #8b8880;
  --line: rgba(236, 232, 223, 0.16);
  --accent: #d6ff3d;
  --pad: clamp(16px, 3vw, 44px);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--display); font-weight: 400; font-stretch: 100%;
  font-size: clamp(16px, 1.15vw, 19px); line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--accent); color: var(--bg); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: var(--pad); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  transition: transform .9s var(--ease) .1s;
}
.loader__count { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(64px, 14vw, 220px); line-height: .8; }
body:not(.is-loading) .loader { transform: translateY(-100%); }

/* ---------- top bar ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 18px var(--pad); mix-blend-mode: difference; color: #fff;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
}
.bar__name { font-weight: 500; }
.bar__section { justify-self: center; }
.bar__nav { justify-self: end; display: flex; gap: clamp(10px, 1.6vw, 26px); }
.bar__nav a { position: relative; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.bar__nav a:hover::after, .bar__nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; padding: 0 var(--pad); display: grid; grid-template-rows: 1fr auto auto; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .75; transform: scale(1.15); will-change: transform; transition: opacity 1.4s var(--ease); }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,12,.35) 0%, rgba(11,11,12,0) 35%, rgba(11,11,12,.25) 70%, var(--bg) 100%); }
.hero__grain { position: absolute; inset: -50%; z-index: 1; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(0,0)} }
.hero__title {
  position: relative; z-index: 2; align-self: end; margin: 0; padding-top: 18vh;
  font-weight: 800; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(64px, 15.5vw, 300px); line-height: .82; letter-spacing: -.02em;
}
.hero__line { display: block; overflow: hidden; }
.hero__line--right { text-align: right; }
.split .ch { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
body.is-ready .split .ch { transform: none; }
.hero__meta { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 0; border-top: 1px solid var(--line); margin-top: 22px; }
.hero__meta p { margin: 0; }
.hero__word { color: var(--accent); display: inline-block; min-width: 1ch; }
.hero__intro { position: relative; z-index: 2; max-width: 34ch; margin: 22px 0 0; font-size: clamp(20px, 2vw, 30px); line-height: 1.2; font-weight: 300; }
.hero__scroll { position: absolute; z-index: 2; right: var(--pad); bottom: var(--pad); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-top: var(--pad); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__track span { font-weight: 300; font-stretch: 62%; text-transform: uppercase; font-size: clamp(28px, 4vw, 64px); line-height: 1; padding-right: .6em; white-space: nowrap; }
.marquee__track span i { font-style: normal; color: var(--accent); padding-right: .6em; }

/* ---------- section heads ---------- */
section { position: relative; }
.work, .practice, .archive, .early, .about { padding: clamp(80px, 12vw, 180px) var(--pad) 0; }
.head { display: grid; grid-template-columns: 1fr 3fr; gap: 16px 24px; align-items: end; margin-bottom: clamp(32px, 5vw, 72px); }
.head__num { margin: 0; color: var(--muted); align-self: start; padding-top: .6em; }
.head__title { margin: 0; font-weight: 700; font-stretch: 112%; text-transform: uppercase; font-size: clamp(40px, 6.6vw, 120px); line-height: .9; letter-spacing: -.015em; }
.head__note { grid-column: 2; margin: 0; color: var(--muted); }
.head--small .head__title { font-size: clamp(28px, 3.4vw, 56px); }

/* generic reveal */
.reveal { clip-path: inset(0 0 100% 0); transform: translateY(30px); transition: clip-path 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { clip-path: inset(0 0 -10% 0); transform: none; }
.rise { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.filters button { border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; transition: background .3s, color .3s, border-color .3s; }
.filters button:hover { border-color: var(--fg); }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- work index ---------- */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); position: relative; z-index: 2; }
.work .head, .filters { position: relative; z-index: 2; }
.index li { border-bottom: 1px solid var(--line); }
.index li.is-hidden { display: none; }
.row {
  position: relative; width: 100%; text-align: left;
  display: grid; grid-template-columns: 1fr 3fr auto; gap: 24px; align-items: baseline;
  padding: clamp(14px, 1.6vw, 24px) 0; transition: color .4s var(--ease), padding .5s var(--ease);
}
.row__num { color: var(--muted); }
.row__main { display: flex; flex-direction: column; gap: 6px; }
.row__title { font-weight: 600; font-stretch: 100%; text-transform: uppercase; font-size: clamp(26px, 3.6vw, 64px); line-height: .95; letter-spacing: -.01em; transition: font-stretch .6s var(--ease), letter-spacing .6s var(--ease); }
.row__sub { color: var(--muted); }
.row__year { color: var(--muted); }
.row__thumb { display: none; }
@media (hover: hover) {
  .index:hover .row { color: rgba(236,232,223,.28); }
  .index .row:hover, .index .row:focus-visible { color: var(--fg); text-shadow: 0 2px 30px rgba(0,0,0,.6); }
  .row:hover .row__title, .row:focus-visible .row__title { font-stretch: 125%; letter-spacing: -.02em; }
  .row:hover .row__num { color: var(--accent); }
}

/* floating preview: big on purpose */
.preview {
  position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none;
  width: min(44vw, 720px); aspect-ratio: 4 / 3;
  clip-path: inset(50% 50% 50% 50%); transition: clip-path .6s var(--ease);
  will-change: transform;
}
.preview.is-on { clip-path: inset(0 0 0 0); }
.preview__inner, .preview__inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview__inner img { opacity: 0; transform: scale(1.08); transition: opacity .5s var(--ease), transform 1.6s var(--ease); }
.preview__inner img.on { opacity: 1; transform: none; }
.preview__label { position: absolute; left: 10px; bottom: 10px; background: var(--bg); padding: 4px 8px; }

.cursor { position: fixed; left: 0; top: 0; z-index: 70; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); pointer-events: none; mix-blend-mode: difference; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease); }
.cursor.is-big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
@media (hover: none) { .cursor, .preview { display: none; } }

/* ---------- practice ---------- */
.practice__wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(24px, 4vw, 72px); }
.practice__step { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .6s var(--ease); }
.practice__step.is-active { opacity: 1; }
.practice__step .mono { color: var(--accent); }
.practice__step h3 { margin: 12px 0 18px; font-weight: 700; font-stretch: 112%; text-transform: uppercase; font-size: clamp(30px, 4vw, 68px); line-height: .92; }
.practice__step p { margin: 0; max-width: 40ch; font-size: clamp(17px, 1.4vw, 22px); font-weight: 300; }
.practice__thumbs { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.practice__thumbs button { width: 64px; height: 48px; overflow: hidden; opacity: .5; transition: opacity .3s, outline-color .3s; outline: 1px solid transparent; outline-offset: 2px; }
.practice__thumbs button.on, .practice__thumbs button:hover { opacity: 1; outline-color: var(--accent); }
.practice__thumbs img { display: block !important; width: 100%; height: 100%; object-fit: cover; margin: 0 !important; aspect-ratio: auto !important; }
.practice__links { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 10px; }
.practice__links a { display: inline-flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--line); border-radius: 99px; padding: 10px 16px; transition: background .3s, color .3s, border-color .3s; }
.practice__links a:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.practice__step > img { display: none; }
.practice__stage { position: sticky; top: 10vh; height: 80vh; align-self: start; overflow: hidden; }
.practice__frames, .practice__frames figure { position: absolute; inset: 0; margin: 0; }
.practice__frames figure { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease); }
.practice__frames figure.on { clip-path: inset(0 0 0 0); z-index: 2; }
.practice__frames figure.was { clip-path: inset(0 0 0 0); z-index: 1; }
.practice__frames img { position: absolute; inset: 0; width: 100%; height: 115%; object-fit: cover; will-change: transform; opacity: 0; transition: opacity .9s var(--ease); }
.practice__frames img.on { opacity: 1; }
.practice__counter { position: absolute; right: 12px; bottom: 12px; z-index: 3; background: var(--bg); padding: 4px 8px; }

/* ---------- archive (compact) ---------- */
.archive__groups { display: grid; grid-template-columns: 1fr 1fr; gap: 56px clamp(24px, 4vw, 72px); }
.archive__group h3 { margin: 0 0 10px; color: var(--accent); font-weight: 400; }
.table { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.table li { border-bottom: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: 62px 1fr auto; gap: 2px 14px; align-items: baseline; padding: 9px 0; font-size: 15px; line-height: 1.35; position: relative; }
.trow__title { font-weight: 500; }
.trow__where { grid-column: 2; color: var(--muted); font-size: 13.5px; }
.muted { color: var(--muted); }
.trow__go { grid-row: 1; grid-column: 3; color: var(--accent); font-size: 11px; }
a.trow:hover .trow__title { color: var(--accent); }

/* ---------- early works teaser ---------- */
.early__teaser { position: relative; display: block; overflow: hidden; background: #f2f0ec; padding: 28px 0; }
.early__strip { display: flex; gap: 14px; width: max-content; will-change: transform; }
.early__strip img { width: clamp(180px, 20vw, 300px); aspect-ratio: 1; object-fit: cover; filter: grayscale(1); transition: transform .8s var(--ease); }
.early__teaser:hover .early__strip img { transform: scale(.94); }
.early__cta { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--bg); color: var(--fg); padding: 18px 28px; text-align: center; transition: background .3s, color .3s; }
.early__cta .mono { display: block; color: var(--muted); margin-bottom: 6px; }
.early__cta strong { font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(22px, 3vw, 44px); line-height: 1; }
.early__teaser:hover .early__cta { background: var(--accent); color: var(--bg); }
.early__teaser:hover .early__cta .mono { color: var(--bg); }

/* ---------- about (inverted so it stands out) ---------- */
.about { background: var(--fg); color: var(--bg); padding-bottom: clamp(80px, 10vw, 160px); margin-top: clamp(80px, 10vw, 160px); }
.about .head__num, .about .head__note, .about__side h3 { color: #6d6a63; }
.about__statement { margin: 0 0 clamp(60px, 8vw, 120px); font-weight: 500; font-size: clamp(30px, 4.6vw, 80px); line-height: 1.02; letter-spacing: -.015em; max-width: 21ch; }
.fill-text .w { color: rgba(11,11,12,.16); transition: color .4s linear; }
.fill-text .w.on { color: var(--bg); }
.about__grid { display: grid; grid-template-columns: 1fr 1.2fr .8fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.about__img { margin: 0; }
.about__img img { width: 100%; height: auto; display: block; }
.about__text p { margin: 0 0 1.1em; font-size: clamp(17px, 1.3vw, 21px); }
.about__side h3 { margin: 0 0 12px; font-weight: 400; }
.about__side ul { list-style: none; margin: 0 0 40px; padding: 0; }
.about__collectives li { padding: 12px 0; border-top: 1px solid rgba(11,11,12,.18); }
.about__collectives a, .about__name { font-weight: 700; text-transform: uppercase; font-stretch: 112%; font-size: 1.1em; }
.about__collectives a:hover { text-decoration: underline; text-underline-offset: 4px; }
.about__collectives span { display: block; color: #55524c; font-size: .85em; }
.about__tools li { padding: 6px 0; border-top: 1px solid rgba(11,11,12,.18); }
.about ::selection { background: var(--bg); color: var(--fg); }

/* ---------- contact ---------- */
.contact { padding: clamp(90px, 12vw, 180px) var(--pad) var(--pad); min-height: 70vh; display: flex; flex-direction: column; }
.contact .head__num { margin-bottom: 24px; }
.contact__mail { align-self: flex-start; font-weight: 700; font-stretch: 112%; text-transform: lowercase; font-size: clamp(24px, 3.6vw, 60px); line-height: .95; letter-spacing: -.02em; word-break: break-word; transition: color .3s; }
.contact__mail .ch { display: inline-block; transition: transform .5s var(--ease), color .3s; }
.contact__mail:hover { color: var(--accent); }
.contact__where { margin: 28px 0 0; color: var(--muted); }
.contact__links { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.contact__links a:hover { color: var(--accent); }
.foot { margin-top: auto; padding-top: 80px; display: flex; justify-content: space-between; color: var(--muted); }

/* ---------- detail overlay ---------- */
.detail { position: fixed; inset: 0; z-index: 80; background: var(--bg); transform: translateY(100%); transition: transform .8s var(--ease); display: flex; flex-direction: column; }
.detail.is-open { transform: none; }
.detail__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--pad); border-bottom: 1px solid var(--line); }
.detail__bar div { display: flex; gap: 22px; }
.detail__bar button:hover { color: var(--accent); }
.detail__scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.detail__body { padding: clamp(28px, 5vw, 80px) var(--pad) 120px; }
.d-cats { color: var(--accent); margin: 0 0 18px; }
.d-title { margin: 0; font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(44px, 9vw, 170px); line-height: .85; letter-spacing: -.02em; }
.d-sub { margin: 14px 0 0; color: var(--muted); font-size: clamp(18px, 1.6vw, 26px); }
.d-hero { margin: clamp(32px, 5vw, 64px) 0; }
.d-hero img { width: 100%; max-height: 88vh; object-fit: cover; }
.d-grid { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 4vw, 72px); }
.d-meta { list-style: none; margin: 0; padding: 0; }
.d-meta li { padding: 12px 0; border-top: 1px solid var(--line); }
.d-meta li span { display: block; color: var(--muted); }
.d-summary { margin: 0 0 1em; font-size: clamp(22px, 2.3vw, 38px); line-height: 1.12; }
.d-text p { margin: 0 0 1em; font-weight: 300; max-width: 60ch; }
.d-links { list-style: none; padding: 0; margin: 24px 0 0; }
.d-links a { display: inline-block; padding: 6px 0; border-bottom: 1px solid var(--line); }
.d-links a:hover { color: var(--accent); border-color: var(--accent); }
.d-video { position: relative; margin: clamp(40px, 6vw, 90px) 0; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.d-video img { width: 100%; height: 100%; object-fit: cover; opacity: .6; transition: opacity .4s, transform 1.2s var(--ease); }
.d-video button { position: absolute; inset: 0; display: grid; place-items: center; }
.d-video button span { font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(22px, 3vw, 46px); border: 1px solid var(--fg); border-radius: 99px; padding: .4em 1em; transition: background .3s, color .3s; }
.d-video:hover img { opacity: .8; transform: scale(1.03); }
.d-video:hover button span { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.d-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.d-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: clamp(40px, 6vw, 90px); }
.d-gallery img { width: 100%; height: 100%; object-fit: cover; }
.d-gallery figure { margin: 0; }
.d-gallery figure:only-child, .d-gallery figure:nth-child(3n+1):last-child { grid-column: 1 / -1; }
.d-next { display: block; margin-top: clamp(60px, 8vw, 120px); padding-top: 24px; border-top: 1px solid var(--line); text-align: left; width: 100%; }
.d-next .mono { color: var(--muted); }
.d-next strong { display: block; font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(36px, 6vw, 110px); line-height: .9; transition: color .3s; }
.d-next:hover strong { color: var(--accent); }
body.no-scroll { overflow: hidden; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar__section { display: none; }
  .bar__nav { gap: 12px; }
  .bar__nav a:nth-child(2), .bar__nav a:nth-child(3) { display: none; }
  .hero__meta { flex-direction: column; gap: 6px; }
  .hero__scroll { display: none; }
  .head { grid-template-columns: 1fr; }
  .head__note { grid-column: 1; }
  .row { grid-template-columns: auto 1fr; gap: 6px 14px; }
  .row__year { grid-column: 2; }
  .row__thumb { display: block; grid-column: 1 / -1; order: -1; aspect-ratio: 16/10; overflow: hidden; margin-bottom: 8px; }
  .row__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .practice__wrap { grid-template-columns: 1fr; }
  .practice__stage { display: none; }
  .practice__step { min-height: 0; opacity: 1; padding: 0 0 56px; }
  .practice__step > img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-bottom: 18px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(-1 * var(--pad)); padding-right: var(--pad); scrollbar-width: none; }
  .filters button { white-space: nowrap; }
  .archive__groups { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; }
  .d-grid, .d-gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .reveal, .rise { clip-path: none; opacity: 1; transform: none; }
  .split .ch { transform: none; }
}
