/* ============================================================
   MUUFOLIO — horror manga portfolio
   ============================================================ */

/* ============================================================
   SELF-HOSTED FONTS (served from /site/fonts — no external CDN)
   ============================================================ */
/* Bricolage Grotesque — variable display face (weights 200–800) */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/bricolage-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/bricolage-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Mono — 400 / 500 / 600 */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plexmono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plexmono-400-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plexmono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plexmono-500-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/plexmono-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/plexmono-600-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Baked-in theme (former Tweaks: palette "clean", hypnosis 36%, texture "dry", font "clean") */
  --ink: #0c0c0d;
  --ink-2: #161618;
  --paper: #f1f3f5;
  --paper-deep: #e9ecef;
  --paper-shadow: #a59b85;
  --blood: #c8201c;
  --blood-deep: #8e1411;
  --bone: #d6cdb8;
  --accent: #e02a26;
  --aylin: #534b76;

  /* Hypnosis = 36% (spiral speed, halftone/grain density, spiral opacity) */
  --spin: 148s;
  --spin2: 75.8s;
  --halftone: 0.282;
  --grain: 0.36;
  --spiral-opacity: 0.412;

  /* Font roles — "clean" set */
  --font-display:
    "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, "Arial", sans-serif;
  --font-mono: "IBM Plex Mono", "Helvetica Neue", monospace;

  /* Layout — shared content column so every section aligns to the same
     left/right edges regardless of viewport width */
  --content-max: 1400px;
  --content-pad: 6vw;

  /* Horizontal nudge for section titles so the big display type lines up
     with the mono number above it (negative = move left). Adjust to taste. */
  --title-shift: -5px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
}


/* Halftone and grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.5) 1px,
    transparent 1.4px
  );
  background-size: 3px 3px;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 1;
  opacity: 0.25;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.25;
  z-index: 9000;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  z-index: 100;
  mix-blend-mode: difference;
  color: var(--paper);
}
.nav a {
  color: inherit;
  text-decoration: none;
  padding: 6px 0;
  position: relative;
}
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
}
.nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav .brand {
  font-weight: 700;
  letter-spacing: 0.25em;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 80px var(--content-pad);
  overflow: hidden;
  background: var(--ink);
}
.hero .spiral-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130vmin;
  height: 130vmin;
  transform: translate(-50%, -50%);
  opacity: var(--spiral-opacity, 0.55);
  animation: rot var(--spin, 120s) linear infinite;
  filter: blur(0.3px);
}
.hero .spiral-bg.s2 {
  width: 60vmin;
  height: 60vmin;
  opacity: calc(var(--spiral-opacity, 0.55) * 0.55);
  animation: rotR var(--spin2, 60s) linear infinite;
}

/* texture variants */
body.tex-wet::before {
  opacity: calc(var(--halftone, 0.25) * 1.4);
  filter: blur(0.6px);
}
body.tex-wet::after {
  opacity: calc(var(--grain, 0.25) * 1.2);
  mix-blend-mode: multiply;
}
body.tex-wet .panel img {
  filter: contrast(1.1) saturate(1.05) blur(0.2px);
}

body.tex-glitch::after {
  opacity: calc(var(--grain, 0.25) * 1.6);
  mix-blend-mode: screen;
}
body.tex-glitch .panel img {
  filter: contrast(1.15) saturate(1.1) hue-rotate(-4deg);
}
body.tex-glitch .hero h1,
body.tex-glitch .shead h2,
body.tex-glitch .footer h2 {
  text-shadow:
    2px 0 rgba(201, 48, 44, 0.7),
    -2px 0 rgba(80, 180, 220, 0.5);
}
body.tex-glitch .panel {
  box-shadow:
    6px 0 0 rgba(201, 48, 44, 0.45),
    -6px 0 0 rgba(80, 180, 220, 0.35),
    8px 8px 0 var(--ink);
}

body.tex-dry::before {
  opacity: calc(var(--halftone, 0.25));
}
body.tex-dry::after {
  opacity: calc(var(--grain, 0.25));
}
@keyframes rot {
  from {
    transform: translate(-50%, -50%) rotate(0);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes rotR {
  from {
    transform: translate(-50%, -50%) rotate(0);
  }
  to {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(64px, 16vw, 260px);
  line-height: 0.82;
  margin: 0;
  letter-spacing: -0.04em;
  color: var(--paper);
  filter: url(#wobble);
  mix-blend-mode: screen;
}
.hero h1 .red {
  color: var(--accent);
}
.hero .kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  margin: 0 0 20px;
  opacity: 1;
  color: var(--accent);
  font-weight: 600;
}
.hero .sub {
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 1;
  font-weight: 500;
}
.hero .scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  opacity: 0.9;
  font-weight: 600;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 8px);
  }
}

.hero .warning {
  position: absolute;
  top: 80px;
  left: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  border: 1px solid var(--accent);
  padding: 8px 12px;
  transform: rotate(-3deg);
  z-index: 3;
  max-width: 180px;
  line-height: 1.4;
}
.hero .stamp {
  position: absolute;
  bottom: 80px;
  right: 32px;
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-decoration: none;
  border: 2px dashed var(--accent);
  padding: 12px 18px;
  text-align: center;
  transform: rotate(7deg);
  z-index: 3;
  opacity: 0.85;
}

/* ============================================================
   PAPER PAGES
   ============================================================ */
/* Shared content column — every section's inner content sits in one
   identical centered column so left/right edges line up everywhere.
   (The divider quote keeps its own narrow 22ch width by design.) */
.hero-inner,
.about-grid,
.project,
.footer > div {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.page {
  background: var(--paper);
  color: var(--ink);
  padding: 140px var(--content-pad);
  position: relative;
  z-index: 2;
}
.page--paper {
  background: var(--paper);
}

.page--about {
  background: var(--paper);
  color: var(--ink);
  padding: 140px var(--content-pad);
  padding-bottom: 80px;
  position: relative;
  z-index: 2;
}

/* edge wear removed — paper sections are now flat, single-color */

/* dark page */
.page--dark {
  background: var(--ink-2);
  color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.4'/></svg>");
  background-blend-mode: multiply;
}

/* section header */
.shead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 64px;
  position: relative;
  border-bottom: 2.5px solid currentColor;
  padding-bottom: 16px;
}
.shead .num {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.25em;
  white-space: nowrap;
  opacity: 0.9;
}
.shead .titlewrap {
  flex: 1;
}
.shead h2 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  font-size: clamp(48px, 9vw, 140px);
  margin: 0 0 0 var(--title-shift);
  line-height: 0.9;
  letter-spacing: -0.035em;
  /* Always-on subtle glitch on titles (note #6) */
  text-shadow:
    2px 0 0 var(--accent),
    -2px 0 0 rgba(80, 180, 220, 0.55);
  animation: glitch-shift 3.6s steps(1) infinite;
}
.shead h2 em {
  font-style: italic;
  font-weight: 700;
}
.shead h2 .red {
  color: var(--blood);
}
/* "Killzone" is one word split into two styled parts. Make the "zone" half
   italic to match "Kill" — the matching slant keeps them from overlapping. */
.shead h2.kz .red {
  font-style: italic;
  font-weight: 700;
}
.hero h1 {
  animation: glitch-shift 3.2s steps(1) infinite;
}
.footer h2 {
  animation: glitch-shift 4s steps(1) infinite;
}
@keyframes glitch-shift {
  0%,
  92%,
  100% {
    text-shadow:
      2px 0 0 var(--accent),
      -2px 0 0 rgba(80, 180, 220, 0.55);
  }
  93% {
    text-shadow:
      4px 0 0 var(--accent),
      -4px 0 0 rgba(80, 180, 220, 0.7),
      0 2px 0 rgba(255, 255, 255, 0.4);
  }
  95% {
    text-shadow:
      -3px 0 0 var(--accent),
      3px 0 0 rgba(80, 180, 220, 0.5);
  }
  97% {
    text-shadow:
      1px 0 0 var(--accent),
      -1px 0 0 rgba(80, 180, 220, 0.4);
  }
}
.shead .role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 14px;
  opacity: 1;
  font-weight: 500;
  color: var(--blood);
}

/* clean panel (grid-aligned image card, no chunky frame) */
.panel {
  border: none;
  background: var(--paper-deep);
  position: relative;
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.25s ease;
}
.panel:hover {
  transform: translateY(-2px);
}
.panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* drawings never cropped */
  object-position: center;
  background: var(--paper-deep);
  filter: none;
  transition: transform 0.4s ease;
}
.panel:hover img {
  transform: scale(1.01);
}
.panel .label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 5px 9px;
  z-index: 2;
  font-weight: 500;
}

.page--dark .panel {
  background: var(--ink);
}
.page--dark .panel img {
  background: var(--ink);
}
.page--dark .panel .label {
  background: var(--paper);
  color: var(--ink);
}
.page--dark .panel .label {
  background: var(--paper);
  color: var(--ink);
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 720px) 360px;
  gap: 300px;
  align-items: start;
  justify-content: center;
  position: relative;
}
.about-float {
  position: absolute;
  left: calc(50% + 190px);
  z-index: 3;
  pointer-events: none;
  user-select: none;
}
.about-float--top {
  top: 60px;
  left: calc(50% + 230px);
  width: clamp(130px, 8vw, 118px);
  transform: translateX(-50%) rotate(-12deg);
}
.about-float--bottom {
  bottom: 50px;
  width: clamp(300px, 14vw, 210px);
  transform: translateX(-50%) rotate(-10deg);
}
.about-grid .about-bio {
  grid-column: 1;
  grid-row: 1;
}
.about-grid .about-photo {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
}
@media (max-width: 900px) {
  .about-grid .about-bio,
  .about-grid .about-photo {
    grid-column: 1;
    justify-self: stretch;
  }
  .about-grid .about-photo {
    grid-row: 2;
  }
  .about-float {
    display: none;
  }
}
/* About: portrait drawing left, intro right — no frame on the drawing */
.about-photo {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
  max-width: 360px;
  width: 100%;
}
.about-photo img {
  display: block;
  width: 100%;
  padding-left: 100px;
  height: 700px;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: multiply;
}
.about-photo .tag {
  display: none;
  margin-bottom: 12px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 5px 12px;
  font-weight: 600;
}
.about-bio h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 68px);
  margin: 0 0 8px;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.about-bio .handle {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--blood);
  margin-bottom: 24px;
}
.about-bio p {
  font-size: 19px;
  line-height: 1.6;
  margin: 0 0 18px;
  text-wrap: pretty;
  /* max-width: 56ch; */
}
.about-bio .lead {
  font-size: 22px;
  font-style: italic;
}
.bio-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
  border-top: 2px solid var(--ink);
  padding-top: 28px;
}
.bio-meta h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: var(--blood);
}
.bio-meta p {
  margin: 4px 0;
  font-size: 16px;
  line-height: 1.4;
}
.bio-meta .small {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 1;
  color: var(--blood);
}

/* WORK SECTIONS — gallery layouts */
.project {
  margin-bottom: 180px;
  position: relative;
}
.project:last-child {
  margin-bottom: 0;
}
.project .blurb {
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.6;
  margin: -20px 0 50px;
  text-wrap: pretty;
}
.project .blurb .pull {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--blood);
}

/* gallery layouts */
.gal {
  display: grid;
  gap: 24px;
}
.gal-2 {
  grid-template-columns: repeat(2, 1fr);
}
.gal-3 {
  grid-template-columns: repeat(3, 1fr);
}
.gal-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Office Bloom — sketchbook layout */
.ob-intro {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 80px;
}
.ob-intro-text {
  padding-top: 0;
  padding-bottom: 12px;
}
.ob-intro-text .ob-name {
  margin-top: -0.18em;
}
.ob-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 132px);
  margin: 0 0 8px;
  line-height: 0.9;
  letter-spacing: -0.035em;
}
.ob-name::after {
  content: "";
  display: block;
  height: 2px;
  background: currentColor;
  margin-top: 14px;
  max-width: 360px;
}
.ob-lede {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blood);
  margin: 18px 0 22px;
}
.ob-intro-text p {
  font-size: 19px;
  line-height: 1.6;
  max-width: 52ch;
  text-wrap: pretty;
  margin: 0 0 18px;
}
.ob-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1.7;
}
.ob-meta span {
  display: inline-block;
  min-width: 70px;
  color: var(--blood);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.2em;
  font-size: 11px;
  margin-right: 8px;
}
.ob-intro-figure {
  margin: 0;
  position: relative;
}
.ob-intro-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
  object-position: bottom right;
  mix-blend-mode: multiply;
}

/* shared block heading */
.ob-block {
  margin-bottom: 80px;
}
.ob-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 48px);
  margin: 0 0 24px;
  line-height: 1;
  letter-spacing: -0.02em;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 14px;
}
.ob-sub {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blood);
  margin-left: 10px;
  vertical-align: middle;
}

/* row of sketches inside a soft frame */
.ob-sketch-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start; /* each sketch sets its own height — no fixed frame */
  gap: 22px;
  padding: 28px;
  border: 1.5px solid currentColor;
  background: var(--paper-deep);
}
.ob-sketch-row .ob-fig {
  background: var(--paper);
}
.ob-sketch-row .ob-fig img {
  height: auto; /* height defined by the image, full drawing always visible */
}
.ob-fig {
  margin: 0;
}
.ob-fig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
}

/* coloring process: 3 captioned items — fill the row width at one shared
   height. Each figure grows in proportion to its image's aspect ratio
   (width/height), so the widths differ (middle Sticker is wider) but the
   heights all come out equal. */
.ob-process-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-end;
  justify-content: center;
}
.ob-process-row .ob-fig {
  flex: 0 1 0; /* basis 0; grow (set below) decides the share of the row */
  min-width: 180px; /* wrap to fewer per row before getting tiny */
}
/* grow = image aspect ratio, in the current left→right order:
   Human (ali-process-3 ≈ 0.574) · Sticker (ali-process-final ≈ 0.900) · Mutant (ali-process-2 ≈ 0.566) */
.ob-process-row .ob-fig:nth-child(1) {
  flex-grow: 0.574;
}
.ob-process-row .ob-fig:nth-child(2) {
  flex-grow: 0.9;
}
.ob-process-row .ob-fig:nth-child(3) {
  flex-grow: 0.566;
}
.ob-process-row .ob-fig img {
  width: 100%;
  height: auto;
  display: block;
}
.ob-fig.captioned figcaption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--blood);
  font-weight: 600;
}

/* boss block: text left, figure right with WIP scrawl */
.ob-boss {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.ob-boss-figure {
  margin: 0;
  position: relative;
}
.ob-boss-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: center right;
  mix-blend-mode: multiply;
}
.ob-boss-figure .wip {
  position: absolute;
  bottom: -6px;
  right: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
  transform: rotate(-4deg);
  white-space: nowrap;
}
.ob-boss-figure .wip::before {
  content: "↘ ";
  font-family: var(--font-mono);
  font-style: normal;
}

/* Aylin — the boss; mirrored intro (image left, text right), purple accent */
.ob-intro--aylin {
  grid-template-columns: 1.05fr 1fr;
}
.ob-aylin .ob-name,
.ob-aylin .ob-lede,
.ob-aylin .ob-meta span {
  color: var(--aylin);
}

/* concept art panel — full image at its natural height (no crop) */
.ob-concept {
  border: 1.5px solid currentColor;
  background: var(--paper-deep);
  padding: 12px;
  overflow: hidden;
}
.ob-concept img {
  display: block;
  width: 100%;
  height: auto; /* show the whole image, never cropped */
}

@media (max-width: 900px) {
  .ob-intro,
  .ob-boss {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ob-sketch-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 18px;
  }
  .ob-process-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* girls grid */
.girls-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}
.girls-grid .panel {
  aspect-ratio: 4 / 5;
}

/* Feature panels — crossfade from the finished piece to its process drawing
   on hover (image equivalent of the Minos Prime hover-to-play video) */
.proc-panel .proc-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--paper-deep);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: 1;
}
.proc-panel:hover .proc-img {
  opacity: 1;
}
/* fade the finished piece OUT as the process fades in, so the two never
   show through each other (the finished art was bleeding through before) */
.proc-panel img:not(.proc-img) {
  transition:
    opacity 0.45s ease,
    transform 0.4s ease;
}
.proc-panel:hover img:not(.proc-img) {
  opacity: 0;
}
/* hold both images steady so nothing zooms through the crossfade */
.proc-panel:hover img {
  transform: none;
}
/* keep the caption above the revealed process image */
.proc-panel .label {
  z-index: 2;
}

/* PDF button card */
.pdf-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  border: 2.5px solid currentColor;
  background: transparent;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-mono);
  margin-top: 22px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.pdf-card:hover {
  background: var(--blood);
  color: var(--paper);
}
.pdf-card .label {
  font-size: 11px;
  letter-spacing: 0.3em;
  opacity: 0.7;
}
.pdf-card h4 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1;
}
.pdf-card .arrow {
  font-size: 36px;
  font-family: var(--font-display);
}

/* Full document / spread image — shown where the old PDF cards were */
.spread {
  display: block;
  margin: 40px auto 0;
  max-width: 720px;
}
.spread img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-deep);
}
.spread figcaption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-align: center;
  color: var(--blood);
  font-weight: 600;
}
.page--dark .spread img,
.killzone-bg .spread img {
  background: var(--ink);
}

/* Null Arcana logo lockup */
.na-logo {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 0 32px;
  /* logo art is black line work — sits on the dark page */
  filter: invert(1);
}

/* killzone bloody header */
.killzone-bg {
  background: var(--ink-2);
  color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(138, 19, 19, 0.5), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(138, 19, 19, 0.4), transparent 35%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.4'/></svg>");
  background-blend-mode: normal, normal, multiply;
}

/* tarot grid */
.tarot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 22px;
}
.tarot-grid .panel {
  aspect-ratio: 1 / 1.2;
}
.tarot-grid .panel:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

/* poster grid — two equal columns, so both posters get identical height */
.poster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.poster-grid .panel {
  aspect-ratio: 5 / 7; /* matches the print posters' portrait ratio */
}
.poster-grid .panel img {
  object-fit: cover; /* fill the frame edge-to-edge — no grey, no top gap */
  object-position: center;
}

/* windybunny — book spread layout */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.book-grid .panel {
  aspect-ratio: 1 / 1;
}

/* windybunny — full-layout spread as centerpiece, pages stacked beside it.
   The figure is display:contents so the spread image, its caption, and the page
   grid place into ONE grid: image + pages share row 1 (pages start and end
   exactly with the poster image), and the caption drops into row 2 under the
   image only — the page column has no caption, so it ends level with the poster. */
.wb-layout {
  display: grid;
  grid-template-columns: 3fr 2fr; /* spread ~60% | pages ~40% keeps heights close */
  column-gap: 26px;
  margin-top: 28px;
  align-items: stretch;
}
.wb-spread {
  display: contents;
}
.wb-spread img {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: auto; /* the poster image defines the shared row height */
  align-self: start;
}
.wb-spread figcaption {
  grid-column: 1;
  grid-row: 2; /* caption lives below the image, left column only */
}
.wb-pages {
  grid-column: 2;
  grid-row: 1; /* same row as the image -> identical top and bottom */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
}
.wb-pages .panel {
  aspect-ratio: auto; /* fill the shared height instead of forcing squares */
  min-width: 0;
  min-height: 0;
  height: 100%;
}
@media (max-width: 900px) {
  .wb-layout {
    grid-template-columns: 1fr; /* stack image, caption, then pages */
  }
  .wb-spread img,
  .wb-spread figcaption,
  .wb-pages {
    grid-column: auto;
    grid-row: auto;
  }
  .wb-pages {
    grid-template-rows: none;
    grid-auto-rows: auto;
  }
  .wb-pages .panel {
    aspect-ratio: 1 / 1;
    height: auto;
  }
}

/* section divider quote */
.divider {
  background: var(--ink);
  color: var(--paper);
  padding: 100px var(--content-pad);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.divider .q {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.1;
  max-width: 22ch;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.divider .q .red {
  color: var(--accent);
}
.divider .cite {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.7;
  position: relative;
  z-index: 2;
}
.divider .small-spiral {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vmin;
  height: 90vmin;
  opacity: 0.12;
  animation: rot 90s linear infinite;
}

/* footer */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 120px var(--content-pad) 60px;
  position: relative;
  overflow: hidden;
}
.footer h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(60px, 14vw, 200px);
  margin: 0;
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-align: center;
}
.footer h2 .red {
  color: var(--accent);
}
.footer .contact {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.25em;
}
.footer .contact a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
}
.footer .contact a:hover {
  color: var(--accent);
}
.footer .colophon {
  margin-top: 80px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
  border-top: 1px solid rgba(236, 227, 207, 0.2);
  padding-top: 20px;
}
.footer .small-spiral {
  position: absolute;
  left: -10vmin;
  top: 50%;
  transform: translateY(-50%);
  width: 70vmin;
  height: 70vmin;
  opacity: 0.12;
  animation: rot 100s linear infinite;
}
.footer .small-spiral.r {
  left: auto;
  right: -10vmin;
  animation: rotR 100s linear infinite;
}

/* fade in */
.fade {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
.fade.in {
  opacity: 1;
  transform: none;
}

/* responsive */
@media (max-width: 900px) {
  body {
    cursor: auto;
  }
  .cursor {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .girls-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .gal-3,
  .gal-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .tarot-grid {
    grid-template-columns: 1fr;
  }
  .poster-grid {
    grid-template-columns: 1fr;
  }
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bio-meta {
    grid-template-columns: 1fr;
  }
  .shead {
    flex-direction: column;
    gap: 8px;
  }
  .nav ul {
    display: none;
  }
  .page {
    padding: 80px 5vw;
  }
}
.girls-grid .span4 {
  grid-column: span 4;
}
.girls-grid .span6 {
  grid-column: span 6;
}
.girls-grid .span3 {
  grid-column: span 3;
}
@media (max-width: 900px) {
  .girls-grid .span4,
  .girls-grid .span6,
  .girls-grid .span3 {
    grid-column: span 3;
  }
}

/* ============================================================
   MINOS PRIME — hover-to-play process video
   ============================================================ */
.minos-panel .minos-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* match the still image (drawings never cropped) */
  object-position: center;
  background: var(--ink);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: 1;
}
.minos-panel.playing .minos-video {
  opacity: 1;
}

/* suppress the panel's hover-zoom here — it would bleed through the crossfade */
.minos-panel:hover img {
  transform: none;
}

/* fade the label out while playing so it doesn't collide with the slider */
.minos-panel .label {
  transition: opacity 0.3s ease;
}
.minos-panel.playing .label {
  opacity: 0;
}

/* seek slider — bottom strip, mono/blood aesthetic, hidden until playing */
.minos-panel .minos-seek {
  --pct: 0; /* played fraction 0–100, updated by JS each frame */
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  width: auto;
  height: 14px;
  margin: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.minos-panel.playing .minos-seek {
  opacity: 1;
  pointer-events: auto;
}
/* track = a thin line; the played portion fills blood up to --pct */
.minos-panel .minos-seek::-webkit-slider-runnable-track {
  height: 2px;
  border: none;
  background: linear-gradient(
    to right,
    var(--blood) calc(var(--pct) * 1%),
    rgba(236, 227, 207, 0.3) calc(var(--pct) * 1%)
  );
}
.minos-panel .minos-seek::-moz-range-track {
  height: 2px;
  border: none;
  background: rgba(236, 227, 207, 0.3);
}
.minos-panel .minos-seek::-moz-range-progress {
  height: 2px;
  background: var(--blood);
}
/* current-second marker = slim vertical playhead, not a square */
.minos-panel .minos-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2px;
  height: 12px;
  margin-top: -5px; /* center 12px playhead on 2px track */
  background: var(--paper);
  border: none;
  border-radius: 0;
}
.minos-panel .minos-seek::-moz-range-thumb {
  width: 2px;
  height: 12px;
  background: var(--paper);
  border: none;
  border-radius: 0;
}
.minos-panel .minos-seek:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* touch / no-hover devices: static image only */
@media (hover: none) {
  .minos-panel .minos-video,
  .minos-panel .minos-seek {
    display: none;
  }
}

/* ============================================================
   GLITTERING GRIEF — competition pair (stacked feature)
   ============================================================ */
.gg-feature {
  position: relative;
  /* recolor THIS section's accents to match the magenta/cosmic artwork —
     scoped here so the rest of the portfolio keeps its red identity.
     These vars drive the "Grief" word, role, pull-quote, title glitch + spiral. */
  --blood: #bb3d80;
  --accent: #e063b2;
}
/* faint cosmic-swirl accent reusing the spiral motif */
.gg-spiral {
  position: absolute;
  top: 0;
  right: -14vmin;
  width: 80vmin;
  height: 80vmin;
  opacity: 0.12;
  color: var(--accent); /* magenta swirl, not red */
  pointer-events: none;
  z-index: 0;
  animation: rot 140s linear infinite;
}
/* keep all content above the spiral */
.gg-feature .shead,
.gg-feature .blurb,
.gg-feature .gg-diptych {
  position: relative;
  z-index: 2;
}

/* two works side by side at one shared height, widths ∝ each image's aspect
   ratio, together filling the full content width (no crop, no grey) */
.gg-diptych {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
  justify-content: center;
}
.gg-diptych .gg-dfig {
  margin: 0;
  flex: 0 1 0; /* basis 0 → flex-grow decides each one's share of the row */
  min-width: 240px; /* wrap to stacked before either gets too small */
  position: relative;
  background: var(--ink);
}
/* flex-grow = aspect ratio (width/height): girl4-a ≈ 2.0, girl4-b ≈ 0.714 */
.gg-diptych .gg-dfig--wide {
  flex-grow: 2;
}
.gg-diptych .gg-dfig--tall {
  flex-grow: 0.714;
}
.gg-diptych .gg-dfig img {
  display: block;
  width: 100%;
  height: auto; /* natural ratio → equal heights across the row */
  background: var(--ink);
}

/* dark-page label chip (paper bg, ink text), bottom-left of each piece */
.gg-diptych .label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
  padding: 5px 9px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .gg-spiral {
    right: -30vmin;
    opacity: 0.07;
  }
}
