/* =========================================================
   Portfolio — inspired by fastwork.com/th/selling
   ========================================================= */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --ink: #2b313b;
  --ink-strong: #171717;
  --muted: #737373;
  --subtle: #a3a3a3;
  --line: #ebebeb;
  --line-strong: #d4d4d4;
  --bg: #fff;
  --bg-soft: #f5f5f5;
  --dark: #1f232b;
  --accent: #0569ff;

  --c-yellow: #f8da9d;
  --c-cyan: #a3e0ef;
  --c-green: #c5e5c0;
  --c-orange: #fad0b5;
  --c-pink: #fccadc;
  --c-purple: #eccef3;
  --c-teal: #a5e3d6;
  --c-blue: #c4ddfb;

  --font: 'Plus Jakarta Sans', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --font-hand: 'Playpen Sans', 'IBM Plex Sans Thai', cursive;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.44, 0, .56, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 18px 48px rgba(17, 24, 39, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.muted { color: var(--subtle); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.hand {
  font-family: var(--font-hand);
  font-weight: 600;
  color: var(--accent);
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px;
  border-radius: 999px; border: 0;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  cursor: pointer;
  transition: transform .5s var(--ease), background .2s, border-color .2s, box-shadow .3s;
}
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(1.01); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-dark { background: var(--ink-strong); color: #fff; }
.btn-line { border: 1px solid var(--line-strong); background: #fff; }
.btn-line:hover { border-color: var(--subtle); }
.btn-light { background: #fff; color: var(--ink-strong); }
.btn-ghost-light { border: 1px solid rgba(255,255,255,.25); color: #fff; }
.btn-ghost-light:hover { border-color: rgba(255,255,255,.6); }

.btn-glow { position: relative; color: #fff; background: transparent; isolation: isolate; padding: 0; }
.btn-glow span {
  display: inline-flex; align-items: center; height: 100%;
  padding: 0 30px; border-radius: inherit; background: var(--ink-strong);
}
.btn-glow::before, .btn-glow::after {
  content: ''; position: absolute; inset: -2px; border-radius: inherit; z-index: -1;
  background: conic-gradient(from var(--spin), #0569ff, #a3e0ef, #fccadc, #f8da9d, #c5e5c0, #0569ff);
  animation: spin 4s linear infinite;
}
.btn-glow::after { filter: blur(14px); opacity: .55; }
@keyframes spin { to { --spin: 360deg; } }

/* ---------- status pill ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 500;
}
.status-pill .dot, .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e; position: relative; flex: none;
}
.status-pill .dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; background: #22c55e;
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping { 70%, 100% { transform: scale(2.6); opacity: 0; } }
.status-pill.on-dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }

/* =========================================================
   NAV — morphs into a floating pill after scrolling
   ========================================================= */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding: 14px 20px; pointer-events: none; }
.nav-bar {
  pointer-events: auto;
  max-width: 1240px; margin: 0 auto;
  height: 64px; padding: 0 12px 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 999px; border: 1px solid transparent;
  transition: max-width .6s var(--ease-out), background .4s, border-color .4s, box-shadow .4s;
}
.nav.is-pill .nav-bar {
  max-width: 980px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-color: rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.nav.on-dark:not(.is-pill) { color: #fff; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink-strong); background: rgba(0,0,0,.05); }
.nav-right { display: flex; align-items: center; gap: 8px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  --p: 0; --mx: 0; --my: 0;
  position: relative; min-height: 100svh; min-height: max(100svh, 720px);
  display: grid; place-items: center;
  padding: 120px 24px 100px;
  overflow: hidden;
}
.hero-cards { position: absolute; inset: 0; pointer-events: none; }

.hcard {
  position: absolute; left: var(--x); top: var(--y); width: var(--w, 200px);
  transform:
    translate3d(calc(var(--mx) * var(--d) * 1px + var(--sx) * var(--p) * 1px),
                calc(var(--my) * var(--d) * 1px + var(--sy) * var(--p) * 1px), 0)
    rotate(var(--r));
  opacity: calc(1 - var(--p) * 1.3);
  will-change: transform;
}
.hcard-pop { animation: pop 1.1s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 250ms); }
@keyframes pop {
  from { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.55) rotate(calc(var(--r) * -2)); filter: blur(8px); }
}
.hcard-in {
  background: #fff; border-radius: 18px; padding: 8px 8px 10px;
  border: 1px solid rgba(0,0,0,.05);
  box-shadow: var(--shadow-card);
  animation: float 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -900ms);
}
@keyframes float { 50% { transform: translateY(-10px); } }
.hcard-cover { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--c, var(--bg-soft)); }
.hcard-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hcard-meta { display: flex; align-items: center; gap: 8px; padding: 8px 4px 0; }
.hcard-meta img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.hcard-meta b { display: block; font-size: 13px; line-height: 1.2; color: var(--ink-strong); }
.hcard-meta small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }

.hero-copy {
  position: relative; z-index: 2;
  max-width: 1000px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  opacity: calc(1 - var(--p) * 1.6);
  transform: translateY(calc(var(--p) * -40px));
}
.hero-title {
  font-size: clamp(40px, 5.4vw, 84px);
  font-weight: 600; line-height: 1.12; letter-spacing: -.025em;
  color: var(--ink-strong);
}
.hero-title .line { display: block; white-space: nowrap; animation: blurIn 1.1s var(--ease-out) both; }
.hero-title .line + .line { animation-delay: .15s; font-size: .54em; font-weight: 500; letter-spacing: -.015em; color: var(--ink); margin-top: .35em; }
@keyframes blurIn { from { opacity: 0; filter: blur(14px); transform: translateY(16px); } }
.hero-title .hand { padding: 0 .08em; }
.nw { white-space: nowrap; }

.scribble {
  position: absolute; left: 0; right: 0; bottom: -.12em; width: 100%; height: .32em;
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; overflow: visible;
}
.scribble path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1s .9s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-sub {
  max-width: 620px; font-size: 16px; line-height: 1.75; color: var(--muted);
  animation: blurIn 1s .3s var(--ease-out) both;
}

.stat-chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; animation: blurIn 1s .45s var(--ease-out) both; }
.stat-chip {
  min-width: 96px; padding: 12px 18px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center;
}
.stat-chip b { font-size: 28px; font-weight: 600; line-height: 1.2; color: var(--ink-strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-chip b sup { font-size: .5em; margin-left: 1px; }
.stat-chip small { font-size: 12px; color: var(--muted); }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; animation: blurIn 1s .6s var(--ease-out) both; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
  opacity: calc(1 - var(--p) * 3);
}
.mouse { width: 22px; height: 34px; border: 1.5px solid var(--subtle); border-radius: 12px; display: grid; justify-items: center; padding-top: 6px; }
.mouse i { width: 3px; height: 7px; border-radius: 2px; background: var(--muted); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80%, 100% { transform: translateY(10px); opacity: 0; } }

/* =========================================================
   STORY
   ========================================================= */
.story { max-width: 1000px; margin: 0 auto; padding: 120px 24px 160px; text-align: center; }
.story-title {
  font-size: clamp(32px, 4.8vw, 62px); font-weight: 600; line-height: 1.2; letter-spacing: -.02em;
  color: var(--ink-strong); margin-bottom: 48px;
}
.hand-pill {
  color: var(--ink-strong); background: var(--c-yellow);
  padding: 0 .35em; border-radius: .3em; transform: rotate(-4deg);
}
.story-text { font-size: clamp(20px, 2.4vw, 30px); line-height: 1.6; font-weight: 500; }
.story-text .w { color: #d6d6d6; transition: color .4s; }
.story-text .w.on { color: var(--ink); }

/* =========================================================
   SHOWCASE — sticky category list + profile card
   ========================================================= */
.showcase { background: var(--bg-soft); padding-bottom: 40px; }
.showcase-track { --n: 5; height: calc(var(--n) * 75vh + 100vh); position: relative; }
.showcase-sticky {
  position: sticky; top: 0; height: 100vh; min-height: 640px;
  max-width: 1380px; margin: 0 auto;
  padding: 96px 32px 28px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: center;
}
.showcase-side { display: flex; flex-direction: column; gap: 18px; }
.showcase-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.showcase-nav button {
  all: unset; cursor: pointer; display: block;
  font-size: 22px; font-weight: 500; line-height: 1.35; color: var(--subtle);
  transition: color .35s, font-size .45s var(--ease-out), font-weight .35s;
}
.showcase-nav button:hover { color: var(--muted); }
.showcase-nav button[aria-current='true'] { color: var(--ink-strong); font-size: 32px; font-weight: 600; }
.showcase-progress { height: 3px; width: 120px; background: var(--line-strong); border-radius: 3px; overflow: hidden; }
.showcase-progress i { display: block; height: 100%; width: 0; background: var(--ink-strong); border-radius: inherit; transition: width .2s linear; }

.profile-card {
  position: relative;
  height: min(820px, calc(100vh - 124px));
  background: #fff; border-radius: 28px;
  border: 1px solid rgba(0,0,0,.05);
  box-shadow: 0 30px 80px rgba(17,24,39,.08);
  padding: 26px 28px 0;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.profile-card::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 70px;
  background: linear-gradient(transparent, #fff); pointer-events: none;
}
.pc-content { display: flex; flex-direction: column; min-height: 0; flex: 1; animation: swapIn .55s var(--ease-out); }
@keyframes swapIn { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }

.pc-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; }
.pc-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pc-id { display: flex; align-items: center; gap: 14px; }
.pc-avatar { position: relative; flex: none; }
.pc-avatar img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.pc-avatar .dot { position: absolute; right: 2px; bottom: 2px; width: 13px; height: 13px; border: 2px solid #fff; }
.pc-name { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--ink-strong); letter-spacing: -.01em; }
.pc-handle { font-size: 13px; color: var(--muted); }
.pc-bio { font-size: 14px; color: var(--ink); margin: 12px 0 14px; line-height: 1.6; }
.pc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pc-stats div { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.pc-stats b { display: block; font-size: 15px; font-weight: 700; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-stats small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pc-banner {
  position: relative; aspect-ratio: 16 / 6.4; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center; color: #fff; isolation: isolate;
}
.pc-banner::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: linear-gradient(90deg, transparent, #000);
}
.pc-banner b {
  font-size: clamp(22px, 3vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: .95;
  text-align: center; padding: 0 16px; text-transform: uppercase;
  text-shadow: 0 6px 30px rgba(0,0,0,.25);
}
.pc-banner small { position: absolute; left: 14px; top: 12px; font-family: var(--font-mono); font-size: 11px; opacity: .75; }
/* banner with a generated image: label moves bottom-left over a dark scrim so it stays readable on busy art */
.pc-banner.has-img { place-items: end start; }
.pc-banner.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: bannerIn .9s var(--ease-out); }
.pc-banner.has-img::before {
  z-index: -1; mask-image: none;
  background:
    linear-gradient(90deg, rgba(6, 9, 20, .78) 0%, rgba(6, 9, 20, .42) 38%, transparent 68%),
    linear-gradient(0deg, rgba(6, 9, 20, .55) 0%, transparent 55%);
}
.pc-banner.has-img b { text-align: left; padding: 0 18px 14px; font-size: clamp(18px, 2.1vw, 30px); }
.pc-banner.has-img small { text-shadow: 0 1px 6px rgba(0, 0, 0, .5); opacity: .9; }
@keyframes bannerIn { from { transform: scale(1.06); opacity: .4; } }
.pc-tags { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pc-tags .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--bg-soft); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pc-loc { font-size: 12px; color: var(--muted); }

.pc-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: 14px 0 14px; }
.pc-tabs button {
  all: unset; cursor: pointer; padding: 8px 0 10px; font-size: 14px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s;
}
.pc-tabs button[aria-selected='true'] { color: var(--ink-strong); border-color: var(--ink-strong); font-weight: 600; }
.pc-tabs button:focus-visible { outline: 2px solid var(--accent); }

.pc-body { flex: 1; min-height: 0; overflow: hidden; }
.pc-pane { animation: swapIn .4s var(--ease-out); }
/* Work tab: project cards + insight sidebar */
.pw { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.pw-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pw-card {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff;
  transition: border-color .2s, box-shadow .3s, transform .5s var(--ease-out);
}
.pw-card:hover { border-color: var(--line-strong); box-shadow: 0 16px 36px rgba(17,24,39,.08); transform: translateY(-2px); }
.pw-img { position: relative; background: var(--c, var(--bg-soft)); padding: 12px 12px 0; aspect-ratio: 2.25 / 1; display: flex; align-items: flex-end; overflow: hidden; }
.pw-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: 10px 10px 0 0; box-shadow: 0 -6px 24px rgba(17,24,39,.12);
  transition: transform .6s var(--ease-out);
}
.pw-card:hover .pw-img img { transform: translateY(-4px); }
.pw-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pw-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pw-card h4 { font-size: 18px; line-height: 1.25; color: var(--ink-strong); letter-spacing: -.01em; }
.pw-card p { font-size: 13px; line-height: 1.6; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pw-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pw-metrics div { background: var(--bg-soft); border-radius: 10px; padding: 6px 9px; min-width: 0; }
.pw-metrics b { display: block; font-size: 14px; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-metrics small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-more { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--accent); }

/* wide card: a category with a single project */
.pw-card.is-wide { grid-column: 1 / -1; flex-direction: row; }
.pw-card.is-wide .pw-img { width: 56%; flex: none; aspect-ratio: auto; min-height: 240px; padding: 16px 0 0 16px; }
.pw-card.is-wide .pw-img img { border-radius: 10px 0 0 0; }
.pw-card.is-wide .pw-body { padding: 20px 22px 18px; gap: 9px; }
.pw-card.is-wide h4 { font-size: 22px; }
.pw-card.is-wide p { -webkit-line-clamp: 3; }
/* 3+ projects: featured card on the left spanning two rows, compact cards stacked on the right */
.pw-list.has-feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.pw-card.is-feature { grid-row: span 2; }
.pw-card.is-feature .pw-img { aspect-ratio: 2.5 / 1; }
.pw-card.is-compact { flex-direction: row; }
.pw-card.is-compact .pw-img { width: 42%; flex: none; aspect-ratio: auto; min-height: 0; padding: 10px 0 0 10px; }
.pw-card.is-compact .pw-img img { border-radius: 8px 0 0 0; }
.pw-card.is-compact .pw-body { padding: 10px 12px 12px; gap: 4px; }
.pw-card.is-compact h4 { font-size: 15px; }
.pw-line { font-size: 12px; color: var(--ink); line-height: 1.45; }
.pw-card.is-compact .pw-more { font-size: 12px; }

/* internship card: a stylised road-network map instead of a screenshot */
.pw-card.is-exp .pw-img { background: linear-gradient(135deg, #042f2e, #0d9488 60%, #5eead4); padding: 0; align-items: flex-end; }
.pw-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.pw-route path { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 6 7; }
.pw-route circle { fill: #fff; }
.pw-route circle.end { fill: #fde68a; stroke: rgba(253,230,138,.35); stroke-width: 10; }
.pw-card.is-exp .pw-img::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.pw-card.is-exp .pw-img span { position: relative; margin: 0 0 12px 14px; color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .02em; text-shadow: 0 2px 10px rgba(0,0,0,.3); }

.pw-side { display: flex; flex-direction: column; gap: 16px; }
.pw-note { padding: 16px; border-radius: 16px; background: #fdf3df; rotate: -1deg; box-shadow: 0 10px 24px rgba(17,24,39,.06); }
.pw-note .who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pw-note .who img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.pw-note h4 { font-size: 15px; line-height: 1.4; color: var(--ink-strong); margin-bottom: 6px; }
.pw-note p { font-size: 13px; color: var(--ink); line-height: 1.6; }
.pw-skills h5 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pw-skills .chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* short laptop screens (e.g. 1366x768): keep each card's link above the fade */
@media (min-width: 961px) and (max-height: 800px) {
  .pw-img { aspect-ratio: 2.8 / 1; }
  .pw-card p { -webkit-line-clamp: 1; }
  .pc-bio { margin: 8px 0 10px; }
  .pw-card.is-feature .pw-img { aspect-ratio: 3.2 / 1; }
}

.side-list { display: flex; flex-direction: column; gap: 10px; }
.s-item { display: flex; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.s-item:hover { border-color: var(--line-strong); box-shadow: 0 6px 20px rgba(0,0,0,.05); }
.s-item img { width: 92px; height: 70px; border-radius: 10px; object-fit: cover; object-position: top; flex: none; background: var(--bg-soft); }
.s-item b { display: block; font-size: 14px; line-height: 1.3; color: var(--ink-strong); }
.s-item small { display: block; font-size: 12px; color: var(--muted); }
.s-item .metric { font-size: 12px; color: var(--ink); margin-top: 4px; display: flex; align-items: center; gap: 5px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.progress { background: #fdf0d2; color: #8a6100; }
.badge.done { background: #dcf3d8; color: #186a0c; }

.skill-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-cloud .chip { height: 36px; padding: 0 16px; font-size: 14px; background: #fff; border: 1px solid var(--line); }
.about-pane { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; font-size: 15px; line-height: 1.75; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; color: var(--ink-strong); }
.exp-mini { display: flex; flex-direction: column; gap: 12px; }
.exp-mini div { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.exp-mini b { display: block; color: var(--ink-strong); }
.exp-mini small { color: var(--muted); font-size: 12px; }

.trust-bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 36px 24px 24px; font-size: 14px; flex-wrap: wrap; text-align: center; }
.avatar-stack { display: flex; }
.avatar-stack img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--bg-soft); margin-left: -10px; background: #fff; }
.avatar-stack img:first-child { margin-left: 0; }

/* =========================================================
   PROBLEMS — dark section with draggable sticky notes
   ========================================================= */
.pain { background: var(--dark); color: #fff; padding: 140px 24px 100px; overflow: hidden; position: relative; }
.pain-head { text-align: center; position: relative; z-index: 1; }
.pain-head h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.pain-head p { color: rgba(255,255,255,.65); margin-top: 12px; font-size: 17px; }
.notes { position: relative; max-width: 1180px; height: 560px; margin: 50px auto 0; }
.note {
  --dx: 0px; --dy: 0px;
  position: absolute; left: var(--x); top: var(--y);
  width: 250px; min-height: 140px; padding: 22px 20px 16px;
  background: var(--c); color: #1d1d1d;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 18px 34px rgba(0,0,0,.35);
  font-size: 17px; font-weight: 500; line-height: 1.45;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  transform: translate(var(--dx), var(--dy)) rotate(var(--r));
  cursor: grab; user-select: none; touch-action: none;
  opacity: 0;
}
.note::before {
  content: ''; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; transform: translateX(-50%) rotate(-2deg);
  background: rgba(255,255,255,.4); backdrop-filter: blur(2px);
}
.note small a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0,0,0,.3); }
.note small a:hover { text-decoration-color: currentColor; }
.note small { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .55; }
.note.dragging { cursor: grabbing; box-shadow: 0 30px 60px rgba(0,0,0,.45); transition: none; }
.notes.in .note { opacity: 1; animation: drop 1s var(--ease-out) both; animation-delay: calc(var(--i) * 110ms); }
.notes.in .note.moved { animation: none; }
@keyframes drop {
  from { opacity: 0; transform: translate(0, -110vh) rotate(calc(var(--r) * -3)); }
  70% { opacity: 1; }
}
.pain-hint { text-align: center; color: rgba(255,255,255,.45); font-size: 13px; font-family: var(--font-hand); margin-top: 16px; }

/* =========================================================
   SECTION HEAD (shared)
   ========================================================= */
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 56px); font-weight: 600; line-height: 1.18; letter-spacing: -.02em; color: var(--ink-strong); }
.section-head p { color: var(--muted); font-size: 16px; max-width: 560px; }

/* =========================================================
   EXPERIENCE
   ========================================================= */
.experience { padding: 140px 24px 60px; max-width: 1200px; margin: 0 auto; }
.exp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.exp-card {
  border-radius: 28px; padding: 32px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 18px;
}
.exp-card.blue { background: #eaf3fe; }
.exp-card.yellow { background: #fdf3df; }
.exp-card .kind { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--muted); }
.exp-card h3 { font-size: 26px; line-height: 1.25; color: var(--ink-strong); letter-spacing: -.01em; }
.exp-card .org { font-size: 16px; font-weight: 600; }
.exp-card .where { font-size: 13px; color: var(--muted); }
.exp-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.exp-card li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.6; }
.exp-card li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.exp-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.exp-card .chip { background: rgba(255,255,255,.75); }
.exp-big {
  position: absolute; right: -10px; top: -24px; font-size: 140px; font-weight: 800; line-height: 1;
  color: rgba(0,0,0,.04); letter-spacing: -.05em; pointer-events: none;
}
.looking {
  margin-top: 20px; border-radius: 28px; padding: 28px 32px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.looking h3 { font-size: 22px; font-weight: 600; color: var(--ink-strong); margin-top: 4px; line-height: 1.4; }

/* =========================================================
   BENTO
   ========================================================= */
.bento-wrap { padding: 120px 24px; max-width: 1200px; margin: 0 auto; }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile { border-radius: 28px; padding: 28px; overflow: hidden; position: relative; min-height: 280px; display: flex; flex-direction: column; gap: 20px; }
.tile h3 { font-size: 22px; font-weight: 500; line-height: 1.3; color: var(--muted); }
.tile h3 b { color: var(--ink-strong); font-weight: 700; }
.tile-stack { grid-column: span 3; background: #e7f6f1; }
.tile-orders { grid-column: span 3; grid-row: span 2; background: #f3ecfb; }
.tile-process { grid-column: span 3; background: #fff1e5; }
.tile-fast { grid-column: span 2; background: #eaf3fe; justify-content: flex-end; }
.tile-term { grid-column: span 4; background: #12151b; color: #d4d4d4; padding: 0; gap: 0; font-family: var(--font-mono); }

.marquee { display: flex; flex-direction: column; gap: 10px; margin: 0 -28px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.m-row { display: flex; gap: 8px; width: max-content; animation: slide var(--dur, 40s) linear infinite; }
.m-row:nth-child(even) { animation-direction: reverse; }
.m-row span { background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
@keyframes slide { to { transform: translateX(-50%); } }

.orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.orders li > a {
  display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 14px 10px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: transform .4s var(--ease-out), box-shadow .3s;
}
.orders li > a:hover { transform: translateX(4px); box-shadow: 0 8px 22px rgba(0,0,0,.07); }
.orders img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; object-position: top; flex: none; background: var(--bg-soft); }
.orders .o-main { flex: 1; min-width: 0; }
.orders b { display: block; font-size: 14px; color: var(--ink-strong); }
.orders small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orders .o-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.orders .o-side em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; counter-reset: step; }
.process li { background: #fff; border-radius: 16px; padding: 14px 16px; counter-increment: step; }
.process li::before { content: '0' counter(step); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.process b { display: block; font-size: 15px; color: var(--ink-strong); margin-top: 2px; }
.process small { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }

.big-num { font-size: 96px; font-weight: 800; line-height: .9; letter-spacing: -.05em; color: var(--ink-strong); }
.big-num small { font-size: 22px; font-weight: 600; letter-spacing: 0; margin-left: 6px; }
.tile-fast p { font-size: 13px; color: var(--muted); margin-top: -12px; }

.term-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 12px; color: #737373; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3f48; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; }
.term-out { flex: 1; padding: 16px 20px 4px; font-size: 13px; line-height: 1.7; overflow-y: auto; max-height: 230px; min-height: 150px; white-space: pre-wrap; }
.term-out .cmd { color: #fff; }
.term-out .cmd::before { content: '$ '; color: #28c840; }
.term-out .hl { color: #7dd3fc; }
.term-out .ok { color: #86efac; }
.term-out a { color: #fcd34d; text-decoration: underline; text-underline-offset: 3px; }
.term-in { display: flex; gap: 10px; align-items: center; padding: 6px 20px 10px; font-size: 13px; }
.term-in label { color: #28c840; white-space: nowrap; }
.term-in input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; caret-color: #28c840; font-family: var(--font-mono); font-size: 13px; }
.term-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 18px; }
.term-chips button { all: unset; cursor: pointer; font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: #a3a3a3; text-transform: uppercase; letter-spacing: .05em; transition: color .2s, border-color .2s; }
.term-chips button:hover { color: #fff; border-color: rgba(255,255,255,.4); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { padding: 40px 24px 80px; }
.contact-card {
  position: relative; overflow: hidden; isolation: isolate;
  max-width: 1200px; margin: 0 auto; border-radius: 36px;
  background: var(--ink-strong); color: #fff;
  padding: 96px 32px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.contact-glow {
  position: absolute; inset: -40%; z-index: -1; opacity: .5;
  background:
    radial-gradient(closest-side at 30% 40%, rgba(5,105,255,.55), transparent),
    radial-gradient(closest-side at 70% 60%, rgba(236,206,243,.4), transparent),
    radial-gradient(closest-side at 55% 25%, rgba(165,227,214,.35), transparent);
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: rotate(25deg) scale(1.1); } }
.contact-card h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 600; line-height: 1.18; letter-spacing: -.02em; }
.contact-card .hand { color: #8ab8ff; }
.contact-card p { color: rgba(255,255,255,.7); max-width: 520px; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.footer { max-width: 1200px; margin: 0 auto; padding: 0 24px 40px; display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.footer a:hover { color: var(--ink-strong); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.exp-grid .reveal:nth-child(2), .bento .reveal:nth-child(2) { transition-delay: .08s; }
.bento .reveal:nth-child(3) { transition-delay: .12s; }
.bento .reveal:nth-child(4) { transition-delay: .16s; }
.bento .reveal:nth-child(5) { transition-delay: .2s; }

/* =========================================================
   UTILITIES + LANGUAGE TOGGLE
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink-strong); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; transition: top .2s; }
.skip:focus { top: 16px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; transition: border-color .2s;
}
.lang-toggle:hover { border-color: var(--line-strong); }
.lang-toggle span { color: var(--subtle); transition: color .2s; }
.lang-toggle span.on { color: var(--ink-strong); }
.lang-toggle span + span::before { content: '/'; margin-right: 6px; color: var(--line-strong); font-weight: 400; }
.nav.is-sub .nav-bar { max-width: 980px; }

/* =========================================================
   PROJECT DETAIL PAGE
   ========================================================= */
.pj { padding-top: 110px; }
.pj-hero { max-width: 1200px; margin: 0 auto; padding: 24px 24px 0; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.pj-hero-copy { display: flex; flex-direction: column; gap: 18px; animation: blurIn 1s var(--ease-out) both; }
.pj-back { font-size: 14px; font-weight: 600; color: var(--muted); width: fit-content; }
.pj-back:hover { color: var(--ink-strong); }
.pj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.pj-meta .muted { margin-left: auto; font-family: var(--font-mono); font-size: 12px; }
.pj-title { font-size: clamp(40px, 5.6vw, 76px); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; color: var(--ink-strong); }
.pj-summary { font-size: 18px; line-height: 1.7; color: var(--ink); max-width: 560px; }
.pj-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.pj-cover { position: relative; margin: 0; padding: 26px; border-radius: 32px; background: var(--c); animation: blurIn 1.1s .1s var(--ease-out) both; }
.pj-cover::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: radial-gradient(rgba(0,0,0,.08) 1px, transparent 1px); background-size: 16px 16px;
  mask-image: linear-gradient(135deg, transparent 30%, #000);
}
.pj-cover-frame { position: relative; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px rgba(17,24,39,.18); }
.pj-cover-frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.pj-cover figcaption { position: relative; font-size: 13px; color: rgba(0,0,0,.62); margin-top: 16px; line-height: 1.55; }
.pj-float {
  position: absolute; width: 34%; padding: 6px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-card); animation: float 7s ease-in-out infinite;
}
.pj-float img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; width: 100%; }
.pj-float.f0 { left: -9%; bottom: 14%; rotate: -7deg; }
.pj-float.f1 { right: -6%; top: -8%; rotate: 6deg; animation-delay: -3s; }
.pj-stats { grid-column: 1 / -1; justify-content: flex-start; animation-delay: .25s; }

.pj-body { max-width: 1200px; margin: 0 auto; padding: 80px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
.pj-article { display: flex; flex-direction: column; gap: 44px; }
.pj-sec h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--ink-strong); margin-bottom: 14px; }
.pj-sec p { font-size: 17px; line-height: 1.8; margin-bottom: 14px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.7; }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.pj-glance {
  position: sticky; top: 100px; border: 1px solid var(--line); border-radius: 24px; padding: 24px; background: #fff;
  box-shadow: 0 20px 50px rgba(17,24,39,.06); display: flex; flex-direction: column; gap: 16px;
}
.pj-glance h3 { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pj-glance h4 { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.pj-glance .kv dd { font-weight: 600; }
.glance-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.glance-metrics div { background: var(--bg-soft); border-radius: 12px; padding: 10px; }
.glance-metrics b { display: block; font-size: 17px; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glance-metrics small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.pj-glance .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-glance .src { font-size: 13px; font-weight: 600; word-break: break-all; color: var(--accent); }

.pj-gallery { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.pj-gallery h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--ink-strong); margin-bottom: 24px; display: flex; align-items: baseline; gap: 10px; }
.pj-gallery h2 small { font-size: 14px; color: var(--muted); font-weight: 500; }
.pj-shots { columns: 3 300px; column-gap: 18px; }
.pj-shot { break-inside: avoid; margin: 0 0 22px; transition-delay: calc(var(--i) * 60ms); }
.pj-zoom { all: unset; display: block; cursor: zoom-in; border-radius: 16px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line); width: 100%; box-sizing: border-box; }
.pj-zoom img { width: 100%; transition: transform .6s var(--ease-out); }
.pj-zoom:hover img { transform: scale(1.03); }
.pj-zoom:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pj-shot figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.55; }

.pj-pager { max-width: 1200px; margin: 0 auto; padding: 20px 24px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pj-pg { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; transition: border-color .2s, box-shadow .3s, transform .5s var(--ease-out); }
.pj-pg:hover { border-color: var(--line-strong); box-shadow: 0 14px 34px rgba(0,0,0,.07); transform: translateY(-2px); }
.pj-pg img { width: 120px; height: 80px; border-radius: 12px; object-fit: cover; object-position: top; flex: none; }
.pj-pg small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.pj-pg b { display: block; font-size: 18px; color: var(--ink-strong); }
.pj-pg.is-next { flex-direction: row-reverse; text-align: right; }
.contact-card.is-compact { padding: 64px 28px; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(15, 17, 21, .86); backdrop-filter: blur(6px); }
.lightbox[open] { animation: swapIn .35s var(--ease-out); }
.lightbox figure { margin: 0; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 14px; margin: 0 auto; background: #fff; }
.lightbox figcaption { color: rgba(255,255,255,.8); text-align: center; font-size: 14px; margin-top: 14px; }
.lb-btn { position: fixed; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; transition: background .2s; }
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 20px; top: 50%; } .lb-next { right: 20px; top: 50%; } .lb-close { right: 20px; top: 20px; }

/* 404 */
.nf { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 120px 24px 60px; }
.nf-code { font-size: clamp(90px, 16vw, 180px); line-height: 1; }
.nf h1 { font-size: clamp(28px, 4vw, 44px); color: var(--ink-strong); letter-spacing: -.02em; }
.nf p { color: var(--muted); max-width: 420px; }
.nf-notes { display: flex; gap: 18px; margin-bottom: 10px; }
.nf-card { width: 150px; padding: 6px 6px 10px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-card); transform: rotate(var(--r)); font-size: 12px; transition: transform .5s var(--ease-out); }
.nf-card:hover { transform: rotate(0) translateY(-4px); }
.nf-card img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; margin-bottom: 6px; }

@media (max-width: 960px) {
  .pj-hero, .pj-body { grid-template-columns: minmax(0, 1fr); }
  .pj-hero { gap: 32px; }
  .pj-glance { position: static; }
  .pj-body { padding-top: 56px; gap: 40px; }
}
@media (max-width: 720px) {
  .pj { padding-top: 84px; }
  .pj-cover { padding: 14px; border-radius: 22px; }
  .pj-float { display: none; }
  .pj-summary { font-size: 16px; }
  .pj-pager { grid-template-columns: 1fr; }
  .pj-pg img { width: 88px; height: 60px; }
  .lang-toggle { height: 34px; padding: 0 10px; }
  .nf-card { width: 96px; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  .pw { grid-template-columns: minmax(0, 1fr) 220px; }
  .pw-card.is-wide .pw-img { width: 50%; }
  .hcard { --w: 170px !important; }
}

@media (max-width: 960px) {
  .nav-links { display: none; }
  .showcase { padding-top: 80px; }
  .showcase-track { height: auto; }
  .showcase-sticky { position: static; height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); padding: 0 16px; gap: 20px; }
  .showcase-side { gap: 10px; position: sticky; top: 74px; z-index: 5; background: var(--bg-soft); margin: 0 -16px; padding: 8px 16px 10px; }
  .showcase-nav { flex-direction: row; overflow-x: auto; gap: 8px; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .showcase-nav button, .showcase-nav button[aria-current='true'] {
    font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; background: #fff; white-space: nowrap; color: var(--muted);
  }
  .showcase-nav button[aria-current='true'] { background: var(--ink-strong); color: #fff; }
  .showcase-progress { display: none; }
  .profile-card { height: auto; padding: 20px 18px 18px; border-radius: 22px; }
  .profile-card::after { display: none; }
  .pc-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .showcase-side, .profile-card { min-width: 0; }
  .pc-banner { order: -1; }
  .pw, .about-pane { grid-template-columns: minmax(0, 1fr); }
  .pc-tabs { overflow-x: auto; gap: 18px; scrollbar-width: none; }
  .pc-tabs::-webkit-scrollbar, .showcase-nav::-webkit-scrollbar { display: none; }

  .notes { height: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 14px; padding-top: 10px; }
  .note { position: relative; left: auto; top: auto; width: 46%; max-width: 240px; min-height: 120px; font-size: 15px; }

  .pain-hint { display: none; }
  .exp-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .tile { grid-column: auto !important; grid-row: auto !important; }
}

@media (max-width: 720px) {
  .hero { padding-top: 110px; place-items: start center; }
  .hcard { --w: 120px !important; left: var(--xm); top: var(--ym); }
  .hcard-meta { display: none; }
  .hcard.hide-sm { display: none; }
  .hero-copy { margin-top: 120px; }
  .hero-title { font-size: clamp(38px, 12vw, 56px); }
  .hero-title .line + .line { font-size: .48em; }
  .hero-title .line { white-space: normal; }
  .stat-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .pj-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* let card metric labels wrap instead of truncating */
  .pw-metrics small { white-space: normal; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  /* calmer section spacing on phones */
  .pain { padding: 96px 20px 72px; }
  .experience { padding: 88px 20px 40px; }
  .bento-wrap { padding: 72px 20px; }
  .section-head { margin-bottom: 36px; }
  /* contact buttons: one tidy full-width column */
  .contact-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
  .contact-actions .btn { width: 100%; }
  /* terminal: short prompt so the hint fits */
  .term-host { display: none; }
  .term-in input { font-size: 16px; min-height: 36px; } /* 16px stops iOS zooming in on focus */
  .term-out { min-height: 84px; }
  .bento-wrap { padding-bottom: 32px; }
  .glance-metrics { display: none; } /* same numbers already sit at the top of the project page */
  /* comfortable tap targets */
  .term-chips button { padding: 8px 12px; }
  .term-in { padding-top: 10px; padding-bottom: 12px; }
  .note small a { display: inline-block; padding: 6px 0; }
  .pj-back, .footer a, .nav-logo { padding: 10px 0; }
  .stat-chip { min-width: 0; padding: 10px 6px; }
  .stat-chip b { font-size: 20px; }
  .stat-chip small { font-size: 11px; text-align: center; line-height: 1.3; }
  .status-pill { display: none; }
  .nav { padding: 10px 12px; }
  .nav-bar { padding: 0 8px 0 16px; height: 56px; }
  .pw-list { grid-template-columns: minmax(0, 1fr); }
  .pw-card.is-wide { flex-direction: column; }
  .pw-list.has-feature { grid-template-columns: minmax(0, 1fr); }
  .pw-card.is-feature { grid-row: auto; }
  .pw-card.is-wide .pw-img { width: auto; aspect-ratio: 16 / 9; min-height: 0; padding: 14px 14px 0; }
  .pw-card.is-wide .pw-img img { border-radius: 10px 10px 0 0; }
  .pw-card.is-compact .pw-img { width: 38%; }
  .pc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: 1fr; }
  .story { padding: 80px 20px 110px; }
  .contact-card { padding: 72px 22px; border-radius: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
