/* Shared styles for ipeksevvalsaritas.com. */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --border: #e4dccf;
  --text: #1b1b1f;
  --muted: #5f5a52;
  --accent: #8a5a2b;
  --on-accent: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 960px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15131a;
    --surface: #1f1c25;
    --border: #36313f;
    --text: #efe9e0;
    --muted: #b2a99c;
    --accent: #e0b887;
    --on-accent: #15131a;
  }
}

:root[data-theme="dark"] {
  --bg: #15131a;
  --surface: #1f1c25;
  --border: #36313f;
  --text: #efe9e0;
  --muted: #b2a99c;
  --accent: #e0b887;
  --on-accent: #15131a;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* The site's type: Syne ExtraBold, the only weight loaded, so every weight asked for shows as it. */
  font-family:
    "Syne", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

/* The still firefly cursor; see the firefly section at the end. */
html {
  cursor:
    url("/assets/cursor/bocek.png") 30 18,
    auto;
}

a,
button,
label {
  cursor:
    url("/assets/cursor/bocek-parlak.png") 30 18,
    pointer;
}

/* Eira's page has a still snowflake instead; see the snowflake section. */
.snow-page,
.snow-page * {
  cursor:
    url("/assets/cursor/kar.png") 24 24,
    auto;
}

.snow-page a,
.snow-page button,
.snow-page label {
  cursor:
    url("/assets/cursor/kar.png") 24 24,
    pointer;
}

/* The Artchive page has a still spray can, the tip of its nozzle the hotspot; see the spray section. */
.spray-page,
.spray-page * {
  cursor:
    url("/assets/cursor/sprey.png") 7 4,
    auto;
}

.spray-page a,
.spray-page button,
.spray-page label {
  cursor:
    url("/assets/cursor/sprey.png") 7 4,
    pointer;
}

/* RawPop's page has a still lemur, its nose the hotspot; see the lemur section. */
.lemur-page,
.lemur-page * {
  cursor:
    url("/assets/cursor/lemur.png") 19 41,
    auto;
}

.lemur-page a,
.lemur-page button,
.lemur-page label {
  cursor:
    url("/assets/cursor/lemur.png") 19 41,
    pointer;
}

:root.bug-on,
:root.bug-on *,
:root.spray-on,
:root.spray-on *,
:root.snow-on,
:root.snow-on *,
:root.lemur-on,
:root.lemur-on * {
  cursor: none;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.brand {
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  /* Syne runs wide; on a phone the name and About share one line. */
  font-size: clamp(13px, 3.6vw, 16px);
}

.hero {
  padding: 48px 0 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  padding: 0 0 48px;
  margin: 0;
  list-style: none;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: inherit;
  text-decoration: none;
}

.card:hover {
  border-color: var(--accent);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.tag {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.actions {
  padding: 0 0 48px;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

/* Where the page sits: Home / Eira. */
.crumbs {
  padding: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li + li::before {
  content: "/";
  margin: 0 8px;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.crumbs [aria-current] {
  color: var(--text);
}

.crumbs + .hero {
  padding-top: 24px;
}

/* A project's own page: wide images, one after another. */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}

.showcase img,
.showcase video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* No save menu on the artwork; screenshots stay possible. */
.showcase img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.story {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #edca9a;
  color: #1b5410;
}

.wave {
  display: block;
  width: 100%;
  height: 48px;
}

.story-text {
  padding: 24px clamp(20px, 6vw, 72px);
  max-width: 820px;
}

.story-text p {
  margin: 0 0 20px;
}

.story-text .loud {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 800;
  line-height: 1.35;
}

.story-text .there {
  color: #d4145a;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(20px, 3vw, 28px);
}

.duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 760px) {
  .duo {
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  }
}

.palette {
  display: grid;
  grid-auto-rows: minmax(88px, 1fr);
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
}

.palette li {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 18px;
  color: #ffffff;
}

.palette .dark-text {
  color: #1c1b1b;
}

.contact {
  padding: 56px var(--gutter);
  border-radius: var(--radius-sm);
  background: #f3eade;
  color: #056a39;
  text-align: center;
}

.contact h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
}

.contact a {
  color: #1c1b1b;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

/* Read by screen readers, not shown. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/*
 * The firefly. styles.css alone gives a still firefly cursor; cursor.js swaps it, with a mouse, for
 * one that follows the pointer, and on touch screens adds one that flies to each tap. Only the
 * abdomen glows.
 */
.bug {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.bug.shown {
  opacity: 1;
}

.bug-inner {
  position: absolute;
  inset: 0;
}

.bug.touch .bug-inner {
  animation: hover 2.4s ease-in-out infinite alternate;
}

@keyframes hover {
  to {
    transform: translateY(-4px);
  }
}

.bug-body,
.bug-wing {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bug-wing-l {
  transform-origin: 46.2% 45.2%;
  animation: flap-l 1.6s ease-in-out infinite alternate;
}

.bug-wing-r {
  transform-origin: 58.3% 40.6%;
  animation: flap-r 1.6s ease-in-out infinite alternate;
}

@keyframes flap-l {
  to {
    transform: rotate(7deg) scale(0.96);
  }
}

@keyframes flap-r {
  to {
    transform: rotate(-7deg) scale(0.96);
  }
}

.bug.flying .bug-wing-l {
  animation: beat-l 0.08s linear infinite alternate;
}

.bug.flying .bug-wing-r {
  animation: beat-r 0.08s linear infinite alternate;
}

@keyframes beat-l {
  to {
    transform: rotate(20deg) scale(0.82);
  }
}

@keyframes beat-r {
  to {
    transform: rotate(-20deg) scale(0.82);
  }
}

/* The light in the abdomen: a bright core over it and a soft halo under the whole bug. */
.bug-glow,
.bug-halo {
  position: absolute;
  top: 70.6%;
  left: 61.4%;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-17deg);
  animation: belly 1.6s ease-in-out infinite alternate;
}

.bug-glow {
  width: 40%;
  height: 62%;
  background: radial-gradient(
    ellipse,
    rgba(255, 240, 180, 0.95) 0%,
    rgba(255, 176, 64, 0.7) 38%,
    rgba(255, 110, 30, 0.2) 62%,
    transparent 72%
  );
  mix-blend-mode: screen;
}

.bug-halo {
  width: 120%;
  height: 130%;
  background: radial-gradient(
    ellipse,
    rgba(255, 150, 50, 0.38) 0%,
    rgba(255, 120, 40, 0.14) 40%,
    transparent 70%
  );
}

@keyframes belly {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}

.bug.hot .bug-glow,
.bug.hot .bug-halo {
  animation-duration: 0.7s;
}

.bug.cast .bug-glow,
.bug.cast .bug-halo,
.bug.lit .bug-glow,
.bug.lit .bug-halo {
  animation: flare 0.6s ease-out;
}

.bug.lit .bug-glow,
.bug.lit .bug-halo {
  animation-duration: 1.2s;
}

@keyframes flare {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-17deg) scale(1.7);
  }
}

.bug-spark {
  position: fixed;
  z-index: 2147483001;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff1c2;
  box-shadow:
    0 0 6px 2px rgba(255, 170, 60, 0.85),
    0 0 2px 1px rgba(255, 220, 140, 0.9);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .bug-inner,
  .bug-wing-l,
  .bug-wing-r,
  .bug-glow,
  .bug-halo {
    animation: none;
  }
}

/*
 * Eira's snowflake (snow.js): with a mouse it follows the pointer, its middle the hotspot, turns
 * slowly and leaves small flakes behind; on touch screens a sliding finger leaves them.
 */
.snow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.snow.shown {
  opacity: 1;
}

.snow-img {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 1px rgba(20, 40, 80, 0.7)) drop-shadow(0 0 6px rgba(170, 210, 255, 0.55));
  transition:
    scale 0.25s ease,
    filter 0.25s ease;
  animation: spin 9s linear infinite;
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

.snow.hot .snow-img {
  scale: 1.15;
  filter: drop-shadow(0 0 1px rgba(20, 40, 80, 0.7)) drop-shadow(0 0 10px rgba(200, 230, 255, 0.95));
}

.snow.cast .snow-img {
  animation:
    spin 9s linear infinite,
    chill 0.6s ease-out;
}

@keyframes chill {
  from {
    scale: 1.35;
    filter: drop-shadow(0 0 16px rgba(220, 240, 255, 1));
  }
}

.snow-bit {
  position: fixed;
  z-index: 2147482999;
  pointer-events: none;
  filter: drop-shadow(0 0 1px rgba(20, 40, 80, 0.6)) drop-shadow(0 0 3px rgba(170, 210, 255, 0.6));
}

@media (prefers-reduced-motion: reduce) {
  .snow-img {
    animation: none;
  }
}

/*
 * RawPop's lemur (lemur.js): with a mouse it follows the pointer, its nose the hotspot, faces the
 * way it goes and swishes its tail; soda bubbles rise behind it. On touch screens a sliding finger
 * leaves the bubbles.
 */
.lemur {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.lemur.shown {
  opacity: 1;
}

.lemur-inner {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  transition: scale 0.25s ease;
}

.lemur.hot .lemur-inner {
  scale: 1.12;
}

.lemur.hop .lemur-inner {
  animation: hop 0.5s ease-out;
}

@keyframes hop {
  40% {
    translate: 0 -10px;
  }
}

.lemur-body,
.lemur-tail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The tail turns about where it meets the rump. */
.lemur-tail {
  transform-origin: 73.8% 53.1%;
  animation: swish 2.6s ease-in-out infinite alternate;
}

@keyframes swish {
  from {
    rotate: -4deg;
  }
  to {
    rotate: 4deg;
  }
}

.lemur.moving .lemur-tail {
  animation: swish-fast 0.45s ease-in-out infinite alternate;
}

@keyframes swish-fast {
  from {
    rotate: -9deg;
  }
  to {
    rotate: 7deg;
  }
}

/* A soda bubble: clear in the middle, a bright rim and a highlight. */
.lemur-bubble {
  position: fixed;
  z-index: 2147482999;
  border: 1px solid rgba(40, 110, 140, 0.35);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95) 0 14%, transparent 24%),
    radial-gradient(
      circle,
      transparent 55%,
      rgba(210, 245, 255, 0.45) 70%,
      rgba(255, 255, 255, 0.85) 82%,
      transparent 86%
    );
  box-shadow: 0 0 4px rgba(150, 220, 255, 0.45);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .lemur-tail {
    animation: none;
  }
}

/*
 * The Artchive page's spray can (spray.js): with a mouse it follows the pointer, the tip of its nozzle
 * the hotspot, and sprays black dots and mist that fade from the page in a few seconds. On touch
 * screens a sliding finger sprays.
 */
.spray {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.spray.shown {
  opacity: 1;
}

.spray-inner {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35));
  transition: scale 0.2s ease;
}

.spray-inner img {
  display: block;
  width: 100%;
  height: 100%;
}

.spray.hot .spray-inner {
  scale: 1.1;
}

.spray.press .spray-inner {
  animation: shake 0.3s ease-out;
}

@keyframes shake {
  30% {
    rotate: -8deg;
  }
  65% {
    rotate: 5deg;
  }
}

.spray-paint {
  position: fixed;
  inset: 0;
  z-index: 2147482999;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .spray.press .spray-inner {
    animation: none;
  }
}

/*
 * The studio: the home page, About and the 404 page. The owner's picture of iridescent light on
 * teal (assets/bg/isik.jpg) fills the screen and stays put while the page scrolls, in light and
 * dark mode alike; a little shade at the top keeps the white type readable where it is brightest.
 */
.studio {
  --bg: #2f6f72;
  --surface: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.2);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.82);
  --accent: #fff3b0;
  --on-accent: #12383b;
  --haze: rgba(206, 236, 232, 0.9);
  min-height: 100vh;
  color-scheme: dark;
  background: var(--bg);
}

.studio::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 46, 54, 0.42), rgba(8, 46, 54, 0) 40%, rgba(4, 30, 38, 0.18)),
    url("/assets/bg/isik.jpg") center / cover no-repeat,
    var(--bg);
}

.studio .brand,
.studio .hero,
.studio .crumbs,
.studio .site-footer {
  text-shadow: 0 1px 14px rgba(0, 38, 46, 0.5);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The home page's visit count (visits.js), shaped like the About pill but not a link. */
.visits {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--border);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.visits[hidden] {
  display: none;
}

/* On a phone the name, the count and About do not fit on one line: the pills go under the name. */
@media (max-width: 520px) {
  .head-row:has(.visits:not([hidden])) {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .head-row:has(.visits:not([hidden])) .site-nav {
    margin-left: auto;
  }
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--border);
}

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

/*
 * The home page: a desk with three file folders, after a picture of folder dividers the owner sent:
 * About, Artchive and Design, each a folder in its own grey, light to near black, with a tab standing
 * up at its own place. With
 * folders.js they lie one in front of another and a tab brings its folder to the front, open;
 * without it they are three folders one under another, all open.
 */
.desk {
  --bg: #e9e8e5;
  --text: #1d1c1a;
  --muted: #4a4741;
  --border: rgba(29, 28, 26, 0.14);
  --surface: #f6f4ef;
  --accent: #b2432a;
  --tab: clamp(54px, 6vw, 84px);
  --strip: clamp(64px, 8vh, 104px);
  --side: clamp(16px, 5vw, 88px);
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  color: var(--text);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--bg);
}

.desk .site-header {
  border-bottom: 0;
}

.desk .site-header .wrap {
  max-width: none;
  padding: 0 var(--side);
}

/* The folders take the whole screen under the name, edge to edge and down to the bottom. */
.desk-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: clamp(8px, 2vh, 28px);
}

.desk-name {
  margin: 0 0 clamp(16px, 3vh, 36px);
  padding: 0 var(--side);
  font-size: clamp(30px, 5.5vw, 88px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.files {
  flex: 1;
}

/* One folder: a tab above, the body below, its own grey and a little paper grain. */
.folder {
  --c: #ddd;
  --ink: #161616;
  --chip: rgba(255, 255, 255, 0.55);
  --chip-hover: rgba(255, 255, 255, 0.85);
  position: relative;
  color: var(--ink);
  margin-top: var(--tab);
}

.folder-about {
  --c: #d2d1ce;
  --x: 4%;
}

.folder-artchive {
  --c: #8e8d8a;
  --chip: rgba(255, 255, 255, 0.4);
  --chip-hover: rgba(255, 255, 255, 0.7);
  --x: 56%;
}

.folder-design {
  --c: #2a2a2a;
  --ink: #f2f1ee;
  --chip: rgba(255, 255, 255, 0.12);
  --chip-hover: rgba(255, 255, 255, 0.22);
  --x: 27%;
}

.folder-tab {
  position: absolute;
  bottom: 100%;
  left: var(--x);
  margin: 0;
  height: var(--tab);
  border-radius: 16px 16px 0 0;
  background: var(--c);
  font-size: clamp(16px, 2.2vw, 32px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* The soft inward curves where a tab meets its folder, as on a cut divider. */
.folder-tab::before,
.folder-tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 16px;
  height: 16px;
}

.folder-tab::before {
  right: 100%;
  background: radial-gradient(circle at 0 0, transparent 15.5px, var(--c) 16px);
}

.folder-tab::after {
  left: 100%;
  background: radial-gradient(circle at 100% 0, transparent 15.5px, var(--c) 16px);
}

.folder-tab button {
  height: 100%;
  padding: 0 clamp(20px, 3vw, 48px);
  border: 0;
  border-radius: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink);
  background: transparent;
}

.folder-tab button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -6px;
}

.folder-body {
  position: relative;
  min-height: 200px;
  padding: clamp(24px, 4vh, 56px) var(--side) 72px;
  background:
    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' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .3 0 0 0 0 .3 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--c);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.35) inset;
}

.folder-body .folder-big {
  max-width: 20ch;
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.folder-body p {
  max-width: 46ch;
  font-size: clamp(16px, 1.5vw, 22px);
}

.folder-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 20px;
}

.folder-links a {
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--chip);
  text-decoration: none;
  font-size: clamp(14px, 1.2vw, 18px);
}

.folder-links a:hover {
  background: var(--chip-hover);
}

.folder-go {
  position: absolute;
  right: var(--side);
  bottom: clamp(14px, 3vh, 36px);
  color: var(--ink);
  font-size: clamp(40px, 4vw, 64px);
  line-height: 1;
  text-decoration: none;
  transition: translate 0.25s ease;
}

.folder-go:hover {
  translate: 6px 0;
}

/* The project cards in a row, sideways when they do not fit. */
.slots {
  --card-w: clamp(170px, min(21vw, 34vh), 340px);
  --card-h: calc(var(--card-w) * 1.3);
  --card-r: 20px;
  display: flex;
  gap: clamp(12px, 2vw, 32px);
  margin: 0 calc(var(--side) * -1);
  padding: 6px var(--side) 10px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.slots::-webkit-scrollbar {
  display: none;
}

.slot {
  flex: none;
  width: var(--card-w);
  height: var(--card-h);
}

.folder-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px clamp(24px, 4vw, 56px);
}

.folder-split .slots {
  --card-w: clamp(200px, min(21vw, 34vh), 340px);
  flex: none;
  margin: 0;
  padding: 6px 0 10px;
}

.folder-split > div {
  flex: 1 1 260px;
}

/* With folders.js: the folders lie one in front of another; the one in front is open. */
.files.on {
  position: relative;
  min-height: calc(var(--tab) + var(--strip) * 2 + 420px);
}

.files.on .folder {
  position: absolute;
  top: calc(var(--tab) + var(--strip) * var(--pos, 0));
  right: 0;
  bottom: 0;
  left: 0;
  z-index: calc(var(--pos, 0) + 1);
  margin: 0;
  transition: top 0.45s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.files.on .folder-body {
  height: 100%;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -6px 14px -8px rgba(0, 0, 0, 0.4);
}

.files.on .folder:not(.front) .folder-body > * {
  visibility: hidden;
  opacity: 0;
}

.files.on .folder.front .folder-body > * {
  animation: folder-in 0.4s ease both 0.12s;
}

@keyframes folder-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}

.files.on .folder:not(.front) .folder-tab {
  transition: translate 0.2s ease;
}

.files.on .folder:not(.front) .folder-tab:hover {
  translate: 0 -5px;
}

@media (max-width: 640px) {
  .desk {
    --tab: 46px;
    --strip: 56px;
  }

  .folder-about {
    --x: 3%;
  }

  .folder-artchive {
    --x: 50%;
  }

  .folder-design {
    --x: 30%;
  }

  .folder-tab button {
    padding: 0 14px;
  }

  .folder-tab::before,
  .folder-tab::after {
    width: 10px;
    height: 10px;
  }

  .folder-tab::before {
    background: radial-gradient(circle at 0 0, transparent 9.5px, var(--c) 10px);
  }

  .folder-tab::after {
    background: radial-gradient(circle at 100% 0, transparent 9.5px, var(--c) 10px);
  }

  .slots {
    --card-w: 160px;
  }

  .folder-split .slots {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .files.on .folder,
  .files.on .folder.front .folder-body > *,
  .folder-go {
    transition: none;
    animation: none;
  }
}

/* A project's card: a title and a tag at the top, its own picture behind, a line and dots below. */
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 18px 18px 14px;
  overflow: hidden;
  border-radius: var(--card-r);
  color: #16181d;
  text-decoration: none;
  background: #f6f7f9;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 28px 56px -30px rgba(40, 44, 80, 0.45);
  transition: scale 0.35s ease;
  -webkit-user-drag: none;
}

a.pcard:hover {
  scale: 1.02;
}

.pcard:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.pcard img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.pcard-head,
.pcard-foot,
.pcard-dots,
.pcard-soon-text {
  position: relative;
  z-index: 1;
}

.pcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pcard-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.pcard-pill {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 4px rgba(20, 24, 40, 0.1);
  font-size: 12px;
  font-weight: 600;
}

.pcard-art {
  position: absolute;
  inset: 0;
}

.pcard-foot {
  margin-top: auto;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.pcard-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.pcard-dots i {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.2;
}

.pcard-dots i.on {
  width: 22px;
  opacity: 0.85;
}

/* Eira: ice. A snowflake in a ring of frost, snow falling through the card. */
.pcard-eira {
  color: #123553;
  background: radial-gradient(
    circle at 50% 46%,
    #2c78bb 0%,
    #64ade4 20%,
    #b8dcf6 42%,
    #e6ecfa 64%,
    #f7f8fb 84%
  );
}

.pcard-eira .pcard-pill {
  color: #2d6a9f;
}

.eira-glow,
.eira-ring,
.eira-flake {
  position: absolute;
  left: 50%;
  top: 46%;
  translate: -50% -50%;
}

.eira-glow {
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    transparent 42%,
    rgba(196, 176, 255, 0.4) 60%,
    transparent 72%
  );
}

.eira-ring {
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background-image:
    radial-gradient(circle, #ffffff 0 1.7px, transparent 2.3px),
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.6px);
  background-size:
    12px 12px,
    7px 9px;
  background-position:
    0 0,
    3px 5px;
  mask-image: radial-gradient(circle, transparent 0 55%, #000 58% 67%, transparent 71%);
  animation: eira-turn 60s linear infinite;
}

.eira-flake {
  width: 44%;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.85))
    drop-shadow(0 0 22px rgba(170, 215, 255, 0.7));
  animation: eira-turn 90s linear infinite reverse;
}

@keyframes eira-turn {
  to {
    rotate: 360deg;
  }
}

.eira-snow {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1.6px, transparent 2.2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.5px);
  background-size:
    61px 70px,
    37px 41px;
  background-position:
    0 0,
    13px 20px;
  mask-image: linear-gradient(transparent, #000 18% 62%, transparent 82%);
  animation: eira-fall 10s linear infinite;
}

@keyframes eira-fall {
  to {
    background-position:
      0 140px,
      13px 102px;
  }
}

/* RawPop: the brand's mango, magenta and jungle green, its lemur and soda bubbles. */
.pcard-rawpop {
  color: #1c1b1b;
  background:
    radial-gradient(62% 44% at 24% 30%, rgba(246, 165, 10, 0.95), transparent 70%),
    radial-gradient(56% 46% at 82% 52%, rgba(212, 20, 90, 0.85), transparent 70%),
    radial-gradient(80% 42% at 45% 100%, rgba(5, 106, 57, 0.8), transparent 72%), #f3eade;
}

.pcard-rawpop .pcard-foot {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: #056a39;
}

.pcard-rawpop .pcard-dots {
  color: #ffffff;
}

.pcard-swatches {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
}

.pcard-swatches i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.pop-lemur {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 62%;
  aspect-ratio: 1;
  translate: -50% -50%;
  filter: drop-shadow(0 10px 14px rgba(60, 10, 30, 0.35));
}

.pop-lemur img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pop-bubbles i {
  position: absolute;
  bottom: -24px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95) 0 14%, transparent 24%),
    radial-gradient(circle, transparent 55%, rgba(255, 255, 255, 0.4) 72%, transparent 86%);
  animation: pop-rise var(--t) ease-in infinite;
  animation-delay: var(--d);
}

.pop-bubbles i:nth-child(1) {
  --x: 12%;
  --s: 14px;
  --t: 6s;
  --d: -1s;
}

.pop-bubbles i:nth-child(2) {
  --x: 26%;
  --s: 9px;
  --t: 5s;
  --d: -3.5s;
}

.pop-bubbles i:nth-child(3) {
  --x: 41%;
  --s: 18px;
  --t: 7s;
  --d: -5s;
}

.pop-bubbles i:nth-child(4) {
  --x: 57%;
  --s: 11px;
  --t: 5.5s;
  --d: -2s;
}

.pop-bubbles i:nth-child(5) {
  --x: 70%;
  --s: 16px;
  --t: 6.5s;
  --d: -4s;
}

.pop-bubbles i:nth-child(6) {
  --x: 83%;
  --s: 8px;
  --t: 4.5s;
  --d: -0.5s;
}

.pop-bubbles i:nth-child(7) {
  --x: 90%;
  --s: 13px;
  --t: 6s;
  --d: -2.8s;
}

@keyframes pop-rise {
  0% {
    translate: 0 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    translate: 6px -50cqh;
  }
  85% {
    opacity: 1;
    scale: 1;
  }
  100% {
    translate: -4px calc(-100cqh - 30px);
    opacity: 0;
    scale: 1.5;
  }
}

.pcard-rawpop .pcard-art {
  container-type: size;
}

/* A project to come: frosted glass over light that drifts, no link. */
.pcard-soon {
  align-items: center;
  justify-content: center;
  color: #2a2d3a;
  background: rgba(255, 255, 255, 0.45);
}

.pcard-soon .pcard-art {
  inset: -20%;
  filter: blur(22px);
  animation: soon-drift 14s ease-in-out infinite alternate;
}

.pcard-soon-1 .pcard-art {
  background:
    radial-gradient(40% 34% at 50% 38%, #5b4cff, transparent 70%),
    radial-gradient(50% 40% at 42% 68%, #e7a3ff, transparent 72%);
}

.pcard-soon-2 .pcard-art {
  background:
    radial-gradient(42% 36% at 55% 42%, #ff6fb5, transparent 70%),
    radial-gradient(50% 40% at 40% 70%, #b49bff, transparent 72%);
}

.pcard-soon-3 .pcard-art {
  background:
    radial-gradient(42% 36% at 45% 40%, #3f8cff, transparent 70%),
    radial-gradient(46% 36% at 60% 72%, #9ff0e6, transparent 72%),
    radial-gradient(30% 24% at 30% 85%, #ffe39a, transparent 72%);
}

@keyframes soon-drift {
  to {
    translate: 4% -5%;
    rotate: 8deg;
    scale: 1.08;
  }
}

.pcard-soon-text {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.pcard-soon .pcard-dots {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pcard,
  .eira-ring,
  .eira-flake,
  .eira-snow,
  .pcard .lemur-tail,
  .pop-bubbles i,
  .pcard-soon .pcard-art {
    animation: none;
    transition: none;
  }

  .pop-bubbles {
    display: none;
  }
}

/* Eira's page: the closing contact takes the overview board's colours (Paper, Blueberry Night). */
.snow-page .contact {
  background: #f1eeea;
  color: #1b2e56;
  box-shadow: inset 0 0 0 1px rgba(27, 46, 86, 0.1);
}

.snow-page .contact a {
  color: #1b2e56;
  font-family: inherit;
}

/* Eira's page: a beige ground (a step darker than the Paper board), the same in light and dark mode. */
:root.snow-page {
  --bg: #e3dcd4;
  --text: #1b2e56;
  --muted: #4a5878;
  --border: rgba(27, 46, 86, 0.14);
}

/*
 * The Artchive page: the drawings pegged to strings on a worn wall, in two groups, Monochrome and
 * Colour, after the owner's photo of zines hung on lines. The wall (media/wall.webp) is made from
 * the owner's own lettering and lines off her cards and drawings, washed out on a concrete grey; it
 * stays put while the page scrolls. Portraits are the photos as taken (cropped, signatures removed).
 * The same in light and dark mode.
 */
:root.sketch-page {
  --bg: #aca393;
  --surface: #e6dfd2;
  --border: rgba(31, 28, 25, 0.26);
  --text: #1f1c19;
  --muted: #3b3631;
  --accent: #7d2f1d;
  --on-accent: #f4ead9;
  color-scheme: light;
}

.sketch-page body {
  background: var(--bg);
}

.sketch-page body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    url("/artchive/media/wall.webp") center / cover no-repeat,
    var(--bg);
}

.sketch-page .site-header {
  border-bottom-color: var(--border);
}

.canvas {
  padding-bottom: 64px;
}

.canvas-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The cover: a line, the title, the pile on the table, the facts. */
.cover {
  padding: clamp(40px, 8vw, 96px) 0 0;
  text-align: center;
}

.cover-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cover h1 {
  margin: 0;
  font-size: clamp(36px, 12.5vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.cover-lede {
  max-width: 36ch;
  margin: 20px auto 0;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.35;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px 32px;
  margin: clamp(40px, 7vw, 80px) 0 0;
  padding: 24px 0 0;
  border-top: 2px solid var(--text);
  text-align: left;
}

.facts div {
  margin: 0;
}

.facts dt {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.35;
}

/* A group: its number and name, one line, then the strings. */
.group {
  padding-top: clamp(64px, 11vw, 140px);
}

.group-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 4px 20px;
  padding-bottom: 16px;
  margin-bottom: clamp(24px, 4vw, 48px);
  border-bottom: 2px solid var(--text);
}

.group-no {
  grid-row: span 2;
  font-size: clamp(56px, 11vw, 132px);
  line-height: 0.8;
  letter-spacing: -0.04em;
}

.group-head h2 {
  margin: 0;
  font-size: clamp(26px, 4.4vw, 48px);
  line-height: 1;
}

.group-head p {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/*
 * A string across the wall with drawings pegged to it, after the owner's photo of zines on lines:
 * the string sags (an SVG curve), each drawing hangs from a wooden peg where the string runs, a
 * little crooked. On a narrow screen a string scrolls sideways instead of shrinking the drawings.
 */
.line-wrap {
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.line-wrap::-webkit-scrollbar {
  display: none;
}

.line {
  --h: clamp(150px, 19vw, 250px);
  --sag: calc(var(--h) * 0.16);
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 22px);
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 26px 8px calc(var(--sag) + 44px);
  list-style: none;
}

.string {
  position: absolute;
  top: 22px;
  left: 0;
  width: 100%;
  height: calc(var(--sag) + 8px);
  overflow: visible;
  pointer-events: none;
}

.string path {
  fill: none;
  stroke: #3f8f95;
  stroke-width: 2.2px;
  vector-effect: non-scaling-stroke;
}

.hung {
  position: relative;
  flex: none;
  translate: 0 calc(var(--sag) * var(--d, 0));
  rotate: var(--t, 0deg);
  transform-origin: 50% 0;
}

/* The peg: two strips of light wood, clipped over the top edge. */
.hung::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -16px;
  left: calc(50% - 5px);
  width: 10px;
  height: 34px;
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(90, 60, 30, 0.45) 46% 54%, transparent 54%),
    linear-gradient(180deg, #e2c497, #c9a26d);
  box-shadow: 0 2px 3px rgba(30, 20, 10, 0.35);
}

.line .hung a {
  display: block;
  transition: scale 0.3s ease;
  -webkit-user-drag: none;
}

.hung img {
  display: block;
  width: auto;
  height: var(--h);
  box-shadow:
    0 1px 2px rgba(30, 24, 18, 0.25),
    0 16px 26px -14px rgba(30, 24, 18, 0.6);
}

.line .hung a:hover {
  scale: 1.03;
}

.hung a:focus-visible,
.sk-box-btn:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 4px;
}

/* The list of what hangs on the strings, numbered, under each group. */
.index {
  columns: 3 220px;
  column-gap: 32px;
  margin: 8px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: 13px;
  line-height: 1.35;
}

.index li {
  break-inside: avoid;
  margin: 0 0 8px;
}

.index .no {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.index .med {
  color: var(--muted);
  font-size: 12px;
}

.canvas-end {
  padding: clamp(64px, 10vw, 120px) 0 0;
  text-align: center;
}

.canvas-end p {
  margin: 0 0 18px;
  font-size: clamp(22px, 3.6vw, 36px);
  line-height: 1.15;
}

.end-link {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--text);
  text-decoration: none;
  font-size: 15px;
}

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

@media (max-width: 640px) {
  .line {
    --h: 190px;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .line .hung a {
    transition: none;
  }
}

/* The larger view: the drawing on the kraft, the page dimmed behind. */
.sk-box {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

.sk-box::backdrop {
  background: rgba(239, 230, 214, 0.97);
}

.sk-box-fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  margin: 0;
  padding: 56px var(--gutter) 24px;
  pointer-events: none;
}

.sk-box-img {
  display: block;
  max-width: min(100%, 1100px);
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
  pointer-events: auto;
}

.sk-box .sk-box-img {
  box-shadow:
    0 1px 2px rgba(40, 28, 16, 0.22),
    0 24px 48px -20px rgba(40, 28, 16, 0.6);
}

.sk-box-cap {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.sk-box-btn {
  position: fixed;
  width: 44px;
  height: 44px;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  color: var(--text);
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.sk-box-btn:hover {
  color: var(--accent);
}

.sk-box-close {
  top: 12px;
  right: 12px;
}

.sk-box-prev,
.sk-box-next {
  top: 50%;
  translate: 0 -50%;
}

.sk-box-prev {
  left: 12px;
}

.sk-box-next {
  right: 12px;
}

/* On a phone the arrows sit under the drawing, not over it. */
@media (max-width: 640px) {
  .sk-box-prev,
  .sk-box-next {
    top: auto;
    bottom: 16px;
    translate: none;
  }

  .sk-box-fig {
    padding-bottom: 76px;
  }

  .sk-box-img {
    max-height: calc(100dvh - 190px);
  }
}

/* Its card on the home page: three drawings laid on paper, fanned out. */
.pcard-artchive {
  color: #1f1c19;
  background:
    url("/artchive/media/wall-card.webp") center / cover,
    #aca393;
}

.sk-fan {
  position: absolute;
  inset: 0;
}

.pcard .sk-fan img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46%;
  height: auto;
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(40, 30, 20, 0.2),
    0 14px 26px -12px rgba(40, 30, 20, 0.5);
  transition:
    translate 0.45s ease,
    rotate 0.45s ease;
}

.sk-fan img:nth-child(1) {
  translate: -92% -54%;
  rotate: -9deg;
}

.sk-fan img:nth-child(2) {
  translate: -8% -56%;
  rotate: 8deg;
}

.sk-fan img:nth-child(3) {
  translate: -50% -46%;
  rotate: -1deg;
}

a.pcard-artchive:hover .sk-fan img:nth-child(1) {
  translate: -100% -54%;
  rotate: -13deg;
}

a.pcard-artchive:hover .sk-fan img:nth-child(2) {
  translate: 0% -56%;
  rotate: 12deg;
}

.pcard-artchive .pcard-pill {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .pcard .sk-fan img {
    transition: none;
  }
}
