/* =========================================================
   Meher Batra — "Pop" portfolio theme
   Neo-brutalist: cream paper, ink borders, hard shadows.
   ========================================================= */

:root {
  --cream: #fff4e0;
  --paper: #fffaf0;
  --ink: #141414;
  --ink-soft: #3a352e;
  --tomato: #ff5a36;
  --tomato-dark: #a3200a;
  --sun: #ffc531;
  --lilac: #b69cff;
  --mint: #4fd1a5;
  --sky: #6ec3ff;

  --bw: 3px;
  --sh-sm: 3px 3px 0 var(--ink);
  --sh: 6px 6px 0 var(--ink);
  --sh-lg: 10px 10px 0 var(--ink);
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;

  --display: "Bricolage Grotesque", "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1240px;
  --spring: cubic-bezier(.3, 1.55, .5, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 300px;
  overflow-x: hidden;
  font: 400 1.0625rem/1.6 var(--body);
  color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(20, 20, 20, .09) 1.1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: -.025em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  padding: 12px 18px; background: var(--sun); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-weight: 700; text-decoration: none; box-shadow: var(--sh-sm);
}
.skip:focus { top: 12px; }

section[id] { scroll-margin-top: 96px; }

/* ---------- Buttons (they "press") ---------- */
.btn {
  --btn-bg: var(--sun);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 54px; padding: .75em 1.45em;
  font: 800 1.05rem/1.1 var(--display); letter-spacing: -.01em;
  color: var(--ink); background: var(--btn-bg);
  border: var(--bw) solid var(--ink); border-radius: 999px;
  box-shadow: 5px 5px 0 var(--ink);
  text-decoration: none; white-space: nowrap;
  transition: transform .22s var(--spring), box-shadow .22s var(--spring), background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); transition-duration: .06s; }
.btn__icon { width: 1.15em; height: 1.15em; flex: none; }
.btn--tomato { --btn-bg: var(--tomato); }
.btn--sun { --btn-bg: var(--sun); }
.btn--paper { --btn-bg: var(--paper); }
.btn--wa { --btn-bg: var(--mint); }
.btn--sm { min-height: 46px; padding: .55em 1.15em; font-size: .98rem; box-shadow: var(--sh-sm); }
.btn--sm:hover { box-shadow: 5px 5px 0 var(--ink); }
.btn--block { width: 100%; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 40; padding-top: 12px; }
.nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 62px; padding: 6px 6px 6px 12px;
  background: var(--cream); border: var(--bw) solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
}
.logo {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-right: 6px;
  font: 800 1.45rem/1 var(--display); letter-spacing: -.04em; text-decoration: none;
}
.logo b { color: var(--tomato); }
.logo__mark { width: 34px; height: 34px; fill: var(--tomato); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; transition: transform .5s var(--spring); }
.logo:hover .logo__mark { transform: rotate(60deg) scale(1.08); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 16px 0 14px;
  background: var(--ink); color: var(--cream);
  border: var(--bw) solid var(--ink); border-radius: 999px;
  font: 700 1rem/1 var(--body);
}
.nav-toggle:focus-visible { outline-offset: 3px; }
.nav-toggle__bars { display: grid; gap: 5px; width: 20px; }
.nav-toggle__bars i { display: block; height: 3px; border-radius: 3px; background: currentColor; transition: transform .25s var(--spring); }
[aria-expanded="true"] .nav-toggle__bars i:first-child { transform: translateY(4px) rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bars i:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Mobile menu panel */
.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  display: flex; flex-direction: column; gap: 14px;
  padding: 10px 14px 16px;
  background: var(--cream); border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  box-shadow: var(--sh);
  visibility: hidden; opacity: 0; transform: translateY(-10px) scale(.98); transform-origin: top center;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.menu-open .nav-menu {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .2s ease, transform .3s var(--spring), visibility 0s;
}
.nav-links a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 0 6px;
  font: 800 clamp(1.5rem, 7vw, 2rem)/1 var(--display); letter-spacing: -.03em;
  text-decoration: none; border-bottom: 2px dashed rgba(20, 20, 20, .35);
}
.nav-links a::after { content: "↗"; font-size: .7em; }
.nav-menu .btn { align-self: stretch; }

/* No JS: simply show the links */
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .nav { flex-wrap: wrap; border-radius: var(--r-lg); }
html:not(.js) .nav-menu { position: static; visibility: visible; opacity: 1; transform: none; border: 0; box-shadow: none; padding: 0 0 8px; width: 100%; }

@media (min-width: 900px) {
  .nav { padding-left: 18px; }
  .nav-toggle { display: none; }
  .nav-menu, html:not(.js) .nav-menu {
    position: static; flex-direction: row; align-items: center; gap: 10px; width: auto;
    padding: 0; background: none; border: 0; box-shadow: none;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  .nav-links { display: flex; gap: 2px; }
  .nav-links a {
    min-height: 46px; padding: 0 16px; border: var(--bw) solid transparent; border-radius: 999px;
    font: 600 1rem/1 var(--body); letter-spacing: 0;
    transition: background-color .2s, border-color .2s;
  }
  .nav-links a::after { content: none; }
  .nav-links a:hover { background: var(--sun); border-color: var(--ink); }
  .nav-menu .btn { align-self: auto; }
  html:not(.js) .nav { flex-wrap: nowrap; border-radius: 999px; }
}

/* ---------- Hero ---------- */
.hero {
  --name-size: clamp(3.6rem, min(23vw, 34vh), 14rem);
  --badge: clamp(96px, 27vw, 112px);
  position: relative; overflow: hidden;
  padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 5vw, 64px);
}
@supports (height: 1svh) {
  .hero { --name-size: clamp(3.6rem, min(23vw, 34svh), 14rem); }
}
.trail { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.trail__star {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  opacity: 0; stroke: var(--ink); stroke-width: 5; stroke-linejoin: round;
}
.hero__inner { position: relative; z-index: 1; }

.pill {
  display: flex; width: fit-content; align-items: center; gap: 10px; max-width: 100%;
  margin: 0; padding: 8px 16px 8px 12px;
  font-size: .92rem; font-weight: 700; line-height: 1.3;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: var(--sh-sm);
}
.pill__dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--mint); border: 2px solid var(--ink); animation: blip 1.6s ease-in-out infinite; }
@keyframes blip { 50% { transform: scale(.65); } }

.name-wrap { position: relative; display: block; width: fit-content; font-size: var(--name-size); margin: .2em 0 .18em; }
.hero__name {
  font-size: 1em; line-height: .84; letter-spacing: -.045em; text-transform: uppercase;
}
.hero__name .line { display: block; }
.hero__name .line--2 {
  margin-left: .55em; color: var(--tomato);
  /* outline built from shadows (a text-stroke would show the variable font's overlapping contours) */
  text-shadow:
    .018em 0 0 var(--ink), -.018em 0 0 var(--ink), 0 .018em 0 var(--ink), 0 -.018em 0 var(--ink),
    .013em .013em 0 var(--ink), -.013em -.013em 0 var(--ink), .013em -.013em 0 var(--ink), -.013em .013em 0 var(--ink),
    .035em .035em 0 var(--ink), .055em .055em 0 var(--ink);
}

.sticker { position: absolute; height: auto; filter: drop-shadow(.025em .025em 0 var(--ink)); animation: wobble var(--t, 3.6s) ease-in-out var(--dl, 0s) infinite alternate; }
.sticker--star    { width: .4em;  top: -.2em;  left: -.14em; --r1: -12deg; --r2: 10deg; --t: 3.2s; }
.sticker--smile   { width: .44em; top: .03em;  right: -.04em; --r1: 8deg; --r2: -10deg; --t: 4s; --dl: -1s; }
.sticker--flower  { width: .44em; bottom: .05em; left: .02em; --r1: -18deg; --r2: 18deg; --t: 5s; --dl: -2s; }
.sticker--squiggle{ width: 1.05em; bottom: -.24em; right: .05em; --r1: -3deg; --r2: 3deg; --y: -.03em; --t: 2.6s; }
.sticker--bolt    { width: .36em; top: .5em; right: -.36em; --r1: 10deg; --r2: -8deg; --t: 3s; --dl: -.6s; }
@keyframes wobble {
  from { transform: translateY(0) rotate(var(--r1, -8deg)); }
  to   { transform: translateY(var(--y, -.05em)) rotate(var(--r2, 8deg)); }
}

.hero__lede { max-width: 34ch; margin: 0 0 .6em; font-size: clamp(1.1rem, 1.5vw + .6rem, 1.4rem); line-height: 1.45; color: var(--ink-soft); }
.hero__lede strong { color: var(--ink); font-weight: 700; background: linear-gradient(transparent 62%, var(--sun) 62%); }

/* Phones: note + badge share a row, buttons below */
.hero__cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; }
.note {
  grid-column: 1; grid-row: 1;
  display: flex; align-items: flex-start; gap: 4px;
  margin: 0 0 0 clamp(1.6rem, 6vw, 4.6rem);
  font: 700 clamp(1.3rem, 2vw + .6rem, 1.6rem)/1.05 var(--hand); color: var(--ink);
  transform: rotate(-3deg);
}
.note span { padding-top: 2px; }
.note__arrow { width: clamp(48px, 12vw, 62px); height: auto; aspect-ratio: 90 / 64; flex: none; margin-top: 4px; }
.hero__btns { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 14px 16px; padding-top: 4px; }

.badge {
  grid-column: 2; grid-row: 1; position: relative;
  width: var(--badge); height: var(--badge);
  display: grid; place-items: center;
  border-radius: 50%; background: var(--tomato); border: var(--bw) solid var(--ink); box-shadow: var(--sh);
  text-decoration: none; transition: transform .3s var(--spring), box-shadow .3s var(--spring);
}
.badge:hover { transform: scale(1.06) rotate(-6deg); }
.badge:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.badge > svg { grid-area: 1 / 1; }
.badge__ring { width: 100%; height: 100%; animation: spin 18s linear infinite; }
.badge__ring text { font: 800 27px/1 var(--display); fill: var(--ink); }
.badge__core { width: 44%; height: 44%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Badge grows on tablets; from 900px it floats beside the name */
@media (min-width: 560px) {
  .hero { --badge: clamp(108px, 15vw, 176px); }
  .hero__cta { grid-template-columns: minmax(0, 34rem) auto; justify-content: space-between; }
}
@media (min-width: 900px) {
  .hero { --name-size: clamp(3.6rem, min(20vw, 34vh), 14rem); }
  .hero__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
  .badge { position: absolute; right: 1%; top: 46%; }
}
@supports (height: 1svh) {
  @media (min-width: 900px) { .hero { --name-size: clamp(3.6rem, min(20vw, 34svh), 14rem); } }
}
/* Wide screens: name on the left, copy beside "Batra", badge top-right */
@media (min-width: 1280px) {
  .hero { --name-size: clamp(3.6rem, min(16.5vw, 34vh), 14rem); }
  .hero__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; column-gap: clamp(72px, 7vw, 120px); }
  .hero__copy { padding-bottom: .4em; }
  .hero__lede { font-size: 1.3rem; }
  .note { margin-left: 1.2rem; }
  .hero__btns { column-gap: 12px; }
  .hero__btns .btn { padding-inline: 1.1em; }
  .badge { top: -6px; right: 0; }
}

/* ---------- Marquee ---------- */
.marquee { position: relative; overflow: hidden; padding: 26px 0 34px; }
.band {
  width: 110%; margin-left: -5%;
  border-block: var(--bw) solid var(--ink); overflow: hidden;
}
.band--1 { position: relative; z-index: 2; background: var(--tomato); transform: rotate(-2deg); }
.band--2 { background: var(--sun); transform: rotate(1.6deg); margin-top: -8px; }
.band__track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.band--2 .band__track { animation-duration: 40s; animation-direction: reverse; }
.band__group {
  display: flex; align-items: center; gap: .55em; margin: 0; padding: .42em .55em .42em 0;
  font: 800 clamp(1.35rem, 3.2vw, 2.5rem)/1 var(--display); letter-spacing: -.02em;
  text-transform: uppercase; white-space: nowrap;
}
.band__group svg { width: .8em; height: .8em; flex: none; fill: var(--ink); }
.band--2 .band__group svg { fill: var(--tomato); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
@keyframes marquee { to { transform: translateX(-33.3333%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 8vw, 108px) 0; }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section h2 { font-size: clamp(2.3rem, 6.2vw, 4.6rem); line-height: .98; letter-spacing: -.035em; max-width: 20ch; }

.kicker {
  --k: var(--lilac);
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  padding: 4px 14px 4px 4px;
  font-weight: 700; font-size: .95rem;
  background: var(--k); border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: var(--sh-sm);
}
.kicker span {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--cream); font: 800 .8rem/1 var(--display);
}
.kicker--mint { --k: var(--mint); }
.kicker--sky { --k: var(--sky); }
.kicker--lilac { --k: var(--lilac); }
.kicker--paper { --k: var(--paper); }

.hl {
  display: inline-block; padding: .02em .16em .08em; margin: .04em 0;
  color: var(--ink); background: var(--sun);
  border: var(--bw) solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-2deg);
}
.hl--lilac { background: var(--lilac); transform: rotate(1.5deg); }
.hl--mint { background: var(--mint); }
.hl--tomato { background: var(--tomato); transform: rotate(2deg); }

.hand-note { margin: 14px 0 0; font: 700 1.45rem/1.1 var(--hand); color: var(--ink-soft); transform: rotate(-1.5deg); transform-origin: left; }

/* Reveal on scroll (only hidden once JS is running) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease var(--d, 0ms), transform .7s var(--spring) var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Work ---------- */
.work { padding-top: clamp(40px, 6vw, 80px); }
.work__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 10px 0 16px;
  font-weight: 700; font-size: .98rem;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: var(--sh-sm);
  transition: transform .2s var(--spring), box-shadow .2s var(--spring), background-color .2s, color .2s;
}
.chip:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); }
.chip:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.chip__n { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--sun); border: 2px solid var(--ink); font-size: .78rem; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.chip[aria-pressed="true"] .chip__n { background: var(--tomato); color: var(--ink); border-color: var(--cream); }

.work-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  box-shadow: var(--sh); overflow: hidden;
  transition: transform .4s var(--spring), box-shadow .4s var(--spring);
}
.card[hidden] { display: none; }
.card__art {
  --bg: var(--sun); --dot: rgba(20, 20, 20, .13);
  position: relative; flex: 1 1 auto; min-height: 0; aspect-ratio: 5 / 4;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.4px, transparent 1.8px);
  background-size: 18px 18px;
  border-bottom: var(--bw) solid var(--ink);
  overflow: hidden;
}
.card__art > svg { position: absolute; top: 40px; right: 6px; bottom: 6px; left: 6px; width: calc(100% - 12px); height: calc(100% - 46px); transition: transform .6s var(--spring); }
.art--sun { --bg: var(--sun); }
.art--lilac { --bg: var(--lilac); background-image: repeating-linear-gradient(-45deg, rgba(20, 20, 20, .08) 0 2px, transparent 2px 14px); background-size: auto; }
.art--ink { --bg: var(--ink); --dot: rgba(255, 244, 224, .16); }
.art--sky { --bg: var(--sky); background-image: linear-gradient(rgba(20, 20, 20, .09) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(20, 20, 20, .09) 1.5px, transparent 1.5px); background-size: 26px 26px; }
.art--tomato { --bg: var(--tomato); --dot: rgba(20, 20, 20, .16); }
.art--mint { --bg: var(--mint); background-image: repeating-linear-gradient(45deg, rgba(20, 20, 20, .08) 0 2px, transparent 2px 14px); background-size: auto; }
.svg-display { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
.svg-body { font-family: var(--body); }

.tags { position: absolute; z-index: 1; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 4px 10px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
}
.card__body { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 16px 18px 20px; }
.card__title { font-size: clamp(1.3rem, 1.2vw + .9rem, 1.6rem); letter-spacing: -.03em; margin-bottom: 6px; }
.card__meta { margin: 0; font-size: .95rem; line-height: 1.4; color: var(--ink-soft); }
.card__go {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px;
  background: var(--sun); border: var(--bw) solid var(--ink); border-radius: 50%; box-shadow: var(--sh-sm);
  transition: transform .3s var(--spring), box-shadow .2s, background-color .2s;
}
.card__go svg { width: 22px; height: 22px; }
.card__go:hover { background: var(--tomato); transform: rotate(45deg); }
.card__go:active { transform: translate(3px, 3px) rotate(45deg); box-shadow: 0 0 0 var(--ink); }

@media (hover: hover) {
  .card:hover { transform: translate(-4px, -7px) rotate(-1.2deg); box-shadow: 12px 15px 0 var(--ink); }
  .card--flip:hover, .card:nth-child(3):hover { transform: translate(-4px, -7px) rotate(1.2deg); }
  .card:hover .card__art > svg { transform: scale(1.05) rotate(-1deg); }
}

@media (min-width: 680px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--wide { grid-column: span 2; }
  .card--wide .card__art { aspect-ratio: 16 / 8; }
  .work-grid.is-filtered .card { grid-column: span 1; }
  .work-grid.is-filtered .card.is-lead { grid-column: span 2; }
  .work-grid.is-filtered .card .card__art { aspect-ratio: 5 / 4; }
  .work-grid.is-filtered .card.is-lead .card__art { aspect-ratio: 16 / 8; }
}
@media (min-width: 1000px) {
  .work-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(170px, 14.5vw, 214px); grid-auto-flow: dense; }
  .card { grid-row: span 2; }
  .card .card__art, .work-grid.is-filtered .card .card__art, .work-grid.is-filtered .card.is-lead .card__art { aspect-ratio: auto; }
  .card--wide { grid-column: span 4; }
  .card--tall { grid-column: span 2; }
  .card--half { grid-column: span 3; }
  .work-grid.is-filtered .card, .work-grid.is-filtered .card.is-lead { grid-column: span 2; }
}

/* ---------- About ---------- */
.about { position: relative; }
.about__grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
.about__portrait { position: relative; max-width: 380px; width: 100%; margin-inline: auto; }
.portrait {
  position: relative; aspect-ratio: 300 / 320;
  background-color: var(--lilac);
  background-image: radial-gradient(rgba(20, 20, 20, .14) 1.4px, transparent 1.8px);
  background-size: 18px 18px;
  border: var(--bw) solid var(--ink); border-radius: 28px 28px 28px 6px; box-shadow: var(--sh-lg);
  overflow: hidden;
}
.avatar { position: absolute; inset: auto 0 0; width: 100%; height: auto; }
.avatar__eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.portrait__bubble {
  position: absolute; top: 18px; right: 16px; margin: 0;
  padding: 8px 14px; font: 800 1.05rem/1.1 var(--display);
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 16px 16px 4px 16px; box-shadow: var(--sh-sm);
  transform: rotate(5deg);
}
.hand-note--portrait { text-align: center; transform: rotate(-2deg); transform-origin: center; margin-top: 22px; }

.about__text h2 { margin-bottom: 24px; }
.lead { font-size: clamp(1.15rem, 1vw + .9rem, 1.35rem); line-height: 1.5; color: var(--ink); }
.about__text p:not(.kicker):not(.lead) { color: var(--ink-soft); max-width: 60ch; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 30px 0; }
.fact {
  --c: var(--sun);
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px;
  background: var(--c); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(var(--rot, 0deg));
  transition: transform .3s var(--spring);
}
.fact:hover { transform: rotate(0) translateY(-3px); }
.fact b { font: 800 clamp(2rem, 4vw, 2.6rem)/1 var(--display); letter-spacing: -.04em; }
.fact span { font-size: .95rem; line-height: 1.3; font-weight: 500; }
.fact--tomato { --c: var(--tomato); --rot: -1.5deg; }
.fact--sky { --c: var(--sky); --rot: 1.2deg; }
.fact--sun { --c: var(--sun); --rot: 1deg; }
.fact--mint { --c: var(--mint); --rot: -1deg; }

.tools__title { font-size: 1.15rem; letter-spacing: -.01em; margin-bottom: 12px; }
.tools__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tools__list li { padding: 6px 14px; font-size: .92rem; font-weight: 700; border: 2.5px dashed var(--ink); border-radius: 999px; background: var(--paper); }

@media (min-width: 680px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .about__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .about__portrait { max-width: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Process ---------- */
.process { background: var(--ink); color: var(--cream); border-block: var(--bw) solid var(--ink); background-image: radial-gradient(rgba(255, 244, 224, .1) 1.1px, transparent 1.5px); background-size: 22px 22px; }
.process .kicker { color: var(--ink); border-color: var(--cream); box-shadow: 3px 3px 0 var(--cream); }
.process :focus-visible { outline-color: var(--sun); }
.process h2 .hl { box-shadow: 4px 4px 0 var(--cream); }
.steps { display: grid; gap: 22px; counter-reset: step; }
.step {
  position: relative; display: flex; flex-direction: column;
  padding: 22px 22px 24px;
  color: var(--ink); background: var(--cream);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: 6px 6px 0 var(--sun);
}
.step:nth-child(2) { box-shadow: 6px 6px 0 var(--lilac); }
.step:nth-child(3) { box-shadow: 6px 6px 0 var(--mint); }
.step:nth-child(4) { box-shadow: 6px 6px 0 var(--sky); }
.step__blob { width: 78px; height: 78px; margin: -4px 0 14px -4px; transition: transform .5s var(--spring); }
@media (max-width: 679px) {
  /* compact steps on phones: number beside the title */
  .step { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
  .step__blob { width: 62px; height: 62px; margin: 0; }
  .step h3 { margin: 0; }
  .step p { grid-column: 1 / -1; margin: 14px 0 16px; }
  .step__time { grid-column: 1 / -1; }
}
.step:hover .step__blob { transform: rotate(-14deg) scale(1.08); }
.step__blob path { stroke: var(--ink); stroke-width: 3.5; }
.step__blob text { font: 800 46px/1 var(--display); fill: var(--ink); }
.step h3 { font-size: 1.45rem; letter-spacing: -.03em; margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 18px; }
.step__time {
  align-self: flex-start; margin-top: auto; padding: 3px 12px;
  font: 700 1.2rem/1.2 var(--hand); border: 2px solid var(--ink); border-radius: 999px; background: var(--paper);
}
@media (min-width: 680px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step:nth-child(even) { margin-top: 40px; }
}

/* ---------- Testimonials (sticky notes) ---------- */
.notes { display: grid; gap: 34px 28px; padding-top: 10px; }
.sticky-note {
  --c: var(--sun);
  position: relative; margin: 0; padding: 34px 26px 24px;
  background: var(--c); border: var(--bw) solid var(--ink); border-radius: 4px 4px 22px 4px;
  box-shadow: var(--sh);
  transform: rotate(var(--rot, -2deg));
}
.js .sticky-note.reveal { transform: translateY(26px) rotate(var(--rot, -2deg)); }
.js .sticky-note.reveal.is-in, .sticky-note { transform: rotate(var(--rot, -2deg)); }
.sticky-note::before {
  content: ""; position: absolute; top: -16px; left: 50%; width: 104px; height: 30px; margin-left: -52px;
  background: rgba(255, 250, 240, .72); border: 2px solid rgba(20, 20, 20, .25);
  transform: rotate(-4deg);
}
@media (hover: hover) {
  .js .sticky-note.reveal.is-in:hover, .sticky-note:hover { transform: rotate(0deg) translateY(-6px); box-shadow: var(--sh-lg); transition: transform .35s var(--spring), box-shadow .35s var(--spring); }
}
.note--mint { --c: var(--mint); }
.note--lilac { --c: var(--lilac); }
.sticky-note blockquote { margin: 0 0 20px; }
.sticky-note blockquote p { margin: 0; font: 600 clamp(1.12rem, .6vw + 1rem, 1.28rem)/1.42 var(--display); letter-spacing: -.01em; }
.sticky-note figcaption { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 2px dashed rgba(20, 20, 20, .45); font-size: .95rem; }
.sticky-note figcaption b { font-family: var(--display); font-size: 1.05rem; }
@media (min-width: 680px) {
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes .sticky-note:last-child { grid-column: 1 / -1; max-width: calc(50% - 14px); justify-self: center; }
}
@media (min-width: 1000px) {
  .notes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .notes .sticky-note:last-child { grid-column: auto; max-width: none; }
  .notes .sticky-note:nth-child(2) { margin-top: 36px; }
}

/* ---------- Contact ---------- */
.contact { padding-top: clamp(32px, 5vw, 64px); }
.contact__box {
  display: grid; gap: clamp(32px, 5vw, 56px);
  padding: clamp(22px, 5vw, 60px);
  background: var(--tomato); border: var(--bw) solid var(--ink); border-radius: 30px; box-shadow: var(--sh-lg);
}
.contact h2 { font-size: clamp(2.6rem, 7.4vw, 5.4rem); max-width: 11ch; margin-bottom: 20px; }
.contact__lede { font-size: 1.12rem; max-width: 42ch; margin-bottom: 26px; }
.contact__list { display: grid; gap: 10px; margin: 30px 0 22px; }
.contact__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-weight: 700; font-size: 1.05rem; }
.contact__list span { min-width: 64px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.contact__list a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.contact__list a:hover { text-decoration-style: wavy; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: var(--sh-sm);
  transition: transform .2s var(--spring), box-shadow .2s var(--spring);
}
.socials a::after { content: "↗"; }
.socials a:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); }
.socials a:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

.form-card {
  position: relative; align-self: start;
  padding: clamp(20px, 3.5vw, 34px);
  background: var(--cream); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh);
}
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 8px; font: 800 1.02rem/1.2 var(--display); }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-height: 54px; padding: 13px 16px;
  font-size: 1rem; line-height: 1.4;
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  box-shadow: var(--sh-sm); outline: none;
  transition: transform .18s var(--spring), box-shadow .18s var(--spring), background-color .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23141414' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
.field ::placeholder { color: #6e675c; opacity: 1; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  background-color: #fff; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink), 0 0 0 4px var(--sun);
}
.field [aria-invalid="true"] { border-color: var(--tomato-dark); box-shadow: 3px 3px 0 var(--tomato-dark); }
.field__error { margin: 8px 0 0; font-size: .92rem; font-weight: 700; color: var(--tomato-dark); }
.field__error:empty { display: none; }
.field__error::before { content: "✖ "; font-size: .8em; }
.form .btn--block { margin-top: 8px; }

.form-success { text-align: center; padding: 18px 4px 6px; }
.form-success:focus { outline: none; }
.form-success__icon { width: 92px; height: 92px; margin: 0 auto 16px; animation: pop .7s var(--spring) both; }
.form-success h3 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.03em; margin-bottom: 12px; }
.form-success p { max-width: 36ch; margin: 0 auto 22px; color: var(--ink-soft); }
@keyframes pop { from { transform: scale(.3) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }

@media (min-width: 1000px) {
  .contact__box { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

/* ---------- Footer ---------- */
.footer { padding: clamp(36px, 6vw, 64px) 0 28px; background: var(--ink); color: var(--cream); border-top: var(--bw) solid var(--ink); }
.footer :focus-visible { outline-color: var(--sun); }
.footer__big {
  display: flex; align-items: center; gap: .2em; margin: 0 0 clamp(24px, 4vw, 44px);
  font: 800 clamp(3rem, 11vw, 8.5rem)/.9 var(--display); letter-spacing: -.05em; text-transform: uppercase;
  color: var(--sun);
}
.footer__big svg { width: .7em; height: .7em; flex: none; fill: var(--tomato); stroke: var(--cream); stroke-width: 3; }
.footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; padding-top: 22px; border-top: 2px dashed rgba(255, 244, 224, .35); font-size: .95rem; }
.footer__row p { margin: 0; }
.footer__credit { color: rgba(255, 244, 224, .78); }
.footer__top { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.footer__top:hover { color: var(--sun); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 90;
  max-width: calc(100% - 32px); padding: 12px 20px;
  font-weight: 700; font-size: .95rem; line-height: 1.35; text-align: center;
  color: var(--cream); background: var(--ink); border: var(--bw) solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--tomato);
  transform: translate(-50%, 160%); opacity: 0; pointer-events: none;
  transition: transform .35s var(--spring), opacity .2s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Motion controls ---------- */
/* Paused when off-screen (class set by script) or when the tab is hidden */
.is-paused *, .tab-hidden [data-anim] * { animation-play-state: paused !important; }

/* Short landscape phones: keep the hero compact */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: relative; }
  .hero { padding-top: 20px; --badge: 112px; --name-size: clamp(3.6rem, 30vh, 14rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .sticky-note.reveal { opacity: 1; transform: none; }
  .js .sticky-note.reveal { transform: rotate(var(--rot, -2deg)); }
}


/* ===== Demo chrome: "All themes" link back to the Spectrix gallery =====
   Not part of the portfolio design itself. Sits under the header/menu and toasts;
   hidden (via the inline script next to it) when the page runs inside the gallery's device preview. */
.demo-back {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  text-decoration: none;
  white-space: nowrap;
  animation: demo-back-in .6s .8s backwards cubic-bezier(.2, .8, .2, 1);
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font: 700 15px/1 var(--body);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.demo-back[hidden] { display: none; }
.demo-back svg { width: 18px; height: 18px; flex: none; transition: transform .25s ease; }
.demo-back:hover svg,
.demo-back:focus-visible svg { transform: translateX(-3px); }
.demo-back:hover,
.demo-back:focus-visible { background: var(--sun); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.demo-back:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

@keyframes demo-back-in { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  .demo-back { animation: none; transition: none; }
  .demo-back svg { transition: none; }
}
