﻿/* ==========================================================
   Sabrina Qranfal - portfolio
   ========================================================== */

:root {
  --ink: #221f1d;
  --tan: #c4a68c;
  --tan-dark: #a98a70;
  --cream: #e9e2d6;
  --card: #f6f3ec;
  --paper: #fbf9f4;
  --shadow: rgba(0, 0, 0, .35);
  --display: "Press Start 2P", "Courier New", monospace;
  --body: "Jura", "Segoe UI", sans-serif;
  --frame: 3px solid var(--ink);
  --rail-w: 92px;
  --gutter: 210px;      /* space reserved for rail + character */
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: #9ec8e6;
  overflow-x: hidden;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* pixel type: crisp, never blurry, wraps instead of overflowing */
.pixel, .btn, .tab, .rail-btn, h1, h2, h3,
.transition-line, .select, .link-btn, .process-tab, .big-email, .note-label {
  font-family: var(--display);
  letter-spacing: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ---------------- animated background ---------------- */

.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.scene-img {
  position: absolute;
  inset: -8%;                   /* overscan the parallax drift moves within */
  width: 116%; height: 116%;
  max-width: none;              /* must beat the global img rule, or the right edge shows through */
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .3, 1), opacity .55s ease;
}

.scene-decor { position: absolute; inset: 0; }

.cloud {
  position: absolute;
  left: 0;
  animation: drift linear infinite;
  will-change: transform;
}
@keyframes drift {
  from { transform: translateX(-25vw) scale(var(--s, 1)); }
  to   { transform: translateX(125vw) scale(var(--s, 1)); }
}

.bird {
  position: absolute;
  left: 0;
  animation: fly linear infinite;
}
@keyframes fly {
  0%   { transform: translate(-12vw, 0) scale(var(--s, 1)); }
  25%  { transform: translate(24vw, -22px) scale(var(--s, 1)); }
  50%  { transform: translate(56vw, 10px) scale(var(--s, 1)); }
  75%  { transform: translate(88vw, -16px) scale(var(--s, 1)); }
  100% { transform: translate(118vw, 4px) scale(var(--s, 1)); }
}
.bird path { animation: flap .45s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes flap { from { transform: scaleY(.55); } to { transform: scaleY(1.15); } }

.star {
  position: absolute;
  width: 3px; height: 3px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: .15; transform: scale(.8); }
  to   { opacity: .95; transform: scale(1.3); }
}

.firefly {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ffe9a3;
  box-shadow: 0 0 10px 4px rgba(255, 224, 140, .55);
  animation: float-around ease-in-out infinite alternate,
             glow ease-in-out infinite alternate;
}
@keyframes float-around {
  from { transform: translate(-22px, 10px); }
  to   { transform: translate(26px, -26px); }
}
@keyframes glow { from { opacity: .18; } to { opacity: .95; } }

/* ---------------- shared frame ---------------- */

.window {
  background: var(--tan);
  border: var(--frame);
  border-radius: 10px;
  box-shadow: 0 14px 34px var(--shadow);
  padding: 14px;
}

.window-inner {
  background: var(--cream);
  border: var(--frame);
  border-radius: 8px;
  padding: 22px 26px;
}

.btn {
  font-size: clamp(.62rem, 1vw, .95rem);
  text-transform: uppercase;
  background: var(--cream);
  border: var(--frame);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 18px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover, .btn:focus-visible {
  background: #f5efe2;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
  outline: none;
}
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn img { width: 22px; height: 22px; flex: 0 0 auto; }

/* ---------------- left rail ---------------- */

.rail {
  position: fixed;
  left: 18px; top: 26px;
  width: var(--rail-w);
  background: var(--tan);
  border: var(--frame);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 10px 26px var(--shadow);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* the three section buttons sit together, home is set apart below them */
.rail-group { display: flex; flex-direction: column; gap: 10px; }
.rail-home {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 3px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.rail-home .rail-btn { width: 78%; }
.rail-home-label {
  font-family: var(--display);
  font-size: .38rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .7;
}

.rail-btn {
  width: 100%;
  aspect-ratio: 1;
  background: var(--cream);
  border: var(--frame);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: background .12s, transform .12s;
}
.rail-btn img { width: 62%; }
.rail-btn:last-child img { width: 100%; }
.rail-btn:hover { background: var(--paper); transform: translateY(-2px); }
.rail-btn[aria-current="page"] { background: var(--tan-dark); }

/* ---------------- character + speech bubble ---------------- */

.char {
  position: fixed;
  right: 2vw; bottom: 0;
  width: clamp(190px, 21vw, 320px);
  z-index: 50;                     /* above the rail, never hidden by it */
}

.char-link { display: block; cursor: pointer; }

.char img {
  width: 100%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35));
  animation: idle-bob 3.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.char-link:hover img { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .85)); }

@keyframes idle-bob {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50%      { transform: translateY(-8px) scale(.995, 1.008); }
}

/* bubble sits ABOVE her head, inside the background margin */
.bubble {
  position: absolute;
  bottom: calc(100% - 6px);
  left: 50%;
  transform: translate(-50%, 8px) scale(.96);
  width: max-content;
  max-width: min(230px, 92vw);
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 22px;
  padding: 12px 16px;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bubble::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -24px;
  margin-left: -12px;
  border: 12px solid transparent;
  border-top: 16px solid var(--ink);
}

/* character parked in the left gutter next to the rail */
.char-rail {
  right: auto;
  left: 8px;
  width: clamp(100px, 9.5vw, 140px);
  z-index: 70;                     /* her bubble sits above the rail */
}
.char-rail .bubble { max-width: min(190px, 40vw); font-size: .85rem; }

.char-left { right: auto; left: 2vw; }

/* ---------------- page transition: pirouette ---------------- */

.transition {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(24, 22, 30, .85);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.transition.show { opacity: 1; pointer-events: all; }

.transition-inner { text-align: center; width: min(430px, 84vw); perspective: 900px; }

.spinner {
  width: 220px;
  margin: 0 auto;
  transform-style: preserve-3d;
  animation: leap 1.45s cubic-bezier(.34, .06, .3, 1) both;
}
.spinner img {
  width: 100%;
  animation: pirouette 1.45s cubic-bezier(.4, .05, .35, 1) both;
  transform-style: preserve-3d;
}

/* she rises, hangs, lands */
@keyframes leap {
  0%   { transform: translateY(40px) scaleY(.9); }
  24%  { transform: translateY(-90px) scaleY(1.04); }
  62%  { transform: translateY(-104px); }
  88%  { transform: translateY(10px) scaleY(.94); }
  100% { transform: translateY(0); }
}

/* ...turning twice on the spot, like a pirouette */
@keyframes pirouette {
  0%   { transform: rotateY(0deg) rotate(-4deg); }
  40%  { transform: rotateY(280deg) rotate(3deg); }
  75%  { transform: rotateY(560deg) rotate(-2deg); }
  100% { transform: rotateY(720deg) rotate(0deg); }
}

/* the rail version of the same move, played faster */
.transition.fast .spinner,
.transition.fast .spinner img { animation-duration: .8s; }
.transition.fast .loadbar span { animation-duration: .74s; }

.transition-line {
  color: #fff;
  font-size: clamp(.8rem, 1.6vw, 1.15rem);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--ink);
  margin: 22px 0 16px;
}

.loadbar {
  height: 26px;
  background: #2c2a31;
  border: 3px solid #fff;
  border-radius: 6px;
  overflow: hidden;
}
.loadbar span {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(90deg, #f1d79a 0 12px, #d9b877 12px 24px);
  animation: fill 1.35s ease-out forwards;
}
@keyframes fill { to { width: 100%; } }

/* ==========================================================
   HOME / MENU
   ========================================================== */

.menu {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 4vh 4vw 24vh;
  max-width: 1500px;
  margin: 0 auto;
}

.menu-list { display: grid; gap: 20px; width: min(540px, 52vw); }

.menu-list .btn {
  justify-content: space-between;
  font-size: clamp(.7rem, 1.15vw, 1.1rem);
  padding: 22px 24px;
  box-shadow: 6px 6px 0 var(--ink);
}
.menu-list .btn:hover { box-shadow: 3px 3px 0 var(--ink); }
.menu-list .btn img { width: 28px; height: 28px; }

.menu-brand {
  position: fixed;
  left: 3vw; bottom: 8px;
  color: #fff;
  z-index: 10;
  pointer-events: none;
  max-width: 62vw;
}
.menu-brand .tagline {
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: .5em;
  text-transform: uppercase;
  font-size: clamp(.65rem, 1.2vw, 1.05rem);
  margin: 0 0 8px 4px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .45);
}
.menu-brand h1 {
  font-size: clamp(1.1rem, 3.6vw, 3rem);
  line-height: 1.25;
  margin: 0;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, .45);
}

/* ==========================================================
   PAGE SHELL
   ========================================================== */

.page {
  padding: 26px 26px 70px var(--gutter);
  max-width: 1560px;
  margin: 0 auto;
  min-height: 100vh;
}

.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.tab {
  font-size: clamp(.5rem, .78vw, .72rem);
  text-transform: uppercase;
  background: var(--cream);
  border: var(--frame);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  max-width: 230px;
  transition: transform .12s, background .12s, box-shadow .12s;
}
.tab img { width: 18px; height: 18px; flex: 0 0 auto; }
.tab:hover { transform: translateY(-3px); }
.tab[aria-selected="true"] {
  background: var(--tan-dark);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-head h2 {
  text-transform: uppercase;
  font-size: clamp(.72rem, 1.15vw, 1rem);
  margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.section-head h2 img { width: 20px; }

.tools { display: flex; gap: 10px; align-items: center; }

.select {
  font-size: .6rem;
  text-transform: uppercase;
  background: var(--card);
  border: var(--frame);
  border-radius: 6px;
  padding: 10px 10px;
  cursor: pointer;
}

.icon-btn {
  width: 44px; height: 40px;
  background: var(--card);
  border: var(--frame);
  border-radius: 6px;
  display: grid; place-items: center;
  cursor: pointer;
}
.icon-btn img { width: 20px; }
.icon-btn[aria-pressed="true"] { background: var(--tan-dark); }

/* cards */

.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.cards.featured-cards { grid-template-columns: repeat(3, 1fr); gap: 26px; }

.card {
  display: block;
  background: var(--card);
  border: var(--frame);
  border-radius: 8px;
  padding: 12px;
  height: 100%;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .14s, box-shadow .14s;
}
.card:hover, .card:focus-visible {
  transform: translate(-2px, -4px);
  box-shadow: 7px 8px 0 var(--ink);
  outline: none;
}

.card .shot {
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, .25);
  overflow: hidden;
}
.featured-cards .card .shot { aspect-ratio: 4 / 3; }   /* same shape as the thumbnails, so nothing is clipped */
.card .shot img { width: 100%; height: 100%; object-fit: cover; }

.card-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 4px 2px;
}
.card-meta h3 { text-transform: uppercase; font-size: clamp(.6rem, .9vw, .85rem); margin: 0 0 8px; }
.card-meta p { margin: 0; font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; }
.card-meta img.go { width: 22px; flex: 0 0 auto; }

.cards.list { display: block; }
.cards.list li + li { margin-top: 12px; }
.cards.list .card { display: grid; grid-template-columns: 120px 1fr auto; gap: 18px; align-items: center; }
.cards.list .card-meta { padding: 0; display: block; }
.cards.list .blurb { margin: 10px 0 0; font-size: .95rem; letter-spacing: 0; text-transform: none; font-weight: 400; max-width: 65ch; }
.cards:not(.list) .blurb { display: none; }

.empty { text-align: center; padding: 60px 0; font-family: var(--display); font-size: .8rem; }

/* ==========================================================
   PROJECT PAGE
   ========================================================== */

.proj-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.link-btn {
  font-size: .62rem;
  text-transform: uppercase;
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  text-decoration: none;
}
.link-btn img { width: 18px; }
.link-btn:hover { text-decoration: underline; }

.proj-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 34px; }
.proj-grid > div { min-width: 0; }   /* lets the thumbnail line scroll instead of widening the column */

/* every project photo is pinned up like a print on a board,
   and the frame hugs the image - no empty bands above or below it */
.proj-shot {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 10px auto 0;
  padding: 15px 15px 28px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, .45);
  border-radius: 2px;
  cursor: zoom-in;
  line-height: 0;
  transform: rotate(-1.1deg);
  box-shadow: 6px 10px 22px rgba(0, 0, 0, .32);
  transition: transform .2s, box-shadow .2s;
}
.proj-shot:hover { transform: rotate(0deg); box-shadow: 8px 12px 26px rgba(0, 0, 0, .36); }
.proj-shot img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
}
.proj-shot > .pin {
  position: absolute;
  top: -15px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: auto;
  z-index: 2;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4));
}

/* an image that is not her own work gets a stamped label */
.ref-tag {
  position: absolute;
  right: -10px; bottom: 12px;
  z-index: 3;
  font-family: var(--display);
  font-size: .5rem;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--tan-dark);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 7px 10px;
  transform: rotate(-4deg);
  box-shadow: 2px 2px 0 var(--ink);
}
.ref-tag[hidden] { display: none; }

/* category label in the corner of the main photo */
.shot-tag {
  position: absolute;
  left: 22px; top: 22px;
  z-index: 3;
  font-family: var(--display);
  font-size: .48rem;
  line-height: 1;
  text-transform: uppercase;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 6px 8px;
  box-shadow: 2px 2px 0 var(--ink);
}
.shot-tag[hidden] { display: none; }

/* thumbnails grouped by category */
.thumbs { flex-direction: column; flex-wrap: nowrap; gap: 12px; }
.thumb-group { min-width: 0; max-width: 100%; }
/* ---------------- process: step by step, or read straight through ---------- */

.process-modes { display: flex; gap: 8px; margin: 0 0 14px; }
.mode-btn {
  font-family: var(--display);
  font-size: .46rem;
  text-transform: uppercase;
  background: var(--cream);
  border: var(--frame);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.mode-btn:hover { background: var(--paper); transform: translateY(-1px); }
.mode-btn[aria-pressed="true"] { background: var(--tan-dark); }

/* these carry a display rule of their own, which would beat [hidden] */
.process-tabs[hidden], .process-body[hidden], .process-scroll[hidden] { display: none; }

.process-scroll { display: flex; flex-direction: column; gap: 34px; }
.scroll-step h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 3px solid var(--ink);
}
.scroll-step .scroll-num {
  background: var(--ink);
  color: var(--cream);
  font-size: .8em;
  padding: 4px 7px;
  line-height: 1;
}
.scroll-step .body { margin: 0 0 16px; max-width: 74ch; }
.scroll-fig { margin: 0 0 16px; }
.scroll-fig img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--cream);
  border: var(--frame);
  border-radius: 8px;
  cursor: zoom-in;
}
/* shots that belong together share one frame instead of one box each */
.fig-row, .process-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.fig-row img, .process-row img {
  flex: 1 1 0;
  min-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  align-self: stretch;
  background: var(--cream);
  border: var(--frame);
  border-radius: 8px;
  cursor: zoom-in;
}
.process-row[hidden] { display: none; }

.scroll-fig figcaption {
  font-size: .85rem;
  opacity: .65;
  margin-top: 6px;
}

/* a category tab split into sections, e.g. Drawings by medium */
.cat-section + .cat-section { margin-top: 26px; }
.cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: .56rem;
  text-transform: uppercase;
  margin: 0 0 12px;
  padding-bottom: 7px;
  border-bottom: 3px solid var(--ink);
}
.cat-head .cat-name { letter-spacing: .06em; }
.cat-head .cat-note {
  font-family: var(--body);
  font-size: .85rem;
  text-transform: none;
  letter-spacing: 0;
  opacity: .6;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-head .cat-count {
  margin-left: auto;
  background: var(--ink);
  color: var(--cream);
  padding: 4px 7px;
  line-height: 1;
}

/* each group reads as its own labelled section: number, name, note, count */
.thumb-group + .thumb-group { margin-top: 16px; }
.thumb-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: .5rem;
  text-transform: uppercase;
  margin: 0 0 9px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
}
.thumb-group-label .g-num {
  background: var(--ink);
  color: var(--cream);
  padding: 4px 6px;
  line-height: 1;
}
.thumb-group-label .g-name { letter-spacing: .06em; }
.thumb-group-label .g-note {
  font-family: var(--body);
  font-size: .78rem;
  text-transform: none;
  letter-spacing: 0;
  opacity: .65;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb-group-label .g-count {
  margin-left: auto;
  border: 2px solid var(--ink);
  padding: 3px 6px;
  line-height: 1;
  opacity: .8;
}
/* one line per group; arrows float over the ends of the line on hover,
   like a streaming row, and only when there is more to see */
.thumb-strip { position: relative; }
.thumb-row {
  display: flex; gap: 12px; flex-wrap: nowrap;
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 4px 3px 10px;
  flex: 1; min-width: 0;
}
.thumb-row::-webkit-scrollbar { display: none; }
.thumb-row .thumb { flex: 0 0 auto; scroll-snap-align: start; }
.strip-arrow {
  position: absolute;
  top: 4px; bottom: 10px;
  width: 38px;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}
.strip-arrow.prev { left: 0;  background: linear-gradient(90deg,  rgba(233,226,214,.97) 35%, rgba(233,226,214,0)); }
.strip-arrow.next { right: 0; background: linear-gradient(270deg, rgba(233,226,214,.97) 35%, rgba(233,226,214,0)); }
.strip-arrow img {
  width: 26px; height: 26px;
  padding: 4px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .15s;
}
.strip-arrow:hover img { transform: scale(1.12); }
.thumb-strip.scrolls:hover .strip-arrow:not(:disabled),
.thumb-strip.scrolls:focus-within .strip-arrow:not(:disabled) { opacity: 1; pointer-events: auto; }
/* touch screens have no hover: keep the arrows visible there */
@media (hover: none) {
  .thumb-strip.scrolls .strip-arrow:not(:disabled) { opacity: 1; pointer-events: auto; }
}

.thumbs { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.thumb {
  position: relative;
  width: 92px; height: 72px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  overflow: visible;
  background: #fff;
  cursor: pointer;
  padding: 0;
}
.thumb > img { border-radius: 2px; width: 100%; height: 100%; object-fit: cover; }
.thumb.is-ref { border-color: var(--tan-dark); }
.ref-badge {
  position: absolute;
  right: -6px; bottom: -8px;
  font-family: var(--display);
  font-size: .42rem;
  text-transform: uppercase;
  background: var(--tan-dark);
  border: 2px solid var(--ink);
  padding: 4px 5px;
  line-height: 1;
  z-index: 2;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { outline: 3px solid var(--tan-dark); outline-offset: 2px; }

.proj-title { font-size: clamp(1.1rem, 2.6vw, 2rem); text-transform: uppercase; margin: 0; line-height: 1.3; }
.proj-year { font-family: var(--display); font-size: .9rem; margin: 12px 0 18px; }

.chips { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  background: var(--card);
  border: var(--frame);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 7px 14px;
  font-size: .88rem;
  font-weight: 600;
}

.proj-blurb { font-size: 1.1rem; line-height: 1.55; max-width: 46ch; margin: 0 0 26px; }

.steps { display: grid; gap: 14px; margin-bottom: 28px; }
.step-jump {
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  font-family: var(--body);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
}
.step-box {
  width: 34px; height: 34px;
  border: var(--frame);
  border-radius: 4px;
  background: var(--card);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.step-box img { width: 20px; opacity: 0; transition: opacity .15s; }
.step-jump:hover .step-box img, .step-jump[aria-current="true"] .step-box img { opacity: 1; }

.cta[hidden], .steps[hidden] { display: none; }
.cta { width: 100%; justify-content: center; background: var(--tan-dark); padding: 20px; }

.process { margin-top: 42px; }
.process[hidden] { display: none; }

.process-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.process-tab {
  font-size: .58rem;
  text-transform: uppercase;
  background: var(--card);
  border: var(--frame);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px 14px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px;
}
.process-tab img { width: 16px; }
.process-tab[aria-selected="true"] { background: var(--tan-dark); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.process-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 30px; align-items: start; }
.process-body.stacked { grid-template-columns: 1fr; gap: 20px; }
.process-body.stacked .process-text { max-width: 78ch; }

.process-stage {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  background: #fff;
  border: var(--frame);
  border-radius: 6px;
  cursor: zoom-in;
  line-height: 0;
}
.process-stage img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
}

/* before / after pair */
.compare[hidden], .process-stage[hidden] { display: none; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.compare figure { position: relative; margin: 0; background: #fff; border: var(--frame); border-radius: 6px; padding: 10px; }
.compare img { width: 100%; max-height: 56vh; object-fit: contain; cursor: zoom-in; }
.compare-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-family: var(--display); font-size: .52rem; text-transform: uppercase;
  background: var(--cream); border: 2px solid var(--ink); padding: 6px 8px;
  box-shadow: 2px 2px 0 var(--ink);
}
.compare-tag.after { background: var(--tan-dark); }

.fig-caption {
  margin: 12px auto 0;
  max-width: 62ch;
  font-size: .98rem;
  line-height: 1.45;
  font-weight: 600;
  text-align: center;
}
.process-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.process-text h3 { text-transform: uppercase; font-size: 1rem; margin: 0 0 10px; }
.process-count { font-family: var(--display); font-size: .58rem; opacity: .7; margin: 0 0 16px; }
.process-text p.body { font-size: 1.05rem; line-height: 1.6; }

.process-controls { display: flex; gap: 12px; margin-top: 24px; }

/* ==========================================================
   ABOUT BOARD (full screen, pinned)
   ========================================================== */

.board .window-inner,
.board-inner {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,.022) 0 6px, transparent 6px 12px),
    var(--cream);
}

/* the three groups sit side by side, each only as wide as its notes */
.board-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: flex-start;
  gap: 36px 32px;
  margin: 26px 0 18px;
}
@media (max-width: 1100px) { .board-group .notes { flex-wrap: wrap; } }
.board-group { display: flex; flex-direction: column; align-items: center; }
.board-group .notes { flex-wrap: nowrap; justify-content: center; }

.board-group h2 {
  font-size: clamp(.56rem, .95vw, .82rem);
  text-transform: uppercase;
  background: #fff;
  border: 2px solid var(--ink);
  display: inline-block;
  padding: 9px 16px;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .22);
  margin: 0 0 22px;
}

.notes { display: flex; flex-wrap: wrap; gap: 22px; }

.note {
  position: relative;
  width: clamp(104px, 8.6vw, 142px);
  background: #fff;
  border: 2px solid rgba(0, 0, 0, .55);
  padding: 16px 8px 10px;
  box-shadow: 3px 4px 9px rgba(0, 0, 0, .3);
  cursor: pointer;
  text-align: center;
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(.68rem, .82vw, .84rem);
  line-height: 1.25;
  text-decoration: none;
  transition: transform .16s, box-shadow .16s;
}
/* a note with nothing behind it yet: pinned up, but not clickable */
.note.note-soon { pointer-events: none; opacity: .7; }
.note:nth-child(odd) { transform: rotate(-3deg); }
.note:nth-child(even) { transform: rotate(2.5deg); }
.note:hover, .note:focus-visible {
  transform: rotate(0deg) scale(1.06);
  box-shadow: 5px 7px 14px rgba(0, 0, 0, .35);
  z-index: 5;
  outline: none;
}
.note img.art { width: clamp(42px, 4.6vw, 62px); margin: 0 auto 8px; }
.note .pin {
  position: absolute;
  top: -15px; left: 50%;
  transform: translateX(-50%);
  width: 30px;
}

/* ---------------- topic page ---------------- */

.topic-body { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.topic-body .art { width: 150px; }
.topic-text h1 { font-size: clamp(.95rem, 1.8vw, 1.4rem); text-transform: uppercase; margin: 0 0 16px; }
.topic-text p { font-size: 1.08rem; line-height: 1.65; max-width: 70ch; }

/* photo wall: the best shots are blown up (big / wide / tall),
   the rest fill in around them */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: 180px;
  grid-auto-flow: dense;
  gap: 14px;
  margin-top: 22px;
}
.gallery .tile { position: relative; margin: 0; }
.gallery .tile.wide { grid-column: span 2; }
.gallery .tile.tall { grid-row: span 2; }
.gallery .tile.big  { grid-column: span 2; grid-row: span 2; }
.gallery .tile > img:not(.pin) {
  width: 100%; height: 100%; object-fit: cover;
  border: 2px solid var(--ink); background: #fff; cursor: zoom-in;
  display: block;
}
.gallery .tile.big > img:not(.pin) {
  border: 8px solid #fff;
  outline: 2px solid var(--ink);
  box-shadow: 6px 8px 18px rgba(0, 0, 0, .3);
}
.gallery .tile .pin {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  width: 34px; z-index: 2;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4));
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
}
.note-empty {
  border: 3px dashed rgba(0, 0, 0, .35);
  padding: 26px;
  text-align: center;
  font-weight: 600;
  margin-top: 20px;
}

/* ---------------- pixel wipe between pages ---------------- */

.wipe {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  pointer-events: none;
}
.wipe i {
  display: block;
  background: var(--ink);
  opacity: 0;
  transform: scale(.35);
  transition: opacity .14s linear, transform .14s ease-out;
}
.wipe i:nth-child(3n) { background: #3a332c; }
.wipe i:nth-child(7n) { background: var(--tan-dark); }
.wipe i.on { opacity: 1; transform: scale(1.02); }

/* ---------------- pixel dissolve between scenes ---------------- */

.dissolve {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
}
.dissolve i {
  display: block;
  background-repeat: no-repeat;
  opacity: 1;
  transition: opacity .18s linear, transform .18s linear;
}
.dissolve i.gone { opacity: 0; transform: scale(.55); }

/* ---------------- favorite songs: spinning records ---------------- */

.records {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 26px;
  margin-top: 18px;
}

.record { text-align: center; text-decoration: none; display: block; }

.disc {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%,
      rgba(255,255,255,.07) 0 2px, rgba(0,0,0,.28) 2px 4px),
    radial-gradient(circle at 34% 30%, #4a4a52 0 38%, #1d1d22 70%, #111 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4), inset 0 0 0 3px #000;
  animation: spin-disc 4.5s linear infinite;
  display: grid;
  place-items: center;
}
.record:hover .disc { animation-duration: 1.6s; }

@keyframes spin-disc { to { transform: rotate(360deg); } }

.disc .label {
  width: 44%;
  height: 44%;
  border-radius: 50%;
  background: var(--label, #d9a441);
  border: 3px solid rgba(0, 0, 0, .55);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: var(--display);
  font-size: .42rem;
  line-height: 1.5;
  text-align: center;
  padding: 6px;
  color: #221f1d;
}
.disc .label img { width: 100%; height: 100%; object-fit: cover; }
/* with a cover the label grows so the art reads */
.disc .label:has(img) { width: 62%; height: 62%; padding: 0; }
.disc::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.6);
}

.record h4 {
  font-family: var(--body);
  font-size: 1rem;
  margin: 14px 0 2px;
  font-weight: 700;
}
.record p { margin: 0; font-size: .88rem; opacity: .75; }
.record .why {
  margin-top: 8px;
  font-size: .9rem;
  line-height: 1.45;
  opacity: 1;
  text-align: left;
}
.record:hover h4 { text-decoration: underline; }

/* the all-time favorite: bigger, gold ring, star on the sleeve */
.records { grid-auto-flow: dense; align-items: end; }
.record.fav .disc-wrap { transform: scale(1.08); transform-origin: 50% 100%; }
.record.fav .disc {
  box-shadow: 0 0 0 4px #e8c46a, 0 0 14px 3px rgba(232, 196, 106, .45), 0 8px 18px rgba(0, 0, 0, .4);
}
.disc-wrap { position: relative; }
.fav-star {
  position: absolute;
  top: -4%; right: 2%;
  width: 24%;
  z-index: 2;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
}

/* ---------------- resume sheet ---------------- */

.resume-sheet { display: grid; gap: 18px; justify-items: center; margin-top: 12px; }
.resume-sheet canvas, .resume-sheet img {
  width: 100%;
  max-width: 900px;
  height: auto;
  background: #fff;
  border: var(--frame);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

/* ---------------- lightbox ---------------- */

.lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 10, 14, .88);
  display: grid; place-items: center;
  z-index: 150;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border: 3px solid #fff; }

/* ---------------- contact ---------------- */

.contact-card { max-width: 660px; }

/* reach-out form */
.contact-form { display: grid; gap: 16px; margin: 4px 0 26px; }
.contact-form label {
  display: grid; gap: 7px;
  font-weight: 700; font-size: .95rem;
}
.contact-form input, .contact-form textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: 11px 12px;
  background: var(--paper);
  border: var(--frame);
  border-radius: 6px;
  color: var(--ink);
  width: 100%;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 3px solid var(--tan-dark); outline-offset: 1px;
}
.contact-form input[name="_gotcha"] {
  position: absolute; left: -9999px; width: 1px; height: 1px; padding: 0; border: 0;
}
.contact-form .btn { justify-self: start; }
.contact-form .btn:disabled { opacity: .55; cursor: default; }
.form-note { margin: 0; font-weight: 700; }
.form-note.bad { color: #9a3b3b; }
.contact-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.contact-list a { font-weight: 700; font-size: 1.05rem; }
.big-email {
  font-size: clamp(.68rem, 1.3vw, 1rem);
  word-break: break-all;
  text-decoration: none;
  border-bottom: 3px solid var(--ink);
}
.about-intro { max-width: 68ch; font-size: 1.05rem; line-height: 1.6; margin: 0 0 22px; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1240px) {
  :root { --gutter: 165px; }
  .char-rail { width: clamp(96px, 9vw, 120px); }
  .char-rail .bubble { max-width: 150px; font-size: .78rem; }
}

@media (max-width: 1100px) {
  .cards.featured-cards { grid-template-columns: repeat(2, 1fr); }
  .proj-grid, .process-body, .topic-body { grid-template-columns: 1fr; }
  .char { width: clamp(150px, 20vw, 220px); }
}

@media (max-width: 980px) {
  :root { --rail-w: 62px; --gutter: 92px; }
  .rail { left: 10px; padding: 8px; }
  .char-rail { display: none; }          /* no room: she would cover the cards */
}

@media (max-width: 820px) {
  .page { padding: 18px 16px 120px 92px; }
  .cards.featured-cards { grid-template-columns: 1fr; }
  .menu-list { width: min(100%, 440px); }
  .menu { padding: 3vh 5vw 32vh; }
  .char { width: 148px; right: 0; }
  .bubble { font-size: .8rem; max-width: 180px; }
  .cards.list .card { grid-template-columns: 84px 1fr; }
  .cards.list .card-meta img.go { display: none; }
  .note { width: 116px; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .char { display: none; }
  .tab { padding: 10px 12px; }
  .notes { gap: 14px; }
  .note { width: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .star, .bird, .bird path, .firefly, .char img, .disc,
  .spinner, .spinner img, .loadbar span { animation: none !important; }
  .scene-img { transition: opacity .2s; }
}
