/* DEV PACK portfolio — 정재훈 */
@font-face { font-family: "Paperlogy"; src: url("../fonts/Paperlogy-4Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("../fonts/Paperlogy-5Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("../fonts/Paperlogy-6SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("../fonts/Paperlogy-7Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("../fonts/Paperlogy-8ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
:root {
  --bg: #070a14;
  --bg-2: #0d1120;
  --panel: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .1);
  --text: #f1f3f8;
  --text-2: #c7ccd9;
  --text-3: #a9b0c2;
  --accent: #ffcc33;
  --accent-ink: #14110a;
  --red: #ea002c;
  --orange: #f47725;
  --gutter: clamp(16px, 5vw, 72px);
  --font: "Paperlogy", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --display: "Paperlogy", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "Paperlogy", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; }
a { color: var(--accent); }
a:hover { color: #ffe08a; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.small { font-size: 13px; color: var(--text-3); }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px; padding: 14px var(--gutter); background: rgba(7, 10, 20, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .02em; min-height: 44px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 17px; }
.site-head nav { margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site-head nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-head nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.site-head nav a:hover { background: var(--panel); color: var(--text); }
.motion-toggle { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-size: 13px; cursor: pointer; white-space: nowrap; }
.motion-toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- common ---------- */
main { display: block; }
.sec { padding: clamp(64px, 9vw, 112px) var(--gutter) 0; max-width: 1440px; margin: 0 auto; }
.sec-head { max-width: 860px; margin-bottom: 36px; }
.eyebrow { margin: 0 0 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.eyebrow.small { font-size: 12px; color: var(--text-3); letter-spacing: .06em; }
h1, h2, h3 { margin: 0; }
h2 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 5vw, 46px); line-height: 1.15; }
.sec-lead { margin: 14px 0 0; font-size: 17px; line-height: 1.75; color: var(--text-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: var(--text); text-decoration: none; font-size: 16.5px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--panel); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; box-shadow: 0 10px 30px rgba(255, 204, 51, .25); }
.btn.primary:hover { background: #ffd95c; color: var(--accent-ink); }
.btn.ghost { border-color: var(--line); }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); font-size: 18px; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--b); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 800; line-height: 1.3; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.badge .glyph { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--b); font-size: 8.5px; letter-spacing: -.02em; }
.badge.sm { font-size: 11.5px; padding: 2px 9px 2px 2px; }
.badge.sm .glyph { width: 16px; height: 16px; font-size: 8px; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 12.5px; color: var(--text-2); }
.gchip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 7px; font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.gchip.g-impact { background: linear-gradient(90deg, #ff9ec0, #ffe08a, #9ad8ff); color: #14110a; }
.gchip.g-live { background: #f3cf6e; color: #1f1603; }
.gchip.g-tested { background: #d6dae3; color: #1c2230; }
.gchip.g-plan { background: #3a4259; color: #eef0f5; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; max-width: 1440px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 0; }
#hero-title:focus { outline: none; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 6.2vw, 74px); line-height: 1.14; letter-spacing: -.02em; }
.lead { margin: 24px 0 0; max-width: 600px; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.8; color: var(--text-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 34px 0 0; max-width: 640px; }
.stats div { padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 13px; color: var(--text-3); line-height: 1.4; margin-top: 4px; }
.stats dd { margin: 0; font-family: var(--mono); font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; color: var(--accent); line-height: 1.2; }
.hero-card { display: flex; justify-content: center; }

/* ---------- holo card base ---------- */
.tcard, .profile { position: relative; display: block; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; container-type: inline-size; aspect-ratio: 5 / 7; width: var(--cw, 300px); border-radius: 5.5cqi; -webkit-tap-highlight-color: transparent; }
.profile { --cw: min(380px, 100%); cursor: default; aspect-ratio: auto; }
.tilt { position: relative; display: block; width: 100%; height: 100%; border-radius: inherit; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s; }
.is-tilting .tilt { transition: none; }
.frame { display: block; height: 100%; padding: 3cqi; border-radius: inherit; background: var(--frame); box-shadow: var(--shadow); }
.inner { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 3.6cqi; background: var(--inner, linear-gradient(180deg, #151a2b, #0f1322)); color: var(--text); }
.c-head { display: flex; align-items: center; gap: 3cqi; padding: 3.4cqi 4cqi 2.6cqi; }
.c-emb { flex-shrink: 0; width: 11.5cqi; height: 11.5cqi; border-radius: 50%; display: grid; place-items: center; background: var(--emblem); color: var(--emblem-ink); font-family: var(--mono); font-size: 3.6cqi; font-weight: 800; box-shadow: inset 0 2px 3px rgba(255, 255, 255, .55), inset 0 -3px 4px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .4); }
.c-titles { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.c-cat { font-size: max(10px, 3.3cqi); font-weight: 600; letter-spacing: .04em; color: var(--text-3); }
.c-title { font-size: max(12px, 5.2cqi); font-weight: 700; line-height: 1.22; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.c-title.big { font-size: 7cqi; }
.c-stat { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex-shrink: 0; max-width: 34%; }
.c-stat b { font-family: var(--mono); font-size: max(12px, 5.4cqi); font-weight: 800; line-height: 1; color: var(--accent2); white-space: nowrap; }
.c-stat small { font-size: max(9.5px, 3cqi); color: var(--text-3); margin-top: .8cqi; line-height: 1.2; }
.c-art { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 46cqi; margin: 0 3.4cqi; border-radius: 2.6cqi; overflow: hidden; background: var(--art); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.c-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 6cqi 6cqi; }
.c-types { position: absolute; left: 2cqi; top: 2cqi; right: 2cqi; z-index: 2; display: flex; flex-wrap: wrap; gap: 1.3cqi; }
.c-types .badge { font-size: max(9.5px, 3.1cqi); padding: .6cqi 2.4cqi .6cqi .6cqi; gap: 1.2cqi; box-shadow: 0 2px 6px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .35); }
.c-types .badge .glyph { width: 4.6cqi; height: 4.6cqi; min-width: 13px; min-height: 13px; font-size: max(7px, 2.2cqi); }
.c-creature { position: relative; width: 44cqi; height: 44cqi; margin-bottom: 1cqi; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.c-ribbon { position: relative; display: flex; flex-direction: column; margin: -4cqi 5cqi 0 3.4cqi; padding: 2cqi 4cqi 2cqi 3.4cqi; clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%); background: var(--ribbon); color: var(--ribbon-ink); }
.c-ribbon small { font-size: max(9px, 2.9cqi); font-weight: 700; letter-spacing: .04em; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-ribbon b { font-family: var(--display); font-weight: 800; font-size: max(13px, 6cqi); line-height: 1.12; }
.c-moves { display: flex; flex-direction: column; gap: 2.4cqi; padding: 3.2cqi 4cqi 0; min-height: 0; overflow: hidden; }
.mv { display: flex; gap: 2.6cqi; align-items: flex-start; }
.mv-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mv-t b { font-size: max(11px, 4cqi); font-weight: 700; line-height: 1.3; }
.mv-t small { font-size: max(10px, 3.5cqi); line-height: 1.4; color: #b9bfcd; }
.mv em { font-style: normal; font-family: var(--mono); font-size: max(11px, 4.2cqi); font-weight: 800; color: var(--accent2); white-space: nowrap; }
.c-foot { margin-top: auto; display: flex; align-items: center; gap: 2cqi; padding: 2.6cqi 4cqi; border-top: 1px solid rgba(255, 255, 255, .1); font-size: max(9.5px, 3.1cqi); color: var(--text-3); }
.c-tools { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-grade { padding: .6cqi 2cqi; border-radius: 1.6cqi; font-family: var(--mono); font-weight: 800; background: var(--coin); color: var(--coin-ink); letter-spacing: .04em; }
.c-year { font-family: var(--mono); }
.foil, .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.foil { opacity: 0; mix-blend-mode: color-dodge; }
.glare { opacity: calc(var(--hyp, 0) * .8); mix-blend-mode: soft-light; background: radial-gradient(circle at calc(var(--px, .5) * 100%) calc(var(--py, .5) * 100%), rgba(255, 255, 255, .85), transparent 55%); transition: opacity .4s; }
.tcard:hover .tilt, .tcard:focus-visible .tilt { box-shadow: 0 24px 50px rgba(0, 0, 0, .5); }
.tcard:focus-visible { outline: none; }
.tcard:focus-visible .frame { outline: 3px solid var(--accent); outline-offset: 3px; }

/* grade themes */
.g-plan { --frame: linear-gradient(135deg, #2c3346, #3a4259); --inner: #10141f; --art: linear-gradient(145deg, #1c2233, #2a3248); --ribbon: #2f3649; --ribbon-ink: #eef0f5; --emblem: radial-gradient(circle at 35% 30%, #6b748a, #353c4f); --emblem-ink: #fff; --accent2: #d6dae3; --coin: #3a4259; --coin-ink: #eef0f5; --shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.g-tested { --frame: linear-gradient(135deg, #8a93a5 0%, #eef1f6 30%, #7d8596 52%, #d4d9e2 76%, #8a93a5 100%); --art: linear-gradient(145deg, #1f3b66 0%, #2f6fb0 50%, #0f1c33 100%); --ribbon: linear-gradient(90deg, #45526e, #5f6d8c); --ribbon-ink: #fff; --emblem: radial-gradient(circle at 35% 30%, #fff, #b9c0cc 45%, #5f6778 100%); --emblem-ink: #1c2230; --accent2: #a9d6ff; --coin: linear-gradient(135deg, #f4f6fa, #aab2c0); --coin-ink: #1c2230; --shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.g-live { --frame: linear-gradient(135deg, #a67a22 0%, #f7d985 28%, #b8892b 50%, #f3cf6e 74%, #9c701c 100%); --inner: linear-gradient(180deg, #171d33, #10152a); --art: linear-gradient(145deg, #6b4a10 0%, #c8962e 45%, #2a1d06 100%); --ribbon: linear-gradient(90deg, #e7b84a, #f7d985); --ribbon-ink: #1f1603; --emblem: radial-gradient(circle at 35% 30%, #fff3c4, #e2b54c 45%, #8c6415 100%); --emblem-ink: #3a2600; --accent2: #f6d77e; --coin: linear-gradient(135deg, #fff3c4, #d9a93c); --coin-ink: #3a2600; --shadow: 0 16px 40px rgba(230, 180, 70, .28); }
.g-impact { --frame: linear-gradient(135deg, #fbf5e8 0%, #e6d7bb 30%, #fffaf0 52%, #d9c6a4 76%, #f7eedb 100%); --inner: linear-gradient(180deg, #141b3d, #0c1128); --art: conic-gradient(from 210deg at 60% 45%, #3b5bff, #8a3bff, #ff4f9a, #ffb347, #3bd6ff, #3b5bff); --ribbon: linear-gradient(90deg, #2f55ff, #7c3bff); --ribbon-ink: #fff; --emblem: radial-gradient(circle at 35% 30%, #fff3c4, #e2b54c 45%, #8c6415 100%); --emblem-ink: #3a2600; --accent2: #ffd76e; --coin: linear-gradient(90deg, #ff9ec0, #ffe08a, #9ad8ff); --coin-ink: #14110a; --shadow: 0 0 0 1px rgba(255, 255, 255, .4), 0 18px 50px rgba(255, 190, 110, .32), 0 0 70px rgba(140, 110, 255, .28); }
.g-tested .foil { opacity: calc(.14 + var(--hyp, 0) * .25); background: linear-gradient(118deg, transparent 30%, rgba(255, 255, 255, .8) calc(var(--px, .5) * 60% + 20%), transparent 75%); mix-blend-mode: screen; }
.g-live .foil { opacity: calc(.22 + var(--hyp, 0) * .3); background: linear-gradient(118deg, transparent 20%, rgba(255, 230, 160, .9) calc(var(--px, .5) * 50% + 20%), #fff calc(var(--px, .5) * 50% + 25%), rgba(255, 214, 120, .9) calc(var(--px, .5) * 50% + 30%), transparent 80%); }
.g-impact .foil { opacity: calc(.3 + var(--hyp, 0) * .3); background: repeating-linear-gradient(118deg, #ff7aa8 0%, #ffd76e 7%, #7dffc4 14%, #72c8ff 21%, #b07bff 28%, #ff7aa8 35%); background-size: 320% 320%; background-position: calc(var(--px, .5) * 100%) calc(var(--py, .5) * 100%); }
.g-impact .foil::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background-image: radial-gradient(circle, #fff 0 1px, transparent 1.6px), radial-gradient(circle, rgba(255, 255, 255, .7) 0 1px, transparent 1.4px); background-size: 23px 23px, 37px 37px; background-position: 0 0, 11px 17px; mix-blend-mode: overlay; }
/* foil lives inside the art window; frames shimmer with the pointer */
.c-art .foil { z-index: 1; border-radius: inherit; }
.g-tested .frame, .g-live .frame, .g-impact .frame { background-size: 220% 220%; background-position: calc(var(--px, .5) * 100%) calc(var(--py, .5) * 100%); }
/* container-based compaction */
@container (max-width: 215px) {
  .c-moves, .c-ribbon small, .c-tools, .c-year { display: none; }
  .c-foot { justify-content: flex-end; }
}

/* profile (hero) */
.profile { display: block; }
.profile .frame { --frame: linear-gradient(135deg, #fbf5e8 0%, #e6d7bb 30%, #fffaf0 52%, #d9c6a4 76%, #f7eedb 100%); --shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 90px rgba(120, 140, 255, .25); padding: 11px; border-radius: 22px; }
.profile .inner { --inner: linear-gradient(180deg, #141b3d, #0c1128); border-radius: 14px; }
.profile { --emblem: radial-gradient(circle at 35% 30%, #fff3c4, #e2b54c 45%, #8c6415 100%); --emblem-ink: #3a2600; --accent2: #ffd76e; --ribbon: linear-gradient(90deg, #2f55ff, #7c3bff); --ribbon-ink: #fff; border-radius: 22px; }
.profile .c-head { padding: 14px 16px 10px; gap: 10px; }
.profile .c-emb { width: 40px; height: 40px; font-size: 13px; }
.profile .c-title.big { font-size: 24px; }
.profile .c-cat { font-size: 12px; }
.profile .c-stat b { font-size: 20px; }
.profile .c-stat small { font-size: 11px; }
.p-art { position: relative; height: 230px; margin: 0 14px; border-radius: 10px; overflow: hidden; display: flex; justify-content: center; align-items: flex-end; background: radial-gradient(160px 120px at 22% 30%, rgba(234, 0, 44, .72), transparent 70%), radial-gradient(180px 140px at 80% 70%, rgba(244, 119, 37, .62), transparent 70%), radial-gradient(220px 160px at 60% 20%, rgba(120, 60, 200, .55), transparent 72%), linear-gradient(180deg, #0a0c24, #140a26); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.p-art .stars { position: absolute; inset: 0; background-image: radial-gradient(circle, #fff 0 1px, transparent 1.5px), radial-gradient(circle, rgba(255, 255, 255, .7) 0 1px, transparent 1.4px), radial-gradient(circle, rgba(255, 220, 180, .9) 0 1.2px, transparent 1.8px); background-size: 37px 41px, 23px 29px, 61px 53px; background-position: 3px 7px, 11px 17px, 29px 5px; }
.p-art .ring { position: absolute; left: 6%; top: 64%; width: 88%; height: 60px; border-radius: 50%; border: 2px solid rgba(255, 190, 140, .35); transform: rotate(-12deg); }
.p-art .c-types { left: 8px; top: 8px; right: 8px; gap: 5px; }
.p-art .c-types .badge { font-size: 11px; padding: 2px 9px 2px 2px; gap: 4px; }
.p-art .c-types .badge .glyph { width: 16px; height: 16px; font-size: 7.5px; }
.avatar-svg { position: relative; width: 230px; height: 230px; }
.profile .c-ribbon { margin: -14px 22px 0 14px; padding: 8px 14px; }
.profile .c-ribbon small { font-size: 11px; }
.profile .c-ribbon b { font-size: 22px; }
.profile .c-moves { padding: 12px 16px 0; gap: 9px; }
.profile .mv-t b { font-size: 14px; }
.profile .mv-t small { font-size: 12.5px; }
.p-skills { display: flex; flex-wrap: wrap; gap: 5px; padding: 12px 14px 0; }
.p-skills .badge { font-size: 11px; padding: 2px 9px 2px 2px; gap: 4px; }
.p-skills .badge .glyph { width: 16px; height: 16px; font-size: 7.5px; }
.profile .c-foot { font-size: 12px; padding: 10px 16px; margin-top: 12px; }
.profile .foil { opacity: calc(.18 + var(--hyp, 0) * .3); background: linear-gradient(118deg, transparent 25%, rgba(255, 230, 160, .7) calc(var(--px, .5) * 50% + 20%), #fff calc(var(--px, .5) * 50% + 25%), rgba(160, 200, 255, .7) calc(var(--px, .5) * 50% + 30%), transparent 80%); -webkit-mask: linear-gradient(#000, #000) top / 100% 52% no-repeat; mask: linear-gradient(#000, #000) top / 100% 52% no-repeat; }

/* ---------- featured ---------- */
.cases { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); }
.case { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding: clamp(20px, 3vw, 36px); border-radius: 24px; background: var(--panel); border: 1px solid var(--line); }
.case-cards { position: relative; --cw: 300px; display: flex; justify-content: center; }
.case-cards.two { --cw: 250px; height: 460px; }
.case-cards.two .tcard:first-child { position: absolute; left: 0; top: 0; transform: rotate(-4deg); }
.case-cards.two .tcard:last-child { position: absolute; right: 0; top: 90px; transform: rotate(5deg); }
.case-no { margin: 0; font-family: var(--mono); font-weight: 800; color: var(--accent); font-size: 14px; }
.case h3 { font-size: clamp(22px, 2.4vw, 28px); margin-top: 4px; }
.case-dl { margin: 18px 0 0; display: flex; flex-direction: column; gap: 14px; }
.case-dl div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
.case-dl dt { font-weight: 700; color: var(--accent); font-size: 14.5px; padding-top: 1px; }
.case-dl dd { margin: 0; font-size: 15.5px; line-height: 1.75; color: var(--text-2); }
.case-dl ul { margin: 0; padding-left: 18px; }
.case-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ext { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.ext:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.private { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--text-3); font-size: 14px; }

/* ---------- career ---------- */
.career-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.career-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.career-meta div { padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.career-meta dt { font-size: 12.5px; color: var(--text-3); }
.career-meta dd { margin: 0; font-family: var(--mono); font-weight: 800; font-size: 16px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.role { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 18px; padding: 18px 20px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.role.now { background: linear-gradient(100deg, rgba(234, 0, 44, .14), rgba(244, 119, 37, .05)); border-color: rgba(244, 119, 37, .45); }
.role-year { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-weight: 800; font-size: 14.5px; color: var(--accent); }
.role.now .role-year { color: #ffab85; }
.now-chip { align-self: flex-start; padding: 2px 8px; border-radius: 6px; background: #c4002a; color: #fff; font-size: 11px; font-family: var(--font); font-weight: 700; }
.role h3 { font-size: 17.5px; }
.role p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.career-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 90px; }
.membership { padding: 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.edu { padding: 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.edu h3 { font-size: 19px; margin-bottom: 12px; }
.edu dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.edu dl div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; font-size: 14.5px; }
.edu dt { color: var(--text-3); }
.edu dd { margin: 0; color: var(--text-2); }
.linked { padding: 22px 24px; border-radius: 18px; background: linear-gradient(140deg, #3a0a18 0%, #1a0f2e 100%); border: 1px solid rgba(234, 0, 44, .45); }
.linked-eye { color: #ff9c78; letter-spacing: .1em; }
.linked h3 { font-size: 17px; line-height: 1.45; }
.linked p:not(.eyebrow) { margin: 8px 0 14px; font-size: 14.5px; line-height: 1.7; color: #d7dbe5; }
.linked .ext { background: rgba(255, 255, 255, .06); cursor: pointer; }
.membership h3 { font-size: 19px; margin-bottom: 14px; }
.membership ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.membership li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.membership .num { flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 800; }

/* ---------- how ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { padding: 22px 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.step-no { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 204, 51, .16); color: var(--accent); font-family: var(--mono); font-weight: 800; margin-bottom: 14px; }
.steps h3 { font-size: 18px; }
.steps p { margin: 8px 0 0; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.split-col { padding: 22px 24px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.split-col.guard { border-color: rgba(255, 204, 51, .35); background: rgba(255, 204, 51, .05); }
.split-col h3 { font-size: 16.5px; margin-bottom: 10px; }
.split-col ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14.5px; line-height: 1.8; }

/* ---------- packs ---------- */
.packs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.pack { position: relative; display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.pack:hover, .pack:focus-visible { transform: perspective(800px) rotateY(-8deg) rotateX(5deg) translateY(-8px); }
.pack-body { position: relative; height: 320px; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; align-items: center; background: var(--pack); box-shadow: 0 18px 40px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .2); }
.crimp { display: block; width: 100%; height: 14px; flex-shrink: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .32) 0 3px, rgba(0, 0, 0, .2) 3px 6px); }
.pack-brand { margin-top: 18px; font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .14em; color: #fff; }
.pack-mon { margin: 10px 0 4px; width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 255, 255, .26), rgba(0, 0, 0, .25) 70%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.pack-mon svg { width: 108px; height: 108px; }
.pack-label { margin: auto 10px 12px; align-self: stretch; padding: 10px 8px; border-radius: 8px; background: rgba(0, 0, 0, .55); text-align: center; display: flex; flex-direction: column; }
.pack-name { font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.2; color: #fff; }
.pack-desc { font-size: 12.5px; color: #eceef3; margin-top: 3px; }
.sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .7) 48%, transparent 60%); background-size: 280% 280%; background-position: 120% 0; transition: background-position .9s; }
.pack:hover .sheen, .pack:focus-visible .sheen { background-position: -20% 100%; }
.pack-meta { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: var(--text); }
.opened-mark { position: absolute; top: 24px; right: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11.5px; font-weight: 700; }
.legend { margin-top: 30px; padding: 20px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.legend-title { margin: 0 0 12px; font-weight: 700; }
.legend-title small { font-weight: 400; color: var(--text-3); margin-left: 8px; font-size: 14px; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.legend li { display: flex; gap: 10px; align-items: flex-start; }
.legend li > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.legend b { font-size: 15px; }
.legend small { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.gcount { font-family: var(--mono); font-size: 13px; color: var(--text-3); }

/* ---------- all ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.chip:hover { border-color: rgba(255, 255, 255, .35); }
.filters .sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.filter-count { margin: 14px 0 20px; font-size: 14px; color: var(--text-3); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 24px; }
.grid li { display: flex; justify-content: center; }
.grid .tcard { --cw: 100%; max-width: 320px; }
.grid li[hidden] { display: none; }

/* ---------- characters ---------- */
.mons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.mon { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px 18px; border-radius: 18px; background: radial-gradient(160px 140px at 50% 36%, #1a2446 0%, #0d1120 100%); border: 1px solid var(--line); text-align: center; }
.mon svg { width: 150px; height: 150px; }
.mon figcaption { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.mon b { font-size: 15px; }
.mon figcaption > span:not(.mon-types) { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.mon-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }

.site-foot { margin-top: 110px; padding: 36px var(--gutter) 48px; border-top: 1px solid var(--line); text-align: center; color: var(--text-2); }
.site-foot p { margin: 4px 0; }

/* ---------- dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(3, 5, 12, .82); backdrop-filter: blur(6px); }
.opening { width: min(980px, calc(100vw - 24px)); height: min(820px, calc(100dvh - 24px)); border-radius: 24px; background: radial-gradient(600px 400px at 50% 45%, #22123a 0%, #0a0d1c 75%); border: 1px solid var(--line); overflow: hidden; }
.opening[open] { display: flex; flex-direction: column; }
.op-top, .dt-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px; }
.op-top h2 { font-size: 22px; flex: 1; }
.op-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.op-pack-wrap { display: flex; align-items: center; justify-content: center; }
.op-pack { position: relative; width: min(240px, 58vw); aspect-ratio: 17 / 27; touch-action: none; user-select: none; cursor: grab; outline-offset: 8px; border-radius: 12px; animation: bob 3.2s ease-in-out infinite; }
.op-pack:active { cursor: grabbing; }
.op-pack-top, .op-pack-body { position: absolute; left: 0; right: 0; background: var(--pack); overflow: hidden; }
.op-pack-top { top: 0; height: 13%; border-radius: 12px 12px 0 0; transform-origin: 100% 100%; transition: transform .35s cubic-bezier(.3, .7, .3, 1), opacity .35s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.op-pack-top { background-size: 100% 770%; background-position: 0 0; }
.op-pack-body { top: 13%; bottom: 0; border-radius: 0 0 12px 12px; display: flex; flex-direction: column; align-items: center; background-size: 100% 115%; background-position: 0 100%; transition: transform .5s cubic-bezier(.3, .7, .3, 1), opacity .5s; box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .2); }
.op-pack-top .crimp { position: absolute; top: 0; }
.op-pack-body .crimp { margin-top: auto; }
.op-pack-body .pack-brand { margin-top: 16px; }
.op-pack-body .pack-mon { width: 58%; height: auto; aspect-ratio: 1; }
.op-pack-body .pack-mon svg { width: 92%; height: 92%; }
.op-pack-body .pack-name { margin: 10px 12px 0; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .55); text-align: center; }
.tear-line { position: absolute; left: -6%; right: -6%; top: 13%; height: 5px; margin-top: -2px; border-radius: 5px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff6c9 30%, #fff); box-shadow: 0 0 18px 6px rgba(255, 220, 120, .75); clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0); pointer-events: none; }
.tear-line.rtl { clip-path: inset(0 0 0 calc((1 - var(--p, 0)) * 100%)); background: linear-gradient(270deg, rgba(255, 255, 255, 0), #fff6c9 30%, #fff); }
.finger { position: absolute; top: calc(13% - 15px); left: 8%; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 24px rgba(255, 255, 255, .9); opacity: 0; pointer-events: none; }
.op-pack.hinting .finger { animation: finger 1.6s ease-in-out infinite; }
.op-pack.torn { animation: none; cursor: default; }
.op-pack.torn .op-pack-top { transform: translate(40%, -140%) rotate(28deg); opacity: 0; }
.op-pack.torn .op-pack-body { transform: translateY(70%); opacity: 0; transition-delay: .15s; }
.op-pack.torn .tear-line, .op-pack.torn .finger { opacity: 0; }
.op-pack.wiggle { animation: wiggle .4s ease-in-out; }
.op-hint { margin: 0; padding: 0 18px; text-align: center; font-size: 15px; color: var(--text-2); min-height: 24px; }
.op-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 14px 18px 20px; }
.op-actions .btn { min-height: 46px; font-size: 15px; }
.op-reveal { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.op-reveal[hidden], .op-result[hidden] { display: none; }
.op-slot { position: relative; width: min(300px, 70vw); aspect-ratio: 5 / 7; perspective: 1200px; }
.flipper { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, .7, .3, 1); cursor: pointer; }
.flipper.up { transform: rotateY(180deg); }
.flipper .face, .flipper .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flipper .face { transform: rotateY(180deg); }
.flipper .face .tcard { --cw: 100%; }
.back { border-radius: 16px; background: radial-gradient(circle at 50% 42%, #2a3a8a 0%, #0c1128 70%); box-shadow: 0 0 0 4px #e6d7bb, 0 24px 50px rgba(0, 0, 0, .55); display: grid; place-items: center; }
.back::before { content: "DEV"; display: grid; place-items: center; width: 42%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255, 215, 110, .85); font-family: var(--display); font-weight: 800; font-size: clamp(18px, 5vw, 28px); color: #ffd76e; box-shadow: 0 0 0 10px rgba(255, 215, 110, .12); }
.back::after { content: ""; position: absolute; inset: 10px; border-radius: 10px; border: 1px solid rgba(255, 215, 110, .35); }
.back.pre-live { box-shadow: 0 0 0 4px #f7d985, 0 0 44px rgba(255, 210, 110, .7); }
.back.pre-impact { box-shadow: 0 0 0 4px #fff3d6, 0 0 60px rgba(255, 200, 140, .85), 0 0 90px rgba(140, 110, 255, .6); }
.shake-1 { animation: shake .2s ease-in-out 3; }
.shake-2 { animation: shake2 .15s ease-in-out 6; }
.op-rays { position: absolute; width: 820px; height: 820px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 215, 110, .16) 0deg 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.op-rays.on { opacity: 1; animation: spin 14s linear infinite; }
.op-flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, rgba(255, 245, 220, .6), transparent 60%); opacity: 0; }
.op-flash.go { animation: flash .6s ease-out; }
.op-tap { margin: 0; font-size: 14px; color: var(--text-3); }
.op-result { position: absolute; inset: 0; overflow-y: auto; padding: 8px 18px 16px; }
.op-result-title { margin: 0 0 16px; text-align: center; font-size: 17px; font-weight: 700; }
.op-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.op-grid li { animation: rise .5s both; }
.op-grid .tcard { --cw: 270px; }

.detail { width: min(1040px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 24px; background: #0d1120; border: 1px solid var(--line); overflow: auto; }
.dt-top { justify-content: flex-end; position: sticky; top: 0; background: #0d1120; z-index: 2; }
.dt-body { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 36px; padding: 0 32px 34px; align-items: start; }
.dt-card .tcard { --cw: 100%; cursor: default; }
.dt-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--text-3); }
.dt-text h2 { font-family: var(--font); font-weight: 700; font-size: clamp(24px, 3vw, 32px); margin-top: 6px; }
.dt-summary { margin: 12px 0 0; font-size: 16px; line-height: 1.75; color: var(--text-2); }
.dt-case:empty { display: none; }
.dt-status { margin: 14px 0 0; font-size: 14.5px; color: var(--text-3); }
.dt-types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

/* ---------- card open reveal (hero CTAs) ---------- */
.tilt > .cback { position: absolute; inset: 0; border-radius: inherit; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: radial-gradient(circle at 50% 42%, #2a3a8a 0%, #0c1128 70%); box-shadow: 0 0 0 3px #e6d7bb, 0 18px 40px rgba(0, 0, 0, .5); display: grid; place-items: center; pointer-events: none; }
.tilt > .cback::before { content: "DEV"; display: grid; place-items: center; width: 40%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255, 215, 110, .85); font-family: var(--display); font-weight: 800; font-size: 7cqi; color: #ffd76e; box-shadow: 0 0 0 3cqi rgba(255, 215, 110, .12); }
.tilt > .cback::after { content: ""; position: absolute; inset: 3.4cqi; border-radius: 3cqi; border: 1px solid rgba(255, 215, 110, .35); }
.tilt > .frame, .tilt > .glare { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tcard.closed .tilt { transform: perspective(900px) rotateY(180deg); transition: none; }
.tcard.flipping .tilt { transition: transform .75s cubic-bezier(.3, .7, .2, 1.15); }
.tcard.pre-live .cback { box-shadow: 0 0 0 3px #f7d985, 0 0 36px rgba(255, 210, 110, .75); animation: cshake .2s ease-in-out 3; }
.tcard.pre-impact .cback { box-shadow: 0 0 0 3px #fff3d6, 0 0 50px rgba(255, 200, 140, .85), 0 0 80px rgba(140, 110, 255, .6); animation: cshake2 .15s ease-in-out 6; }
.tcard.burst::after { content: ""; position: absolute; inset: -28%; z-index: -1; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255, 240, 200, .55) 0%, rgba(255, 215, 110, .18) 38%, transparent 66%); animation: burst .9s ease-out forwards; }
.tcard.burst.g-impact::after { background: radial-gradient(circle, rgba(255, 245, 225, .7) 0%, rgba(170, 130, 255, .3) 40%, transparent 68%), repeating-conic-gradient(from 0deg, rgba(255, 215, 110, .22) 0deg 7deg, transparent 7deg 20deg); -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%); animation-duration: 1.3s; }
@keyframes cshake { 0%, 100% { translate: 0 0; rotate: 0deg; } 25% { translate: -3px 0; rotate: -.6deg; } 75% { translate: 3px 0; rotate: .6deg; } }
@keyframes cshake2 { 0%, 100% { translate: 0 0; rotate: 0deg; scale: 1; } 25% { translate: -5px 0; rotate: -1deg; scale: 1.01; } 75% { translate: 5px 0; rotate: 1deg; scale: 1.01; } }
@keyframes burst { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25) rotate(20deg); } }

/* ---------- intro (first screen) ---------- */
.intro { display: none; }
html.has-intro .intro { display: flex; }
html.has-intro body { overflow: hidden; }
html.has-intro .hero .profile { visibility: hidden; }
.intro { position: fixed; inset: 0; z-index: 60; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 3vh, 28px); padding: 24px 16px; text-align: center; background: #05060d; transition: background-color .8s ease; }
.intro-bg { position: absolute; inset: 0; overflow: hidden; transition: opacity .8s ease; }
.intro-nebula { position: absolute; inset: -10%; background: radial-gradient(38% 30% at 30% 35%, rgba(234, 0, 44, .38), transparent 70%), radial-gradient(40% 32% at 72% 66%, rgba(244, 119, 37, .32), transparent 70%), radial-gradient(45% 36% at 55% 25%, rgba(120, 60, 200, .4), transparent 72%); filter: blur(10px); animation: nebula 16s ease-in-out infinite alternate; }
.intro-stars { position: absolute; inset: 0; background-image: radial-gradient(circle, #fff 0 1px, transparent 1.5px), radial-gradient(circle, rgba(255, 255, 255, .6) 0 1px, transparent 1.4px), radial-gradient(circle, rgba(255, 220, 180, .9) 0 1.3px, transparent 1.9px); background-size: 97px 89px, 53px 61px, 151px 137px; background-position: 13px 27px, 31px 7px, 77px 45px; animation: twinkle 3.2s ease-in-out infinite alternate; }
.intro-copy, .intro-stage, .intro-hint, .intro-skip { position: relative; z-index: 1; transition: opacity .5s ease, transform .5s ease; }
.intro-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4.6vw, 52px); line-height: 1.2; }
.intro-sub { margin: 10px auto 0; max-width: 520px; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.7; color: var(--text-2); }
.intro-stage { position: relative; display: grid; place-items: center; }
.intro-card { position: relative; width: var(--iw, 380px); height: var(--ih, 540px); transform: scale(var(--is, 1)); transform-origin: center; perspective: 1400px; cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline-offset: 10px; border-radius: 22px; animation: ifloat 4s ease-in-out infinite; }
.intro-card:focus-visible { outline: 3px solid var(--accent); }
.ic-inner { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(var(--drag, 0deg)); transition: transform .2s ease-out; }
.intro-card.flipped .ic-inner { transform: rotateY(180deg); transition: transform .9s cubic-bezier(.3, .7, .2, 1.1); }
.ic-back, .ic-face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ic-face { transform: rotateY(180deg); }
.ic-face .profile { --cw: 100%; width: 100%; height: 100%; }
.ic-face .profile .tilt, .ic-face .profile .frame { height: 100%; }
.ic-back { overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 50% 40%, #2c3c95 0%, #0f1640 55%, #070a1c 100%); box-shadow: 0 0 0 6px #efe2c6, 0 0 0 7px rgba(0, 0, 0, .4), 0 0 60px rgba(255, 210, 130, .55), 0 0 120px rgba(140, 110, 255, .45); animation: iglow 2.4s ease-in-out infinite alternate; }
.ic-back::after { content: ""; position: absolute; inset: 14px; border-radius: 14px; border: 1.5px solid rgba(255, 215, 110, .45); }
.ic-foil { position: absolute; inset: -40%; background: conic-gradient(from 0deg, rgba(255, 122, 168, .0), rgba(255, 122, 168, .35), rgba(255, 215, 110, .35), rgba(125, 255, 196, .3), rgba(114, 200, 255, .35), rgba(176, 123, 255, .35), rgba(255, 122, 168, .0)); mix-blend-mode: color-dodge; animation: spin 8s linear infinite; }
.ic-back::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255, 255, 255, .95) 0 1px, transparent 1.6px), radial-gradient(circle, rgba(255, 255, 255, .7) 0 1px, transparent 1.4px); background-size: 29px 31px, 43px 41px; background-position: 5px 9px, 19px 23px; mix-blend-mode: overlay; animation: twinkle 1.8s ease-in-out infinite alternate; }
.ic-emblem { position: relative; display: grid; place-items: center; width: 42%; aspect-ratio: 1; border-radius: 50%; border: 4px solid rgba(255, 215, 110, .9); font-family: var(--display); font-weight: 800; font-size: 40px; color: #ffd76e; box-shadow: 0 0 0 14px rgba(255, 215, 110, .12), 0 0 40px rgba(255, 215, 110, .45), inset 0 0 30px rgba(255, 215, 110, .25); }
.ic-name { position: relative; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .3em; color: #f3dfae; }
.intro-card.charging { animation: none; }
.intro-card.charging .ic-inner { animation: cshake2 .12s ease-in-out 8; }
.intro-card.charging .ic-back { box-shadow: 0 0 0 6px #fff6df, 0 0 90px rgba(255, 220, 150, .9), 0 0 160px rgba(160, 120, 255, .75); }
.intro-rays { position: absolute; width: 1100px; height: 1100px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 215, 110, .2) 0deg 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%); opacity: 0; transition: opacity .5s; pointer-events: none; }
.intro.lit .intro-rays { opacity: 1; animation: spin 18s linear infinite; }
.intro-burst { position: absolute; inset: 0; pointer-events: none; }
.spark { position: absolute; left: 50%; top: 50%; width: var(--sz, 8px); height: var(--sz, 8px); border-radius: 50%; background: var(--c, #ffd76e); box-shadow: 0 0 10px var(--c, #ffd76e); opacity: 0; animation: spark 1.3s cubic-bezier(.15, .7, .3, 1) forwards; animation-delay: var(--d, 0s); }
.spark.star { border-radius: 2px; transform: rotate(45deg); }
.intro-flash { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(circle at 50% 55%, rgba(255, 248, 230, .85), rgba(255, 220, 160, .25) 40%, transparent 70%); opacity: 0; }
.intro-flash.go { animation: flash .9s ease-out; }
.intro-hint { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.hint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: twinkle 1.2s ease-in-out infinite alternate; }
.intro-skip { position: absolute; right: 16px; bottom: 16px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text-3); font-size: 13.5px; cursor: pointer; }
.intro.opening-done .intro-copy, .intro.opening-done .intro-hint, .intro.opening-done .intro-skip { opacity: 0; transform: translateY(-10px); }
.intro.leaving { background-color: rgba(5, 6, 13, 0); pointer-events: none; }
.intro.leaving .intro-bg, .intro.leaving .intro-rays { opacity: 0; }
.intro-card.flying { animation: none; transition: transform .95s cubic-bezier(.5, 0, .2, 1); }
html.intro-done .hero-text > * { animation: rise .7s both; }
html.intro-done .hero-text > *:nth-child(2) { animation-delay: .08s; }
html.intro-done .hero-text > *:nth-child(3) { animation-delay: .16s; }
html.intro-done .hero-text > *:nth-child(4) { animation-delay: .24s; }
html.intro-done .hero-text > *:nth-child(5) { animation-delay: .32s; }
@keyframes ifloat { 0%, 100% { translate: 0 0; rotate: -1.2deg; } 50% { translate: 0 -12px; rotate: 1.2deg; } }
@keyframes iglow { from { filter: brightness(1); } to { filter: brightness(1.18); } }
@keyframes nebula { from { transform: translate(-2%, -1%) scale(1); } to { transform: translate(2%, 1%) scale(1.06); } }
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes spark { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.4); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); } }

/* ---------- keyframes ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-12px) rotate(1.5deg); } }
@keyframes finger { 0% { left: 6%; opacity: 0; } 15% { opacity: 1; } 80% { left: 82%; opacity: 1; } 100% { left: 88%; opacity: 0; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px) rotate(-.6deg); } 75% { transform: translateX(3px) rotate(.6deg); } }
@keyframes shake2 { 0%, 100% { transform: translateX(0) scale(1); } 25% { transform: translateX(-5px) rotate(-1deg) scale(1.01); } 75% { transform: translateX(5px) rotate(1deg) scale(1.01); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flash { 0% { opacity: 0; } 30% { opacity: .6; } 100% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- reduced motion ---------- */
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; scroll-behavior: auto !important; }
html.calm .op-rays.on { animation: none !important; }
html.calm .pack:hover, html.calm .pack:focus-visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) *, html:not(.motion-on) *::before, html:not(.motion-on) *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .legend ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .career-grid { grid-template-columns: 1fr; }
  .career-side { position: static; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-card { justify-content: flex-start; }
  .case { grid-template-columns: 1fr; }
  .case-cards { justify-content: flex-start; }
  .case-cards.two { width: min(100%, 520px); }
  .steps, .split { grid-template-columns: 1fr; }
  .dt-body { grid-template-columns: 1fr; padding: 0 18px 24px; }
  .dt-card { max-width: 320px; }
}
@media (max-width: 640px) {
  .site-head { gap: 10px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .site-head nav { order: 3; width: 100%; margin-left: 0; }
  .brand { margin-right: auto; }
  .stats { grid-template-columns: 1fr; }
  .stats div { flex-direction: row-reverse; justify-content: space-between; align-items: center; }
  .cta .btn { flex: 1 1 100%; }
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pack-body { height: 250px; }
  .pack-mon { width: 90px; height: 90px; }
  .pack-mon svg { width: 82px; height: 82px; }
  .pack-name { font-size: 16px; }
  .legend ul { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 6px; }
  .role-year { flex-direction: row; align-items: center; }
  .case-dl div { grid-template-columns: 1fr; gap: 2px; }
  .case-cards.two { height: auto; flex-direction: column; gap: 16px; }
  .case-cards.two .tcard:first-child, .case-cards.two .tcard:last-child { position: static; transform: none; }
  .case-cards { --cw: min(300px, 100%); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .mons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon svg { width: 120px; height: 120px; }
  .op-grid .tcard { --cw: 150px; }
  .opening { border-radius: 18px; }
}
