/* ================================================================
   KOA Portfolio — style.css
   ----------------------------------------------------------------
   STRUCTURE (top → bottom)
     1. GLOBAL       Variables, reset, scrollbar, body
     2. MOBILE       All .hero, .main layout, cards, modals, work
     3. BREAKPOINTS  @media (max-width: 700px) and (max-width: 380px)
     4. ANIMATIONS   Shared entrance + icon animations
     5. DESKTOP      All pc-* classes + @media (min-width: 701px)
   ================================================================ */


/* ================================================================
   SECTION 1 — GLOBAL
   Variables, reset, scrollbar, body — shared by mobile and desktop
   ================================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

img, svg {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

:root {
  --bg:        #0a0a0a;
  --bg2:       #0f0f0f;
  --bg3:       #141414;
  --gold:      #c9b48a;
  --gold-dim:  #b09070;
  --gold-muted:#4a3e2e;
  --red:       #8b1a1a;
  --red-light: #b02222;
  --white:     #e8ddd0;
  --muted:     #7a6a50;
  --border:    rgba(201,180,138,0.13);
  --border2:   rgba(201,180,138,0.06);
  --font-serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-sans:  'Montserrat', sans-serif;
}

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--gold);
  font-family: var(--font-serif);
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
}

/* Remove blue/default outlines — replace with premium gold glow */
*, *::before, *::after { outline-color: transparent; }
a, button, input, select, textarea, [tabindex] { outline: none; }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 1.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Native scrollbar hidden — custom one via JS ── */
html { scrollbar-width: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ── Custom scrollbar track — ultra-thin dark tint ── */
#scroll-track {
  position: fixed;
  right: 0; top: 0;
  width: 1px;
  height: 100%;
  z-index: 9998;
  pointer-events: none;
  background: rgba(201,180,138,0.06);
}

/* ── Position wrapper — only moves top/height via JS ── */
#scroll-thumb-pos {
  position: absolute;
  left: 0;
  width: 1px;
  top: 0;
}

/* ── Visual thumb — matches top bar golden line exactly ── */
#scroll-thumb {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom,
    transparent            0%,
    rgba(232,213,163,0.00) 5%,
    rgba(232,213,163,0.50) 30%,
    rgba(232,213,163,0.75) 50%,
    rgba(232,213,163,0.50) 70%,
    rgba(232,213,163,0.00) 95%,
    transparent            100%);
  transform-origin: center;
  transform: scaleY(0);
  transition:
    transform 0.80s cubic-bezier(0.22,1,0.36,1),
    box-shadow 0.80s ease;
  animation: sb-glow 2.8s ease-in-out infinite;
  box-shadow:
    0 0 4px  rgba(232,213,163,0.55),
    0 0 10px rgba(232,213,163,0.25);
}

/* Entrance: scale up from center like the top bar scaleX */
#scroll-thumb.visible {
  transform: scaleY(1);
  box-shadow:
    0 0 5px  rgba(232,213,163,0.70),
    0 0 14px rgba(232,213,163,0.40),
    0 0 28px rgba(201,180,138,0.20);
}

/* Hide scrollbar during wave animation */
html.wave-running #scroll-track { opacity: 0; }

@keyframes sb-glow {
  0%, 100% {
    box-shadow: 0 0 4px rgba(232,213,163,0.55), 0 0 10px rgba(232,213,163,0.25);
  }
  50% {
    box-shadow: 0 0 8px rgba(255,248,220,0.95), 0 0 18px rgba(232,213,163,0.65), 0 0 32px rgba(201,180,138,0.28);
  }
}

/* ── Hero parallax wrapper — pre-scaled so JS has no visible entry jump (desktop only) ── */
.hero__bg-img {
  will-change: transform;
  transform: translateY(0px) scale(1.08);
}

/* Mobile: static hero background — no parallax, no GPU hint wasted */
@media (max-width: 700px) {
  .hero__bg-img {
    will-change: auto;
    transform: none !important;
  }
}

/* sidebar hidden by default — shown via PC media query below */
.sidebar { display: none; }


/* ================================================================
   SECTION 2 — MOBILE LAYOUT
   Everything below is for the mobile UI (.main, .hero, cards, etc.)
   On desktop (≥701px) .main is hidden via display:none !important
   ================================================================ */

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; }

.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-img {
  width: 100%; height: 100%; object-fit: cover; object-position: 64% 0%;
  filter: none;
}
.hero__bg-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, transparent 0%, transparent 35%, rgba(10,10,10,0.55) 62%, rgba(10,10,10,0.96) 100%),
    linear-gradient(to right, rgba(10,10,10,0.10) 0%, transparent 40%);
}

/* top-bar not used on mobile — hidden */
.hero__top-bar { display: none; }

/* JP text — right hidden on mobile, left shown */
.hero__jp-right { display: none; }
.hero__jp-left { display: none; }

.hero__content {
  position: absolute; bottom: 80px; left: 36px; right: 20px; top: auto; z-index: 2;
}

/* Gothic bloody cross */
.hero__cross {
  width: 70px;
  height: auto;
  display: block;
  margin-bottom: 10px;
  margin-left: 0;
  object-fit: contain;
}

.hero__memory { font-family: var(--font-sans); font-size: 9px; letter-spacing: 0.2em; color: var(--gold); line-height: 1.8; margin-bottom: 10px; }
.hero__name {
  font-family: var(--font-serif); font-size: clamp(64px, 20vw, 100px);
  font-weight: 300; letter-spacing: 0.06em; color: #c9b48a;
  line-height: 0.88; margin-bottom: 7px;
}
.hero__roles-wrap { display: inline-block; margin-bottom: 13px; border-top: 1px solid rgba(201,180,138,0.18); border-bottom: 1px solid rgba(201,180,138,0.18); padding: 6px 0; }
.hero__roles { font-family: var(--font-sans); font-size: 8px; font-weight: 400; letter-spacing: 0.22em; color: var(--gold); margin-bottom: 0; }
.hero__intro { padding-left: 0; }
.hero__real-name { font-family: var(--font-sans); font-size: 10px; font-weight: 500; letter-spacing: 0.3em; color: var(--gold); margin-bottom: 4px; }
.hero__quote-line { font-family: var(--font-serif); font-size: 16px; font-style: italic; font-weight: 300; color: var(--gold); line-height: 1.4; }

/* KOA click glow + scale transition — no font-size/line-height changes so
   the h1 layout box is permanently static; only visual transform changes.       */
.hero__name {
  transition: text-shadow 0.28s ease, color 0.28s ease;
  transform-origin: left center;
}
.hero__name.koa-glow {
  color: #ede0bf;
  text-shadow:
    0 0 12px rgba(201,180,138,1),
    0 0 30px rgba(201,180,138,0.6),
    0 0 60px rgba(201,180,138,0.25);
}

/* Japanese settled state — letter-spacing only; font-size/line-height NEVER
   change so the h1 box height is identical in both KOA and Japanese states.
   Visual size is handled by JS transform:scale(0.80) which has zero layout
   impact → cross, memory text and roles can never shift.                        */
.hero__name.koa-jp {
  letter-spacing: 0.04em;
}

/* KOA cryptic scramble — multi-stage flicker with brightness spikes */
.hero__name.koa-scrambling {
  animation: koa-cryptic-flicker 0.10s linear infinite !important;
}
@keyframes koa-cryptic-flicker {
  0%   { opacity: 0.72; filter: brightness(0.88); }
  12%  { opacity: 1.00; filter: brightness(1.48); }
  25%  { opacity: 0.78; filter: brightness(0.97); }
  42%  { opacity: 0.96; filter: brightness(1.38); }
  58%  { opacity: 0.74; filter: brightness(0.91); }
  72%  { opacity: 0.98; filter: brightness(1.42); }
  85%  { opacity: 0.80; filter: brightness(1.00); }
  100% { opacity: 0.72; filter: brightness(0.88); }
}

/* Hero animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.hero__cross, .hero__memory, .hero__name, .hero__roles-wrap, .hero__intro { animation: fadeInUp 1s ease forwards; opacity: 1; }
.hero__cross      { animation-delay: 0.05s; }
.hero__memory     { animation-delay: 0.15s; }
.hero__name       { animation-delay: 0.25s; }
.hero__roles-wrap { animation-delay: 0.35s; }
.hero__intro      { animation-delay: 0.45s; }

/* ═══════════════════ SHARED LABELS ═══════════════════ */
.section-label { font-family: var(--font-sans); font-size: 8px; font-weight: 600; letter-spacing: 0.28em; color: var(--gold); text-transform: uppercase; }
.section-star { width: 11px; height: 11px; color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.section-star svg { width: 100%; height: 100%; }
.view-all { font-family: var(--font-sans); font-size: 8px; font-weight: 500; letter-spacing: 0.2em; color: var(--gold-dim); cursor: pointer; white-space: nowrap; text-decoration: none; transition: color 0.3s ease, letter-spacing 0.3s ease, filter 0.3s ease; }
.view-all:hover { color: var(--gold); letter-spacing: 0.26em; filter: drop-shadow(0 0 8px rgba(201,180,138,0.35)); }

/* ═══════════════════ MID SECTION ═══════════════════ */
.mid-section { background: var(--bg); padding: 20px 14px 12px; }
.mid-section__grid { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 12px; }

/* ABOUT CARD */
.about-card { background: var(--bg3); border: 1px solid var(--border); padding: 16px; grid-column: 1; grid-row: auto; border-radius: 10px; transition: border-color 0.4s ease, box-shadow 0.4s ease; }
.about-card:hover { border-color: rgba(201,180,138,0.28); box-shadow: 0 8px 32px rgba(0,0,0,0.45); }
.about-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.about-card__inner { display: flex; gap: 14px; align-items: flex-start; }
.about-card__portrait { width: 82px; height: 106px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); }
.about-card__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: grayscale(25%) brightness(0.68) sepia(15%); }
.about-card__text p { font-family: var(--font-serif); font-size: 11px; line-height: 1.75; color: var(--gold-dim); }
.about-card__text strong { color: var(--gold); font-weight: 600; }
.about-card__sub { margin-top: 7px; font-style: italic; font-size: 11px !important; color: var(--muted) !important; }
.about-card__sig { margin-top: 12px; }
.signature { width: 148px; height: 42px; opacity: 0.72; }

@keyframes sig-draw { to { stroke-dashoffset: 0; } }
@keyframes sig-dot-appear { to { opacity: 1; } }
.signature path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.signature .sig-s5 { opacity: 0; }
.signature.sig-play .sig-s1  { animation: sig-draw 0.40s cubic-bezier(.4,0,.2,1) forwards 0.00s; }
.signature.sig-play .sig-s2  { animation: sig-draw 0.15s ease            forwards 0.38s; }
.signature.sig-play .sig-s3  { animation: sig-draw 0.46s cubic-bezier(.4,0,.2,1) forwards 0.52s; }
.signature.sig-play .sig-s4  { animation: sig-draw 0.14s ease            forwards 0.97s; }
.signature.sig-play .sig-s5  { animation: sig-dot-appear 0.12s ease      forwards 1.09s; }
.signature.sig-play .sig-s6  { animation: sig-draw 0.20s ease            forwards 1.11s; }
.signature.sig-play .sig-s7  { animation: sig-draw 0.28s cubic-bezier(.4,0,.2,1) forwards 1.29s; }
.signature.sig-play .sig-s8  { animation: sig-draw 0.38s cubic-bezier(.4,0,.2,1) forwards 1.56s; }
.signature.sig-play .sig-s9  { animation: sig-draw 0.30s cubic-bezier(.4,0,.2,1) forwards 1.92s; }
.signature.sig-play .sig-s10 { animation: sig-draw 0.42s cubic-bezier(.25,1,.5,1) forwards 2.20s; }

/* SKILLS CARD */
.skills-card { background: var(--bg3); border: 1px solid var(--border); padding: 16px; grid-column: 1; grid-row: auto; border-radius: 10px; transition: border-color 0.4s ease, box-shadow 0.4s ease; }
.skills-card:hover { border-color: rgba(201,180,138,0.28); box-shadow: 0 8px 32px rgba(0,0,0,0.45); }
.skills-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.skills-list { display: flex; flex-direction: column; gap: 14px; }

/* Category block */
.skill-category { display: flex; flex-direction: column; gap: 9px; }
.skill-category__header { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.skill-cat-sparkle { width: 9px; height: 9px; flex-shrink: 0; color: var(--gold); display: flex; align-items: center; justify-content: center; }
.skill-cat-sparkle svg { width: 9px; height: 9px; }
.skill-cat-label { font-family: var(--font-sans); font-size: 7.5px; font-weight: 700; letter-spacing: 0.22em; color: var(--gold); text-transform: uppercase; white-space: nowrap; }
.skill-cat-line { flex: 1; height: 1px; background: linear-gradient(to right, rgba(201,180,138,0.3), transparent); }

/* Bar skill items */
.skill-item { display: block; width: 100%; }
.skill-item__header { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; width: 100%; }
.skill-icon { width: 15px; height: 15px; flex-shrink: 0; color: var(--gold-dim); display: flex; align-items: center; justify-content: center; }
.skill-icon svg { width: 14px; height: 14px; }
.skill-name { font-family: var(--font-sans); font-size: 8px; font-weight: 600; letter-spacing: 0.14em; color: var(--gold-dim); flex: 1; text-transform: uppercase; }
.skill-pct { font-family: var(--font-sans); font-size: 8px; color: var(--gold); font-weight: 700; flex-shrink: 0; }
.skill-bar { display: block; width: 100%; height: 3px; background: rgba(201,180,138,0.08); border-radius: 2px; overflow: visible; }
.skill-bar__fill { display: block; height: 100%; background: linear-gradient(to right, var(--gold-dim), var(--gold)); border-radius: 2px; width: 0%; will-change: width; box-shadow: 0 0 8px rgba(201,180,138,0.30); }
@keyframes grow-bar { from { width: 0% } to { width: var(--w) } }
.skills-card.animated .skill-bar__fill { animation: grow-bar 1.1s cubic-bezier(0.22,1,0.36,1) var(--d,0s) both; }

/* WHAT I DO */
.whatido-card { background: var(--bg3); border: 1px solid var(--border); padding: 18px 16px 14px; grid-column: 1; grid-row: auto; border-radius: 10px; transition: border-color 0.4s ease, box-shadow 0.4s ease; }
.whatido-card:hover { border-color: rgba(201,180,138,0.28); box-shadow: 0 8px 32px rgba(0,0,0,0.45); }
.whatido-card .section-label { margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); display: block; }
.whatido-list { display: flex; flex-direction: column; gap: 14px; }
.whatido-item { display: flex; gap: 10px; align-items: flex-start; }
.whatido-item__icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--gold-dim); margin-top: 1px; }
.whatido-item__icon svg { width: 15px; height: 15px; }
.whatido-item__title { font-family: var(--font-sans); font-size: 8px; font-weight: 600; letter-spacing: 0.15em; color: var(--gold); margin-bottom: 3px; }
.whatido-item__desc { font-family: var(--font-serif); font-size: 10.5px; line-height: 1.5; color: var(--gold-dim); }
.whatido-item__num { display: none; }
.whatido-dots { display: none; }

/* QUOTE CARD */
.quote-card { background: none; border: none; padding: 0; max-width: 340px; margin: 20px 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; }
.quote-card::before { content: ''; display: block; width: 55%; height: 1px; background: linear-gradient(to left, rgba(201,180,138,0.65), transparent); margin-top: 12px; margin-bottom: 18px; flex-shrink: 0; }
.quote-card__text { font-family: var(--font-serif); font-size: 14px; font-style: italic; line-height: 1.65; color: var(--gold); }
.quote-card__author { display: block; font-family: var(--font-sans); font-size: 8px; letter-spacing: 0.2em; color: var(--gold-dim); margin-top: 10px; }

/* IDENTITY CARD */
.identity-card { position: relative; border: 1px solid rgba(201,180,138,0.18); border-radius: 12px; display: flex; overflow: hidden; width: 100%; margin: clamp(14px, 4vw, 20px) 0 0; transition: border-color 0.4s ease, box-shadow 0.4s ease; -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); }
.identity-card__bg { position: absolute; inset: 0; background-image: url('images/quote-background.webp'); background-size: cover; background-position: center right; z-index: 0; }
.identity-card::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.55); z-index: 1; }
.identity-card:hover { border-color: rgba(201,180,138,0.38); box-shadow: 0 8px 32px rgba(0,0,0,0.55); }
.identity-card__silhouette { display: none; }
.identity-card__text { position: relative; z-index: 2; flex: 1; padding: clamp(18px, 5.5vw, 28px) clamp(14px, 5vw, 24px); display: flex; flex-direction: column; justify-content: center; }
.identity-card__text p { font-family: var(--font-serif); font-size: clamp(13px, 3.8vw, 17px); font-style: italic; font-weight: 300; letter-spacing: 0.04em; color: var(--gold); line-height: 1.6; }
.identity-card__sig { font-family: var(--font-sans); font-size: clamp(7px, 1.8vw, 9px); letter-spacing: 0.2em; color: var(--gold-dim); margin-top: clamp(10px, 3vw, 16px); display: block; }

/* ═══════════════════ WORK SECTION ═══════════════════ */
/* ── SELECTED WORK — fullscreen vertical-snap slides ── */
.work-section { background: var(--bg); padding: 0 12px 40px; }

/* Wrapper holds scroll container + static overlays */
.work-slides-wrap {
  position: relative;
}

/* Static header — sits above slides, never scrolls */
.work-static-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 20px 22px;
  z-index: 10;
  pointer-events: none;
  border-radius: 12px 12px 0 0;
}
.work-static-header > * { pointer-events: all; }
.work-slide__label {
  font-family: var(--font-sans);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-transform: uppercase;
}

/* Static sidenav — right edge, never scrolls */
.work-static-sidenav {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
  z-index: 10;
  pointer-events: none;
}

/* VIEW ALL — match SELECTED WORK label */
.work-slide__viewall {
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 0.28em;
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.25s ease;
  pointer-events: all;
}
.work-slide__viewall:hover { opacity: 1; }

.work-slides {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(201,180,138,0.18);
  height: 62vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
.work-slides::-webkit-scrollbar { display: none; }

/* Each slide */
.work-slide {
  position: relative;
  height: 62vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  flex-shrink: 0;
}

/* Skeleton loading state */
.work-slide--skeleton {
  background: linear-gradient(160deg, #18160f 0%, #1f1c14 60%, #17150e 100%);
}
.work-slide__sk-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(201,180,138,0.04) 0%,
    rgba(201,180,138,0.0) 40%,
    rgba(201,180,138,0.05) 100%
  );
  overflow: hidden;
}
.work-slide__sk-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(201,180,138,0.07) 35%,
    rgba(201,180,138,0.13) 50%,
    rgba(201,180,138,0.07) 65%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: rpm-shimmer 2.2s ease-in-out infinite;
}
.work-slide__sk-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 22px 22px;
  z-index: 2;
}
.work-slide__sk-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  padding: 20px 0 16px;
}
.work-slide__sk-idx {
  width: 22px; height: 7px;
  border-radius: 3px;
  background: rgba(201,180,138,0.12);
  margin-bottom: 12px;
  animation: sk-pulse 2s ease-in-out infinite;
}
.work-slide__sk-sep {
  width: 26px; height: 1px;
  background: rgba(201,180,138,0.15);
  margin-bottom: 16px;
}
.work-slide__sk-name {
  height: 38px;
  width: 68%;
  border-radius: 4px;
  background: rgba(201,180,138,0.11);
  margin-bottom: 6px;
  animation: sk-pulse 2s ease-in-out infinite 0.15s;
}
.work-slide__sk-name--short {
  width: 42%;
  height: 38px;
  animation-delay: 0.25s;
}
.work-slide__sk-desc {
  height: 7px; width: 38%;
  border-radius: 3px;
  background: rgba(201,180,138,0.08);
  margin-bottom: 12px;
  margin-top: 4px;
  animation: sk-pulse 2s ease-in-out infinite 0.35s;
}
.work-slide__sk-tagline {
  height: 6px; width: 54%;
  border-radius: 3px;
  background: rgba(201,180,138,0.06);
  animation: sk-pulse 2s ease-in-out infinite 0.45s;
}
.work-slide__sk-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(201,180,138,0.08);
  padding-top: 15px;
}
.work-slide__sk-tags {
  height: 7px; width: 100px;
  border-radius: 3px;
  background: rgba(201,180,138,0.08);
  animation: sk-pulse 2s ease-in-out infinite 0.55s;
}
.work-slide__sk-btn {
  width: 110px; height: 36px;
  border-radius: 20px;
  background: rgba(201,180,138,0.07);
  animation: sk-pulse 2s ease-in-out infinite 0.65s;
}
@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

/* Profile card (0 repos fallback) */
.work-profile__content {
  justify-content: space-between;
}
.work-profile__top {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding-top: 8px;
}
.work-profile__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.work-profile__avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(201,180,138,0.4);
  display: block;
  filter: grayscale(0.2);
  box-shadow: 0 0 0 3px rgba(201,180,138,0.08);
}
.work-profile__hireable-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #0d0c09;
  box-shadow: 0 0 6px rgba(74,222,128,0.6);
}
.work-profile__identity { flex: 1; min-width: 0; }
.work-profile__hireable-badge {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 6px;
  letter-spacing: 0.2em;
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.35);
  border-radius: 20px;
  padding: 2px 7px;
  text-transform: uppercase;
}
.work-profile__bio {
  font-family: var(--font-serif);
  font-size: 11.5px;
  font-style: italic;
  color: rgba(201,180,138,0.6);
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin: 0;
}
.work-profile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 8px 0;
  border-top: 1px solid rgba(201,180,138,0.1);
  border-bottom: 1px solid rgba(201,180,138,0.1);
}
.work-profile__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: rgba(201,180,138,0.55);
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.work-profile__meta-link {
  color: rgba(201,180,138,0.7);
  transition: color 0.2s ease;
}
.work-profile__meta-link:hover { color: var(--gold); }
.work-profile__meta-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.7;
  color: var(--gold);
}
.work-profile__stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
}
.work-profile__stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.work-profile__stat-sep {
  width: 1px;
  height: 28px;
  background: rgba(201,180,138,0.15);
  flex-shrink: 0;
  margin: 0 2px;
}
.work-profile__stat-val {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1;
}
.work-profile__stat-lbl {
  font-family: var(--font-sans);
  font-size: 6.5px;
  letter-spacing: 0.16em;
  color: rgba(201,180,138,0.45);
  text-transform: uppercase;
}

/* Background image — minimal filter, image visible */
.work-slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.72) saturate(0.55) sepia(0.15);
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
  z-index: 0;
}

/* Bottom-heavy gradient for text readability */
.work-slide__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.38) 0%,
    rgba(0,0,0,0.0) 28%,
    rgba(0,0,0,0.0) 42%,
    rgba(5,4,3,0.65) 68%,
    rgba(5,4,3,0.94) 100%
  );
}

/* Content layer */
.work-slide__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 22px 22px;
}

/* Top header row (kept for any legacy use) */
.work-slide__header { display: flex; justify-content: space-between; align-items: center; }

/* Middle body: info only (sidenav is absolutely positioned) */
.work-slide__body {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  flex: 1;
  padding: 20px 0 16px;
  padding-right: 44px;
}
.work-slide__info { flex: 1; min-width: 0; }
.work-slide__idx {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(201,180,138,0.5);
  margin-bottom: 7px;
}
.work-slide__separator {
  width: 26px;
  height: 1px;
  background: rgba(201,180,138,0.38);
  margin-bottom: 14px;
}
.work-slide__name {
  font-family: var(--font-serif);
  font-size: clamp(28px, 9vw, 46px);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold);
  line-height: 1.0;
  text-transform: uppercase;
  margin-bottom: 8px;
  word-break: break-word;
}
.work-slide__desc {
  font-family: var(--font-sans);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: rgba(201,180,138,0.6);
  text-transform: uppercase;
  margin-bottom: 9px;
}
.work-slide__tagline {
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  color: rgba(201,180,138,0.55);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* Right side vertical navigation — premium dot + number */
.work-slide__sidenav {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
  z-index: 3;
}
.work-slide__sidenav-item {
  display: flex;
  align-items: center;
  gap: 7px;
}
.work-slide__sidenav-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(201,180,138,0.2);
  flex-shrink: 0;
  transition: background 0.42s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.42s cubic-bezier(0.22,1,0.36,1),
              transform 0.42s cubic-bezier(0.34,1.56,0.64,1);
}
.work-slide__sidenav-num {
  font-family: var(--font-sans);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: rgba(201,180,138,0.22);
  line-height: 1;
  transition: color 0.42s ease,
              font-weight 0.3s ease,
              letter-spacing 0.35s ease;
}
.work-slide__sidenav-item.active .work-slide__sidenav-dot {
  background: var(--gold);
  transform: scale(1.7);
  box-shadow:
    0 0 4px rgba(201,180,138,1),
    0 0 10px rgba(201,180,138,0.8),
    0 0 22px rgba(201,180,138,0.45),
    0 0 40px rgba(201,180,138,0.2);
}
.work-slide__sidenav-item.active .work-slide__sidenav-num {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.16em;
}

/* Footer row */
.work-slide__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(201,180,138,0.13);
  padding-top: 15px;
}
.work-slide__tags {
  font-family: var(--font-sans);
  font-size: 7.5px;
  letter-spacing: 0.18em;
  color: rgba(201,180,138,0.5);
  text-transform: uppercase;
}
.work-slide__viewbtn {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 7.5px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  flex-shrink: 0;
}
.work-slide__viewbtn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.work-slide__arrow-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(201,180,138,0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: background 0.28s ease, border-color 0.28s ease, transform 0.28s ease;
  flex-shrink: 0;
  margin-right: 4px;
}
.work-slide__viewbtn:hover .work-slide__arrow-circle {
  background: rgba(201,180,138,0.12);
  border-color: var(--gold);
  transform: translateX(2px);
}

/* ── Slide content entrance animation ── */
@keyframes workSlideIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(7px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0);   }
}
.work-anim-in {
  animation: workSlideIn 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.work-slide__footer.work-anim-in { animation-delay: 0.1s; }

.work-error { font-family: var(--font-sans); font-size: 9px; letter-spacing: 0.15em; color: var(--muted); text-align: center; padding: 30px 0; }

/* ── Language bar & Contribution graph — inside modal ── */
.rpm-section-eyebrow {
  font-family: var(--font-sans); font-size: 7.5px; letter-spacing: 0.26em;
  text-transform: uppercase; font-weight: 600; color: var(--gold);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.rpm-section-eyebrow svg { opacity: 0.7; flex-shrink: 0; }

/* Placeholder for removed overlay block start — kept for modal styles below */
.rpm-lang-section { margin: 20px 0 0; }
.rpm-lang-bar-track {
  display: flex; height: 7px; border-radius: 6px; overflow: hidden; gap: 2px;
  background: rgba(201,180,138,0.06);
}
.rpm-lang-bar-seg {
  height: 100%; border-radius: 3px; min-width: 3px;
  transition: opacity 0.2s ease; cursor: default;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px 16px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.0) 0%,
    rgba(0,0,0,0.0) 45%,
    rgba(5,4,3,0.72) 75%,
    rgba(5,4,3,0.92) 100%
  );
}
.repo-card__index {
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: rgba(201,180,138,0.45);
  align-self: flex-start;
}
.repo-card__caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.repo-card__name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--gold);
  line-height: 1.25;
}
.repo-card__lang {
  font-family: var(--font-sans);
  font-size: 7.5px;
  letter-spacing: 0.2em;
  color: rgba(201,180,138,0.5);
  text-transform: uppercase;
}

.work-error { font-family: var(--font-sans); font-size: 9px; letter-spacing: 0.15em; color: var(--muted); text-align: center; padding: 30px 0; }

/* ── Language bar & Contribution graph — inside modal ── */
.rpm-section-eyebrow {
  font-family: var(--font-sans); font-size: 7.5px; letter-spacing: 0.26em;
  text-transform: uppercase; font-weight: 600; color: var(--gold);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.rpm-section-eyebrow svg { opacity: 0.7; flex-shrink: 0; }

.rpm-lang-section { margin: 20px 0 0; }
.rpm-lang-bar-track {
  display: flex; height: 7px; border-radius: 6px; overflow: hidden; gap: 2px;
  background: rgba(201,180,138,0.06);
}
.rpm-lang-bar-seg {
  height: 100%; border-radius: 3px; min-width: 3px;
  transition: opacity 0.2s ease; cursor: default;
}
.rpm-lang-bar-seg:hover { opacity: 0.7; }
.rpm-lang-bar-shimmer {
  display: block; width: 100%; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, rgba(201,180,138,0.06) 25%, rgba(201,180,138,0.14) 50%, rgba(201,180,138,0.06) 75%);
  background-size: 200% 100%; animation: rpm-shimmer 1.4s infinite;
}
@keyframes rpm-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.rpm-lang-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.rpm-lang-item {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-sans); font-size: 9px; letter-spacing: 0.06em; color: var(--text);
}
.rpm-lang-item .rpm-lang-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rpm-lang-item em { color: var(--gold-dim); font-style: normal; margin-left: 2px; }
.rpm-lang-legend-shimmer {
  display: block; width: 160px; height: 10px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(201,180,138,0.06) 25%, rgba(201,180,138,0.12) 50%, rgba(201,180,138,0.06) 75%);
  background-size: 200% 100%; animation: rpm-shimmer 1.4s infinite;
}

.rpm-contrib-section { margin: 22px 0 0; }
.rpm-contrib-grid { width: 100%; }
.rpm-contrib-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.rpm-contrib-total {
  font-family: var(--font-sans); font-size: 9px; letter-spacing: 0.08em; color: var(--text);
}
.rpm-contrib-total em { color: var(--muted); font-style: normal; }
.rpm-contrib-peak {
  font-family: var(--font-sans); font-size: 9px; letter-spacing: 0.06em; color: var(--muted);
}
.rpm-contrib-peak strong { color: var(--gold-dim); font-weight: 600; }
.rpm-contrib-chart-wrap { width: 100%; overflow: hidden; border-radius: 4px; }
.rpm-contrib-svg {
  display: block; width: 100%; height: auto;
  overflow: visible;
}
.rpm-contrib-shimmer {
  display: block; width: 100%; height: 84px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(201,180,138,0.04) 25%, rgba(201,180,138,0.10) 50%, rgba(201,180,138,0.04) 75%);
  background-size: 200% 100%; animation: rpm-shimmer 1.4s infinite;
}
.rpm-contrib-empty {
  font-family: var(--font-sans); font-size: 9px; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; padding: 16px 0;
}
.rpm-no-data {
  display: block; font-family: var(--font-sans); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(201,180,138,0.25); padding: 10px 0;
}

/* ── Topics & Homepage ── */
.rpm-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.rpm-topic {
  font-family: var(--font-sans); font-size: 8.5px; letter-spacing: 0.10em;
  color: var(--gold-dim); background: rgba(201,180,138,0.08);
  border: 1px solid rgba(201,180,138,0.16); border-radius: 20px;
  padding: 3px 9px; text-transform: lowercase;
  transition: background 0.2s, color 0.2s;
}
.rpm-topic:hover { background: rgba(201,180,138,0.15); color: var(--gold); }
.rpm-homepage {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  font-family: var(--font-sans); font-size: 9px; letter-spacing: 0.08em;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
.rpm-homepage:hover { color: var(--gold-dim); }

/* ═══════════════════ REPO MODAL ═══════════════════ */
.rpm-overlay {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; visibility: hidden;
}
.rpm-overlay.open { pointer-events: all; visibility: visible; }

.rpm-backdrop {
  position: absolute; inset: 0;
  background: rgba(4,3,2,0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0; transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1); cursor: pointer;
}
.rpm-overlay.open .rpm-backdrop { opacity: 1; }

/* ── Panel: mobile bottom sheet ── */
.rpm-wrap {
  position: absolute; top: auto; right: 0; left: 0; bottom: 0;
  width: 100%; height: 87vh;
  background: #0a0a0a;
  border-left: none;
  border-top: 1px solid rgba(201,180,138,0.22);
  border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.65);
  transform: translateY(100%) translateZ(0);
  transition: transform 0.55s cubic-bezier(0.16,1,0.3,1);
  will-change: transform; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.rpm-overlay.open .rpm-wrap { transform: translateY(0); }

/* ── Mobile handle pill ── */
.rpm-handle { display: flex; justify-content: center; align-items: center; padding: 10px 0 4px; flex-shrink: 0; background: #0a0a0a; touch-action: none; }

/* ── Close button ── */
.rpm-close {
  position: absolute; top: 12px; right: 18px; z-index: 20;
  width: 34px; height: 34px;
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; padding: 0; border-radius: 50%;
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1);
}

/* ── Sticky header bar ── */
.rpm-header {
  display: flex; align-items: center;
  padding: 14px 64px 14px 20px; border-bottom: 1px solid rgba(201,180,138,0.13);
  background: var(--bg3); flex-shrink: 0;
}
.rpm-header__eyebrow {
  font-family: var(--font-sans); font-size: 7.5px; letter-spacing: 0.28em;
  text-transform: uppercase; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.rpm-header__eyebrow svg { width: 10px; height: 10px; flex-shrink: 0; color: var(--white); }
.rpm-gh-word   { color: var(--white); }
.rpm-repo-word { color: var(--gold); }
.rpm-close::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color 0.32s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1);
  transform: scale(0.55); pointer-events: none;
}
.rpm-close:hover { transform: rotate(90deg); }
.rpm-close:hover::before { border-color: var(--gold); transform: scale(1); }
.rpm-close__bar {
  display: block; width: 18px; height: 1.5px;
  background: var(--gold-dim); border-radius: 1px;
  transform-origin: center center; transition: background 0.32s ease;
}
.rpm-close__bar--a { transform: translateY(0.75px) rotate(45deg); }
.rpm-close__bar--b { transform: translateY(-0.75px) rotate(-45deg); }
.rpm-close:hover .rpm-close__bar { background: var(--gold); }

/* ── Scrollable content ── */
.rpm-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
}
.rpm-content::-webkit-scrollbar { display: none; }

/* ── Hero image — full-bleed, bottom-gradient into body ── */
.rpm-img-wrap {
  width: 100%; aspect-ratio: 16/9; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #13110d 0%, #0c0b09 55%, #080706 100%);
  flex-shrink: 0;
}
.rpm-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: brightness(0.5) saturate(0.28) sepia(0.12);
  transform: scale(1.06);
  transition: transform 1.4s cubic-bezier(0.16,1,0.3,1), filter 0.7s ease;
}
.rpm-overlay.open .rpm-img { transform: scale(1.0); filter: brightness(0.55) saturate(0.3) sepia(0.1); }
.rpm-img-wrap::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(20,17,13,0.15) 0%, transparent 25%, transparent 55%, rgba(20,17,13,0.96) 100%);
}

/* ── Gold divider — synced with SKM: 0.25s delay, scaleX from center ── */
.rpm-divider {
  width: 100%; height: 1px; flex-shrink: 0;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(232,213,163,0.0)  5%,
    rgba(232,213,163,0.55) 30%,
    rgba(232,213,163,0.80) 50%,
    rgba(232,213,163,0.55) 70%,
    rgba(232,213,163,0.0)  95%,
    transparent 100%);
  transform: scaleX(0); transform-origin: center; opacity: 0;
  transition: transform 0.80s cubic-bezier(0.22,1,0.36,1) 0.25s,
              opacity   0.35s ease 0.18s;
}
.rpm-overlay.open .rpm-divider { transform: scaleX(1); opacity: 1; }

/* ── Body ── */
.rpm-body {
  padding: 20px 26px 44px; display: flex; flex-direction: column; gap: 18px;
  background: var(--bg3);
}

.rpm-title {
  font-family: var(--font-sans); font-size: 17px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--gold); line-height: 1.2; word-break: break-word;
}
.rpm-desc {
  font-family: var(--font-serif); font-size: 13.5px; color: var(--gold-dim);
  font-style: italic; line-height: 1.68;
}
.rpm-desc-empty {
  font-style: normal; color: var(--muted); font-family: var(--font-sans);
  font-size: 9px; letter-spacing: 0.12em;
}

/* ── Stats grid ── */
.rpm-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.rpm-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 14px 6px; background: var(--bg2);
  border-right: 1px solid var(--border);
  transition: background 0.25s ease;
}
.rpm-stat:last-child { border-right: none; }
.rpm-stat:hover { background: #111; }
.rpm-stat__icon { color: var(--gold-dim); display: flex; align-items: center; justify-content: center; }
.rpm-stat__icon svg { width: 14px; height: 14px; }
.rpm-stat__val {
  font-family: var(--font-sans); font-size: 15px; font-weight: 700;
  color: var(--gold); letter-spacing: 0.04em; line-height: 1;
}
.rpm-stat__label {
  font-family: var(--font-sans); font-size: 6.5px; font-weight: 600;
  letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase;
}

/* ── Meta rows ── */
.rpm-meta {
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--border2); padding-top: 16px;
}
.rpm-meta-row { display: flex; align-items: center; gap: 11px; }
.rpm-meta-icon { color: var(--muted); flex-shrink: 0; }
.rpm-meta-icon svg { width: 13px; height: 13px; display: block; }
.rpm-meta-label {
  font-family: var(--font-sans); font-size: 7.5px; letter-spacing: 0.15em;
  color: var(--muted); text-transform: uppercase; min-width: 66px;
}
.rpm-meta-val {
  font-family: var(--font-sans); font-size: 9px; font-weight: 500;
  letter-spacing: 0.08em; color: var(--gold-dim);
}
.rpm-lang-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 5px; flex-shrink: 0; vertical-align: middle;
}

/* ── CTA button ── */
.rpm-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-size: 9px; font-weight: 700;
  letter-spacing: 0.25em; color: var(--bg); text-decoration: none; text-transform: uppercase;
  background: var(--gold); padding: 15px 24px; border-radius: 4px;
  transition: background 0.3s, transform 0.32s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
  margin-top: 6px;
  box-shadow: 0 0 0 0 rgba(201,180,138,0);
}
.rpm-cta:hover {
  background: var(--white); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 24px rgba(201,180,138,0.22);
}
.rpm-cta:active { transform: translateY(0) scale(0.97); }
.rpm-cta svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ─── Repo Modal (RPM) — mobile bottom-sheet only ──────────────── */
/* ── Handle pill styles ── */
.rpm-handle__pill {
  width: 36px; height: 4px; background: rgba(201,180,138,0.28);
  border-radius: 2px; transition: background 0.25s ease, width 0.25s cubic-bezier(0.22,1,0.36,1);
}
.rpm-handle:active .rpm-handle__pill { background: rgba(201,180,138,0.55); width: 50px; }

/* ── Mobile-specific panel overrides ── */
@media (max-width: 700px) {
  .rpm-header { background: #0a0a0a; padding: 12px 56px 12px 18px; }
  .rpm-body { background: #0a0a0a; padding: 18px 18px 52px; gap: 14px; }
  .rpm-stat { padding: 12px 4px; }
  .rpm-stat__val { font-size: 13px; }
}

.work-card__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: brightness(0.42) saturate(0.35) sepia(0.15);
  z-index: 0;
}
.work-card__cross {
  position: absolute; top: 12px; left: 12px;
  width: 14px; height: 24px;
  color: var(--red); opacity: 0.90;
  z-index: 1;
  filter:
    drop-shadow(0 0 2px rgba(140,0,0,0.85))
    drop-shadow(0 0 6px rgba(100,0,0,0.50));
}
.work-card__cross svg { width: 100%; height: 100%; }
.work-card__title { font-family: var(--font-sans); font-size: 9px; font-weight: 600; letter-spacing: 0.2em; color: var(--gold); text-align: center; margin-bottom: 3px; }
.work-card__type { font-family: var(--font-serif); font-size: 10px; color: var(--gold-dim); text-align: center; font-style: italic; }

/* ═══════════════════ MOBILE CONTACT SECTION ═══════════════════ */
.mob-contact { display: none; }

/* ═══════════════════ FOOTER ═══════════════════ */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 20px 20px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer__tagline { font-family: var(--font-serif); font-size: 10.5px; font-style: italic; color: var(--gold-dim); letter-spacing: 0.05em; }
.footer__name { font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: 0.4em; color: var(--gold); }
.footer__barcode { width: 120px; height: 28px; margin-top: 8px; }
.footer__copy { font-family: var(--font-sans); font-size: 9px; color: rgba(176,144,112,0.35); letter-spacing: 0.03em; margin-top: 6px; line-height: 1.6; }
.barcode-lines { width: 100%; height: 100%; background-image: repeating-linear-gradient(to right, var(--gold-muted) 0px, var(--gold-muted) 1px, transparent 1px, transparent 3px, var(--gold-muted) 3px, var(--gold-muted) 4px, transparent 4px, transparent 6px, var(--gold-muted) 6px, var(--gold-muted) 8px, transparent 8px, transparent 9px, var(--gold-muted) 9px, var(--gold-muted) 10px, transparent 10px, transparent 12px, var(--gold-muted) 12px, var(--gold-muted) 14px, transparent 14px, transparent 15px); opacity: 0.45; }

/* ═══════════════════ MOBILE HEADER ═══════════════════ */
.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  background: transparent;
  border-bottom: none;
  z-index: 300;
  padding: 14px 20px;
  align-items: center; justify-content: space-between;
  height: 52px;
}
.mobile-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.86);
  backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
  z-index: -1;
}
.mobile-header.scrolled::before {
  opacity: 1;
}
.mobile-header::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(232,213,163,0.0) 5%,
    rgba(232,213,163,0.5) 30%,
    rgba(232,213,163,0.75) 50%,
    rgba(232,213,163,0.5) 70%,
    rgba(232,213,163,0.0) 95%,
    transparent 100%);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition:
    transform 0.8s cubic-bezier(0.22,1,0.36,1) 0.15s,
    opacity 0.4s ease 0.1s;
  pointer-events: none;
}
.mobile-header.scrolled::after {
  transform: scaleX(1);
  opacity: 1;
}
.mobile-header__logo { display: flex; align-items: center; gap: 8px; }
.mobile-header__star { width: 17px; height: 17px; color: #e8d5a3; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mobile-header__star svg { width: 100%; height: 100%; }
.mobile-header__name { font-family: var(--font-sans); font-size: 12px; font-weight: 600; letter-spacing: 0.3em; color: #e8d5a3; }
.mobile-header__menu {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; padding: 4px;
  -webkit-tap-highlight-color: transparent;
}
.mobile-header__menu span { display: block; width: 22px; height: 1.5px; background: linear-gradient(to right, #e8d5a3, #7a5820); transition: all 0.3s ease; transform-origin: center; }
.mobile-header__menu.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-header__menu.open span:nth-child(2) { opacity: 0; }
.mobile-header__menu.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════════ MOBILE MENU OVERLAY ═══════════════════ */
.mobile-menu-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,10,10,0.97); z-index: 250;
  justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: all; }
.mobile-menu-nav { display: flex; flex-direction: column; gap: 28px; align-items: center; }
.mobile-menu-item {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  letter-spacing: 0.35em; color: var(--gold-dim); text-decoration: none;
  transition: color 0.3s; display: flex; align-items: center; gap: 10px;
}
.mobile-menu-item:hover { color: var(--gold); }
.mmn-num { font-size: 10px; color: var(--gold-muted); }

/* ═══════════════════ MOBILE BOTTOM NAV ═══════════════════ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,10,10,0.97);
  border-top: 1px solid rgba(201,180,138,0.20);
  border-left: 1px solid rgba(201,180,138,0.13);
  border-right: 1px solid rgba(201,180,138,0.13);
  border-radius: 26px 26px 0 0;
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 -4px 28px rgba(0,0,0,0.65);
  z-index: 200;
  overflow: visible;
  padding: 0 20px;
  align-items: center; justify-content: space-evenly;
  height: 58px;
}
.mobile-nav__item {
  display: flex; flex-direction: row; align-items: center; gap: 5px;
  text-decoration: none; color: var(--gold-muted);
  transition: color 0.35s cubic-bezier(0.22,1,0.36,1), transform 0.35s cubic-bezier(0.22,1,0.36,1);
  padding: 0 2px;
  -webkit-tap-highlight-color: transparent;
  flex: 1; justify-content: center;
}
.mobile-nav__item.active {
  color: var(--gold);
  transform: translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(201,180,138,0.55));
}
.mobile-nav__item svg { width: 14px; height: 14px; display: block; flex-shrink: 0; }
.mobile-nav__item span { font-family: var(--font-sans); font-size: 8.5px; font-weight: 500; letter-spacing: 0.14em; }
/* Circle — inside nav, lifted above bar with relative positioning */
.mobile-nav__center {
  background:
    radial-gradient(ellipse at 45% 35%, rgba(201,180,138,0.13) 0%, transparent 65%),
    linear-gradient(145deg, #1a1a1a 0%, #111111 50%, #0a0a0a 100%);
  border: 1.5px solid rgba(201,180,138,0.55);
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; flex-shrink: 0;
  position: relative; top: -18px;
  transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1);
  box-shadow:
    0 0 18px rgba(201,180,138,0.22),
    0 0 5px rgba(201,180,138,0.10),
    inset 0 1px 0 rgba(232,213,163,0.08);
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav__center-star { width: 13px; height: 13px; color: var(--gold); flex-shrink: 0; display: block; animation: star-twinkle 2.8s ease-in-out infinite; }
@keyframes star-twinkle {
  0%, 100% { opacity: 1;    transform: scale(1)    rotate(0deg);   }
  40%       { opacity: 0.55; transform: scale(0.80) rotate(18deg);  }
  70%       { opacity: 1;    transform: scale(1.15) rotate(-8deg);  }
}
.mobile-nav__center-text {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--gold);
  line-height: 1;
}
.mobile-nav__center-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mobile-nav__center-sparkles span {
  position: absolute;
  width: 4px; height: 4px;
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
}
.mobile-nav__center-sparkles span:nth-child(1) { top: 6px;  right: 8px;  animation: sparkle-pop 3.2s 0.0s ease-in-out infinite; }
.mobile-nav__center-sparkles span:nth-child(2) { bottom: 9px; left: 7px;  animation: sparkle-pop 3.2s 1.1s ease-in-out infinite; }
.mobile-nav__center-sparkles span:nth-child(3) { top: 14px; left: 5px;   animation: sparkle-pop 3.2s 2.0s ease-in-out infinite; }
@keyframes sparkle-pop {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg);   }
  20%       { opacity: 0; transform: scale(0.4) rotate(0deg);   }
  40%       { opacity: 1; transform: scale(1.2) rotate(20deg);  }
  60%       { opacity: 1; transform: scale(1.0) rotate(-10deg); }
  80%       { opacity: 0; transform: scale(0.4) rotate(15deg);  }
}

/* ── iOS fluid wave canvas — sits BELOW the nav bar ── */
#koa-wave-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 190;       /* below mobile-nav (200) so circle stays on top */
  pointer-events: none;
  opacity: 0;
  /* No CSS transition — opacity is controlled directly in JS for mobile reliability */
  will-change: opacity;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Mobile nav must stay above canvas during wave */
.mobile-nav { z-index: 201; }

/* Circle press feedback — iOS NameDrop stretch-pull */
.mobile-nav__center.bursting {
  animation: center-press 0.65s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes center-press {
  0%   { transform: scale(1)         scaleY(1);    }
  10%  { transform: scale(0.87)      scaleY(0.88); }
  28%  { transform: scaleX(0.80)     scaleY(1.44); }
  46%  { transform: scaleX(1.18)     scaleY(0.83); }
  62%  { transform: scaleX(0.95)     scaleY(1.09); }
  78%  { transform: scaleX(1.03)     scaleY(0.97); }
  100% { transform: scale(1); }
}

/* Glow is driven entirely by the rAF loop via inline box-shadow/border —
   no CSS animation class needed. This guarantees it fires on every tap. */

@keyframes cardFadeIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }


/* ================================================================
   SECTION 3 — BREAKPOINTS
   Mobile overrides: values that differ from the mobile base above
   ================================================================ */

@media (max-width: 700px) {

  /* ── Show/hide layout elements ── */
  .mobile-header { display: flex; }
  .mobile-menu-overlay { display: flex; }
  .mobile-nav { display: flex; }
  .main { margin-left: 0; padding-bottom: 58px; }

  /* ── MOBILE CONTACT SECTION ── */
  .mob-contact { display: block; background: var(--bg); }

  .mob-contact__hero {
    position: relative;
    height: 280px;
    overflow: hidden;
  }
  .mob-contact__bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: 70% top;
  }
  .mob-contact__hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(10,10,10,1.0)  0%,
      rgba(10,10,10,0.92) 6%,
      rgba(10,10,10,0.75) 13%,
      rgba(10,10,10,0.48) 22%,
      rgba(10,10,10,0.22) 32%,
      rgba(10,10,10,0.05) 42%,
      rgba(10,10,10,0.0)  50%,
      rgba(10,10,10,0.08) 58%,
      rgba(10,10,10,0.28) 68%,
      rgba(10,10,10,0.60) 78%,
      rgba(10,10,10,0.88) 90%,
      rgba(10,10,10,1.0)  100%
    );
  }
  .mob-contact__hero-content {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 0 20px 22px;
  }

  /* Contact hero — hero-style fadeInUp (no blur), triggered by JS adding .contact-hero-animate */
  .mob-contact__eyebrow,
  .mob-contact__title,
  .mob-contact__rule,
  .mob-contact__desc {
    opacity: 0;
  }
  .mob-contact__hero-content.contact-hero-animate .mob-contact__eyebrow {
    animation: fadeInUp 1s ease forwards 0.05s;
  }
  .mob-contact__hero-content.contact-hero-animate .mob-contact__title {
    animation: fadeInUp 1s ease forwards 0.20s;
  }
  .mob-contact__hero-content.contact-hero-animate .mob-contact__rule {
    animation: fadeInUp 1s ease forwards 0.35s;
  }
  .mob-contact__hero-content.contact-hero-animate .mob-contact__desc {
    animation: fadeInUp 1s ease forwards 0.45s;
  }
  .mob-contact__eyebrow {
    display: flex; flex-direction: column; gap: 2px;
    margin-bottom: 6px;
  }
  .mob-contact__eyebrow-r1 {
    display: flex; align-items: center; gap: 6px;
  }
  .mob-contact__eyebrow-r1 span {
    font-family: var(--font-sans); font-size: 9px; font-weight: 400;
    letter-spacing: 0.2em; color: var(--gold); line-height: 1.8;
  }
  .mob-contact__eyebrow-r2 {
    padding-left: 0;
    font-family: var(--font-sans); font-size: 9px; font-weight: 400;
    letter-spacing: 0.2em; color: var(--gold); line-height: 1.8;
  }
  .mob-contact__title {
    font-family: var(--font-serif); font-size: 34px; font-weight: 300;
    letter-spacing: 0.06em; color: #c9b48a; line-height: 1;
    margin-top: 14px; margin-bottom: 10px;
  }
  .mob-contact__rule {
    width: 55%; height: 1px;
    background: linear-gradient(to right, var(--gold), transparent);
    margin-bottom: 12px;
  }
  .mob-contact__desc {
    font-family: var(--font-sans); font-size: 8px; font-weight: 400;
    letter-spacing: 0.22em; color: var(--gold); line-height: 1.85;
    max-width: 230px;
  }

  .mob-contact__body {
    padding: 18px 14px 28px;
    display: flex; flex-direction: column; gap: 12px;
  }

  .mob-contact__card {
    background: #111111;
    border: 1px solid rgba(201,180,138,0.16);
    border-radius: 10px;
  }

  /* Form card */
  .mob-contact__form-card {
    padding: 18px 16px 14px;
    display: flex; flex-direction: column; gap: 13px;
  }
  .mob-contact__field { display: flex; flex-direction: column; gap: 6px; }
  .mob-contact__label {
    font-family: var(--font-sans); font-size: 8.5px; font-weight: 700;
    letter-spacing: 0.22em; color: var(--gold-dim);
  }
  .mob-contact__input {
    background: transparent;
    border: 1px solid rgba(201,180,138,0.18);
    border-radius: 5px;
    padding: 10px 12px;
    font-family: var(--font-serif); font-size: 13.5px;
    color: var(--white);
    outline: none; width: 100%;
    -webkit-appearance: none;
    user-select: text; -webkit-user-select: text;
    caret-color: var(--gold);
  }
  .mob-contact__input::placeholder { color: rgba(176,144,112,0.38); }
  .mob-contact__input:focus { border-color: rgba(201,180,138,0.42); }
  .mob-contact__textarea { resize: none; min-height: 110px; padding-top: 10px; }
  #turnstile-invisible {
    display: none;
    margin-top: 10px;
    border: 1px solid rgba(201,180,138,0.18);
    border-radius: 6px;
    overflow: hidden;
    background: #111;
  }
  #turnstile-invisible iframe {
    display: block;
    width: 100% !important;
    color-scheme: dark;
  }

  .mob-contact__send {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px;
    background: transparent;
    border: 1px solid rgba(201,180,138,0.22);
    border-radius: 6px;
    cursor: pointer; width: 100%;
    margin-top: 2px;
    -webkit-tap-highlight-color: transparent;
    position: relative; overflow: hidden;
    will-change: transform, border-color, box-shadow;
    transition:
      border-color 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
      background   0.4s cubic-bezier(0.25,0.46,0.45,0.94),
      box-shadow   0.4s cubic-bezier(0.25,0.46,0.45,0.94),
      transform    0.22s cubic-bezier(0.34,1.56,0.64,1);
  }
  /* shimmer sweep on hover / focus */
  .mob-contact__send::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(
      105deg,
      transparent 30%,
      rgba(201,180,138,0.10) 50%,
      transparent 70%
    );
    transform: translateX(-110%);
    transition: transform 0.7s cubic-bezier(0.22,1,0.36,1);
    pointer-events: none;
  }
  .mob-contact__send:hover::before,
  .mob-contact__send:focus-visible::before {
    transform: translateX(110%);
  }
  .mob-contact__send:hover,
  .mob-contact__send:focus-visible {
    border-color: rgba(201,180,138,0.42);
    background: rgba(201,180,138,0.04);
    box-shadow: 0 0 18px rgba(201,180,138,0.07);
    outline: none;
  }
  .mob-contact__send:active {
    transform: scale(0.962);
    background: rgba(201,180,138,0.06);
    border-color: rgba(201,180,138,0.52);
    transition:
      transform    0.07s ease,
      background   0.07s ease,
      border-color 0.07s ease;
  }
  .mob-contact__send span {
    font-family: var(--font-sans); font-size: 9.5px; font-weight: 700;
    letter-spacing: 0.3em; color: var(--gold);
    transition: opacity 0.18s cubic-bezier(0.25,0.46,0.45,0.94);
    display: flex; align-items: center;
  }
  /* cross spin on send */
  .mob-contact__send--sending .mob-contact__gothic-cross--send {
    animation: send-cross-spin 0.75s cubic-bezier(0.34,1.56,0.64,1) forwards;
  }
  @keyframes send-cross-spin {
    0%   { transform: rotate(0deg)   scale(1);    }
    40%  { transform: rotate(180deg) scale(1.3);  }
    70%  { transform: rotate(310deg) scale(1.1);  }
    100% { transform: rotate(360deg) scale(1);    }
  }
  /* sent state glow */
  .mob-contact__send--sent {
    border-color: rgba(201,180,138,0.55) !important;
    box-shadow: 0 0 24px rgba(201,180,138,0.13) !important;
  }
  /* error state — border and shadow use red only, no transition so no
     intermediate golden colour leaks through when the class is removed via JS */
  .mob-contact__send--error {
    border-color: rgba(210,75,75,0.6) !important;
    box-shadow: 0 0 18px rgba(210,75,75,0.12), 0 0 4px rgba(210,75,75,0.08) !important;
    animation: send-error-shake 0.38s cubic-bezier(0.36,0.07,0.19,0.97) both;
  }
  .mob-contact__send--error span {
    color: rgba(220,95,95,0.92) !important;
  }
  @keyframes send-error-shake {
    0%,100% { transform: translateX(0);   }
    18%     { transform: translateX(-5px); }
    36%     { transform: translateX(5px);  }
    54%     { transform: translateX(-4px); }
    72%     { transform: translateX(4px);  }
    86%     { transform: translateX(-2px); }
  }
  /* ripple */
  .send-ripple {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(201,180,138,0.25);
    transform: translate(-50%,-50%) scale(0);
    animation: send-ripple-out 0.75s cubic-bezier(0.22,1,0.36,1) forwards;
    pointer-events: none;
  }
  @keyframes send-ripple-out {
    to { transform: translate(-50%,-50%) scale(58); opacity: 0; }
  }

  /* Links card — matches skills-card layout exactly */
  .mob-contact__links-card { padding: 16px; }
  .mob-contact__links-hd {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .mob-contact__links-list { display: flex; flex-direction: column; gap: 9px; }

  /* Gothic cross instances */
  .mob-contact__gothic-cross {
    object-fit: contain; flex-shrink: 0;
    opacity: 0.9;
    filter: brightness(1.1);
  }
  .mob-contact__gothic-cross--eyebrow { width: 40px; height: 40px; margin-top: 1px; }
  .mob-contact__gothic-cross--send    { width: 16px; height: 16px; }
  .mob-contact__gothic-cross--quote   { width: 22px; height: 22px; }

  /* Link rows — matches skill-item__header */
  .mob-contact__link-row {
    display: flex; align-items: center; gap: 9px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
  }
  .mob-contact__link-row:active { opacity: 0.7; }
  .mob-contact__link-icon {
    width: 18px; height: 18px; flex-shrink: 0;
    color: var(--gold-dim);
    display: flex; align-items: center; justify-content: center;
  }
  .mob-contact__link-icon svg { width: 14px; height: 14px; }
  .mob-contact__link-icon--tg svg { width: 17px; height: 17px; }
  .mob-contact__link-icon--x svg  { width: 13px; height: 13px; }
  .mob-contact__link-icon--dc svg { width: 15px; height: 15px; }
  .mob-contact__link-name {
    font-family: var(--font-sans); font-size: 8px; font-weight: 600;
    letter-spacing: 0.14em; color: var(--gold-dim);
    text-transform: uppercase; flex-shrink: 0;
  }
  .mob-contact__link-val {
    font-family: var(--font-sans); font-size: 8px; font-weight: 700;
    color: var(--gold); letter-spacing: 0.06em;
    flex: 1; text-align: right;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .contact-val-shimmer {
    display: inline-block; width: 72px; height: 7px;
    border-radius: 4px;
    background: linear-gradient(90deg,
      rgba(201,180,138,0.06) 0%,
      rgba(201,180,138,0.06) 20%,
      rgba(201,180,138,0.22) 50%,
      rgba(201,180,138,0.06) 80%,
      rgba(201,180,138,0.06) 100%
    );
    background-size: 300% 100%;
    animation: rpm-shimmer 1.8s cubic-bezier(0.4,0,0.6,1) infinite;
    vertical-align: middle;
  }
  @keyframes contact-val-fadein {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .contact-val-text {
    display: inline;
    animation: contact-val-fadein 0.4s cubic-bezier(0.22,1,0.36,1) forwards;
  }

  /* Quote card */
  .mob-contact__quote-card { padding: 20px 20px 16px; position: relative; }
  .mob-contact__quote-mark {
    font-family: Georgia, serif; font-size: 46px; line-height: 0.8;
    color: var(--gold-dim); opacity: 0.5; margin-bottom: 0; display: block;
  }
  .mob-contact__quote-text {
    font-family: var(--font-serif); font-size: 15px; font-style: italic;
    color: var(--gold-dim); line-height: 1.7; margin-bottom: 12px;
  }
  .mob-contact__quote-author {
    font-family: var(--font-sans); font-size: 9px; font-weight: 500;
    letter-spacing: 0.14em; color: var(--gold-dim);
    display: block;
  }
  .mob-contact__quote-cross {
    position: absolute; bottom: 16px; right: 16px;
    color: var(--red-light);
  }

  /* Hide plain footer on mobile — contact section replaces it */
  .footer { display: none; }

  /* ── MOBILE FOOTER ── */
  .mob-footer {
    text-align: center;
    padding: 28px 24px 36px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .mob-footer__tagline {
    font-family: var(--font-serif);
    font-size: 10px;
    font-style: italic;
    color: var(--gold-dim);
    letter-spacing: 0.05em;
  }
  .mob-footer__name {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: #c9b48a;
    line-height: 1;
    margin: 2px 0 2px;
    height: 28px;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mob-footer__cursor {
    display: inline-block;
    width: 1.5px;
    height: 0.85em;
    background: #c9b48a;
    margin-left: 2px;
    vertical-align: middle;
    animation: footer-blink 0.75s step-end infinite;
  }
  @keyframes footer-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
  }
  .mob-footer__name--tip {
    font-size: 9px;
    letter-spacing: 0.18em;
    color: rgba(201,180,138,0.78);
    font-style: italic;
  }
  .mob-footer__copy {
    font-family: var(--font-sans);
    font-size: 8px;
    color: rgba(176,144,112,0.52);
    letter-spacing: 0.03em;
    line-height: 1.7;
    margin-top: 1px;
  }

  /* ── HERO MOBILE ── */
  .hero {
    height: 100svh;
    min-height: 620px;
  }

  /* JP text on LEFT side for mobile — positioned in image area */
  .hero__jp-left {
    display: block;
    position: absolute;
    left: 12px;
    right: auto;
    top: 240px;
    bottom: auto;
    transform: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--font-serif);
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--gold-dim);
    opacity: 0.88;
    z-index: 2;
  }

  /* ── MID SECTION MOBILE ── */
  .skill-icon svg { width: 14px; height: 14px; }
  .skill-name { font-size: 8.5px; }

  /* What I do — horizontal swipe carousel on mobile */
  .whatido-card { overflow: hidden; }
  .whatido-card .section-label { margin-bottom: 14px; }

  .whatido-list {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 10px;
  }
  .whatido-list::-webkit-scrollbar { display: none; }
  /* Spacers so first and last cards can snap to centre — width = (100% - 78%) / 2 minus the gap */
  .whatido-list::before,
  .whatido-list::after {
    content: '';
    flex: 0 0 calc(11% - 10px);
  }

  .whatido-item {
    flex: 0 0 78%;
    scroll-snap-align: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    background: none;
    border: none;
    border-radius: 0;
    padding: 8px 20px 8px 20px;
    position: relative;
  }

  /* Thin static golden gradient vertical line — left */
  .whatido-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 22%;
    bottom: 22%;
    width: 1px;
    background: linear-gradient(to bottom,
      transparent            0%,
      rgba(232,213,163,0.45) 25%,
      rgba(232,213,163,0.75) 50%,
      rgba(232,213,163,0.45) 75%,
      transparent            100%);
  }

  /* Right gold line on last card so it matches the others */
  .whatido-item:last-child::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 22%;
    bottom: 22%;
    width: 1px;
    background: linear-gradient(to bottom,
      transparent            0%,
      rgba(232,213,163,0.45) 25%,
      rgba(232,213,163,0.75) 50%,
      rgba(232,213,163,0.45) 75%,
      transparent            100%);
  }

  .whatido-item__num { display: none; }

  .whatido-item__icon {
    width: auto;
    height: auto;
    background: none;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
    color: var(--gold-dim);
  }
  .whatido-item__icon svg { width: 28px; height: 28px; }

  .whatido-item__body { display: flex; flex-direction: column; gap: 8px; align-items: center; }

  .whatido-item__title {
    font-size: 9px;
    letter-spacing: 0.2em;
  }
  .whatido-item__desc {
    font-size: 11.5px;
    line-height: 1.65;
  }

  /* Scroll dot indicators — same pill style as skm-dots */
  .whatido-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
  }
  .whatido-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(201,180,138,0.18);
    border: none;
    cursor: pointer;
    padding: 0;
    display: block;
    transition: background 0.35s cubic-bezier(0.22,1,0.36,1), transform 0.35s cubic-bezier(0.22,1,0.36,1), width 0.35s cubic-bezier(0.22,1,0.36,1), border-radius 0.35s ease;
  }
  .whatido-dot.active {
    background: var(--gold);
    transform: scale(1.15);
    width: 20px;
    border-radius: 3px;
  }

  /* Quote card */
  .quote-card__text { font-size: 13px; }

  /* Identity card */
  .identity-card { min-height: 120px; }
  .identity-card__text p { font-size: clamp(12px, 3.4vw, 15px); }

  /* Quote card */
  .quote-card { margin: 12px 0 0 auto; }

  /* ── WORK SECTION MOBILE ── */
  .work-slides { border-radius: 10px; }
  .work-slide__name { font-size: clamp(22px, 9vw, 34px); }
  .work-slide__content { padding: 14px 20px 16px; }
  .work-slide__footer { padding-top: 10px; }
  .work-slide__sidenav { right: 14px; }
  .work-detail__inner { flex-direction: column; gap: 12px; }
  .work-detail__actions { flex-direction: row; align-items: center; }
  .work-detail.open { max-height: 280px; }

}


/* ── Very small screens ── */
@media (max-width: 380px) {
  .hero__name { font-size: 58px; }
  .whatido-list { grid-template-columns: 1fr; }
  .hero__content { left: 30px; }
}

/* ============================================================
   SKILLS MODAL — Swipeable Pages, No Bars
   ============================================================ */

.skm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  visibility: hidden;
}
.skm-overlay.open {
  pointer-events: all;
  visibility: visible;
}

/* ─── Skills Modal (SKM) — mobile bottom-sheet only ────────────── */
/* ── Backdrop ── */
.skm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4,3,2,0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1);
  cursor: pointer;
}
.skm-overlay.open .skm-backdrop { opacity: 1; }

/* ── Panel: mobile bottom sheet ── */
.skm-wrap {
  position: absolute;
  top: auto;
  right: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 87vh;
  background: #0a0a0a;
  border-left: none;
  border-top: 1px solid rgba(201,180,138,0.22);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.65);
  transform: translateY(100%);
  transition: transform 0.55s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.skm-wrap.animating {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.skm-overlay.open .skm-wrap { transform: translateY(0); }

/* ── Close Button — hamburger X style ── */
.skm-close {
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 20;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
.skm-close::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color 0.32s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1);
  transform: scale(0.55);
  pointer-events: none;
}
.skm-close:hover {
  transform: rotate(90deg);
}
.skm-close:hover::before {
  border-color: var(--gold);
  transform: scale(1);
}
.skm-close__bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--gold-dim);
  border-radius: 1px;
  transform-origin: center center;
  transition: background 0.32s ease;
}
.skm-close__bar--a { transform: translateY(0.75px) rotate(45deg); }
.skm-close__bar--b { transform: translateY(-0.75px) rotate(-45deg); }
.skm-close:hover .skm-close__bar { background: var(--gold); }

/* ── Pages Container ── */
.skm-pages {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

/* ── Sliding Track: 4 pages wide ── */
.skm-track {
  display: flex;
  width: 400%;
  height: 100%;
  transition: transform 0.50s cubic-bezier(0.22,1,0.36,1);
}
.skm-track.swiping { will-change: transform; }
.skm-track.no-transition { transition: none; }

/* ── Individual Section Page ── */
.skm-section {
  flex-shrink: 0;
  width: 25%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.skm-section::-webkit-scrollbar { display: none; }

/* ── Section Header ── */
.skm-section__hd {
  padding: 52px 48px 36px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.skm-section__hd::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 48px;
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.skm-section__eyebrow {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--gold);
  opacity: 1;
  margin-bottom: 18px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skm-eyebrow-spark {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: star-twinkle 2.8s ease-in-out infinite;
}
.skm-eyebrow-spark svg { width: 9px; height: 9px; }
.skm-section__title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.20;
  color: var(--white);
  margin-bottom: 14px;
}
.skm-section__title em {
  font-style: italic;
  color: var(--gold);
}
.skm-section__sub {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.72;
  color: var(--gold-dim);
  max-width: 480px;
  font-style: italic;
}

/* ── Skill List ── */
.skm-list { padding: 4px 0 80px; }

/* ── Skill Item ── */
.skm-item {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 24px 48px;
  border-bottom: 1px solid var(--border);
  cursor: default;
  position: relative;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity   0.42s cubic-bezier(0.22,1,0.36,1) calc(var(--stagger, 0) * 38ms),
    transform 0.42s cubic-bezier(0.22,1,0.36,1) calc(var(--stagger, 0) * 38ms),
    background 0.22s ease;
}
.skm-item:last-child { border-bottom: none; }
.skm-item.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.skm-item:hover { background: rgba(201,180,138,0.025); }

/* Left gold accent on hover */
.skm-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 50%;
  background: var(--gold);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.28s ease;
}
.skm-item:hover::before { opacity: 0.3; }

/* ── Icon ── */
.skm-item__icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dim);
  margin-top: 3px;
  transition: color 0.25s, transform 0.32s cubic-bezier(0.22,1,0.36,1);
}
.skm-item__icon svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: block;
  overflow: visible;
}
.skm-item:hover .skm-item__icon {
  color: var(--gold);
  transform: scale(1.10) translateY(-1px);
}

/* ── Body ── */
.skm-item__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.skm-item__name {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.20em;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.4;
  transform-origin: left center;
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1);
}
.skm-item:hover .skm-item__name {
  transform: scale(1.12);
}
.skm-item__tag {
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--gold);
  opacity: 0.42;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.skm-item__desc {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.68;
  color: var(--gold-dim);
  font-style: italic;
  max-width: 520px;
}

/* ── Footer: dots + label ── */
.skm-footer {
  height: 54px;
  min-height: 54px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  flex-shrink: 0;
}

.skm-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.skm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(201,180,138,0.18);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.35s cubic-bezier(0.22,1,0.36,1), transform 0.35s cubic-bezier(0.22,1,0.36,1), width 0.35s cubic-bezier(0.22,1,0.36,1), border-radius 0.35s ease;
}
.skm-dot.active {
  background: var(--gold);
  transform: scale(1.15);
  width: 20px;
  border-radius: 3px;
}

/* centered label */
.skm-footer__center {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
}
.skm-footer__spacer {
  justify-self: end;
}
.skm-footer__num {
  font-family: var(--font-sans);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: opacity 0.20s ease, transform 0.20s cubic-bezier(0.22,1,0.36,1);
}
.skm-footer__sep { color: var(--muted); font-size: 8px; opacity: 0.4; }
.skm-footer__cat {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gold);
  text-transform: uppercase;
  transition: opacity 0.20s ease, transform 0.20s cubic-bezier(0.22,1,0.36,1);
}
/* fade states driven by JS */
.skm-footer__num.fading,
.skm-footer__cat.fading {
  opacity: 0;
  transform: translateY(4px);
}

/* ── Drag Handle ── */
.skm-handle {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 4px;
  flex-shrink: 0;
  background: #0a0a0a;
  touch-action: none;
}
.skm-handle__pill {
  width: 36px;
  height: 4px;
  background: rgba(201,180,138,0.28);
  border-radius: 2px;
  transition: background 0.25s ease, width 0.25s cubic-bezier(0.22,1,0.36,1);
}
.skm-handle:active .skm-handle__pill {
  background: rgba(201,180,138,0.55);
  width: 50px;
}

/* ── Mobile-specific SKM overrides ── */
@media (max-width: 700px) {

  /* ── Section header — sticky top bar, SAME solid bg as sheet (no blur) ── */
  .skm-section__hd {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 16px 22px 14px;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(201,180,138,0.13);
  }
  /* animated golden gradient line — matches mobile-header style */
  .skm-section__hd::after {
    left: 0;
    right: 0;
    width: 100%;
    height: 1px;
    bottom: -1px;
    background: linear-gradient(to right,
      transparent 0%,
      rgba(232,213,163,0.0)  5%,
      rgba(232,213,163,0.55) 30%,
      rgba(232,213,163,0.80) 50%,
      rgba(232,213,163,0.55) 70%,
      rgba(232,213,163,0.0)  95%,
      transparent 100%);
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;
    transition:
      transform 0.80s cubic-bezier(0.22,1,0.36,1) 0.25s,
      opacity   0.35s ease                         0.18s;
  }
  .skm-overlay.open .skm-section__hd::after {
    transform: scaleX(1);
    opacity: 1;
  }

  .skm-section__eyebrow { margin-bottom: 10px; }
  .skm-section__title   { font-size: 22px; margin-bottom: 10px; }
  .skm-section__sub     { font-size: 12.5px; }

  /* ── Skill list — card layout ── */
  .skm-list {
    padding: 12px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  /* ── Skill items — rounded cards matching normal skills-card style ── */
  .skm-item {
    padding: 14px 16px;
    gap: 14px;
    border-bottom: none;
    border: 1px solid rgba(201,180,138,0.13);
    border-radius: 10px;
    background: #111111;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s cubic-bezier(0.22,1,0.36,1);
    -webkit-tap-highlight-color: transparent;
  }
  .skm-item:last-child {
    border-bottom: 1px solid rgba(201,180,138,0.13);
  }
  .skm-item:active {
    background: rgba(201,180,138,0.06);
    border-color: rgba(201,180,138,0.26);
    transform: scale(0.985);
  }
  /* left accent bar removed on mobile — card border replaces it */
  .skm-item::before { display: none; }

  .skm-item__icon  { width: 26px; height: 26px; min-width: 26px; }
  .skm-item__icon svg { width: 18px; height: 18px; flex-shrink: 0; display: block; overflow: visible; }
  .skm-item__name  { font-size: 9px; }
  .skm-item__tag   { font-size: 7.5px; }
  .skm-item__desc  { font-size: 12.5px; }

  /* ── Footer — solid, matches mobile-nav exactly ── */
  .skm-footer {
    height: 54px;
    min-height: 54px;
    padding: 0 22px;
    background: #0a0a0a;
    border-top: 1px solid rgba(201,180,138,0.20);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex-shrink: 0;
  }
}


/* ================================================================
   SECTION 4 — ANIMATIONS
   Shared entrance, scroll-reveal, and mobile icon animations
   ================================================================ */
@keyframes koa-fadein-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes koa-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Section-level entrance — applied via JS IntersectionObserver */
.koa-enter {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.koa-enter.koa-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Work slides entrance — matches other sections */
.work-slides.koa-enter {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1),
              transform 0.75s cubic-bezier(0.22,1,0.36,1),
              filter 0.65s cubic-bezier(0.22,1,0.36,1);
}
.work-slides.koa-enter.koa-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

/* Stagger children inside an enter container */
.koa-enter:nth-child(2) { transition-delay: 0.08s; }
.koa-enter:nth-child(3) { transition-delay: 0.14s; }
.koa-enter:nth-child(4) { transition-delay: 0.20s; }
.koa-enter:nth-child(5) { transition-delay: 0.26s; }

/* ── Smooth interactive press on all clickable cards — uniform bounce ── */
.about-card,
.skills-card,
.whatido-card,
.identity-card,
.mob-contact__card,
.mob-contact__link-row {
  cursor: pointer;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  -webkit-tap-highlight-color: transparent;
}
.about-card:active,
.skills-card:active,
.whatido-card:active,
.identity-card:active { transform: scale(0.96) !important; }
.mob-contact__card:active { transform: scale(0.97) !important; }
/* No card bounce when tapping input fields, send button, or link rows inside contact cards */
.mob-contact__card:active:has(input:active, textarea:active, .mob-contact__send:active, .mob-contact__link-row:active) {
  transform: none !important;
}
.whatido-card:active:has(.whatido-item:active) {
  transform: none !important;
}
.mob-contact__link-row:active { transform: scale(0.97) !important; }

/* ── Modal stat pills — hover glow ── */
.rpm-stat { transition: transform 0.2s ease; }
.rpm-stat:hover { transform: scale(1.04); }

/* ── Lang bar segments — width animate + hover dim ── */
.rpm-lang-bar-seg {
  transition: width 0.85s cubic-bezier(0.22,1,0.36,1), filter 0.2s ease;
  cursor: default;
}
.rpm-lang-bar-seg:hover { filter: brightness(1.35); }

/* ── Section reveal (lang + contrib) ── */
@keyframes rpm-section-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rpm-section-reveal {
  animation: rpm-section-in 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

/* ── Legend item stagger fade-up ── */
@keyframes rpm-fade-up {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rpm-lang-item {
  opacity: 0;
  animation: rpm-fade-up 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

/* ── Contrib meta fade-up ── */
.rpm-contrib-meta {
  opacity: 0;
  animation: rpm-fade-up 0.4s cubic-bezier(0.22,1,0.36,1) 0.08s both;
}

/* ── Graph line draw ── */
@keyframes rpm-draw-line {
  to { stroke-dashoffset: 0; }
}
.rpm-line-draw {
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  animation: rpm-draw-line 1.3s cubic-bezier(0.22,1,0.36,1) 0.12s forwards;
}

/* ── Graph area + dots fade in ── */
@keyframes rpm-area-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rpm-area-fade { opacity: 0; animation: rpm-area-in 0.7s ease 0.5s forwards; }
.rpm-dot-fade  { opacity: 0; animation: rpm-area-in 0.5s ease 0.9s forwards; }

/* ── Topic pill — press feedback ── */
.rpm-topic:active { transform: scale(0.94); }

/* ── rpm-meta-row — subtle slide-in ── */
.rpm-meta-row {
  transition: opacity 0.2s ease;
}

/* ── Reduce motion for accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .koa-enter, .koa-enter.koa-visible { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─── What I Do — mobile card icon animations ───────────────────── */

.whatido-item__icon {
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(201,180,138,0.42));
}

/* 01 DESIGN — physics-based pencil stroke (right to left) */
.whatido-item:nth-child(1) .whatido-item__icon svg {
  animation: pencil-physics 2.8s linear infinite;
  transform-origin: center center;
}
.whatido-item:nth-child(1) .whatido-item__icon .pencil-line {
  stroke-dasharray: 9;
  stroke-dashoffset: 9;
  animation: pencil-ink-physics 2.8s linear infinite;
}

/* Physics: pen hovers at right → presses down → strokes left (decelerating) → lifts → snaps back */
@keyframes pencil-physics {
  0%    { transform: translateX( 3.5px) translateY(-1.5px); }  /* hovering above paper */
  8%    { transform: translateX( 3.5px) translateY( 0.5px); }  /* pen presses onto paper */
  80%   { transform: translateX(-3px)   translateY( 0.8px); }  /* slow decelerate at end */
  88%   { transform: translateX(-3.8px) translateY(-2.5px); }  /* pen lifts off */
  94%   { transform: translateX( 3.5px) translateY(-2.5px); }  /* quick return through air */
  100%  { transform: translateX( 3.5px) translateY(-1.5px); }  /* back to hover */
}

/* Ink appears with slight delay after pen touches, fades on lift */
@keyframes pencil-ink-physics {
  0%    { stroke-dashoffset: 9;   opacity: 0;    }
  10%   { stroke-dashoffset: 9;   opacity: 0.3;  }  /* ink starts just after press */
  80%   { stroke-dashoffset: 0;   opacity: 1;    }  /* fully drawn */
  87%   { stroke-dashoffset: 0;   opacity: 0.6;  }  /* fading as pen lifts */
  92%   { stroke-dashoffset: 0;   opacity: 0;    }  /* invisible */
  93%   { stroke-dashoffset: 9;   opacity: 0;    }  /* reset hidden */
  100%  { stroke-dashoffset: 9;   opacity: 0;    }
}

/* 02 DEVELOPMENT — fix overflow so layers don't clip at top */
.whatido-item:nth-child(2) .whatido-item__icon {
  overflow: visible;
}
.whatido-item:nth-child(2) .whatido-item__icon svg {
  overflow: visible;
}

/* 02 DEVELOPMENT — stacked layers float up (frontend/backend/infra) */
.whatido-item:nth-child(2) .whatido-item__icon .layer-top {
  animation: layer-float-top 2.2s ease-in-out infinite;
}
.whatido-item:nth-child(2) .whatido-item__icon .layer-mid {
  animation: layer-float-mid 2.2s ease-in-out infinite 0.14s;
}
.whatido-item:nth-child(2) .whatido-item__icon .layer-bot {
  animation: layer-float-bot 2.2s ease-in-out infinite 0.28s;
}
@keyframes layer-float-top {
  0%,100% { transform: translateY(0);    opacity: 1;    }
  45%     { transform: translateY(-2.5px); opacity: 1;  }
  50%     { transform: translateY(-3px);  opacity: 0.7; }
  55%     { transform: translateY(-2.5px); opacity: 1;  }
}
@keyframes layer-float-mid {
  0%,100% { transform: translateY(0);    opacity: 0.75; }
  45%     { transform: translateY(-2px); opacity: 0.9;  }
  50%     { transform: translateY(-2.5px); opacity: 1;  }
  55%     { transform: translateY(-2px); opacity: 0.9;  }
}
@keyframes layer-float-bot {
  0%,100% { transform: translateY(0);    opacity: 0.5; }
  45%     { transform: translateY(-1.5px); opacity: 0.7; }
  50%     { transform: translateY(-2px);  opacity: 0.85;}
  55%     { transform: translateY(-1.5px); opacity: 0.7; }
}

/* 03 SYSTEM & INTEGRATION — gear spins slowly, faster on hover */
.whatido-item:nth-child(3) .whatido-item__icon svg {
  transform-origin: center center;
  animation: icon-gear-spin 7s linear infinite;
}
@keyframes icon-gear-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 04 DIGITAL OPERATIONS — pulse line runs like a heartbeat */
.whatido-item:nth-child(4) .whatido-item__icon svg polyline {
  stroke-dasharray: 70;
  stroke-dashoffset: 0;
  animation: icon-pulse-run 1.7s ease-in-out infinite;
}
@keyframes icon-pulse-run {
  0%   { stroke-dashoffset: 70;  opacity: 0.35; }
  50%  { stroke-dashoffset: 0;   opacity: 1;    }
  100% { stroke-dashoffset: -70; opacity: 0.35; }
}

/* ================================================================
   SECTION 5 — DESKTOP / PC UI
   Fresh build — zero mobile code reused.
   All classes prefixed pc- to avoid collision with mobile classes.
   .pc-main is display:none by default; shown via @media (min-width:701px).
   ================================================================ */

/* PC main wrapper — hidden on mobile, shown on desktop */
.pc-main {
  display: none;
  margin-left: clamp(100px, 10vw, 140px);
}

/* ── PC HERO ── */
.pc-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
}

/* Background image */
.pc-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pc-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% top;
  filter: brightness(0.84) saturate(0.50);
}

/* Dark gradient overlay — heavy left, full bottom fade so image never looks cut */
.pc-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(10,10,10,0.97) 0%,
      rgba(10,10,10,0.78) 28%,
      rgba(10,10,10,0.28) 52%,
      rgba(10,10,10,0.04) 100%),
    linear-gradient(to top,
      rgba(10,10,10,1.00)  0%,
      rgba(10,10,10,0.95)  6%,
      rgba(10,10,10,0.72) 16%,
      rgba(10,10,10,0.28) 28%,
      transparent         44%);
}

/* Tagline — inside upper-group, centered by flexbox */
.pc-hero__tagline {
  font-family: var(--font-sans);
  font-size: clamp(6px, 0.68vw, 9px);
  font-weight: 400;
  letter-spacing: 0.20em;
  color: var(--gold-dim);
  line-height: 1.75;
  margin: 0;
  text-align: center;
}

/* Right vertical text group — wrapper */
.pc-hero__right-text {
  position: absolute;
  right: 24px;
  top: clamp(70px, 13vh, 165px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
}

/* Japanese text */
.pc-hero__jp {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-serif);
  font-size: clamp(12px, 1.4vw, 22px);
  letter-spacing: 0.18em;
  color: var(--gold-dim);
  opacity: 0.85;
}

/* JOHAN LIEBERT — vertical below jp */
.pc-hero__johan {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-sans);
  font-size: clamp(12px, 1.4vw, 22px);
  font-weight: 500;
  letter-spacing: 0.28em;
  color: rgba(201,180,138,0.45);
  text-transform: uppercase;
}

/* Main content block — bottom-left anchored */
.pc-hero__content {
  position: absolute;
  top: clamp(210px, 43vh, 400px);
  left: 41px;
  right: 48%;
  z-index: 2;
}

/* Cross + memory wrapper — upper left, moved down */
.pc-hero__upper-group {
  position: absolute;
  top: clamp(70px, 13vh, 165px);
  left: 55px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

/* Large decorative cross inside the group */
.pc-hero__cross-large {
  width: clamp(80px, 12vh, 152px);
  height: auto;
  object-fit: contain;
  display: block;
}

/* Memory text — larger, below the cross */
.pc-hero__memory {
  font-family: var(--font-sans);
  font-size: clamp(6px, 0.8vw, 10px);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--gold-dim);
  line-height: 1.80;
  margin: -11px 0 0;
  text-align: center;
}

/* KOA — large serif */
.pc-hero__name {
  font-family: var(--font-serif);
  font-size: clamp(68px, 9.2vw, 126px);
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #c9b48a;
  line-height: 0.88;
  margin: 0 0 14px 0;
  cursor: pointer;
  transition: text-shadow 0.28s ease, color 0.28s ease;
  transform-origin: left center;
  user-select: none;
}
.pc-hero__name.pc-koa-glow {
  color: #ede0bf;
  text-shadow:
    0 0 14px rgba(201,180,138,1),
    0 0 36px rgba(201,180,138,0.6),
    0 0 72px rgba(201,180,138,0.25);
}
.pc-hero__name.pc-koa-jp {
  letter-spacing: 0.04em;
}
.pc-hero__name.pc-koa-scrambling {
  animation: pc-koa-flicker 0.10s linear infinite !important;
}
@keyframes pc-koa-flicker {
  0%   { opacity: 0.72; filter: brightness(0.88); }
  12%  { opacity: 1.00; filter: brightness(1.48); }
  25%  { opacity: 0.78; filter: brightness(0.97); }
  42%  { opacity: 0.96; filter: brightness(1.38); }
  58%  { opacity: 0.74; filter: brightness(0.91); }
  72%  { opacity: 0.98; filter: brightness(1.42); }
  85%  { opacity: 0.80; filter: brightness(1.00); }
  100% { opacity: 0.72; filter: brightness(0.88); }
}

/* Roles — with top/bottom border lines */
.pc-hero__roles-wrap {
  display: inline-block;
  border-top: 1px solid rgba(201,180,138,0.20);
  border-bottom: 1px solid rgba(201,180,138,0.20);
  padding: 6px 0;
  margin-bottom: 16px;
}
.pc-hero__roles {
  font-family: var(--font-sans);
  font-size: clamp(7px, 0.88vw, 11px);
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--gold);
  margin: 0;
}

/* Intro — ANIRUDH + quotes */
.pc-hero__intro {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pc-hero__real-name {
  font-family: var(--font-sans);
  font-size: clamp(8px, 0.96vw, 12px);
  font-weight: 500;
  letter-spacing: 0.30em;
  color: var(--gold);
  margin: 0 0 6px 0;
}
.pc-hero__quote-line {
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.6vw, 20px);
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
  line-height: 1.4;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   DESKTOP / PC — All desktop-only styles live here
   Nothing below this line applies to mobile (≤700px)
═══════════════════════════════════════════════════════════ */
@media (min-width: 701px) {

  /* ── Show PC layout, hide mobile layout ── */
  .pc-main { display: block; }
  .main, .skm-overlay, .rpm-overlay, #scroll-track { display: none !important; }

  /* ── Sidebar ── */
  .sidebar {
    display: flex;
    position: fixed; left: 0; top: 0; width: clamp(100px, 10vw, 140px); height: 100vh;
    background: var(--bg2); border-right: 1px solid var(--border);
    flex-direction: column; align-items: center;
    padding: clamp(16px, 2.2vh, 28px) 0 clamp(14px, 2vh, 24px); z-index: 100;
  }
  .sidebar__logo { display: flex; flex-direction: column; align-items: center; gap: clamp(3px, 0.4vh, 5px); margin-bottom: 0; }
  .sidebar__star { width: clamp(22px, 2vw, 32px); height: clamp(22px, 2vw, 32px); color: #e8d5a3; display: flex; align-items: center; justify-content: center; }
  .sidebar__star svg { width: 100%; height: 100%; }
  .sidebar__logo-text { font-family: var(--font-sans); font-size: clamp(9px, 0.85vw, 12px); font-weight: 600; letter-spacing: 0.28em; color: #e8d5a3; }
  .sidebar__divider { width: 72%; height: 1px; background: linear-gradient(to right, transparent, rgba(201,180,138,0.42), transparent); flex-shrink: 0; margin: 0; }
  .sidebar__divider-sparkle { display: flex; align-items: center; width: 36%; gap: 0; flex-shrink: 0; }
  .sidebar__div-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, rgba(201,180,138,0.42), transparent); }
  .sidebar__div-star { width: 6px; height: 6px; color: rgba(201,180,138,0.65); flex-shrink: 0; }
  .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold-muted); transition: background 0.3s, width 0.3s, height 0.3s, box-shadow 0.3s; }
  .dot.active { background: var(--gold); width: 4px; height: 4px; box-shadow: 0 0 6px rgba(201,180,138,0.5); }
  .sidebar__nav { display: flex; flex-direction: column; gap: clamp(2px, 0.3vh, 4px); width: 100%; padding: 0 clamp(8px, 0.8vw, 12px); }
  .nav-item {
    display: flex; align-items: center; gap: clamp(3px, 0.4vw, 5px); padding: clamp(5px, 0.7vh, 7px) clamp(6px, 0.7vw, 10px);
    text-decoration: none; color: var(--gold-dim);
    font-family: var(--font-sans); font-size: clamp(7px, 0.65vw, 9px); font-weight: 500;
    letter-spacing: 0.15em;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-item:hover { color: var(--gold); transform: translateX(3px); }
  .nav-item.active { color: var(--gold); }
  .nav-item.active .nav-num { color: var(--gold-dim); }
  .nav-num { color: var(--gold-muted); font-size: clamp(6px, 0.58vw, 8px); transition: color 0.3s ease; }
  .nav-line { flex: 1; height: 1px; background: linear-gradient(to right, rgba(201,180,138,0.22), rgba(201,180,138,0.55)); align-self: center; opacity: 0; transition: opacity 0.3s ease; margin: 0 clamp(3px, 0.4vw, 5px); }
  .nav-dot { color: var(--gold); font-size: 6px; line-height: 1; opacity: 0; transition: opacity 0.3s ease; flex-shrink: 0; }
  .nav-item.active .nav-line { opacity: 1; }
  .nav-item.active .nav-dot { opacity: 1; }
  .sidebar__sp { flex: 1; min-height: 0; flex-shrink: 1; }
  .sidebar__sp-half { flex: 0.5; min-height: 0; flex-shrink: 1; }
  .sidebar__portrait-section { display: flex; align-items: stretch; gap: clamp(4px, 0.5vw, 7px); padding: 0 clamp(6px, 0.7vw, 10px) 0 clamp(8px, 0.9vw, 12px); flex-shrink: 0; width: 100%; }
  .sidebar__dots-left { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; justify-content: center; padding-top: clamp(8px, 1.2vh, 14px); }
  .dot-pair { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
  .dot-sm { width: 2.5px; height: 2.5px; border-radius: 50%; background: rgba(201,180,138,0.32); display: block; flex-shrink: 0; }
  .sidebar__portrait { flex: 1; height: clamp(140px, 20vh, 170px); overflow: hidden; border: 1px solid var(--border); }
  .sidebar__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: grayscale(22%) brightness(0.86) sepia(8%); }
  .sidebar__quote { padding: 0 clamp(6px, 0.7vw, 10px) 0 clamp(8px, 0.9vw, 12px); margin: 0; flex-shrink: 0; overflow: hidden; }
  .sidebar__quote p { font-family: var(--font-serif); font-size: clamp(9px, 0.85vw, 12px); font-style: italic; line-height: 1.58; color: var(--gold-dim); text-align: left; word-break: break-word; overflow-wrap: break-word; margin: 0; }
  .sidebar__quote-author { display: block; font-family: var(--font-serif); font-size: clamp(8px, 0.72vw, 10px); font-style: italic; letter-spacing: 0.06em; color: var(--muted); text-align: right; margin-top: clamp(8px, 1.2vh, 14px); }

  /* ══════════════════════════════════════════════════
     PC MID — ABOUT + SKILLS + WHAT I DO
     Appears on scroll below the hero. PC only.
  ══════════════════════════════════════════════════ */

  .pc-mid {
    position: relative;
    padding: clamp(10px, 1.4vw, 28px) clamp(16px, 2.2vw, 40px);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: clamp(12px, 1.6vw, 24px);
    height: clamp(310px, 46vh, 520px);
  }

  /* Left column — About Me box stacked above Skills+WhatIDo box */
  .pc-mid__left-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vh, 28px);
  }

  /* Main two-panel bordered box (Skills + What I Do) */
  .pc-mid__box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 1px solid rgba(201,180,138,0.14);
    background: rgba(15,15,15,0.88);
    overflow: hidden;
    transform: translateZ(0);
  }

  /* Each panel */
  .pc-mid__panel {
    flex: 1;
    padding: clamp(14px, 1.8vw, 26px) clamp(14px, 1.6vw, 24px);
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 14px);
    min-width: 0;
  }

  .pc-mid__panel--skills  { flex: 32 1 0%; overflow: hidden; position: relative; }
  .pc-mid__panel--whatido { flex: 28 1 0%; }

  /* Scrollable list inside skills panel — header stays pinned */
  .pc-mid__skills-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: none;
    padding-bottom: 32px;
  }
  .pc-mid__skills-list::-webkit-scrollbar { display: none; }

  /* Fade shadow at bottom of skills scroll */
  .pc-mid__panel--skills::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: linear-gradient(to bottom, transparent, rgba(13,13,13,0.92));
    pointer-events: none;
    z-index: 2;
  }

  /* Vertical dividers between panels */
  .pc-mid__divider {
    width: 1px;
    background: linear-gradient(to bottom,
      transparent 0%,
      rgba(201,180,138,0.18) 20%,
      rgba(201,180,138,0.22) 50%,
      rgba(201,180,138,0.18) 80%,
      transparent 100%);
    flex-shrink: 0;
    align-self: stretch;
  }

  /* Panel header row */
  .pc-mid__panel-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: clamp(7px, 0.8vw, 12px);
    border-bottom: 1px solid rgba(201,180,138,0.10);
    flex-shrink: 0;
  }

  /* Section panel label — exact match to mobile .section-label */
  .pc-mid__label {
    font-family: var(--font-sans);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.28em;
    color: var(--gold);
    text-transform: uppercase;
    margin: 0;
    flex: 1;
  }

  .pc-mid__star {
    width: 9px;
    height: 9px;
    color: var(--gold);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pc-mid__star svg { width: 100%; height: 100%; }

  /* ── ABOUT panel ── */
  .pc-mid__panel--about {
    flex: 20 1 0%;
    min-width: 0;
    overflow: hidden;
  }

  /* portrait LEFT | text+sig RIGHT — stretch full remaining height */
  .pc-mid__about-inner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: clamp(10px, 1.2vw, 18px);
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-top: clamp(10px, 1.4vw, 24px);
  }

  /* Portrait — stretches to match text column height automatically */
  .pc-mid__about-portrait {
    width: clamp(72px, 9.6vw, 147px);
    align-self: stretch;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border);
  }
  .pc-mid__about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(30%) brightness(0.65) sepia(12%);
    display: block;
  }

  /* Text column — top aligned with portrait via inner padding-top */
  .pc-mid__about-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(5px, 0.6vw, 10px);
    min-width: 0;
    overflow: hidden;
  }
  .pc-mid__about-text p {
    font-family: var(--font-serif);
    font-size: clamp(11.5px, 1.05vw, 15px);
    line-height: 1.75;
    color: var(--gold-dim);
    margin: 0;
  }
  .pc-mid__about-text strong { color: var(--gold); font-weight: 600; }
  .pc-mid__muted { color: var(--muted); font-size: 0.93em; }

  .pc-mid__about-sub {
    font-style: italic !important;
    font-size: clamp(10px, 0.88vw, 13px) !important;
    color: var(--muted) !important;
    letter-spacing: normal;
    margin: 0 !important;
  }

  /* Signature — pinned to bottom-left of text column */
  .pc-mid__about-sig {
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    flex-shrink: 0;
    padding-top: clamp(6px, 0.6vw, 10px);
  }
  .pc-signature {
    width: clamp(75px, 7.5vw, 120px);
    height: auto;
    display: block;
  }

  /* ── SKILLS panel — single column with scroll, mobile styles ── */
  .pc-mid__skills-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  /* Category block — matches mobile .skill-category */
  .pc-mid__skill-cat {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  /* Category header — matches mobile .skill-category__header */
  .pc-mid__skill-cat-hd {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 3px;
  }

  /* Star — matches mobile .skill-cat-sparkle */
  .pc-mid__skill-cat-star {
    width: 9px;
    height: 9px;
    color: var(--gold);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pc-mid__skill-cat-star svg { width: 9px; height: 9px; }

  /* Label — matches mobile .skill-cat-label */
  .pc-mid__skill-cat-label {
    font-family: var(--font-sans);
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--gold);
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Line — matches mobile .skill-cat-line */
  .pc-mid__skill-cat-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(201,180,138,0.3), transparent);
  }

  /* Skills inside a category */
  .pc-mid__skill-items {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  .pc-mid__skill {}

  /* Skill header row — matches mobile .skill-item__header */
  .pc-mid__skill-hd {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
  }

  /* Icon — matches mobile .skill-icon */
  .pc-mid__skill-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pc-mid__skill-icon svg { width: 14px; height: 14px; }

  /* Name — matches mobile .skill-name */
  .pc-mid__skill-name {
    font-family: var(--font-sans);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--gold-dim);
    text-transform: uppercase;
    flex: 1;
    min-width: 0;
  }

  /* Pct — matches mobile .skill-pct */
  .pc-mid__skill-pct {
    font-family: var(--font-sans);
    font-size: 8px;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
  }

  .pc-mid__skill-bar {
    height: 2px;
    background: rgba(201,180,138,0.08);
    width: 100%;
    overflow: hidden;
  }

  .pc-mid__skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(201,180,138,0.40), rgba(201,180,138,0.88));
    transition: width 1.1s cubic-bezier(0.22,1,0.36,1) var(--pd, 0s);
  }

  .pc-mid--visible .pc-mid__skill-fill {
    width: var(--pw, 0%);
  }

  /* ── WHAT I DO panel ── */
  .pc-mid__wid-list {
    display: flex;
    flex-direction: column;
    gap: clamp(9px, 1.1vw, 16px);
    flex: 1;
    overflow: hidden;
  }

  .pc-mid__wid-item {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 1vw, 14px);
  }

  .pc-mid__wid-icon {
    width: clamp(16px, 1.5vw, 22px);
    height: clamp(16px, 1.5vw, 22px);
    flex-shrink: 0;
    color: var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
  }
  .pc-mid__wid-icon svg { width: 100%; height: 100%; }

  .pc-mid__wid-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .pc-mid__wid-title {
    font-family: var(--font-sans);
    font-size: clamp(7.5px, 0.68vw, 9.5px);
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--gold);
    margin: 0;
  }

  .pc-mid__wid-desc {
    font-family: var(--font-serif);
    font-size: clamp(9.5px, 0.85vw, 12px);
    font-weight: 300;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
  }

  /* ── Quote + Silhouette — right side column ── */
  .pc-mid__quote-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: clamp(14px, 1.8vh, 24px);
    flex-shrink: 0;
    width: clamp(110px, 11vw, 170px);
    padding-top: clamp(4px, 0.5vh, 8px);
  }

  .pc-mid__quote {
    text-align: right;
  }

  .pc-mid__quote-text {
    font-family: var(--font-serif);
    font-size: clamp(11px, 1.1vw, 15px);
    font-style: italic;
    font-weight: 300;
    line-height: 1.65;
    color: var(--gold-dim);
    margin: 0 0 clamp(6px, 0.8vh, 10px) 0;
  }

  .pc-mid__quote-author {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(8px, 0.72vw, 10px);
    font-style: italic;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-align: right;
  }

  .pc-mid__silhouette {
    width: 100%;
    max-height: clamp(90px, 14vh, 160px);
    overflow: hidden;
    opacity: 0.55;
    filter: grayscale(100%) brightness(0.6);
  }
  .pc-mid__silhouette img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
  }

  /* Entrance animation — fade + slide up */
  .pc-mid__box,
  .pc-mid__quote-wrap {
    opacity: 0;
    transform: translateY(22px) translateZ(0);
    transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1), transform 0.75s cubic-bezier(0.22,1,0.36,1);
    will-change: opacity, transform;
  }
  .pc-mid__quote-wrap { transition-delay: 0.10s; }

  .pc-mid--visible .pc-mid__box,
  .pc-mid--visible .pc-mid__quote-wrap {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }

  /* PC signature draw animation — mirrors mobile .signature rules */
  .pc-signature { width: 148px; height: 42px; opacity: 0.72; }
  .pc-signature path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .pc-signature .sig-s5 { opacity: 0; }
  .pc-signature.sig-play .sig-s1  { animation: sig-draw 0.40s cubic-bezier(.4,0,.2,1) forwards 0.00s; }
  .pc-signature.sig-play .sig-s2  { animation: sig-draw 0.15s ease            forwards 0.38s; }
  .pc-signature.sig-play .sig-s3  { animation: sig-draw 0.46s cubic-bezier(.4,0,.2,1) forwards 0.52s; }
  .pc-signature.sig-play .sig-s4  { animation: sig-draw 0.14s ease            forwards 0.97s; }
  .pc-signature.sig-play .sig-s5  { animation: sig-dot-appear 0.12s ease      forwards 1.09s; }
  .pc-signature.sig-play .sig-s6  { animation: sig-draw 0.20s ease            forwards 1.11s; }
  .pc-signature.sig-play .sig-s7  { animation: sig-draw 0.28s cubic-bezier(.4,0,.2,1) forwards 1.29s; }
  .pc-signature.sig-play .sig-s8  { animation: sig-draw 0.38s cubic-bezier(.4,0,.2,1) forwards 1.56s; }
  .pc-signature.sig-play .sig-s9  { animation: sig-draw 0.30s cubic-bezier(.4,0,.2,1) forwards 1.92s; }
  .pc-signature.sig-play .sig-s10 { animation: sig-draw 0.42s cubic-bezier(.25,1,.5,1) forwards 2.20s; }

  /* ── Short viewport (height ≤ 820px) — compress spacing aggressively ── */
  @media (max-height: 820px) {
    .pc-mid {
      padding-top: clamp(14px, 2vh, 28px);
      padding-bottom: clamp(14px, 2vh, 28px);
    }
    .pc-mid__panel {
      padding-top: clamp(10px, 1.3vh, 16px);
      padding-bottom: clamp(10px, 1.3vh, 16px);
      gap: clamp(6px, 0.9vh, 11px);
    }
    .pc-mid__about-portrait {
      width: clamp(80px, 11vw, 152px);
    }
    .pc-mid__about-text p,
    .pc-mid__about-sub { font-size: 10px !important; }
    .pc-signature { width: 120px; height: 34px; }
    .pc-mid__panel-hd { padding-bottom: 6px; }
    .pc-mid__skill-cat { gap: 7px; }
    .pc-mid__skill-items { gap: 7px; }
  }

  /* ── Very short viewport (height ≤ 680px) ── */
  @media (max-height: 680px) {
    .pc-mid { padding-top: 10px; padding-bottom: 10px; }
    .pc-mid__about-portrait {
      width: clamp(70px, 9vw, 130px);
    }
    .pc-mid__about-text p,
    .pc-mid__about-sub { font-size: 9.5px !important; }
  }

}


/* ================================================================
   LOW-PERF MODE
   body.low-perf — applied by JS when device is weak
   (≤2GB RAM  /  avg FPS < 40  /  prefers-reduced-motion)
   Goal: kill infinite loops + heavy entrances, keep tap-feel
   ================================================================ */

/* ── Kill infinite looping animations (biggest GPU drain) ── */
.low-perf .mobile-nav__center-star,
.low-perf .mobile-nav__center-sparkles span,
.low-perf .skm-footer__center svg {
  animation: none !important;
  opacity: 1 !important;
}

/* Scrollbar thumb glow loop */
.low-perf #scroll-thumb {
  animation: none !important;
  box-shadow: 0 0 4px rgba(232,213,163,0.35) !important;
}

/* Skills modal icon loops — pencil, layers, gear, pulse */
.low-perf .skm-item__icon svg,
.low-perf .skm-item__icon svg * {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* Shimmer skeletons */
.low-perf [class*="sk-pulse"] {
  animation: none !important;
  opacity: 0.4 !important;
}
.low-perf [class*="rpm-shimmer"],
.low-perf [class*="rpm-section-in"],
.low-perf [class*="rpm-fade-up"] {
  animation: none !important;
  opacity: 1 !important;
}

/* ── Hero entrance — show instantly, no slide-up ── */
.low-perf .hero__cross,
.low-perf .hero__memory,
.low-perf .hero__name,
.low-perf .hero__roles-wrap,
.low-perf .hero__intro {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ── Cryptic flicker effect — off ── */
.low-perf .hero__name.koa-cryptic-active,
.low-perf .pc-hero__name.koa-cryptic-active {
  animation: none !important;
}

/* ── Signature draw — show fully written instantly ── */
.low-perf .signature path,
.low-perf .signature .sig-s5,
.low-perf .pc-signature path,
.low-perf .pc-signature .sig-s5 {
  animation: none !important;
  stroke-dashoffset: 0 !important;
  opacity: 1 !important;
}

/* ── Skill bars — fill to full width without grow animation ── */
.low-perf .skills-card.animated .skill-bar__fill {
  animation: none !important;
  width: var(--w) !important;
}

/* ── Work cards — appear instantly, no slide-in ── */
.low-perf .work-anim-in {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* ── Section scroll reveals — instant, no transition ── */
.low-perf .koa-enter {
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* ── All other transitions — keep snappy but short ── */
.low-perf *,
.low-perf *::before,
.low-perf *::after {
  transition-duration: 0.12s !important;
  transition-delay: 0s !important;
}
/* Never suppress koa-enter visibility transition (already set to none above) */
.low-perf .koa-enter,
.low-perf .koa-enter * {
  transition: none !important;
}
