@import url('fonts/fonts.css');

:root {
  --ink: #101010;
  --paper: #e6e8e4;
  --screen: #dcecff;
  --blue: #1459ff;
  --lilac: #c8b5ff;
  --yellow: #ffe500;
  --sage: #83aa9c;
  --rust: #ef5a1c;
  --lime: var(--yellow);
  --pink: var(--lilac);
  --orange: var(--rust);
  --grey-panel: var(--paper);
  --stroke-panel: 4px;
  --stroke-control: 3px;
  --stroke-detail: 2px;
  --menu-border: #7a7a7a;
  --gutter: clamp(20px, 4vw, 64px);
  --cursor-arrow: url('cursors/arrow.svg') 7 3, auto;
  --cursor-pointer: url('cursors/pointer.svg') 13 3, pointer;
  --cursor-grab: url('cursors/grab.svg') 16 14, grab;
  --cursor-wait: url('cursors/wait.svg') 16 16, wait;
  --cursor-not-allowed: url('cursors/not-allowed.svg') 16 16, not-allowed;
  --cursor-move: url('cursors/move.svg') 16 16, move;
  --cursor-zoom-in: url('cursors/zoom-in.svg') 16 13, zoom-in;
  --cursor-zoom-out: url('cursors/zoom-out.svg') 16 13, zoom-out;
  --portfolio-hover-filter: brightness(0.82) saturate(1.08) contrast(1.03);
}

* {
  box-sizing: border-box;
}

::selection {
  color: var(--ink);
  background: var(--lilac);
}

::-moz-selection {
  color: var(--ink);
  background: var(--lilac);
}

html {
  scroll-behavior: smooth;
  cursor: var(--cursor-arrow);
}

a,
button,
[role='button'],
summary,
label[for] {
  cursor: var(--cursor-pointer);
}

button:disabled,
[aria-disabled='true'] {
  cursor: var(--cursor-not-allowed);
}

[aria-busy='true'],
[aria-busy='true'] * {
  cursor: var(--cursor-wait);
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: 'Manrope', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    rgba(20, 89, 255, 0.18) 0,
    rgba(20, 89, 255, 0.18) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: multiply;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  z-index: 60;
  top: 14px;
  left: 50%;
  width: min(1180px, calc(100% - 28px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  padding: 8px 10px 8px 16px;
  color: #fff;
  background: rgba(10, 10, 10, 0.94);
  border: var(--stroke-control) solid var(--menu-border);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.site-header::before {
  content: none;
  display: none;
  position: absolute;
  top: -10px;
  left: 18px;
  padding: 1px 8px;
  color: var(--ink);
  background: var(--lime);
  border: 1px solid var(--ink);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 1px;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  color: var(--ink);
  background: var(--orange);
  border: 0;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.35px;
  text-transform: none;
}

.logo::after {
  content: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 9px 14px;
  border: var(--stroke-detail) solid #555;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.5px;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
  background: #fff;
  border-color: var(--yellow);
}

.main-nav .nav-cta {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

.nav-toggle {
  position: relative;
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: none;
}

.nav-toggle::before,
.nav-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 3px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-toggle::before {
  box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
}

.nav-toggle::after { opacity: 0; }

.nav-toggle.is-open::before {
  box-shadow: none;
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-toggle.is-open::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Home hero */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 88px var(--gutter) 36px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 79, 219, 0.35), transparent 25%),
    radial-gradient(circle at 86% 72%, rgba(169, 255, 54, 0.25), transparent 24%),
    #090909;
}

.hero::before {
  content: none;
}

.hero-layers {
  position: relative;
  width: 100%;
  height: calc(100svh - 124px);
  min-height: 580px;
  overflow: hidden;
  background: var(--screen);
  border: var(--stroke-panel) solid #fff;
  border-radius: 0;
  box-shadow:
    0 0 0 var(--stroke-panel) var(--ink),
    12px 12px 0 #000;
}

.hero-layers::after {
  content: '';
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.03)),
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.12) 4px);
  mix-blend-mode: multiply;
}

.hero-layer {
  position: absolute;
  inset: -3%;
  width: 106%;
  height: 106%;
  object-fit: cover;
  transform: scale(1.04);
  will-change: transform;
}

.hero-layer:nth-child(1) { z-index: 1; }
.hero-layer:nth-child(2) { z-index: 2; }
.hero-layer:nth-child(3) { z-index: 3; }

.hero-copy {
  position: absolute;
  z-index: 10;
  right: clamp(38px, 7vw, 120px);
  bottom: clamp(54px, 8vw, 118px);
  width: min(840px, calc(100% - 76px));
  text-align: right;
}

.hero-kicker,
.hero-description {
  display: inline-block;
  padding: 6px 12px;
  color: #fff;
  background: var(--ink);
  border: var(--stroke-detail) solid #fff;
  box-shadow: 4px 4px 0 var(--blue);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(17px, 1.4vw, 21px);
}

.hero-title {
  margin: 10px 0 12px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(62px, 10.2vw, 168px);
  line-height: 0.69;
  letter-spacing: -0.07em;
  text-transform: uppercase;
  text-shadow:
    5px 5px 0 var(--ink),
    9px 9px 0 var(--ink);
}

.hero-title span {
  display: block;
}

.hero-description {
  max-width: 620px;
  line-height: 1.35;
}

.hero-enter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--lime);
  border: var(--stroke-control) solid var(--ink);
  box-shadow: 5px 5px 0 #000;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 20px;
  text-transform: uppercase;
}

.hero-enter:hover {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* About */
.about {
  position: relative;
  z-index: 2;
  padding: 56px var(--gutter) 100px;
  background:
    repeating-linear-gradient(135deg, rgba(20, 89, 255, 0.12) 0 2px, transparent 2px 12px),
    var(--screen);
  border-top: 10px solid var(--sage);
  border-bottom: 0;
  transition: padding 0.38s ease;
}

.gallery-section::before {
  content: 'ABOUT ME.TXT';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 7px var(--gutter);
  color: #fff;
  background: var(--blue);
  border-bottom: var(--stroke-panel) solid var(--ink);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 18px;
}

.about::before,
.about::after {
  content: none;
}

.about-inner {
  --about-pad: clamp(42px, 5vw, 68px);
  position: relative;
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 0;
  background: #fff;
  border: var(--stroke-panel) solid var(--ink);
  box-shadow: none;
}

.about-inner::before {
  content: none;
}

.about-content-inner {
  display: grid;
  grid-template-columns: minmax(180px, 0.54fr) minmax(360px, 1.46fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
  padding: var(--about-pad);
}

.about-photo-frame {
  width: min(220px, 100%);
  min-width: 0;
  justify-self: start;
}

.about-photo-wrap {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: #d7d9dd;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.about-photo {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: none;
  border-radius: 0;
}

.about-photo img {
  width: 118%;
  max-width: none;
  height: 118%;
  object-fit: cover;
  transform: translate(-7.6%, 0);
}

.dashed-frame {
  display: none;
}

.corner {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: var(--stroke-detail) solid var(--blue);
}

.corner-tl { top: -6px; left: 12%; }
.corner-tr { top: 6%; right: 4%; }
.corner-bl { bottom: 8%; left: 2%; }
.corner-br { bottom: -5px; right: 15%; }

.about-copy {
  min-width: 0;
}

.about-copy h1 {
  display: inline-block;
  margin: 0 0 24px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 86px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.about-copy p {
  max-width: 680px;
  margin: 0;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.55;
}

.tool-marquee {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-top: 34px;
  overflow: visible;
  border: none;
  background: transparent;
}

.tool-marquee::before,
.tool-marquee::after {
  content: none;
}

.tool-marquee::before { left: 0; background: linear-gradient(90deg, #fff, transparent); }
.tool-marquee::after { right: 0; background: linear-gradient(-90deg, #fff, transparent); }

.tool-marquee-track {
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 0;
  animation: none;
}

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

.badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: auto;
  aspect-ratio: 1;
  min-width: 0;
  max-width: 36px;
  flex: 1 1 36px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.badge[aria-hidden="true"] { display: none; }
.badge img { width: 100%; height: 100%; object-fit: contain; }

/* These two supplied raster marks already include the same cream card and
   purple outline as the vector program icons. Keep their internal padding
   and edges stable at the small badge size. */
.badge-chatgpt img,
.badge-claude img {
  display: block;
  image-rendering: auto;
}

/* ChatGPT and Claude are supplied as transparent marks, so they need the
   same cream tile and purple outline that is drawn inside the other SVGs. */
.badge-chatgpt,
.badge-claude {
  box-sizing: border-box;
  background: #fffbf4;
  border: 2px solid #321539;
  border-radius: 7px;
}

.badge-chatgpt img { width: 72%; height: 72%; }
.badge-claude img { width: 68%; height: 68%; }

/* Selected work */
.work-section {
  position: relative;
  z-index: 3;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #242424;
  background-size: 18px 18px;
  border-bottom: 10px solid var(--sage);
  scroll-margin-top: 82px;
}

.marquee {
  overflow: hidden;
  color: var(--ink);
  background: var(--lime);
  border-top: var(--stroke-panel) solid var(--ink);
  border-bottom: var(--stroke-panel) solid var(--ink);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: title-marquee 22s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 10px 0;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(42px, 7vw, 102px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.marquee-track span::after {
  content: '\25C6';
  display: grid;
  place-items: center;
  width: 0.8em;
  height: 0.8em;
  color: var(--ink);
  font-size: 0.42em;
  line-height: 1;
  transform: translateY(0.02em);
}

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

.work {
  padding: 80px var(--gutter) 110px;
}

.work-grid {
  display: grid;
  gap: 22px;
  width: min(1260px, 100%);
  margin: 0 auto;
}

.work-row {
  display: flex;
  gap: 22px;
}

.work-row-tall { height: clamp(520px, 46vw, 680px); }
.work-row-short { height: clamp(320px, 30vw, 460px); }

.work-col {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 38%;
}

.work-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #000;
  border: var(--stroke-panel) solid #000;
  border-radius: 0;
  box-shadow: 8px 8px 0 #000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
  z-index: 2;
  transform: translate(4px, 4px);
  box-shadow: none;
}

.work-card.grow { flex: 1 1 0; }
.work-card.square { width: 100%; min-height: 0; }
.work-card.fixed-square { width: 38%; flex: 0 0 38%; }

.work-row > .work-card,
.work-col > .work-card {
  height: 100%;
  min-height: 0;
}

.work-col > .work-card { flex: 1 1 0; }

.work-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.work-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.work-card:hover video {
  filter: var(--portfolio-hover-filter);
}

.work-card-video {
  position: relative;
}

.work-video-play {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding-left: 2px;
  color: var(--ink);
  background: var(--yellow);
  border: var(--stroke-detail) solid var(--ink);
  font-size: 15px;
  line-height: 1;
}

.work-card:hover img {
  filter: var(--portfolio-hover-filter);
}

.work-card::before {
  content: none;
}

.work-card::after {
  content: none;
}

.work-card .tags {
  position: absolute;
  z-index: 4;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-card .tags span {
  padding: 5px 9px;
  color: #fff;
  background: var(--ink);
  border: 1px solid #fff;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 17px;
}

/* Categories */
.categories {
  position: relative;
  z-index: 4;
  padding: 88px var(--gutter);
  background:
    repeating-linear-gradient(135deg, rgba(20, 89, 255, 0.12) 0 2px, transparent 2px 12px),
    var(--screen);
  border-bottom: 0;
}

.categories-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.categories-inner-single {
  grid-template-columns: minmax(0, 1fr);
  width: min(1180px, 100%);
}

.category-card {
  --folder-color: var(--lilac);
  position: relative;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  padding: 32px;
  margin-top: 0;
  overflow: visible;
  background: var(--folder-color);
  border: var(--stroke-panel) solid var(--ink);
  border-radius: 0;
  box-shadow: 7px 7px 0 #000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::before {
  content: none;
}

.category-card::after {
  content: none;
}

.category-card:hover {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.category-card.branding { --folder-color: var(--lilac); }
.category-card.illustration { --folder-color: var(--orange); }

.category-card h3 {
  position: relative;
  z-index: 1;
  max-width: 90%;
  min-width: 0;
  margin: 0;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 0.86;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .categories-inner { grid-template-columns: minmax(0, 1fr); }
  .category-card {
    min-height: clamp(220px, 62vw, 280px);
    padding: clamp(20px, 6vw, 32px);
  }
  .category-card h3 {
    max-width: 100%;
    font-size: clamp(34px, 11vw, 46px);
  }
  .category-card.illustration h3 {
    font-size: clamp(25px, 8.5vw, 39px);
  }
}

.category-card.illustration h3 {
  font-size: clamp(38px, 5.1vw, 72px);
}

.category-card .go {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  background: var(--yellow);
  border: var(--stroke-control) solid var(--ink);
  border-radius: 0;
  transition: transform 0.22s ease;
}

.category-card .go svg { display: none; }

.category-card .go::before {
  content: '→';
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  transition: transform 0.22s ease;
}

.category-card:hover .go {
  transform: translate(4px, -4px);
}

.category-card:hover .go::before {
  transform: rotate(-45deg);
}

/* Footer */
.footer {
  position: relative;
  z-index: 4;
  color: var(--ink);
  background: var(--grey-panel);
  scroll-margin-top: 82px;
}

.footer::before {
  content: none;
}

/* Collapsible retro windows */
.window-titlebar {
  position: relative;
  z-index: 3;
  height: 42px;
  padding: 0;
  color: #fff;
  background: var(--blue);
  border-bottom: var(--stroke-panel) solid var(--ink);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 18px;
}

.window-title {
  position: absolute;
  top: 50%;
  left: max(8px, var(--gutter));
  max-width: calc(100% - 90px);
  overflow: hidden;
  transform: translateY(-50%);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.about-inner > .window-titlebar .window-title {
  left: 14px;
}

.window-actions {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: translateY(-50%);
}

.window-minimize,
.window-close {
  appearance: none;
  position: relative;
  display: grid;
  width: 27px;
  height: 25px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: var(--stroke-detail) solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  line-height: 1;
}

.window-close {
  color: #fff;
  background: var(--orange);
  cursor: pointer;
  touch-action: none;
}

.window-minimize span::before {
  content: '';
  display: block;
  width: 11px;
  height: 3px;
  margin-top: 8px;
  background: currentColor;
}

.collapsible-window.is-collapsed .window-minimize span::before {
  width: 10px;
  height: 8px;
  margin-top: 0;
  background: transparent;
  border: 2px solid currentColor;
}

.window-minimize:hover,
.window-minimize:focus-visible {
  background: var(--yellow);
  outline: none;
}

.window-close::before,
.window-close::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 2px;
  background: #fff;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.window-close::before { transform: rotate(45deg); }
.window-close::after { transform: rotate(-45deg); }
.window-close:not(.is-detached):hover::before { transform: rotate(405deg); }
.window-close:not(.is-detached):hover::after { transform: rotate(315deg); }

.physics-arena {
  position: relative;
  overflow: hidden;
}

.window-close-slot {
  display: block;
  flex: 0 0 auto;
  width: 27px;
  height: 25px;
  background: rgba(16, 16, 16, 0.16);
  border: 2px dashed rgba(255, 255, 255, 0.82);
}

.window-close-slot.is-filled {
  background: transparent;
  border-color: transparent;
}

.window-close.is-counted {
  animation: close-button-nudge 0.18s steps(2, end);
}

.window-close.is-detached {
  position: absolute;
  z-index: 20;
  margin: 0;
  cursor: grab;
  transform: rotate(var(--physics-angle, 0deg));
  will-change: left, top, transform;
  user-select: none;
}

.window-close.is-detached::before,
.window-close.is-detached::after {
  transition: none;
}

.window-close.is-detached.is-dragging {
  cursor: grabbing;
}

.window-close.is-detached.is-pinned {
  cursor: default;
  will-change: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.branding-puzzle {
  position: absolute;
  z-index: auto;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.branding-header .page-header-window {
  position: relative;
}

.branding-puzzle-basket,
.branding-puzzle-wrench {
  position: absolute;
  display: block;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.branding-puzzle-basket {
  z-index: 30;
  top: clamp(96px, 9vw, 122px);
  right: -3px;
  width: clamp(54px, 7vw, 88px);
  transform: translate(125%, -18%) rotate(4deg);
}

.branding-puzzle-basket.is-visible {
  opacity: 1;
  transform: translate(0, 0) rotate(0deg);
  transition: opacity 0.18s steps(2, end), transform 0.58s cubic-bezier(0.16, 0.82, 0.3, 1.12);
}

.branding-puzzle-basket.is-hit {
  animation: branding-basket-hit 0.24s steps(3, end);
}

.branding-puzzle-wrench {
  z-index: 10;
  left: clamp(14px, 2vw, 26px);
  /* The wrench rests directly on the window's black bottom rail. */
  bottom: 0;
  width: clamp(90px, 12vw, 160px);
  touch-action: none;
  filter:
    drop-shadow(2px 0 0 #fff)
    drop-shadow(-2px 0 0 #fff)
    drop-shadow(0 2px 0 #fff)
    drop-shadow(0 -2px 0 #fff);
  transform: translateY(170%) rotate(-14deg);
}

.branding-puzzle-wrench.is-visible {
  opacity: 1;
  pointer-events: auto;
  cursor: var(--cursor-grab);
  transform: translateY(0) rotate(-7deg);
  transition: opacity 0.16s steps(2, end), transform 0.62s cubic-bezier(0.12, 0.78, 0.22, 1.2);
}

.branding-puzzle-wrench.is-visible.is-free {
  position: absolute;
  z-index: 40;
  margin: 0;
  transform: rotate(-7deg);
  transition: none;
}

.branding-puzzle-wrench.is-dragging {
  cursor: var(--cursor-grab);
  will-change: left, top;
}

.branding-puzzle-wrench.is-falling {
  pointer-events: none;
  will-change: transform;
}

html.is-dragging-wrench,
html.is-dragging-wrench * {
  cursor: var(--cursor-grab) !important;
}

@keyframes branding-basket-hit {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  35% { transform: translate(-3px, 2px) rotate(-4deg); }
  70% { transform: translate(3px, -2px) rotate(4deg); }
}

@keyframes close-button-nudge {
  0%, 100% { transform: translate(0, 0); }
  35% { transform: translate(-1px, 1px) rotate(-2deg); }
  70% { transform: translate(1px, -1px) rotate(2deg); }
}

.window-content {
  overflow: hidden;
  max-height: 2400px;
  opacity: 1;
  transition: max-height 0.42s ease, opacity 0.24s ease;
}

.window-content-inner {
  min-height: 0;
  overflow: hidden;
}

.collapsible-window.is-collapsed .window-content {
  max-height: 0;
  opacity: 0;
}

.about.is-collapsed {
  padding-top: max(0px, calc(var(--gutter) - 10px));
  padding-bottom: var(--gutter);
}

@media (prefers-reduced-motion: reduce) {
  .about,
  .about-content-inner,
  .window-content,
  .window-close::before,
  .window-close::after,
  .window-close.is-counted {
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
  }
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(44px, 8vw, 120px);
  width: min(1160px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 90px 0;
}

.footer-message h2 {
  margin: 0 0 24px;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 94px);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.footer-message p {
  max-width: 520px;
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-link {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 94px;
  padding: 18px;
  overflow: hidden;
  background: #fff;
  border: var(--stroke-control) solid var(--ink);
  box-shadow: 7px 7px 0 #000;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.social-link:nth-child(1):hover { background: #1769ff; }
.social-link:nth-child(2):hover { background: #6947ff; }
.social-link:nth-child(3):hover { background: #e1306c; }
.social-link:nth-child(4):hover { background: #0a66c2; }

.social-link img {
  max-width: 90%;
  max-height: 58px;
  transition: filter 0.2s ease;
}

.social-link .icon-hover {
  display: none;
}

.social-link:hover .icon-default {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px var(--gutter);
  color: #fff;
  background: var(--ink);
  border-top: 0;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 16px;
}

.copyright-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.copyright-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  font-family: Arial, sans-serif;
  font-size: 1em;
  line-height: 1;
}

/* Inner page headers */
.page-header {
  position: relative;
  min-height: 620px;
  padding: 150px var(--gutter) 86px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 24%, rgba(200, 181, 255, 0.65), transparent 28%),
    radial-gradient(circle at 28% 82%, rgba(255, 229, 0, 0.5), transparent 24%),
    var(--screen);
  border-bottom: 10px solid var(--blue);
}

.page-header::before {
  content: 'C:\\DIANA\\PORTFOLIO\\';
  position: absolute;
  top: 108px;
  left: var(--gutter);
  padding: 6px 10px;
  color: #fff;
  background: var(--ink);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 17px;
}

.page-header::after {
  content: '□  □  ×';
  position: absolute;
  top: 108px;
  right: var(--gutter);
  padding: 4px 9px;
  color: #fff;
  background: var(--blue);
  border: var(--stroke-detail) solid var(--ink);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 20px;
}

.page-header-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1180px, 100%);
  min-height: 380px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 82px);
  background: rgba(255, 255, 255, 0.68);
  border: var(--stroke-panel) solid var(--ink);
  border-radius: 46px / 24px;
  box-shadow: 12px 12px 0 var(--blue), 18px 18px 0 var(--pink);
}

.page-header-inner::before {
  content: '● ONLINE / SELECTED ARCHIVE';
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 5px 9px;
  color: #fff;
  background: var(--ink);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 16px;
}

.page-header h1 {
  margin: 0 0 20px;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(72px, 12vw, 180px);
  line-height: 0.72;
  letter-spacing: -0.07em;
  text-transform: uppercase;
  text-shadow: 6px 6px 0 #fff, 10px 10px 0 var(--pink);
}

.page-header p {
  max-width: 720px;
  margin: 0;
  padding: 10px 14px;
  background: #fff;
  border: var(--stroke-detail) solid var(--ink);
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.5;
}

.illustrations-header {
  background:
    radial-gradient(circle at 80% 22%, rgba(255, 229, 0, 0.84), transparent 25%),
    radial-gradient(circle at 20% 82%, rgba(20, 89, 255, 0.62), transparent 30%),
    var(--orange);
}

.illustrations-header h1 {
  font-size: clamp(58px, 9vw, 132px);
}

/* Galleries */
.gallery-section {
  position: relative;
  padding: 118px var(--gutter) 120px;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #111;
  background-size: 18px 18px;
}

.gallery-section::before {
  content: '02 / OPEN_ARCHIVE';
  color: var(--ink);
  background: var(--lime);
}

.case-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  width: min(1220px, 100%);
  margin: 0 auto;
}

.case-item,
.gallery-item {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #000;
  border: var(--stroke-panel) solid #000;
  border-radius: 0;
  box-shadow: 8px 8px 0 #000;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.case-item::before,
.gallery-item::before {
  content: none;
}

.case-item {
  aspect-ratio: 860 / 675;
}

.case-item-featured {
  grid-column: 1 / -1;
  aspect-ratio: 2.15 / 1;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  cursor: zoom-in;
}

.case-item:hover,
.gallery-item:hover {
  z-index: 2;
  transform: translate(4px, 4px);
  box-shadow: none;
}

.case-item img,
.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.case-item:hover img,
.gallery-item:hover img,
.gallery-item:hover video {
  filter: var(--portfolio-hover-filter);
}

.gallery-video-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding-left: 3px;
  color: var(--ink);
  background: var(--yellow);
  border: var(--stroke-detail) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 22px;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.case-item::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(to bottom, transparent 36%, rgba(0, 0, 0, 0.18) 50%, rgba(0, 0, 0, 0.9) 100%);
  pointer-events: none;
}

.case-title {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 68px;
  bottom: 15px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 0.98;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}

.case-go {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--yellow);
  border: var(--stroke-control) solid var(--ink);
  border-radius: 0;
  transition: transform 0.22s ease, background 0.2s ease;
}

.case-go svg {
  width: 24px;
  height: 24px;
  transition: transform 0.22s ease;
}

.case-item:hover .case-go {
  transform: translate(3px, -3px);
}

.case-item:hover .case-go svg {
  transform: rotate(-45deg);
}

.case-corner-peel {
  position: absolute;
  z-index: 5;
  top: -4px;
  right: -4px;
  width: clamp(66px, 8vw, 92px);
  aspect-ratio: 1;
  overflow: hidden;
  background:
    linear-gradient(135deg, #f5f5f2 0 46%, #9da3a3 47% 52%, #d9d9d6 53% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  filter: drop-shadow(-4px 4px 0 #000);
  pointer-events: none;
}

.case-corner-nut {
  position: absolute;
  top: 16%;
  right: 15%;
  width: clamp(22px, 2.7vw, 30px);
  aspect-ratio: 1;
  background: #050505;
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
}

.case-corner-nut::before,
.case-corner-nut::after {
  content: '';
  position: absolute;
}

.case-corner-nut::before {
  inset: 4px;
  background: #a8b0b1;
  clip-path: inherit;
}

.case-corner-nut::after {
  inset: 38%;
  background: #050505;
}

.case-corner-nut {
  transition: filter 0.15s steps(2, end), opacity 0.22s steps(3, end), transform 0.22s steps(3, end);
}

.case-corner-nut.is-targeted {
  filter:
    drop-shadow(3px 0 0 var(--yellow))
    drop-shadow(-3px 0 0 var(--yellow))
    drop-shadow(0 3px 0 var(--yellow))
    drop-shadow(0 -3px 0 var(--yellow));
}

.case-corner-nut.is-unscrewing {
  animation: puzzle-nut-turn 0.72s steps(8, end);
}

.case-corner-nut.is-unscrewed {
  opacity: 0;
  transform: scale(0.35) rotate(-180deg);
}

.branding-puzzle-wrench.is-working {
  animation: puzzle-wrench-turn 0.72s steps(6, end);
}

.loose-nut {
  position: absolute;
  z-index: 60;
  top: 0;
  right: auto;
  width: 30px;
  pointer-events: none;
  transform-origin: 50% 50%;
  filter:
    drop-shadow(2px 0 0 #fff)
    drop-shadow(-2px 0 0 #fff)
    drop-shadow(0 2px 0 #fff)
    drop-shadow(0 -2px 0 #fff);
}

.loose-nut.is-draggable {
  pointer-events: auto;
  touch-action: none;
  cursor: var(--cursor-grab);
}

.loose-nut.is-dragging {
  z-index: 70;
  cursor: var(--cursor-grab);
  will-change: left, top;
}

html.is-dragging-loose-part,
html.is-dragging-loose-part * {
  cursor: var(--cursor-grab) !important;
}

@keyframes puzzle-nut-turn {
  0% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-90deg) scale(1.12); }
  70% { transform: rotate(-210deg) scale(0.9); }
  100% { transform: rotate(-360deg) scale(0.65); }
}

@keyframes puzzle-wrench-turn {
  0%, 100% { transform: rotate(-7deg); }
  35% { transform: rotate(-28deg); }
  68% { transform: rotate(13deg); }
}

.fish-game-reveal {
  width: min(960px, 100%);
  margin: clamp(34px, 4vw, 56px) auto 0;
  color: #fff;
}

.fish-game-reveal[hidden] {
  display: none;
}

.fish-game-reveal.is-revealed {
  animation: fish-game-boot 0.72s cubic-bezier(0.18, 0.82, 0.28, 1) both;
}

.fish-game-window {
  overflow: hidden;
  background: #080c0e;
  border: var(--stroke-panel) solid #000;
  box-shadow: 10px 10px 0 #000;
}

.fish-game-titlebar,
.fish-game-toolbar,
.fish-game-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: 'VT323', monospace;
  font-weight: 400;
  text-transform: uppercase;
}

.fish-game-titlebar {
  min-height: 48px;
  padding: 8px 14px;
  color: #fff;
  background: var(--blue);
  border-bottom: var(--stroke-panel) solid #000;
  font-size: clamp(20px, 2.4vw, 30px);
}

.fish-game-toolbar {
  padding: 9px 14px;
  color: #000;
  background: var(--yellow);
  border-bottom: var(--stroke-detail) solid #000;
  font-size: clamp(16px, 1.8vw, 22px);
}

.fish-game-toolbar strong {
  font: inherit;
}

.fish-game-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #071b23;
}

.fish-game-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  image-rendering: pixelated;
  cursor: var(--cursor-pointer);
}

.fish-game-start {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  min-width: 180px;
  padding: 12px 22px;
  color: #000;
  background: var(--yellow);
  border: var(--stroke-control) solid #000;
  box-shadow: 6px 6px 0 #000;
  font-family: 'VT323', monospace;
  font-size: clamp(22px, 3vw, 34px);
  text-transform: uppercase;
  cursor: var(--cursor-pointer);
  transform: translate(-50%, -50%);
}

.fish-game-start:hover,
.fish-game-start:focus-visible {
  color: #fff;
  background: var(--orange);
  outline: none;
}

.fish-game-start.is-hidden {
  display: none;
}

.fish-game-help {
  justify-content: center;
  min-height: 38px;
  padding: 7px 12px;
  color: #fff;
  background: #111;
  border-top: var(--stroke-detail) solid #000;
  font-size: clamp(14px, 1.6vw, 19px);
  text-align: center;
}

@keyframes fish-game-boot {
  0% {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-78px) scaleY(0.32);
    transform-origin: 50% 0;
  }
  45% { opacity: 1; }
  100% {
    opacity: 1;
    clip-path: inset(0);
    transform: translateY(0) scaleY(1);
    transform-origin: 50% 0;
  }
}

/* Illustrations easter egg: flies, newspaper swatter and kitchen checkers. */
.illustrations-newspaper {
  appearance: none;
  position: absolute;
  z-index: 16;
  right: clamp(14px, 2.4vw, 34px);
  bottom: clamp(14px, 2.4vw, 32px);
  width: clamp(106px, 14vw, 176px);
  padding: 0;
  overflow: visible;
  opacity: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
  touch-action: none;
  transform: translate(118%, 18%) rotate(7deg);
  transform-origin: 50% 50%;
}

.illustrations-newspaper img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(4px 4px 0 #000);
}

.illustrations-newspaper.is-visible {
  opacity: 1;
  pointer-events: auto;
  cursor: var(--cursor-pointer);
  transform: translate(0) rotate(20deg);
  transition: opacity 0.2s steps(2, end), transform 0.66s cubic-bezier(0.18, 0.84, 0.24, 1.12);
}

.illustrations-newspaper.is-free {
  z-index: 110;
  right: auto;
  bottom: auto;
  width: clamp(100px, 12vw, 164px);
  margin: 0;
  transition: none;
}

.illustrations-newspaper.is-carried {
  position: fixed;
  pointer-events: none;
  cursor: var(--cursor-grab);
  transform: translate(-50%, -42%) rotate(18deg);
  will-change: left, top, transform;
}

.illustrations-newspaper.is-dropped {
  position: absolute;
  pointer-events: auto;
  cursor: var(--cursor-pointer);
  transform: rotate(20deg);
}

.illustrations-newspaper.is-swatting {
  animation: newspaper-swat 0.28s cubic-bezier(0.25, 0.9, 0.36, 1);
}

.illustration-fly {
  position: absolute;
  z-index: 96;
  top: 0;
  left: 0;
  display: block;
  width: clamp(30px, 3vw, 43px);
  height: auto;
  pointer-events: none;
  user-select: none;
  image-rendering: pixelated;
  filter: none;
  transform: translate3d(var(--fly-x, 0), var(--fly-y, 0), 0) rotate(var(--fly-angle, 0deg));
  transform-origin: 50% 50%;
  will-change: transform;
}

.newspaper-slap {
  position: fixed;
  z-index: 161;
  width: 44px;
  aspect-ratio: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: newspaper-local-slap 0.3s steps(4, end) forwards;
}

.newspaper-slap::before,
.newspaper-slap::after {
  content: '';
  position: absolute;
  inset: 17px 0;
  background: #000;
  box-shadow: 0 -17px 0 -5px #000, 0 17px 0 -5px #000;
}

.newspaper-slap::before { transform: rotate(45deg); }
.newspaper-slap::after { transform: rotate(-45deg); }

@keyframes newspaper-local-slap {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

@keyframes newspaper-swat {
  0% { transform: translate(-50%, -42%) rotate(-8deg) scale(1); }
  45% { transform: translate(-49%, -40%) rotate(5deg) scale(1.02); }
  100% { transform: translate(-50%, -42%) rotate(-8deg) scale(1); }
}

.checkers-game-reveal {
  width: min(960px, 100%);
  margin: clamp(42px, 5vw, 70px) auto 0;
  color: #fff;
}

.checkers-game-reveal[hidden] {
  display: none;
}

.checkers-game-reveal.is-revealed {
  animation: checkers-game-boot 0.78s cubic-bezier(0.18, 0.82, 0.28, 1) both;
}

.checkers-game-window {
  position: relative;
  overflow: hidden;
  background: #000;
  border: var(--stroke-panel) solid #000;
  box-shadow: 10px 10px 0 #000;
}

.checkers-game-titlebar,
.checkers-game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: 'VT323', monospace;
  text-transform: uppercase;
}

.checkers-game-titlebar {
  min-height: 48px;
  padding: 8px 14px;
  color: #f4ead5;
  background: #000;
  border-bottom: var(--stroke-panel) solid #000;
  font-size: clamp(20px, 2.4vw, 30px);
}

.checkers-kitchen-scene {
  position: relative;
  display: grid;
  min-height: 610px;
  place-items: center;
  overflow: hidden;
  padding: 44px;
  background: #83aa9c;
  border: 0 solid #000;
}

.checkers-tablecloth {
  position: absolute;
  z-index: 0;
  right: -3%;
  bottom: -8%;
  width: 62%;
  height: 62%;
  background: conic-gradient(#f4ead5 25%, #83aa9c 0 50%, #f4ead5 0 75%, #83aa9c 0) 0 0 / 32px 32px;
  border: 4px solid #000;
  transform: rotate(-2deg);
}

.checkers-bagel {
  position: absolute;
  z-index: 1;
  width: 86px;
  aspect-ratio: 1;
  background: #f4ead5;
  border: 4px solid #000;
  clip-path: polygon(23% 0, 77% 0, 100% 23%, 100% 77%, 77% 100%, 23% 100%, 0 77%, 0 23%);
  filter: none;
}

.checkers-bagel::after {
  content: '';
  position: absolute;
  inset: 31%;
  background: #83aa9c;
  border: 4px solid #000;
  clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%);
}

.checkers-bagel-one { left: 5%; top: 9%; transform: rotate(9deg); }
.checkers-bagel-two { right: 5%; top: 11%; width: 68px; transform: rotate(-12deg); }

.checkers-cup {
  position: absolute;
  z-index: 1;
  right: 5%;
  bottom: 8%;
  width: 76px;
  height: 62px;
  background: #f4ead5;
  border: 4px solid #000;
}

.checkers-cup::after {
  content: '';
  position: absolute;
  right: -28px;
  top: 10px;
  width: 25px;
  height: 30px;
  border: 4px solid #000;
  border-left: 0;
}

.checkers-crumbs {
  position: absolute;
  z-index: 1;
  left: 16%;
  top: 19%;
  width: 7px;
  height: 7px;
  background: #000;
  box-shadow: 18px 8px 0 #000, 37px -4px 0 #000, 54px 13px 0 #000;
}

.checkers-newspaper-prop {
  position: absolute;
  z-index: 1;
  left: 1.5%;
  bottom: 3%;
  width: 25%;
  transform: rotate(6deg);
  filter: none;
}

.checkers-board {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: min(72%, 550px);
  aspect-ratio: 1;
  overflow: hidden;
  background: #f4ead5;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000;
  transform: none;
}

.checkers-cell {
  appearance: none;
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 0;
  aspect-ratio: 1;
  background: #f4ead5;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.checkers-cell.is-dark { background: #83aa9c; }
.checkers-cell.is-selected { outline: 5px solid #000; outline-offset: -5px; }
.checkers-cell.is-legal::after {
  content: '';
  position: absolute;
  width: 18%;
  aspect-ratio: 1;
  background: #000;
  border: 2px solid #000;
}

.checkers-piece {
  position: relative;
  z-index: 2;
  display: grid;
  width: 68%;
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid #000;
  border-radius: 50%;
  box-shadow: none;
  pointer-events: none;
}

.checkers-piece.is-white { background: #f4ead5; }
.checkers-piece.is-black { background: #000; border-color: #f4ead5; outline: 3px solid #000; }
.checkers-piece.is-king::after {
  content: '♛';
  color: #000;
  font-size: clamp(18px, 2.4vw, 30px);
  text-shadow: none;
}

.checkers-piece.is-black.is-king::after { color: #f4ead5; }

.checkers-piece.is-pill {
  width: 68%;
  aspect-ratio: 1;
  background: #f4ead5;
  border-color: #000;
  border-radius: 50%;
  transform: none;
  overflow: hidden;
}

.checkers-piece.is-pill::before {
  content: '';
  position: absolute;
  left: -16%;
  top: 42%;
  width: 132%;
  height: 16%;
  background: #000;
  transform: rotate(-36deg);
}

.checkers-piece.is-button {
  background:
    radial-gradient(circle at 36% 36%, #f4ead5 0 6%, transparent 7%),
    radial-gradient(circle at 64% 36%, #f4ead5 0 6%, transparent 7%),
    radial-gradient(circle at 36% 64%, #f4ead5 0 6%, transparent 7%),
    radial-gradient(circle at 64% 64%, #f4ead5 0 6%, transparent 7%),
    #000;
  border-color: #f4ead5;
  outline: 3px solid #000;
}

.checkers-game-toolbar {
  min-height: 48px;
  padding: 8px 12px;
  color: #000;
  background: #f4ead5;
  border-top: var(--stroke-panel) solid #000;
  font-size: clamp(15px, 1.7vw, 20px);
}

.checkers-game-toolbar button {
  appearance: none;
  flex: 0 0 auto;
  padding: 6px 12px;
  color: #fff;
  background: #111;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  cursor: var(--cursor-pointer);
}

@keyframes checkers-game-boot {
  0% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(-70px) scaleY(0.3); transform-origin: 50% 0; }
  45% { opacity: 1; }
  100% { opacity: 1; clip-path: inset(0); transform: translateY(0) scaleY(1); transform-origin: 50% 0; }
}

@media (max-width: 720px) {
  .illustration-fly { width: 30px; }
  .checkers-kitchen-scene { min-height: 430px; padding: 24px 12px 82px; }
  .checkers-board { width: min(94%, 390px); }
  .checkers-newspaper-prop { width: 34%; }
  .checkers-bagel { width: 58px; }
  .checkers-game-toolbar { align-items: flex-start; flex-direction: column; }
}

/* Final supplied assets for the Illustrations easter egg. */
.illustrations-newspaper.is-visible { transform: translate(0) rotate(20deg); }
.illustrations-newspaper.is-carried { transform: translate(-50%, -42%) rotate(18deg); }
.illustrations-newspaper.is-dropped { transform: rotate(20deg); }

.newspaper-slap {
  width: clamp(100px, 10vw, 150px);
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  filter: none;
  opacity: 0.8;
  transform: translate(-50%, -50%);
  animation: newspaper-local-slap 0.24s steps(3, end) forwards;
}

.checkers-kitchen-scene {
  display: block;
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: #000;
}

.checkers-board-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.checkers-board {
  position: absolute;
  z-index: 3;
  left: 24%;
  top: 26%;
  width: 50%;
  height: auto;
  aspect-ratio: 1;
  border: 0;
  box-shadow: none;
  transform: none;
  background: transparent;
}

.checkers-cell,
.checkers-cell.is-dark {
  background: transparent;
  border: 0;
}

.checkers-cell.is-selected { outline: 3px solid #000; outline-offset: -3px; }
.checkers-cell.is-selected { outline: 0; }
.checkers-cell.is-selected::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 3px solid #000;
  pointer-events: none;
  transform: translate(var(--cell-shift-x), var(--cell-shift-y));
}
.checkers-cell.is-legal::after {
  left: 50%;
  top: 50%;
  width: 16%;
  background: #000;
  border: 0;
  transform: translate(calc(-50% + var(--cell-shift-x)), calc(-50% + var(--cell-shift-y)));
}

@media (max-width: 720px) {
  .checkers-board { left: 24%; top: 26%; width: 50%; }
}

.checkers-result {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  display: none;
  padding: 12px 22px;
  color: #000;
  background: #f4ead5;
  border: 4px solid #000;
  font: 32px/1 'VT323', monospace;
  transform: translate(-50%, -50%);
  box-shadow: 6px 6px 0 #000;
}

.checkers-result.is-visible { display: block; }

.case-item-hidden,
.gallery-item-hidden {
  display: none;
}

.expand-btn {
  display: block;
  margin: 54px auto 0;
  padding: 11px 32px;
  color: var(--ink);
  background: var(--lime);
  border: var(--stroke-control) solid var(--ink);
  border-radius: 0;
  box-shadow: 6px 6px 0 #000;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 20px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.expand-btn:hover {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.lightbox.is-open { display: flex; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.92);
  backdrop-filter: blur(12px);
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1180px, 100%);
}

.lightbox-image-wrap {
  position: relative;
  flex: 1;
  max-height: calc(100vh - 100px);
  padding: 0;
  overflow: auto;
  scrollbar-width: none;
  background: #000;
  border: 0;
  box-shadow: none;
}

.lightbox-image-wrap::-webkit-scrollbar {
  display: none;
}

.lightbox-image-wrap::-webkit-scrollbar-track {
  background: #202020;
}

.lightbox-image-wrap::-webkit-scrollbar-thumb {
  background: #777;
  border: 2px solid #202020;
}

.lightbox-image-wrap::-webkit-scrollbar-thumb:hover {
  background: #777;
}

.lightbox-image-wrap img {
  width: 100%;
  height: auto;
  max-width: none;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  cursor: zoom-in;
  transition: none;
}

.lightbox-image-wrap video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  background: #000;
}

.lightbox-image-wrap video[hidden],
.lightbox-image-wrap img[hidden] { display: none; }

.lightbox-image-wrap.is-zoomed img {
  display: block;
  width: calc(100% * var(--zoom-scale, 2));
  max-height: none;
  cursor: var(--cursor-zoom-in);
  user-select: none;
}

.lightbox-image-wrap.is-zoomed {
  touch-action: none;
  cursor: var(--cursor-zoom-in);
}

.lightbox-image-wrap.is-max-zoom,
.lightbox-image-wrap.is-max-zoom img {
  cursor: var(--cursor-zoom-out);
}

.lightbox-image-wrap.is-panning img {
  transition: none;
  cursor: var(--cursor-grab);
}

.lightbox-caption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 7px;
  color: #fff;
  background: var(--ink);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.15;
}

.lightbox-arrow,
.lightbox-close {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--yellow);
  border: var(--stroke-detail) solid var(--ink);
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.lightbox-arrow:hover,
.lightbox-close:hover {
  filter: brightness(1.12);
}

.lightbox-arrow:disabled {
  opacity: 0.38;
  cursor: default;
  filter: none;
}

.lightbox-arrow svg,
.lightbox-close svg { width: 19px; height: 19px; }
.lightbox-arrow path,
.lightbox-close path { stroke: var(--ink); }

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: var(--orange);
}

.lightbox-close path { stroke: #fff; }

.case-item:focus-visible,
.gallery-item:focus-visible,
.expand-btn:focus-visible,
.lightbox-close:focus-visible {
  outline: var(--stroke-control) solid var(--yellow);
  outline-offset: 3px;
}

/* Disabled archive arrows should not leave a stray yellow edge at a boundary. */
.lightbox-arrow:focus-visible { outline: none; }

@media (max-width: 900px) {
  .site-header { top: 10px; }
  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    width: min(280px, calc(100vw - 28px));
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    color: #fff;
    background: var(--ink);
    border: var(--stroke-control) solid var(--menu-border);
    box-shadow: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { text-align: center; }
  .nav-toggle { display: flex; }

  .hero { padding: 82px 18px 26px; }
  .hero::before { top: 98px; left: 34px; }
  .hero-layers { height: calc(100svh - 108px); min-height: 560px; border-radius: 0; }
  .hero-copy { right: 34px; bottom: 62px; width: calc(100% - 68px); }
  .hero-title { font-size: clamp(60px, 13vw, 112px); }

  .about-content-inner { grid-template-columns: 1fr; }
  .about-photo-frame { width: min(190px, 42vw); margin: 0; justify-self: start; }

  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .work-row,
  .work-col { display: contents; }
  .work-card,
  .work-card.grow,
  .work-card.square,
  .work-card.fixed-square {
    width: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    flex: none;
  }

  .category-card h3 { font-size: clamp(36px, 5.5vw, 54px); }
  .category-card.illustration h3 { font-size: clamp(32px, 4.8vw, 46px); }

  .footer-inner { grid-template-columns: 1fr; }
  .page-header { min-height: 540px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .site-header { min-height: 52px; }
  .site-header::before { content: 'PORTFOLIO.OS'; }
  .logo { font-size: 18px; }

  .hero { min-height: 760px; }
  .hero::before { top: 94px; left: 30px; right: 30px; overflow: hidden; white-space: nowrap; }
  .hero-layers { height: 660px; min-height: 0; }
  .hero-layer { inset: 0; width: 100%; height: 100%; object-position: 48% center; }
  .hero-copy { right: 30px; bottom: 56px; width: calc(100% - 60px); }
  .hero-title { margin: 10px 0 16px; font-size: clamp(56px, 18vw, 88px); line-height: 0.76; }
  .hero-description { font-size: 12px; }
  .hero-enter { font-size: 14px; }

  .about { padding-top: 64px; padding-bottom: 112px; }
  .about-inner {
    --about-pad: 36px;
    padding: 0;
    box-shadow: none;
  }
  .about-photo-frame { width: min(150px, 48vw); }
  .about-copy h1 { font-size: 50px; }
  .about-copy p { font-size: 15px; }
  .tool-marquee-track { gap: 3px; }
  .badge { width: 26px; height: auto; flex-basis: 26px; }

  .work { padding: 48px 16px 70px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card,
  .work-card.grow,
  .work-card.fixed-square,
  .work-card.square { width: 100%; min-height: 0; aspect-ratio: 4 / 3; }

  .categories { padding: 60px 16px; }
  .categories-inner { grid-template-columns: 1fr; }
  .category-card { min-height: clamp(220px, 62vw, 250px); }

  .footer-inner { width: calc(100% - 32px); padding: 64px 0; }
  .footer-links { grid-template-columns: 1fr; }
  .social-link { min-height: 82px; }
  .footer-bar { flex-direction: column; }

  .page-header { min-height: 520px; padding-top: 134px; }
  .page-header::before,
  .page-header::after { top: 92px; }
  .page-header::before { right: 88px; overflow: hidden; white-space: nowrap; }
  .page-header-inner { min-height: 330px; padding: 28px 22px; border-radius: 30px / 18px; }
  .page-header h1 { font-size: clamp(62px, 21vw, 100px); }
  .illustrations-header h1 { font-size: clamp(46px, 14.5vw, 70px); letter-spacing: -0.05em; }
  .page-header p { font-size: 14px; }

  .gallery-section { padding: 96px 16px 90px; }
  .case-grid,
  .gallery-grid { grid-template-columns: 1fr; gap: 20px; }
  .case-item-featured { grid-column: auto; aspect-ratio: 860 / 675; }
  .case-title { font-size: 20px; }

  .lightbox { padding: 52px 10px 16px; }
  .lightbox-frame { display: block; }
  .lightbox-image-wrap { width: 100%; }
  .lightbox-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 34px;
    height: 38px;
    transform: translateY(-50%);
  }
  .lightbox-arrow:hover { transform: translateY(-50%); }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-close {
    top: -40px;
    width: 34px;
    height: 34px;
  }
  .lightbox-caption {
    left: 7px;
    bottom: 7px;
    max-width: calc(100% - 14px);
    padding: 3px 5px;
    font-size: 11px;
  }
}

/* Unified window treatment for Branding and Illustrations hero panels */
.site-header {
  top: 0;
  left: 0;
  width: 100%;
  min-height: 56px;
  padding: 8px 14px 7px 18px;
  transform: none;
  border-top: 0;
  border-right: 0;
  border-left: 0;
}

.site-header::before {
  top: 0;
}

.page-header {
  transition: min-height 0.38s ease, padding 0.38s ease;
}

.page-header::before,
.page-header::after,
.page-header-inner::before {
  content: none;
}

.page-header-window {
  width: min(1180px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border: var(--stroke-panel) solid var(--ink);
}

.page-header-window > .window-titlebar .window-title { left: 14px; }

.page-header-inner {
  width: 100%;
  min-height: 380px;
  margin: 0;
  padding: clamp(42px, 6vw, 82px);
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-header h1 {
  margin: 0 0 24px;
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: clamp(54px, 8vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: none;
  text-shadow: none;
}

.page-header p {
  max-width: 760px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 17px;
  line-height: 1.55;
}

.illustrations-header h1 { font-size: clamp(50px, 7vw, 92px); }

.page-header.is-collapsed {
  min-height: 0;
  padding-bottom: 64px;
}

@media (max-width: 900px) {
  .page-header {
    min-height: 0;
    padding-top: 130px;
    padding-bottom: 70px;
  }
}

@media (max-width: 560px) {
  .page-header {
    min-height: 0;
    padding: 112px 16px 64px;
  }
  .page-header.is-collapsed { padding-bottom: 48px; }
  .page-header-inner {
    min-height: 300px;
    padding: 42px 24px;
  }
  .page-header h1 { font-size: clamp(48px, 16vw, 72px); }
  .illustrations-header h1 {
    font-size: clamp(40px, 12.5vw, 56px);
    letter-spacing: -0.04em;
  }
  .page-header p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tool-marquee-track,
  .marquee-track { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Custom cursor state map */
.nav-toggle,
.window-close,
.case-item,
.gallery-item,
.expand-btn,
.lightbox-close,
.lightbox-arrow {
  cursor: var(--cursor-pointer);
}

.window-close.is-detached {
  cursor: var(--cursor-grab);
}

.window-close.is-detached.is-dragging {
  cursor: var(--cursor-grab);
}

.window-close.is-detached.is-pinned {
  cursor: var(--cursor-pointer);
}

.lightbox-image-wrap img {
  cursor: var(--cursor-zoom-in);
}

/* Videos open a player, rather than an image zoom. */
.gallery-item.gallery-video,
.gallery-item.gallery-video video { cursor: var(--cursor-pointer); }

.lightbox-image-wrap.is-zoomed img {
  cursor: var(--cursor-zoom-in);
}

.lightbox-image-wrap.is-zoomed {
  cursor: var(--cursor-zoom-in);
  touch-action: none;
}

.lightbox-image-wrap.is-max-zoom,
.lightbox-image-wrap.is-max-zoom img {
  cursor: var(--cursor-zoom-out);
}

.lightbox-image-wrap.is-panning,
.lightbox-image-wrap.is-panning img {
  cursor: var(--cursor-grab);
}

/* Picture-book archive: placement follows the supplied 1536 × 2732 sketch. */
.books-section {
  position: relative;
  height: min(177.87vw, 2732px);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    #111;
  background-size: 18px 18px;
  border-bottom: var(--stroke-panel) solid #000;
}

.books-section-header {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  min-height: 54px;
  padding: 10px var(--gutter) 8px;
  color: var(--ink);
  background: var(--yellow);
  border-top: 10px solid var(--blue);
  font: 400 20px/1 'VT323', monospace;
  letter-spacing: .04em;
}

.books-stage {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  top: 54px;
  width: 100%;
  height: calc(100% - 54px);
}

.books-objects,
.books-stack {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.book-decor {
  position: absolute;
  z-index: 1;
  display: block;
  height: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(clamp(5px, .7vw, 11px) clamp(6px, .85vw, 13px) 0 rgba(0, 0, 0, .9));
}

/* Edge objects remain physically attached to the viewport edges. */
.decor-mouse { top: 6.2%; left: -3.8%; width: 13.5%; }
.decor-green-sticker { top: 22.8%; left: 28.7%; width: 5.6%; }
.decor-floppy-2002 { top: 26.4%; right: -2.8%; width: 14%; }
.decor-small-sticker { top: 78.5%; left: 23%; width: 4.8%; }
.decor-phone { top: 42.3%; right: -3.2%; width: 12.5%; }
.decor-tamagotchi { top: 49.1%; left: 48.2%; width: 8.2%; }
.decor-disc { top: 52.3%; left: -4.5%; width: 21%; }
.decor-keyboard { bottom: -1.5%; left: -5.4%; width: 24%; }
.decor-poster { right: -4.2%; bottom: -1.8%; width: 24%; }

.book-object {
  position: absolute;
  z-index: 4;
  display: block;
  width: 28%;
  aspect-ratio: 1;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  cursor: var(--cursor-pointer);
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(clamp(12px, 1.7vw, 24px) clamp(14px, 1.9vw, 28px) 0 rgba(0, 0, 0, .92));
  transform: rotate(var(--book-rotation));
  transform-origin: center;
  transition: transform .18s ease, filter .18s ease;
}

.book-object img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none;
}

.book-marisol { top: 4.2%; left: 14%; --book-rotation: -15deg; }
.book-sunshine { top: 9.8%; right: 16.2%; --book-rotation: 0deg; }
.book-joy { top: 20.3%; left: 52.3%; --book-rotation: -11deg; }
.book-greed { top: 29.8%; left: 20.3%; --book-rotation: 5deg; }
.book-rom-bom-bom { top: 40.5%; left: 9.5%; --book-rotation: -13deg; }
.book-hello-yoel { top: 56.2%; left: 54%; --book-rotation: 0deg; }
.book-little-angel { top: 66.2%; left: 37.5%; --book-rotation: -14deg; }

.book-object:hover,
.book-object:focus-visible {
  z-index: 12;
  filter: drop-shadow(clamp(12px, 1.7vw, 24px) clamp(14px, 1.9vw, 28px) 0 rgba(0, 0, 0, .92));
  transform: translate(.6vw, .7vw) rotate(var(--book-rotation));
  outline: 0;
}

.book-object:hover img,
.book-object:focus-visible img {
  box-shadow: none !important;
}

/* Book preview window */
.book-viewer {
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.book-viewer.is-open { display: flex; }

.book-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .84);
  backdrop-filter: blur(9px);
}

.book-viewer-window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1240px, calc(100vw - 32px));
  height: min(860px, calc(100svh - 32px));
  overflow: hidden;
  background: var(--paper);
  border: var(--stroke-panel) solid var(--ink);
}

.book-viewer-titlebar {
  flex: 0 0 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 8px 18px;
  color: #fff;
  background: var(--blue);
  border-bottom: var(--stroke-panel) solid var(--ink);
  font: 400 20px/1 'VT323', monospace;
  letter-spacing: .04em;
}

.book-viewer-close {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #fff;
  background: var(--orange);
  border: var(--stroke-detail) solid var(--ink);
  font-size: 0;
}

.book-viewer-close::before,
.book-viewer-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 3px;
  background: #fff;
  transform-origin: center;
}

.book-viewer-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.book-viewer-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.book-viewer-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.book-viewer-thumbs {
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    #171717;
  background-size: 18px 18px;
  border-right: var(--stroke-panel) solid var(--ink);
  scrollbar-color: #777 #222;
}

.book-viewer-thumb {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  background: #111;
  border: var(--stroke-detail) solid #666;
  opacity: .42;
  filter: brightness(.64) saturate(.65);
  transition: opacity .16s ease, filter .16s ease, border-color .16s ease;
}

.book-viewer-thumb img {
  width: 100%;
  height: auto;
}

.book-viewer-thumb.is-active {
  opacity: 1;
  filter: none;
  border-color: var(--yellow);
  box-shadow: 4px 4px 0 var(--yellow);
}

.book-viewer-thumb:hover,
.book-viewer-thumb:focus-visible {
  opacity: .78;
  filter: brightness(.88) saturate(.9);
}

.book-viewer-thumb.is-active:hover,
.book-viewer-thumb.is-active:focus-visible {
  opacity: 1;
  filter: none;
}

.book-viewer-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0b0b0b;
}

.book-viewer-stage {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 72px;
}

.book-viewer-image-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: var(--cursor-zoom-in);
}

.book-viewer-image-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: none;
  user-select: none;
  will-change: transform;
  transform: translate3d(var(--book-pan-x, 0px), var(--book-pan-y, 0px), 0) scale(var(--book-zoom, 1));
  transform-origin: center;
}

.book-viewer-image-wrap.is-zoomed {
  cursor: var(--cursor-grab);
}

.book-viewer-image-wrap.is-panning,
.book-viewer-image-wrap.is-panning > img {
  cursor: var(--cursor-grab);
}

.book-viewer-image-wrap.is-max-zoom:not(.is-panning) {
  cursor: var(--cursor-zoom-out);
}

.book-viewer-zoom {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  color: #fff;
  background: rgba(10, 10, 10, .9);
  border: var(--stroke-detail) solid #666;
  font: 400 20px/1 'VT323', monospace;
}

.book-viewer-zoom button {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink);
  background: var(--yellow);
  border: var(--stroke-detail) solid var(--ink);
  font: 400 26px/1 'VT323', monospace;
}

.book-viewer-zoom button:disabled {
  opacity: .35;
}

.book-viewer-zoom span {
  min-width: 38px;
  text-align: center;
}

.book-viewer-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--yellow);
  border: var(--stroke-detail) solid var(--ink);
  box-shadow: 5px 5px 0 #000;
  transform: translateY(-50%);
  font: 400 30px/1 'VT323', monospace;
}

.book-viewer-prev { left: 14px; }
.book-viewer-next { right: 14px; }
.book-viewer-arrow:disabled { opacity: .35; }

.book-viewer-status {
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--yellow);
  border-top: var(--stroke-panel) solid var(--ink);
  font: 400 21px/1 'VT323', monospace;
  letter-spacing: .08em;
}

body.book-viewer-open { overflow: hidden; }

@media (max-width: 700px) {
  .book-viewer { padding: 6px; }
  .book-viewer-window {
    width: calc(100vw - 12px);
    height: calc(100svh - 12px);
  }
  .book-viewer-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 116px;
  }
  .book-viewer-main { grid-row: 1; }
  .book-viewer-thumbs {
    grid-row: 2;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 9px;
    border-top: var(--stroke-panel) solid var(--ink);
    border-right: 0;
  }
  .book-viewer-thumb {
    flex: 0 0 82px;
    width: 82px;
    height: 94px;
    margin: 0;
    overflow: hidden;
  }
  .book-viewer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .book-viewer-stage { padding: 12px 46px; }
  .book-viewer-zoom {
    top: 7px;
    right: 7px;
    gap: 2px;
    padding: 3px;
  }
  .book-viewer-zoom button { width: 31px; height: 31px; }
  .book-viewer-zoom span { min-width: 32px; }
  .book-viewer-arrow { width: 34px; height: 40px; }
  .book-viewer-prev { left: 6px; }
  .book-viewer-next { right: 6px; }
}

[aria-busy='true'],
[aria-busy='true'] * {
  cursor: var(--cursor-wait) !important;
}

html.is-dragging-close,
html.is-dragging-close * {
  cursor: var(--cursor-grab) !important;
}

button:disabled,
[disabled],
[aria-disabled='true'],
.is-disabled {
  cursor: var(--cursor-not-allowed) !important;
}
