* { margin: 0; padding: 0; box-sizing: border-box; }

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #17171b;
  --glass: rgba(17, 17, 20, 0.7);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #fafafa;
  --muted: #a1a1aa;
  --faint: #63636e;
  --ink: #fafafa;
  --ink-text: #09090b;
  --a1: #818cf8;
  --a2: #38bdf8;
  --a3: #c084fc;
  --grad: linear-gradient(110deg, var(--a1), var(--a2) 50%, var(--a3));
  --spot: rgba(129, 140, 248, 0.14);
  --shadow: 0 0 0 1px var(--line), 0 24px 60px -30px rgba(0, 0, 0, .9);
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

body.light {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --glass: rgba(255, 255, 255, 0.75);
  --line: rgba(9, 9, 11, 0.08);
  --line-strong: rgba(9, 9, 11, 0.16);
  --text: #09090b;
  --muted: #52525b;
  --faint: #a1a1aa;
  --ink: #09090b;
  --ink-text: #fafafa;
  --a1: #6366f1;
  --a2: #0ea5e9;
  --a3: #a855f7;
  --spot: rgba(99, 102, 241, 0.08);
  --shadow: 0 0 0 1px var(--line), 0 20px 50px -28px rgba(9, 9, 11, .25);
}

html[data-lang="km"] { --font: "Kantumruy Pro", "Geist", sans-serif; }
html[data-lang="zh"] { --font: "Noto Sans SC", "Geist", sans-serif; }

html, body { height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  overflow: hidden; -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
}
::selection { background: var(--a1); color: #fff; }

em {
  font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400;
  background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .08em; animation: flow 6s linear infinite;
}
@keyframes flow { to { background-position: 200% center; } }
html[data-lang="km"] em, html[data-lang="zh"] em { font-family: var(--font); font-style: normal; font-weight: 700; }

iconify-icon { display: inline-block; width: 1em; height: 1em; flex-shrink: 0; vertical-align: middle; }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.aurora { position: absolute; border-radius: 50%; filter: blur(130px); will-change: transform; transition: transform 1.8s var(--ease); }
.a1 { width: 720px; height: 520px; background: radial-gradient(circle, var(--a1), transparent 70%); top: -280px; left: 50%; margin-left: -360px; opacity: .35; animation: orbit1 22s ease-in-out infinite alternate; }
.a2 { width: 520px; height: 520px; background: radial-gradient(circle, var(--a2), transparent 70%); bottom: -300px; right: -160px; opacity: .22; animation: orbit2 26s ease-in-out infinite alternate; }
.a3 { width: 480px; height: 480px; background: radial-gradient(circle, var(--a3), transparent 70%); bottom: -260px; left: -180px; opacity: .2; animation: orbit3 30s ease-in-out infinite alternate; }
body.light .a1 { opacity: .22; } body.light .a2, body.light .a3 { opacity: .14; }
@keyframes orbit1 { 50% { translate: -80px 60px; scale: 1.08; } 100% { translate: 60px 30px; scale: .95; } }
@keyframes orbit2 { 50% { translate: -120px -80px; scale: 1.15; } 100% { translate: -40px -160px; } }
@keyframes orbit3 { 50% { translate: 100px -60px; scale: 1.1; } 100% { translate: 160px -120px; scale: .92; } }
.glow {
  position: absolute; width: 600px; height: 600px; border-radius: 50%; left: 0; top: 0;
  background: radial-gradient(circle, rgba(129, 140, 248, .10), transparent 60%);
  transform: translate(-50%, -50%); pointer-events: none; transition: opacity .5s;
}
body.light .glow { background: radial-gradient(circle, rgba(99, 102, 241, .07), transparent 60%); }
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, var(--bg) 100%); }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(18px, 3.5vw, 44px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark {
  position: relative; width: 36px; height: 36px; border-radius: 11px; overflow: hidden;
  display: grid; place-items: center; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-strong);
}
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.brand-mark b { font-size: .75rem; }
.brand-name { font-family: "Geist", sans-serif; font-weight: 600; letter-spacing: -.3px; }
.brand-dot { color: var(--a2); }

.nav {
  position: relative; display: flex; gap: 2px; padding: 4px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.nav a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 999px; white-space: nowrap;
  color: var(--muted); text-decoration: none; font-size: .87rem; font-weight: 500;
  transition: color .3s var(--ease);
}
.nav a iconify-icon { font-size: 1.1rem; transition: transform .4s var(--ease); }
.nav a:hover { color: var(--text); }
.nav a:hover iconify-icon { transform: translateY(-1px) scale(1.12); }
.nav a.active { color: var(--text); }
.nav-pill {
  position: absolute; top: 4px; left: 4px; height: calc(100% - 8px); border-radius: 999px;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-strong), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .5s var(--ease), width .5s var(--ease);
}
.nav-pill::after {
  content: ""; position: absolute; left: 25%; right: 25%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--a2), transparent);
}

.top-actions { display: flex; align-items: center; gap: 8px; }
.clock {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(16px);
  font-family: var(--mono); font-size: .75rem; color: var(--muted); white-space: nowrap;
}
.clock iconify-icon { font-size: .95rem; color: var(--a2); }
.clock b { color: var(--text); font-weight: 500; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line); color: var(--text); font-size: 1.05rem;
  cursor: pointer; backdrop-filter: blur(16px); transition: transform .45s var(--ease), border-color .3s;
}
.icon-btn:hover { border-color: var(--line-strong); transform: rotate(30deg); }
.icon-btn.sm { width: 30px; height: 30px; font-size: .9rem; }
.icon-btn.sm:hover { transform: translateY(-2px); }

.music-btn { position: relative; }
.music-btn .eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.music-btn .eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--grad); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.music-btn .eq i:nth-child(2) { animation-delay: -.4s; animation-duration: .8s; }
.music-btn .eq i:nth-child(3) { animation-delay: -.2s; animation-duration: 1.2s; }
.music-btn .eq i:nth-child(4) { animation-delay: -.6s; animation-duration: .9s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.music-btn.playing .eq { display: flex; }
.music-btn.playing .music-off { display: none; }
.music-btn.playing { border-color: rgba(129, 140, 248, .5); box-shadow: 0 0 18px -4px rgba(129, 140, 248, .6); }
.music-btn.playing:hover { transform: translateY(-2px); }
.music-btn.waiting::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--a1);
  animation: ping 1.8s infinite;
}
.flag { display: inline-block; width: 26px; height: 18px; border-radius: 4px; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 1px var(--line-strong); }
.flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flag.round { width: 22px; height: 22px; border-radius: 50%; }

.lang { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 9px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--text);
  font: inherit; font-family: var(--mono); font-size: .75rem; font-weight: 500; cursor: pointer;
  backdrop-filter: blur(16px); transition: border-color .3s;
}
.lang-btn:hover, .lang.open .lang-btn { border-color: var(--line-strong); }
.lang-btn .flag { transition: transform .5s var(--ease); }
.lang-btn .flag.flip { transform: rotateY(180deg) scale(.5); }
.lang-icon { font-size: 1rem; color: var(--a2); }
.caret { font-size: .85rem; color: var(--faint); transition: transform .4s var(--ease); }
.lang.open .caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 248px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.97); transform-origin: top right;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; z-index: 70;
}
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-title { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-family: var(--mono); font-size: .68rem; color: var(--faint); text-transform: uppercase; letter-spacing: 1px; }
.lang-title iconify-icon { font-size: .95rem; }
.lang-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px;
  border: none; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  opacity: 0; transform: translateY(4px); transition: background .2s, opacity .3s var(--ease), transform .3s var(--ease);
}
.lang.open .lang-item { opacity: 1; transform: none; }
.lang.open .lang-item:nth-of-type(1) { transition-delay: .03s; }
.lang.open .lang-item:nth-of-type(2) { transition-delay: .06s; }
.lang.open .lang-item:nth-of-type(3) { transition-delay: .09s; }
.lang.open .lang-item:nth-of-type(4) { transition-delay: .12s; }
.lang-item:hover { background: var(--surface-2); }
.lang-item .flag { width: 30px; height: 20px; transition: transform .3s var(--ease); }
.lang-item:hover .flag { transform: scale(1.08); }
.lang-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.lang-text strong { font-size: .9rem; font-weight: 600; }
.lang-item[data-lang="km"] strong { font-family: "Kantumruy Pro", sans-serif; }
.lang-item[data-lang="zh"] strong { font-family: "Noto Sans SC", sans-serif; }
.lang-text small { font-size: .7rem; color: var(--faint); font-family: var(--mono); }
.tick { font-size: 1.05rem; color: var(--a2); opacity: 0; transform: scale(.4); transition: all .35s var(--ease); }
.lang-item.active { background: var(--surface-2); }
.lang-item.active .tick { opacity: 1; transform: none; }

.lang-wave {
  position: fixed; z-index: 80; pointer-events: none; border-radius: 50%;
  width: 20px; height: 20px; background: var(--grad); opacity: 0; transform: scale(0);
}
.lang-wave.go { animation: wave 1s var(--ease) forwards; }
@keyframes wave { 0% { opacity: .35; transform: scale(0); } 100% { opacity: 0; transform: scale(230); } }
.stage.switching .view.active { opacity: 0; filter: blur(10px); transform: translateY(8px); }

.stage { position: relative; height: 100vh; height: 100dvh; }
.view {
  position: absolute; inset: 94px clamp(18px, 3.5vw, 44px) 72px;
  max-width: 1160px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(22px); filter: blur(12px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease), visibility .6s;
  overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 8px;
}
.view::-webkit-scrollbar { display: none; }
.view.active { opacity: 1; visibility: visible; transform: none; filter: none; }
.view.leaving { transform: translateY(-22px); }

.view-head { margin-bottom: 32px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-family: var(--mono); font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px;
}
.kicker iconify-icon { font-size: 1rem; color: var(--a2); }
.view h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); font-weight: 600; letter-spacing: -1.8px; line-height: 1.06; }
html[data-lang="km"] .view h2, html[data-lang="zh"] .view h2 { letter-spacing: 0; line-height: 1.35; }

.view.active .stagger { animation: rise .8s var(--ease) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.tile, .skill, .project, .form, .profile-card { background: var(--surface); box-shadow: var(--shadow); }
.spot { position: relative; isolation: isolate; --mx: 50%; --my: 50%; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--spot), transparent 45%);
  opacity: 0; transition: opacity .35s;
}
.spot:hover::before { opacity: 1; }

.ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 1.2rem; color: var(--text); background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--line-strong), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .45s var(--ease), color .3s;
}
.ico-skill { font-size: 1.5rem; }

.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: .93rem; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .3s, background .3s;
}
.btn iconify-icon { font-size: 1.05rem; transition: transform .4s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover iconify-icon[icon="lucide:arrow-right"], .btn:hover iconify-icon[icon="lucide:send"] { transform: translateX(4px); }
.btn:hover iconify-icon[icon="lucide:hand"] { animation: wave-hand .7s ease; }
@keyframes wave-hand { 25% { transform: rotate(-16deg); } 60% { transform: rotate(14deg); } }
.btn-primary { background: var(--ink); color: var(--ink-text); box-shadow: 0 0 0 1px var(--ink), 0 10px 30px -10px rgba(129, 140, 248, .6); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(129, 140, 248, .35), transparent 70%);
  transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { background: var(--glass); color: var(--text); border-color: var(--line-strong); backdrop-filter: blur(16px); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-full { width: 100%; justify-content: center; }

.home-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); font-size: .8rem; color: var(--muted);
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; position: relative; flex-shrink: 0; box-shadow: 0 0 10px #22c55e; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #22c55e; animation: ping 1.8s infinite; }
@keyframes ping { from { opacity: .8; transform: scale(.6); } to { opacity: 0; transform: scale(1.9); } }

.hero-title { margin: 22px 0 18px; font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 600; letter-spacing: -3.5px; line-height: 1; }
html[data-lang="km"] .hero-title .reveal-line:first-child, html[data-lang="zh"] .hero-title .reveal-line:first-child { letter-spacing: 0; line-height: 1.45; font-size: .72em; }
.reveal-line { display: block; }
.hero-title .reveal-line:first-child { color: var(--muted); font-weight: 500; }
.view.active .reveal-line { animation: lineUp 1s var(--ease) both; }
.view.active .reveal-line:nth-child(2) { animation-delay: .12s; }
@keyframes lineUp { from { transform: translateY(36px); opacity: 0; filter: blur(10px); } to { transform: none; opacity: 1; filter: none; } }
.hero-title .name { font-family: "Geist", sans-serif; }

.hero-role { display: flex; align-items: center; gap: 12px; font-size: 1rem; flex-wrap: wrap; }
.role-label { color: var(--faint); font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; }
.role-word {
  position: relative; padding: 5px 13px; border-radius: 9px; font-weight: 500;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-strong);
  transition: opacity .3s, transform .3s var(--ease), filter .3s;
}
.role-word::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 1px; background: var(--grad); }
.role-word.swap { opacity: 0; transform: translateY(8px); filter: blur(4px); }
.hero-lead { margin-top: 18px; max-width: 480px; color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.profile-wrap { position: relative; justify-self: center; width: min(370px, 100%); }
.profile-card { position: relative; padding: 10px 10px 18px; border-radius: 30px; text-align: center; transition: transform .35s ease-out; transform-style: preserve-3d; }

.beam {
  position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--angle), transparent 0 70%, var(--a1) 80%, var(--a2) 88%, var(--a3) 94%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: beam 5s linear infinite;
}
@keyframes beam { to { --angle: 360deg; } }
.profile-wrap::before {
  content: ""; position: absolute; inset: 10% 6% -4%; z-index: -1; border-radius: 40px;
  background: var(--grad); filter: blur(60px); opacity: .22; animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .36; transform: scale(1.04); } }

.pc-photo { position: relative; height: 300px; border-radius: 22px; overflow: hidden; background: var(--surface-2); }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; animation: kenburns 16s ease-in-out infinite alternate; transition: filter .6s; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-6px); } }
.pc-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 28%, transparent 55%, rgba(0,0,0,.7)); pointer-events: none; }
.shine {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(-120%);
}
.profile-card:hover .shine { transition: transform 1.1s var(--ease); transform: translateX(120%); }
.view.active .pc-photo { animation: photoIn 1.1s var(--ease) .15s backwards; }
@keyframes photoIn { from { clip-path: inset(18% 18% 18% 18% round 40px); opacity: 0; } to { clip-path: inset(0 0 0 0 round 22px); opacity: 1; } }
.photo-fallback { position: absolute; inset: 0; display: none; place-items: center; font-size: 3.6rem; font-weight: 600; letter-spacing: -2px; background: var(--grad); color: #fff; }
.pc-photo.no-photo img { display: none; }
.pc-photo.no-photo .photo-fallback { display: grid; }
.pc-badge, .pc-place {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 999px; font-size: .75rem; font-weight: 500; color: #fff;
  background: rgba(10, 10, 12, .35); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.pc-badge { top: 12px; left: 12px; padding-left: 11px; }
.pc-place { bottom: 12px; left: 12px; }
.pc-place .flag.round { width: 20px; height: 20px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.view.active .pc-badge { animation: chipIn .8s var(--ease) .6s backwards; }
.view.active .pc-place { animation: chipIn .8s var(--ease) .75s backwards; }
@keyframes chipIn { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }

.pc-body { padding: 16px 8px 0; }
.pc-body h3 { display: inline-flex; align-items: center; gap: 6px; font-family: "Geist", sans-serif; font-size: 1.35rem; font-weight: 600; letter-spacing: -.5px; }
.verified { color: var(--a2); font-size: 1.15rem; }
.pc-role { margin-top: 2px; color: var(--muted); font-size: .92rem; }
.view.active .pc-body > * { animation: rise .8s var(--ease) backwards; }
.view.active .pc-body > :nth-child(1) { animation-delay: .45s; }
.view.active .pc-body > :nth-child(2) { animation-delay: .55s; }
.view.active .pc-body > :nth-child(3) { animation-delay: .65s; }
.view.active .pc-body > :nth-child(4) { animation-delay: .75s; }

.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0; padding: 12px 4px; border-radius: 16px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
.pc-stats div { display: flex; flex-direction: column; gap: 2px; }
.pc-stats div + div { border-left: 1px solid var(--line); }
.pc-stats strong { font-family: "Geist", sans-serif; font-size: 1.5rem; font-weight: 600; letter-spacing: -1px; }
.pc-stats strong::after { content: "+"; font-size: .95rem; margin-left: 1px; color: var(--a2); }
.pc-stats span { font-size: .7rem; color: var(--faint); }

.socials { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 10px; padding: 7px 11px 7px 7px; border-radius: 15px;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); color: var(--text); text-align: left;
  text-decoration: none; transition: transform .45s var(--ease), box-shadow .3s;
}
.social-ico {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 1.1rem; color: #fff; background: #000; box-shadow: 0 0 0 1px var(--line-strong);
  transition: transform .5s var(--ease);
}
.tiktok .social-ico iconify-icon { filter: drop-shadow(-1.2px -1px 0 #25f4ee) drop-shadow(1.2px 1px 0 #fe2c55); }
.social-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.social-text b { font-size: .86rem; font-weight: 600; font-family: "Geist", sans-serif; }
.social-text small { font-size: .7rem; color: var(--faint); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; }
.social-go { font-size: .95rem; color: var(--faint); transition: transform .45s var(--ease), color .3s; }
.social::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s var(--ease); }
.social.github::before { background: radial-gradient(120% 140% at 0% 0%, rgba(129, 140, 248, .22), transparent 60%); }
.social.tiktok::before { background: radial-gradient(120% 140% at 0% 0%, rgba(37, 244, 238, .18), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(254, 44, 85, .2), transparent 55%); }
.social:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-strong); }
.social:hover::before { opacity: 1; }
.social:hover .social-ico { transform: rotate(-8deg) scale(1.06); }
.social:hover .social-go { color: var(--text); transform: translate(2px, -2px); }

.float-chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 13px; font-family: var(--mono); font-size: .72rem; white-space: nowrap;
  background: var(--glass); border: 1px solid var(--line-strong); backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .7); animation: bob 6s ease-in-out infinite;
}
.float-chip iconify-icon { font-size: 1rem; color: var(--a2); }
.chip-a { top: 50px; left: -54px; }
.chip-b { top: 236px; right: -40px; animation-delay: -3s; }
.chip-b iconify-icon { color: var(--a3); }
@keyframes bob { 50% { transform: translateY(-10px); } }

.profile-card:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 40px 80px -30px rgba(0,0,0,.9); }
.pc-body h3 .verified { animation: pop 2.8s var(--ease) infinite; }
@keyframes pop { 0%, 80%, 100% { transform: scale(1); } 88% { transform: scale(1.25) rotate(-10deg); } }
.pc-stats div { transition: transform .4s var(--ease); }
.pc-stats div:hover { transform: translateY(-3px); }

.bento { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: minmax(156px, auto); gap: 14px; }
.tile {
  padding: 22px; border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  transition: transform .45s var(--ease), box-shadow .3s;
}
.tile > .ico { margin-bottom: auto; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-strong), 0 24px 60px -30px rgba(0,0,0,.9); }
.tile:hover .ico, .skill:hover .ico { transform: translateY(-2px) rotate(-6deg); color: var(--a2); }
.tile-lg { grid-row: span 2; }
.tile-lg h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.6px; margin-top: auto; }
.tile-lg p { color: var(--muted); line-height: 1.8; margin-top: 6px; }
.tile-wide { grid-column: span 2; }
.about-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: auto; }
.about-photo { width: 88px; height: 88px; border-radius: 24px; object-fit: cover; object-position: center 20%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 5px var(--surface-2); }
.tile-label { font-family: var(--mono); font-size: .7rem; color: var(--faint); text-transform: uppercase; letter-spacing: 1.2px; margin-top: 14px; }
.tile h4 { font-size: 1.08rem; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips > span {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); font-size: .84rem; transition: all .3s var(--ease);
}
.chips > span iconify-icon { font-size: 1rem; color: var(--muted); }
.chips > span:hover { box-shadow: 0 0 0 1px var(--line-strong); transform: translateY(-2px); }
.chips.sm > span { padding: 3px 10px; font-family: var(--mono); font-size: .7rem; color: var(--muted); }

.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.skill { padding: 20px; border-radius: var(--radius); transition: transform .45s var(--ease), box-shadow .3s; }
.skill:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-strong), 0 24px 60px -30px rgba(0,0,0,.9); }
.skill-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.skill-top h4 { font-weight: 600; font-size: 1rem; flex: 1; }
.skill-num { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.track { height: 6px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.fill { position: relative; height: 100%; width: 0; border-radius: 99px; background: var(--grad); transition: width 1.6s var(--ease); box-shadow: 0 0 14px var(--a1); }
.fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: shimmer 2.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.tools { margin-top: 24px; }
.tools .chips > span iconify-icon { color: inherit; font-size: 1.05rem; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.project {
  display: grid; grid-template-columns: 128px 1fr; gap: 6px; padding: 8px; border-radius: var(--radius);
  transition: transform .35s ease-out, box-shadow .3s;
}
.project:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 24px 60px -30px rgba(0,0,0,.9); }
.project.featured { background: linear-gradient(160deg, rgba(129, 140, 248, .10), var(--surface) 55%); }
.project-cover { position: relative; min-height: 150px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.project-cover::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; filter: blur(40px); opacity: .55; transition: transform .6s var(--ease), opacity .4s; }
.pc1::after { background: var(--a1); }
.pc2::after { background: var(--a3); }
.pc3::after { background: var(--a2); }
.pc4::after { background: #f472b6; }
.project:hover .project-cover::after { transform: scale(1.35); opacity: .8; }
.project-cover iconify-icon { position: relative; z-index: 1; font-size: 2.8rem; color: var(--text); transition: transform .6s var(--ease); }
.project:hover .project-cover iconify-icon { transform: scale(1.12) rotate(-6deg); }
.p-num { position: absolute; top: 10px; left: 12px; z-index: 1; font-family: var(--mono); font-size: .68rem; color: var(--faint); }
.project-body { display: flex; flex-direction: column; padding: 8px 8px 6px 12px; min-width: 0; }
.project-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.p-type, .p-status {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .6px;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); color: var(--muted);
}
.p-status { color: #4ade80; background: rgba(34, 197, 94, .1); box-shadow: 0 0 0 1px rgba(34, 197, 94, .3); }
.p-status .pulse { width: 6px; height: 6px; }
.project-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.project-title h3 { font-family: "Geist", sans-serif; font-size: 1.12rem; font-weight: 600; letter-spacing: -.4px; }
.project-title a {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-strong); color: var(--text); font-size: .95rem; transition: all .4s var(--ease);
}
.project:hover .project-title a { background: var(--ink); color: var(--ink-text); transform: rotate(45deg); }
.project-body p { color: var(--muted); font-size: .86rem; line-height: 1.6; }
.p-progress { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .66rem; color: var(--faint); text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; }
.p-bar { position: relative; flex: 1; height: 4px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.p-bar i { position: absolute; top: 0; bottom: 0; width: 30%; border-radius: 99px; background: var(--grad); box-shadow: 0 0 10px var(--a1); animation: build 2.4s var(--ease) infinite; }
@keyframes build { 0% { left: -30%; } 100% { left: 100%; } }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact-left p { color: var(--muted); margin-top: 16px; line-height: 1.75; max-width: 430px; }
.contact-list { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.form { padding: 22px; border-radius: 26px; display: flex; flex-direction: column; gap: 12px; }
.field { position: relative; }
.field > iconify-icon { position: absolute; left: 16px; top: 18px; font-size: 1.1rem; color: var(--faint); transition: color .3s; z-index: 1; }
.field input, .field textarea {
  width: 100%; padding: 24px 16px 10px 46px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; outline: none; resize: none;
  transition: border-color .3s, box-shadow .3s;
}
.field label { position: absolute; left: 46px; top: 17px; color: var(--faint); pointer-events: none; transition: all .25s var(--ease); }
.field input:focus, .field textarea:focus { border-color: var(--a1); box-shadow: 0 0 0 4px rgba(129, 140, 248, .15); }
.field:focus-within > iconify-icon { color: var(--a1); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 7px; font-size: .7rem; color: var(--a1); }

.footbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 3.5vw, 44px); font-family: var(--mono); font-size: .72rem; color: var(--faint);
}
.pager { display: flex; align-items: center; gap: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 72px; transform: translate(-50%, 20px); z-index: 90;
  display: flex; align-items: center; gap: 10px; padding: 11px 17px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); font-size: .88rem;
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .7);
  opacity: 0; pointer-events: none; transition: all .45s var(--ease);
}
.toast iconify-icon { font-size: 1.1rem; color: #22c55e; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

@media (max-width: 1160px) { .clock { display: none; } .nav a { padding: 8px 12px; } }
@media (max-width: 980px) {
  .home-grid, .contact { grid-template-columns: 1fr; gap: 40px; }
  .home-text { text-align: center; }
  .hero-role, .cta { justify-content: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .chip-a { left: -12px; } .chip-b { right: -12px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-lg { grid-column: span 2; grid-row: auto; }
  .projects { grid-template-columns: 1fr; }
  .view { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .brand-name { display: none; }
  .nav { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); width: calc(100% - 28px); justify-content: space-between; }
  .nav a { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: .64rem; flex: 1; justify-content: center; }
  .nav a iconify-icon { font-size: 1.25rem; }
  .footbar { display: none; }
  .view { inset: 80px 16px 96px; }
  .hero-title { letter-spacing: -2px; }
  .skills, .projects, .bento { grid-template-columns: 1fr; }
  .project { grid-template-columns: 96px 1fr; }
  .project-cover { min-height: 120px; }
  .tile-lg, .tile-wide { grid-column: auto; }
  .float-chip { display: none; }
  .toast { bottom: 96px; }
  .lang-code { display: none; }
  .lang-menu { right: -50px; }
}

.install-btn {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(129, 140, 248, .45); background: rgba(129, 140, 248, .12);
  color: var(--text); font: inherit; font-size: .82rem; font-weight: 500; cursor: pointer;
  backdrop-filter: blur(16px); transition: transform .35s var(--ease), background .3s, border-color .3s;
}
.install-btn iconify-icon { font-size: 1.05rem; color: var(--a2); animation: nudge 2.4s var(--ease) infinite; }
.install-btn::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .22), transparent 70%);
  animation: sweep 3.5s var(--ease) infinite;
}
.install-btn:hover { transform: translateY(-2px); background: rgba(129, 140, 248, .2); border-color: var(--a1); }
.install-btn[hidden] { display: none; }
@keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 75% { transform: translateY(3px); } 85% { transform: translateY(-1px); } }
@keyframes sweep { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.install { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; visibility: hidden; pointer-events: none; }
.install.open { visibility: visible; pointer-events: auto; }
.install-backdrop {
  position: absolute; inset: 0; background: rgba(5, 5, 8, .55);
  backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.install.open .install-backdrop { opacity: 1; }
.install-card {
  position: relative; width: min(440px, 100%); padding: 28px 26px 22px; border-radius: 30px; text-align: center;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 50px 120px -30px rgba(0, 0, 0, .9);
  opacity: 0; transform: translateY(40px) scale(.92); filter: blur(8px);
  transition: opacity .6s var(--ease), transform .7s cubic-bezier(.16, 1.3, .3, 1), filter .6s var(--ease);
  overflow: hidden;
}
.install.open .install-card { opacity: 1; transform: none; filter: none; }
.install-card::before {
  content: ""; position: absolute; left: 50%; top: -140px; width: 360px; height: 260px; margin-left: -180px; border-radius: 50%;
  background: var(--grad); filter: blur(70px); opacity: .35; pointer-events: none;
}
.install-x {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  font-size: 1rem; cursor: pointer; transition: transform .4s var(--ease), color .3s;
}
.install-x:hover { color: var(--text); transform: rotate(90deg); }

.install-hero { position: relative; height: 128px; display: grid; place-items: center; margin-bottom: 14px; }
.app-icon-wrap { position: relative; width: 96px; height: 96px; }
.app-icon { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 24px; box-shadow: 0 20px 40px -14px rgba(99, 102, 241, .8); }
.install.open .app-icon { animation: appIn .9s cubic-bezier(.16, 1.4, .3, 1) .15s backwards, floaty 4s ease-in-out 1.1s infinite; }
@keyframes appIn { from { transform: scale(.3) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.app-ring { position: absolute; inset: -10px; border-radius: 32px; border: 1.5px solid var(--a1); opacity: 0; }
.install.open .app-ring { animation: ring 2.4s var(--ease) .8s infinite; }
@keyframes ring { 0% { opacity: .7; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
.devices .dev {
  position: absolute; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-strong); color: var(--text); font-size: 1.1rem;
  opacity: 0;
}
.d1 { left: 18%; top: 14px; }
.d2 { right: 16%; top: 4px; }
.d3 { right: 22%; bottom: 0; }
.install.open .dev { animation: devIn .7s var(--ease) backwards, floaty 5s ease-in-out infinite; opacity: 1; }
.install.open .d1 { animation-delay: .35s, 1s; }
.install.open .d2 { animation-delay: .45s, 1.6s; }
.install.open .d3 { animation-delay: .55s, 2.2s; }
@keyframes devIn { from { opacity: 0; transform: scale(.4) translateY(10px); } to { opacity: 1; transform: none; } }

.install-card h3 { position: relative; font-size: 1.5rem; font-weight: 600; letter-spacing: -.6px; }
.install-sub { position: relative; margin: 6px auto 0; max-width: 330px; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.install-feats { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.install-feats > span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); font-size: .76rem; color: var(--muted);
}
.install-feats iconify-icon { font-size: .95rem; color: var(--a2); }
.install.open .install-card > h3, .install.open .install-sub, .install.open .install-feats, .install.open .install-steps, .install.open .install-actions { animation: rise .7s var(--ease) backwards; }
.install.open .install-card > h3 { animation-delay: .25s; }
.install.open .install-sub { animation-delay: .32s; }
.install.open .install-feats { animation-delay: .4s; }
.install.open .install-steps { animation-delay: .48s; }
.install.open .install-actions { animation-delay: .56s; }

.install-steps { position: relative; list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 16px; text-align: left; }
.install-steps:empty { display: none; }
.install-steps li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); font-size: .86rem;
}
.install-steps .n {
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--mono); font-size: .72rem; color: #fff; background: var(--grad);
}
.install-steps li iconify-icon { margin-left: auto; font-size: 1.15rem; color: var(--a2); }

.install-actions { position: relative; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 20px; }
.install-actions .btn { justify-content: center; width: 100%; }
.install-actions.single { grid-template-columns: 1fr; }
.install-actions.single .btn-ghost { display: none; }

@media (max-width: 760px) {
  .install-btn span { display: none; }
  .install-btn { width: 40px; padding: 0; justify-content: center; }
  .install { place-items: end center; padding: 0; }
  .install-card { width: 100%; border-radius: 28px 28px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateY(100%); }
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overscroll-behavior: none; }
body { -webkit-tap-highlight-color: transparent; }
a, button, input, textarea { touch-action: manipulation; }
.view { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.topbar { padding-top: max(18px, env(safe-area-inset-top)); padding-left: max(clamp(18px, 3.5vw, 44px), env(safe-area-inset-left)); padding-right: max(clamp(18px, 3.5vw, 44px), env(safe-area-inset-right)); }
.footbar { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.stage { height: 100vh; height: 100svh; height: 100dvh; }

@media (hover: none) and (pointer: coarse) {
  .glow, .spot::before { display: none; }
  .aurora { filter: blur(80px); animation: none; }
  .nav, .lang-btn, .icon-btn, .install-btn, .clock, .float-chip, .pc-badge, .pc-place { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .pc-photo img { animation: none; }
  .field input, .field textarea { font-size: 16px; }
}

@media (max-width: 760px) {
  .nav { bottom: max(14px, env(safe-area-inset-bottom)); }
  .view { top: calc(80px + env(safe-area-inset-top)); bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
