/* ============================================================
   FAHIM AHMED — v4 · NEO-BRUTALIST POP
   Loud yellow · thick borders · hard shadows · stickers
   pro  = electric blue accents · professional copy
   real = hot pink accents      · full-disclosure copy
   Display/body: Archivo · Labels: JetBrains Mono · Notes: Caveat
   ============================================================ */

@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #2b6ef2;
}

:root {
  --nav-h: 92px;
  --bg: #ffd943;
  --ink: #14120c;
  --paper: #fffdf5;
  --mint: #7ce0c3;
  --pink: #f2408d;
  --blue: #2b6ef2;
  --soft: rgba(20, 18, 12, 0.72);
  --faint: rgba(20, 18, 12, 0.5);
  --font-display: "Archivo", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-hand: "Caveat", cursive;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.85, 0, 0.15, 1);
  transition: --accent 0.6s ease;
}

html[data-mode="pro"] { --accent: #2b6ef2; --accent-2: #f2408d; }
html[data-mode="real"] { --accent: #f2408d; --accent-2: #2b6ef2; }

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-loading { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); border-left: 3px solid var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink); }

/* ---------- Mode-swap spans ---------- */
.v {
  display: inline-block;
  animation: v-swap 0.45s var(--ease-out) both;
  animation-delay: var(--d, 0ms);
}

html[data-mode="pro"] .v-real { display: none; }
html[data-mode="real"] .v-pro { display: none; }

@keyframes v-swap {
  from { opacity: 0; transform: translateY(0.3em) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ---------- Mode transition (iris from the switch) ---------- */
::view-transition-old(root) { animation: none; }

::view-transition-new(root) {
  animation: vt-iris 0.65s var(--ease-snap) both;
}

@keyframes vt-iris {
  from { clip-path: circle(0px at var(--vt-x, 92%) var(--vt-y, 40px)); }
  to { clip-path: circle(160% at var(--vt-x, 92%) var(--vt-y, 40px)); }
}

/* ---------- Preloader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: transform 0.6s var(--ease-snap), visibility 0s 0.6s;
}

.loader.done {
  transform: translateY(-101%);
  visibility: hidden;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.loader-name {
  font-weight: 900;
  font-stretch: 66%;
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-shadow: 4px 4px 0 var(--paper), 7px 7px 0 var(--ink);
  animation: loader-stomp 0.5s var(--ease-out) both;
}

@keyframes loader-stomp {
  from { transform: scale(1.6) rotate(-4deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.loader-track {
  width: min(320px, 60vw);
  height: 18px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}

.loader-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 10px, var(--bg) 10px 20px);
}

.loader-pct {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--ink);
  color: var(--bg);
  padding: 0.2rem 0.7rem;
}

.loader-pct::after { content: "%"; }

/* ---------- Custom cursor (square, hard) ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 400;
  pointer-events: none;
  translate: -50% -50%;
  opacity: 0;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--ink);
  box-shadow: 0 0 0 1.5px var(--paper);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 2.5px solid var(--ink);
  box-shadow: 0 0 0 1.5px var(--paper), inset 0 0 0 1.5px var(--paper);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
    background-color 0.25s ease, transform 0.25s ease;
}

.cursor-ring.is-hover {
  width: 54px;
  height: 54px;
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  transform: rotate(10deg);
}

body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor .card-tab {
  cursor: none;
}

body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring { opacity: 1; }

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Doodles ---------- */
.doodle {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  font-weight: 900;
  will-change: transform;
}

.doodle--star {
  top: 16%;
  right: 7%;
  font-size: 3.4rem;
  color: var(--accent);
  transform: translate(calc(var(--px, 0) * 22px), calc(var(--py, 0) * 22px)) rotate(12deg);
  animation: doodle-spin 14s linear infinite;
}

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

.doodle--burst {
  bottom: 18%;
  left: 5%;
  font-size: 2.6rem;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
  transform: translate(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -16px));
  animation: doodle-bob 5s ease-in-out infinite;
}

.doodle--ring {
  top: 58%;
  right: 12%;
  width: 44px;
  height: 44px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  transform: translate(calc(var(--px, 0) * 14px), calc(var(--py, 0) * -14px));
  animation: doodle-bob 6.5s ease-in-out infinite reverse;
}

.doodle--zig {
  top: 34%;
  left: 4%;
  font-size: 2rem;
  letter-spacing: -0.2em;
  color: var(--accent-2, #f2408d);
  transform: translate(calc(var(--px, 0) * 12px), calc(var(--py, 0) * 12px)) rotate(-8deg);
}

@keyframes doodle-bob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -14px; }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 250;
  height: 5px;
  width: 100%;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--sp, 0));
}

/* ---------- Stack HUD ---------- */
.stack-hud {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 240;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 0.55rem 0.95rem;
  transform: translateY(140%) rotate(-2deg);
  transition: transform 0.4s var(--ease-out);
}

.stack-hud.show { transform: translateY(0) rotate(-2deg); }

.stack-hud b {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
}

.stack-hud span { color: var(--faint); }

.stack-hud em {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  margin-left: 0.35rem;
}

/* ---------- Header ---------- */
.site-head {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: min(1180px, calc(100vw - 20px));
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0 0.7rem 0 1.3rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
}

.monogram {
  font-weight: 900;
  font-stretch: 72%;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  display: inline-block;
}

.mono-dot { color: var(--accent); }

.site-nav {
  display: flex;
  gap: clamp(1rem, 2.6vw, 2rem);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-nav a {
  padding: 0.35rem 0.55rem;
  border: 2.5px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease-out);
}

.site-nav a:hover,
.site-nav a[aria-current] {
  border-color: var(--ink);
  background: var(--bg);
  transform: rotate(-1.5deg);
}

.head-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.clock {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--soft);
  white-space: nowrap;
}

/* ---------- The Switch ---------- */
.mode-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 42px;
  padding: 3px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

.mode-switch:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.mode-switch:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

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

.ms-label {
  position: relative;
  z-index: 2;
  padding: 0 14px;
  transition: color 0.35s ease;
}

.ms-knob {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 7px;
  background: var(--accent);
  border: 2px solid var(--ink);
  transition: transform 0.4s var(--ease-snap), background-color 0.4s ease;
}

html[data-mode="pro"] .ms-pro { color: var(--paper); }
html[data-mode="pro"] .ms-real { color: var(--faint); }
html[data-mode="real"] .ms-knob { transform: translateX(100%); }
html[data-mode="real"] .ms-pro { color: var(--faint); }
html[data-mode="real"] .ms-real { color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) clamp(1.1rem, 5vw, 4.5rem) 4rem;
  max-width: 1460px;
  margin: 0 auto;
  width: 100%;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.55rem 1.05rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-1.2deg);
  margin-bottom: 2.6rem;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--ink);
  animation: pulse-pop 1.8s ease-in-out infinite;
}

@keyframes pulse-pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

.hero-name {
  font-weight: 900;
  font-stretch: 64%;
  font-size: clamp(3.4rem, 15vw, 13rem);
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  user-select: none;
  text-shadow: 0.045em 0.045em 0 var(--paper), 0.07em 0.07em 0 var(--ink);
}

.hero-line { display: block; }

.hero-line .ltr {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotate(8deg);
  animation: ltr-in 0.55s var(--ease-out) forwards;
  animation-delay: calc(var(--li) * 50ms + var(--base, 0ms));
  transition: transform 0.22s var(--ease-out), color 0.22s ease;
}

@keyframes ltr-in {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* Once the intro finishes, hand transform back to the hover transition */
.hero-name.letters-done .ltr {
  animation: none;
  opacity: 1;
  transform: none;
}

.hero-name.letters-done .ltr:hover {
  transform: translateY(-0.07em) rotate(-3deg) scale(1.05);
  color: var(--accent);
}

.hero-line--accent .ltr {
  color: var(--accent);
  -webkit-text-stroke: 3px var(--ink);
}

.hero-line--accent.letters-done .ltr:hover { color: var(--accent-2); }

.hero-stick {
  position: absolute;
  top: calc(var(--nav-h) + 6.5rem);
  right: clamp(1rem, 7vw, 6rem);
  background: var(--accent-2, #f2408d);
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 0.85rem 1.25rem;
  font-weight: 900;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: rotate(8deg);
  display: inline-block;
  animation: stick-wiggle 4.5s ease-in-out infinite;
}

@keyframes stick-wiggle {
  0%, 100% { rotate: 0deg; }
  50% { rotate: 5deg; }
}

@media (max-width: 900px) { .hero-stick { display: none; } }

.hero-below {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.6rem;
  margin-top: 2.6rem;
}

.hero-role {
  font-size: clamp(1.08rem, 1.9vw, 1.45rem);
  line-height: 1.5;
  font-weight: 600;
  max-width: 52ch;
}

.hero-role mark {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  padding: 0 0.3em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.rotator {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  padding: 0.05em 0.4em;
  white-space: nowrap;
  display: inline-block;
  transform: rotate(-1deg);
}

.rotator::after {
  content: "▌";
  color: var(--bg);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.9rem;
}

.scribble {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--ink);
  transform: rotate(-2deg);
}

.meta-links { display: flex; gap: 0.6rem; }

.meta-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.6rem 1rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  display: inline-block;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), background-color 0.2s ease;
}

.meta-links a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--mint);
}

.meta-links a:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3.4rem;
}

.stat {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  border-radius: 14px;
  padding: 1.2rem 1.3rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.stat:hover {
  transform: translate(-2px, -2px) rotate(-0.6deg);
  box-shadow: 8px 8px 0 var(--ink);
}

.stat:nth-child(even):hover { transform: translate(-2px, -2px) rotate(0.6deg); }

.stat-num {
  font-weight: 900;
  font-stretch: 72%;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.05;
  color: var(--accent);
  -webkit-text-stroke: 1.5px var(--ink);
}

.stat-num::after { content: "+"; opacity: 0.6; font-size: 0.7em; }
.stat:nth-child(3) .stat-num::after,
.stat:nth-child(4) .stat-num::after { content: ""; }

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--soft);
}

.scroll-cue {
  position: absolute;
  bottom: 1.4rem;
  right: clamp(1.1rem, 5vw, 4.5rem);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: cue-hop 1.6s ease-in-out infinite;
}

@keyframes cue-hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  padding: 0.95rem 0;
  transform: skewX(var(--skew, 0deg));
  will-change: transform;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-run 26s linear infinite;
  font-weight: 900;
  font-stretch: 80%;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-chunk i {
  font-style: normal;
  color: var(--accent-2, #f2408d);
  padding: 0 0.8rem;
}

@keyframes marquee-run {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(5.5rem, 13vh, 9.5rem) clamp(1.1rem, 5vw, 4.5rem) 0;
  max-width: 1460px;
  margin: 0 auto;
  position: relative;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.4rem, 6vh, 4rem);
}

.head-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
  transform: rotate(-4deg);
  box-shadow: 4px 4px 0 var(--accent);
}

.section-title {
  font-weight: 900;
  font-stretch: 68%;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  letter-spacing: -0.01em;
  line-height: 1;
  text-shadow: 0.05em 0.05em 0 var(--paper);
}

.section-title em,
.about-big em,
.footer-mega em {
  font-family: var(--font-hand);
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1em;
  text-shadow: none;
  letter-spacing: 0;
}

.section-sub {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

/* ---------- Work: sticky stacking cards ---------- */
.stack {
  --tab-h: 4.1rem;
  display: flex;
  flex-direction: column;
}

.card {
  position: sticky;
  top: calc(var(--nav-h) + 0.3rem + var(--i) * var(--tab-h));
  /* Later cards must always paint above earlier ones so the pile
     recedes in strict 1 → 2 → 3 → 4 order */
  z-index: calc(var(--i) + 1);
  margin-bottom: 3.4rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  transform-origin: top center;
  /* Hand-stacked pile: covered cards lift, shrink and tilt aside */
  transform: perspective(1200px)
    translateY(calc(var(--squish, 0) * -10px))
    scale(calc(1 - var(--squish, 0) * 0.045))
    rotate(calc(var(--squish, 0) * var(--rdir, 1) * 1.3deg))
    rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: 9px 9px 0 var(--ink);
  transition: box-shadow 0.2s var(--ease-out);
  will-change: transform;
}

.card:hover { box-shadow: 12px 12px 0 var(--ink); }

.card:last-child { margin-bottom: 0; }

.card-tab {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: var(--tab-h);
  padding: 0 clamp(1.2rem, 3vw, 2.2rem);
  border-bottom: 3px solid var(--ink);
  background: var(--tabc, var(--mint));
  cursor: pointer;
  transition: filter 0.2s ease;
}

.card-tab:hover { filter: brightness(1.06); }

.card-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.2rem 0.55rem;
  transform: rotate(-3deg);
}

.card-title {
  font-weight: 900;
  font-stretch: 74%;
  text-transform: uppercase;
  font-size: clamp(1.05rem, 2.5vw, 1.65rem);
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-kind {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  flex-shrink: 0;
}

.card-body {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: clamp(1.6rem, 4vw, 3.4rem);
  padding: clamp(1.6rem, 3.5vw, 2.6rem) clamp(1.2rem, 3vw, 2.2rem) clamp(1.8rem, 4vw, 2.8rem);
  align-items: stretch;
  /* Body fades as the card is covered — the tab stays bold & readable */
  opacity: calc(1 - var(--squish, 0) * 0.85);
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-desc {
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  font-weight: 500;
  line-height: 1.62;
  color: var(--soft);
  max-width: 52ch;
}

.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.card-tech li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.8rem;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

.card-tech li:nth-child(2) { background: var(--bg); transform: rotate(-1.5deg); }
.card-tech li:nth-child(4) { background: var(--mint); transform: rotate(1.2deg); }

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: auto;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), background-color 0.2s ease;
}

.card-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.card-link:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.card-link--primary {
  background: var(--accent);
  color: var(--paper);
}

.card-link--muted {
  border-style: dashed;
  box-shadow: none;
  color: var(--faint);
  cursor: default;
}

.card-link--muted:hover { transform: none; box-shadow: none; }

/* ---------- Cover / media slot ---------- */
.cover {
  border: 3px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
}

.cover-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.9rem;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}

.cover-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.cover-bar i:first-child { background: var(--accent); }
.cover-bar i:nth-child(2) { background: var(--bg); }
.cover-bar i:nth-child(3) { background: var(--mint); }

.cover-url {
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Drop-in media slot: an <img class="cover-media"> or <video class="cover-media">
   placed inside .cover-art fills the frame; the placeholder art hides itself. */
.cover-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-art:has(.cover-media) .cover-letter,
.cover-art:has(.cover-media) .cover-chip {
  display: none;
}

.cover-art {
  position: relative;
  flex: 1;
  background: var(--tabc, var(--mint));
  overflow: hidden;
}

.cover-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--ink) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.12;
}

.cover-letter {
  position: absolute;
  right: -0.03em;
  bottom: -0.24em;
  font-weight: 900;
  font-stretch: 66%;
  font-size: clamp(9rem, 15vw, 15rem);
  line-height: 1;
  color: var(--paper);
  -webkit-text-stroke: 4px var(--ink);
  transition: transform 0.45s var(--ease-out);
}

.card:hover .cover-letter {
  transform: translateY(-12px) rotate(-4deg);
}

.cover-chip {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  animation: chip-float 5s ease-in-out infinite;
  animation-delay: calc(var(--cx) * 0.02);
}

@keyframes chip-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-big {
  font-weight: 700;
  font-stretch: 86%;
  font-size: clamp(1.4rem, 2.9vw, 2.2rem);
  line-height: 1.34;
  letter-spacing: -0.01em;
}

.facts {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 2.4rem;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.1rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

.fact:hover {
  transform: translate(-2px, -2px) rotate(-0.4deg);
  box-shadow: 7px 7px 0 var(--ink);
}

.fact:nth-child(even):hover { transform: translate(-2px, -2px) rotate(0.4deg); }

.fact dt {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.fact dd {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- Portrait (photo slot) ---------- */
.portrait {
  position: sticky;
  top: calc(var(--nav-h) + 1.2rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 3px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
  display: grid;
  place-items: center;
  transform: rotate(1.5deg);
  transition: transform 0.25s var(--ease-out);
}

.portrait:hover .portrait-frame { transform: rotate(0deg); }

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--ink) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.08;
}

.portrait-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-frame:has(.portrait-media) .portrait-mark,
.portrait-frame:has(.portrait-media) .portrait-note {
  display: none;
}

.portrait-mark {
  font-weight: 900;
  font-stretch: 66%;
  font-size: clamp(4rem, 8vw, 7rem);
  color: var(--bg);
  -webkit-text-stroke: 4px var(--ink);
}

.portrait-note {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--soft);
  white-space: nowrap;
}

.portrait-cap {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--soft);
  text-align: center;
}

/* ---------- Colophon ---------- */
.colophon {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(5.5rem, 13vh, 9.5rem) clamp(1.1rem, 5vw, 4.5rem) 0;
}

.colophon > * { position: relative; }

.colophon {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.colo-stamp {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--paper);
  background: var(--accent);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.6rem 1.2rem;
  transform: rotate(-2deg);
}

.colo-quote {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  font-stretch: 86%;
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  line-height: 1.42;
  position: relative;
}

.colo-quote::before,
.colo-quote::after {
  content: "";
  position: absolute;
  top: -14px;
  width: 90px;
  height: 26px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 2px solid rgba(20, 18, 12, 0.25);
}

.colo-quote::before { left: 8%; transform: rotate(-6deg); }
.colo-quote::after { right: 8%; transform: rotate(5deg); }

.colo-quote .v-real {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.35em;
  line-height: 1.28;
}

.colo-quote em {
  font-style: normal;
  color: var(--accent);
}

.colo-cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--soft);
}

/* ---------- Skills ---------- */
.skill-groups {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.skill-group {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.4rem;
  align-items: center;
  padding: 1.4rem 1.5rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
}

.skill-group:nth-child(even) { transform: rotate(0.35deg); }
.skill-group:nth-child(odd) { transform: rotate(-0.35deg); }

.sg-name {
  font-weight: 900;
  font-stretch: 74%;
  text-transform: uppercase;
  font-size: 1.35rem;
}

.sg-note {
  display: block;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.15rem;
  text-transform: none;
  color: var(--accent);
  margin-top: 0.2rem;
}

.sg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.sg-chips li {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.55rem 1rem;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), background-color 0.2s ease;
}

.sg-chips li:hover {
  transform: translate(-2px, -2px) rotate(-1.5deg);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--bg);
}

/* ---------- Footer / contact (inverted) ---------- */
.footer {
  margin-top: clamp(5.5rem, 13vh, 9.5rem);
  background: var(--ink);
  color: var(--paper);
  border-top: 3px solid var(--ink);
}

.footer-in {
  max-width: 1460px;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 7rem) clamp(1.1rem, 5vw, 4.5rem) 2rem;
}

.footer .section-title { text-shadow: 0.05em 0.05em 0 rgba(255, 253, 245, 0.18); }

.head-badge--inv {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--accent);
}

.footer-mega {
  font-weight: 900;
  font-stretch: 70%;
  text-transform: uppercase;
  font-size: clamp(2rem, 5.6vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 24ch;
  margin-bottom: 2.8rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.4rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1.05rem 1.7rem;
  border-radius: 12px;
  border: 3px solid var(--bg);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--accent);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--accent);
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--accent);
}

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1.05rem 1.5rem;
  border-radius: 12px;
  border: 3px solid var(--paper);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  box-shadow: 5px 5px 0 rgba(255, 253, 245, 0.35);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), background-color 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(255, 253, 245, 0.35);
  background: var(--paper);
  color: var(--ink);
}

.contact-list {
  border-top: 3px solid rgba(255, 253, 245, 0.25);
}

.contact-list li {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.05rem 0.2rem;
  border-bottom: 3px solid rgba(255, 253, 245, 0.25);
  transition: padding-left 0.25s var(--ease-out);
}

.contact-list li:hover { padding-left: 0.8rem; }

.cl-key {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--bg);
}

.contact-list a {
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 2.5px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-list a:hover {
  color: var(--bg);
  border-color: var(--bg);
}

.cl-plain { font-size: 1rem; font-weight: 600; }

.cl-note {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 1.1rem;
  color: rgba(255, 253, 245, 0.6);
  text-align: right;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3.2rem;
  padding-top: 1.3rem;
  border-top: 3px solid rgba(255, 253, 245, 0.25);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 253, 245, 0.65);
}

.footer-bottom .scribble {
  font-size: 1.15rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--bg);
  transform: rotate(-1deg);
}

.footer-bottom a:hover { color: var(--bg); }

/* ---------- Magnetic ---------- */
.magnetic {
  will-change: transform;
  transition: transform 0.2s var(--ease-out);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px) rotate(0.6deg);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

/* ---------- Responsive ---------- */

/* Tablet (960px and below) */
@media (max-width: 960px) {
  :root { --nav-h: 80px; }

  .site-head {
    height: 56px;
    padding: 0 0.6rem 0 1rem;
    gap: 0.8rem;
  }

  .monogram { font-size: 1.2rem; }

  .site-nav { display: none; }

  .mode-switch {
    height: 38px;
    font-size: 0.62rem;
  }

  .hero {
    padding: calc(var(--nav-h) + 1.8rem) clamp(1rem, 4vw, 3rem) 3rem;
  }

  .hero-name {
    font-size: clamp(2.6rem, 12vw, 8rem);
  }

  .hero-stick { display: none; }

  .hero-below {
    gap: 1.2rem;
    margin-top: 1.8rem;
  }

  .hero-role {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    max-width: 45ch;
  }

  .meta-links {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .meta-links a {
    font-size: 0.68rem;
    padding: 0.55rem 0.9rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .kicker {
    font-size: 0.68rem;
    padding: 0.5rem 0.9rem;
    margin-bottom: 1.8rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 2.4rem;
  }

  .stat {
    padding: 1rem 1rem 0.9rem;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .stat-num {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
  }

  .stat-label {
    font-size: 0.62rem;
  }

  .section {
    padding: clamp(4rem, 10vh, 7rem) clamp(1rem, 4vw, 3rem) 0;
  }

  .section-head {
    margin-bottom: clamp(1.8rem, 4vh, 3rem);
    gap: 0.8rem;
  }

  .section-title {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
  }

  .section-sub {
    font-size: 0.72rem;
  }

  .card-body {
    grid-template-columns: 1fr;
    gap: clamp(1.2rem, 3vw, 2rem);
    padding: clamp(1.2rem, 2.5vw, 2rem) clamp(1rem, 2.5vw, 1.8rem) clamp(1.4rem, 3vw, 2.2rem);
  }

  .card-tab {
    height: 3.4rem;
    padding: 0 clamp(1rem, 2.5vw, 1.8rem);
    gap: 0.8rem;
  }

  .card-title {
    font-size: clamp(0.95rem, 2vw, 1.4rem);
  }

  .card-desc {
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  }

  .cover {
    min-height: 200px;
  }

  .cover-letter {
    font-size: clamp(6rem, 12vw, 10rem);
  }

  .card-link {
    font-size: 0.68rem;
    padding: 0.65rem 1rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .portrait {
    position: static;
    max-width: 100%;
  }

  .about-big {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  }

  .skill-group {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.2rem;
  }

  .sg-name {
    font-size: 1.15rem;
  }

  .doodle { display: none; }

  .stack { --tab-h: 3.2rem; }

  .colophon {
    padding: clamp(4rem, 10vh, 7rem) clamp(1rem, 4vw, 3rem) 0;
  }

  .colo-quote {
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    padding: clamp(1.2rem, 3vw, 2.2rem);
  }
}

/* Mobile (640px and below) */
@media (max-width: 640px) {
  :root { --nav-h: 70px; }

  .site-head {
    height: 50px;
    width: calc(100vw - 16px);
    padding: 0 0.5rem;
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .monogram {
    font-size: 1rem;
    letter-spacing: 0;
  }

  .mono-dot { display: none; }

  .head-right {
    gap: 0.6rem;
  }

  .clock { display: none; }

  .mode-switch {
    height: 36px;
    font-size: 0.58rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .ms-label { padding: 0 10px; }

  .hero {
    padding: calc(var(--nav-h) + 1.2rem) 1rem 2.5rem;
    min-height: auto;
  }

  .kicker {
    font-size: 0.62rem;
    padding: 0.45rem 0.8rem;
    margin-bottom: 1.2rem;
    gap: 0.4rem;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .pulse {
    width: 8px;
    height: 8px;
  }

  .hero-name {
    font-size: clamp(2rem, 10vw, 4rem);
    text-shadow: 0.03em 0.03em 0 var(--paper), 0.05em 0.05em 0 var(--ink);
  }

  .hero-below {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.2rem;
  }

  .hero-role {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    max-width: 100%;
  }

  .hero-role mark {
    padding: 0 0.2em;
    border-width: 2px;
  }

  .rotator {
    font-size: 0.9em;
    padding: 0.05em 0.3em;
  }

  .hero-side {
    align-items: flex-start;
    width: 100%;
  }

  .scribble {
    font-size: 1.15rem;
  }

  .meta-links {
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .meta-links a {
    font-size: 0.62rem;
    padding: 0.5rem 0.8rem;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .meta-links a:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: 2rem;
  }

  .stat {
    padding: 0.9rem 1rem 0.8rem;
    gap: 0.05rem;
    box-shadow: 3px 3px 0 var(--ink);
    border-radius: 10px;
  }

  .stat-num {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    -webkit-text-stroke: 1px var(--ink);
  }

  .stat-label {
    font-size: 0.58rem;
  }

  .marquee {
    padding: 0.7rem 0;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
  }

  .marquee-track {
    font-size: 0.85rem;
  }

  .section {
    padding: clamp(3rem, 8vh, 5rem) 1rem 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: clamp(1.4rem, 3vh, 2.2rem);
  }

  .head-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
    box-shadow: 3px 3px 0 var(--accent);
  }

  .section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.1;
  }

  .section-title em {
    font-size: 1.05em;
  }

  .section-sub {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }

  .stack { --tab-h: 3rem; }

  .card-tab {
    height: 3rem;
    padding: 0 0.8rem;
    gap: 0.6rem;
    border-bottom: 2px solid var(--ink);
  }

  .card-num {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
  }

  .card-title {
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
  }

  .card-kind { display: none; }

  .card-body {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    align-items: stretch;
  }

  .card-info {
    gap: 1rem;
  }

  .card-desc {
    font-size: clamp(0.9rem, 1.1vw, 0.95rem);
    line-height: 1.5;
  }

  .card-tech {
    gap: 0.4rem;
  }

  .card-tech li {
    font-size: 0.62rem;
    padding: 0.35rem 0.65rem;
    box-shadow: 2px 2px 0 var(--ink);
    border-width: 2px;
  }

  .card-links {
    gap: 0.6rem;
  }

  .card-link {
    font-size: 0.62rem;
    padding: 0.6rem 0.9rem;
    border-width: 2px;
    border-radius: 10px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .card-link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
  }

  .cover {
    min-height: 160px;
    border-radius: 10px;
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .cover-bar {
    padding: 0.5rem 0.8rem;
    gap: 4px;
    border-bottom: 2px solid var(--ink);
  }

  .cover-bar i {
    width: 9px;
    height: 9px;
    border-width: 1.5px;
  }

  .cover-url {
    font-size: 0.6rem;
  }

  .cover-letter {
    font-size: clamp(4rem, 10vw, 7rem);
    -webkit-text-stroke: 3px var(--ink);
  }

  .cover-chip {
    font-size: 0.58rem;
    padding: 0.3rem 0.6rem;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .about-big {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.4;
  }

  .facts {
    gap: 0.6rem;
    margin-top: 1.5rem;
  }

  .fact {
    padding: 0.8rem 1rem;
    gap: 0.2rem;
    border-width: 2px;
    border-radius: 10px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .fact dt {
    font-size: 0.58rem;
  }

  .fact dd {
    font-size: 0.9rem;
  }

  .portrait-frame {
    transform: rotate(0deg);
    max-width: 100%;
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--ink);
    border-radius: 12px;
  }

  .portrait-mark {
    font-size: clamp(3rem, 6vw, 5rem);
    -webkit-text-stroke: 3px var(--ink);
  }

  .portrait-note {
    font-size: 1rem;
  }

  .portrait-cap {
    font-size: 0.62rem;
  }

  .skill-group {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1rem;
    border-width: 2px;
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .sg-name {
    font-size: 1.05rem;
  }

  .sg-note {
    font-size: 1rem;
    margin-top: 0.15rem;
  }

  .sg-chips {
    gap: 0.5rem;
  }

  .sg-chips li {
    font-size: 0.68rem;
    padding: 0.45rem 0.8rem;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .colophon {
    padding: clamp(3rem, 8vh, 5rem) 1rem 0;
  }

  .colo-stamp {
    font-size: 0.65rem;
    padding: 0.5rem 1rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .colo-quote {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    line-height: 1.4;
    padding: 1.2rem;
    border-width: 2px;
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .colo-quote::before,
  .colo-quote::after {
    width: 70px;
    height: 20px;
    top: -10px;
  }

  .colo-cite {
    font-size: 0.62rem;
  }

  .footer {
    border-top: 2px solid var(--ink);
  }

  .footer-in {
    padding: clamp(3rem, 7vh, 5rem) 1rem 1.5rem;
  }

  .footer-mega {
    font-size: clamp(1.4rem, 5vw, 2rem);
    max-width: 20ch;
    margin-bottom: 1.8rem;
  }

  .contact-row {
    gap: 0.6rem;
    flex-direction: column;
    margin-bottom: 2rem;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
    font-size: 0.78rem;
    padding: 0.9rem 1.4rem;
    box-shadow: 4px 4px 0 var(--accent);
    border-width: 2px;
  }

  .btn-primary:hover {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--accent);
  }

  .btn-ghost {
    font-size: 0.7rem;
    padding: 0.9rem 1.2rem;
    border-width: 2px;
    box-shadow: 3px 3px 0 rgba(255, 253, 245, 0.35);
  }

  .btn-ghost:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 rgba(255, 253, 245, 0.35);
  }

  .contact-list {
    border-top: 2px solid rgba(255, 253, 245, 0.25);
  }

  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.8rem 0.2rem;
    border-bottom: 2px solid rgba(255, 253, 245, 0.25);
  }

  .cl-key {
    font-size: 0.58rem;
  }

  .contact-list a {
    font-size: 0.95rem;
  }

  .cl-note {
    font-size: 1rem;
    text-align: left;
  }

  .footer-bottom {
    gap: 0.6rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 253, 245, 0.25);
  }

  .footer-bottom span {
    font-size: 0.6rem;
  }

  .stack-hud {
    left: 8px;
    bottom: 8px;
    font-size: 0.65rem;
    padding: 0.45rem 0.8rem;
    box-shadow: 3px 3px 0 var(--ink);
    border-width: 2px;
  }

  .scroll-progress {
    height: 3px;
  }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
  .site-head {
    top: 8px;
    width: calc(100vw - 12px);
  }

  .hero {
    padding: calc(var(--nav-h) + 0.8rem) 0.8rem 2rem;
  }

  .kicker {
    font-size: 0.58rem;
    padding: 0.4rem 0.7rem;
  }

  .hero-name {
    font-size: clamp(1.6rem, 8vw, 3rem);
  }

  .stats {
    gap: 0.5rem;
  }

  .stat {
    padding: 0.8rem 0.9rem 0.7rem;
  }

  .section {
    padding: clamp(2.5rem, 7vh, 4rem) 0.8rem 0;
  }

  .section-title {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  }

  .card-body {
    padding: 0.9rem;
    gap: 0.8rem;
  }

  .card-tab {
    height: 2.8rem;
    padding: 0 0.7rem;
  }

  .footer-in {
    padding: clamp(2.5rem, 6vh, 4rem) 0.8rem 1.2rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .loader { display: none; }

  .v,
  .marquee-track,
  .pulse,
  .cue-hop,
  .scroll-cue,
  .cover-chip,
  .doodle--star,
  .doodle--burst,
  .doodle--ring,
  .hero-stick,
  .hero-line .ltr,
  .loader-name,
  .rotator::after {
    animation: none !important;
  }

  .hero-line .ltr {
    opacity: 1;
    transform: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card { transform: none; }

  .card-body { opacity: 1; }

  .magnetic { transition: none; }
}
