:root {
  --bg: #09090b;
  --bg-2: #0d0d10;
  --surface: #111114;
  --surface-2: #16161a;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #ededf0;
  --muted: #8b8b93;
  --dim: #56565e;
  --accent: #9affc0;
  --accent-2: rgba(154, 255, 192, 0.13);
  --accent-ink: #06241a;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 12px;
  --radius-sm: 9px;
  --max-width: 1080px;

  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; }

#cursor-trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9997;
}

#fxBurst {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9996;
}

/* ===== Aurora drifting glow ===== */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora span {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  will-change: transform;
}
.aurora span:nth-child(1) { background: radial-gradient(circle, rgba(154,255,192,0.5), transparent 65%); top: -12%; left: -8%; animation: auroraA 26s ease-in-out infinite; }
.aurora span:nth-child(2) { background: radial-gradient(circle, rgba(79,125,255,0.38), transparent 65%); top: 28%; right: -14%; animation: auroraB 32s ease-in-out infinite; }
.aurora span:nth-child(3) { background: radial-gradient(circle, rgba(154,255,192,0.28), transparent 65%); bottom: -18%; left: 32%; animation: auroraC 38s ease-in-out infinite; }
@keyframes auroraA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(18vw,12vh) scale(1.18); } }
@keyframes auroraB { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(-14vw,16vh) scale(0.92); } }
@keyframes auroraC { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(10vw,-12vh) scale(1.2); } }

/* ===== Skin docked companion ===== */
.hero-skin.skin-dock {
  position: fixed;
  bottom: 4px;
  right: 8px;
  left: auto;
  top: auto;
  z-index: 1300;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: bottom right;
  transition: opacity .35s ease, transform .4s var(--ease-out);
}
.hero-skin.skin-dock.dock-left {
  right: auto;
  left: 8px;
  transform-origin: bottom left;
}
.hero-skin.skin-dock.skin-hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.hero-skin.skin-dock .skin-bubble { transform-origin: center bottom; }
.hero-skin.skin-dock .skin-bubble.show { transform: translateX(-50%) scale(1.95); }

/* ===== Skin speech bubble ===== */
.skin-bubble {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.7);
  background: #fff;
  color: #15151a;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 7px 13px;
  border-radius: 11px;
  white-space: nowrap;
  border: 2px solid #d4d4d8;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity .26s ease, transform .26s var(--ease-out);
}
.skin-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom: 0;
  border-top-color: #fff;
}
.skin-bubble.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* ===== Enchant glint on project names (hover) ===== */
@keyframes glintSweep { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.pk-card:not(.pk-card--soon):hover .pk-name {
  background: linear-gradient(100deg, var(--text) 38%, #fff 50%, var(--text) 62%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glintSweep 2.2s linear infinite;
}
.pk-card:not(.pk-card--soon):hover .pk-name-accent { -webkit-text-fill-color: var(--accent); }

/* ===== XP bar scroll progress ===== */
.xp-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 7px;
  background: #1a1a1f;
  border-top: 1px solid #000;
  z-index: 1400;
}
.xp-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #eafff2 70%, #ffffff);
  box-shadow: 0 0 10px rgba(154,255,192,0.7);
  transition: width .1s linear;
}

/* ===== Totem of Undying pop ===== */
#totemFx {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
}
#totemFx.play { animation: totemVignette 2.2s ease-out forwards; }
.totem-emblem {
  width: 120px; height: 120px;
  display: grid; place-items: center;
  transform: scale(0);
}
.totem-emblem img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 18px #ffcf4d) sepia(0.5) saturate(2.4) hue-rotate(-12deg) brightness(1.15);
}
#totemFx.play .totem-emblem { animation: totemSpin 2.2s cubic-bezier(0.2,0.8,0.3,1) forwards; }
@keyframes totemVignette {
  0% { opacity: 0; box-shadow: inset 0 0 0 rgba(255,196,77,0); }
  12% { opacity: 1; box-shadow: inset 0 0 220px 40px rgba(255,196,77,0.55); }
  70% { opacity: 1; box-shadow: inset 0 0 220px 40px rgba(255,196,77,0.18); }
  100% { opacity: 0; box-shadow: inset 0 0 0 rgba(255,196,77,0); }
}
@keyframes totemSpin {
  0% { transform: scale(0) rotateY(0); }
  20% { transform: scale(1.25) rotateY(220deg); }
  45% { transform: scale(1) translateY(-10px) rotateY(540deg); }
  70% { transform: scale(1.04) translateY(-26px) rotateY(720deg); }
  100% { transform: scale(0.7) translateY(-90px) rotateY(900deg); opacity: 0; }
}

/* ===== Project card 3D tilt + glare ===== */
.pk-grid { perspective: 1100px; }
.pk-card { transform-style: preserve-3d; position: relative; }


/* ============ Advancement toasts ============ */
.mc-toasts {
  position: fixed;
  top: 74px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1500;
  pointer-events: none;
}
.mc-toast {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 11px 16px 11px 13px;
  min-width: 230px;
  max-width: 320px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  transform: translateX(115%) scale(0.96);
  opacity: 0;
  transition: transform .44s var(--ease-out), opacity .44s var(--ease-out);
  will-change: transform, opacity;
}
.mc-toast.show { transform: translateX(0) scale(1); opacity: 1; }
.mc-toast.hide {
  transform: translateX(115%) scale(0.96);
  opacity: 0;
  transition: transform .26s cubic-bezier(0.4, 0, 1, 1), opacity .22s ease;
}
.mc-toast-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  background: var(--accent-2);
  border: 1px solid rgba(154, 255, 192, 0.32);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}
.mc-toast-body { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.mc-toast-title {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mc-toast-name { color: var(--text); font-weight: 600; font-size: 0.92rem; }

/* ============ Header ============ */
.site-head {
  position: sticky;
  top: 14px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  width: fit-content;
  max-width: calc(100% - 28px);
  margin: 14px auto 0;
  padding: 9px 10px 9px 18px;
  background: rgba(13, 13, 16, 0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-logo { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; border: 1px solid var(--line-2); }
.brand-name { font-family: var(--display); font-weight: 600; color: var(--text); font-size: 1rem; letter-spacing: 0.2px; }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 9px;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.partner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.partner-logo {
  width: 22px; height: 22px; border-radius: 50%;
  object-fit: cover; background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.partner-name { font-weight: 500; }
.partner .arr { color: var(--accent); }

#hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
#hamburger span {
  display: block; width: 24px; height: 2px; margin: 5px 0;
  background: var(--text); border-radius: 2px;
  transition: transform .25s var(--ease-out), opacity .2s ease;
}
#hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

.nav-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: rgba(13, 13, 16, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
  padding: 10px;
  flex-direction: column;
  gap: 2px;
  z-index: 1200;
}
.nav-menu a {
  display: block;
  padding: 13px 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.nav-menu a:hover { background: var(--surface); }
.nav-menu.open { display: flex; }
.nav-menu-contact { color: var(--accent) !important; }
.nav-menu-partner { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px !important; color: var(--muted) !important; }
.nav-menu-partner img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }

/* ============ Hero ============ */
.hero {
  min-height: 86vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 30vw, 360px);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 70px clamp(20px, 6vw, 40px) 60px;
  position: relative;
}
.hero-text { display: flex; flex-direction: column; }

.hero-skin::after {
  content: "";
  position: absolute;
  inset: 8% 12%;
  background: radial-gradient(50% 50% at 50% 45%, var(--accent-2), rgba(154,255,192,0) 70%);
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
  animation: skinGlowPulse 5s ease-in-out infinite;
}
@keyframes skinGlowPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}
.hero-skin:hover::after { animation-duration: 1.6s; opacity: 1; }
.hero-skin {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  align-self: center;
}
.hero-skin #skinFx {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
.hero-skin #skinCanvas {
  display: block;
  position: relative;
  z-index: 1;
  cursor: grab;
  touch-action: none;
}
.hero-skin #skinCanvas:active { cursor: grabbing; }
.hero-skin-tag { position: relative; z-index: 1; }
.hero-skin-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.hero-eyebrow {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin: 0 0 22px;
}
.hero-eyebrow .dot { color: var(--accent); margin: 0 6px; }
.hero-title {
  font-family: var(--display);
  font-size: clamp(2.1rem, 6.4vw, 4.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 17ch;
  color: var(--text);
}
.hero-title .i { font-style: italic; font-weight: 400; color: var(--accent); }
.hero-sub {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  max-width: 58ch;
}
.hero-cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s var(--ease-out), background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(0.97); }
.btn--solid { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.arr { font-family: var(--mono); }

.scroll-arrow {
  position: absolute;
  bottom: 1.8rem;
  left: clamp(20px, 6vw, 40px);
  background: none; border: none; cursor: pointer;
  color: var(--dim);
  padding: 6px;
  animation: arrowBob 2.2s ease-in-out infinite;
  transition: color .2s ease;
}
.scroll-arrow:hover { color: var(--accent); }
.scroll-arrow svg { width: 30px; height: 30px; display: block; }
@keyframes arrowBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ============ Sections ============ */
.section {
  padding: 84px clamp(20px, 5vw, 40px) 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
section { scroll-margin-top: 80px; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 40px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.sec-head::before {
  content: "/ " attr(data-num) "  \2014  ";
  font-family: var(--mono);
  color: var(--accent);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 500;
  white-space: pre;
}
.sec-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ============ Reveal ============ */
.reveal-block { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .55s var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.reveal-block.revealed { opacity: 1; transform: none; }
.fade { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.fade.visible { opacity: 1; transform: translateY(0); }

/* ============ About ============ */
.about { display: flex; flex-direction: column; gap: 44px; }
.icon { display: none; }
.highlight, .highlight-white { color: var(--text); font-weight: 600; }

.about-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.about-bio { display: flex; flex-direction: column; gap: 18px; font-size: 1.15rem; color: var(--muted); line-height: 1.7; max-width: 54ch; }
.about-bio p { margin: 0; }

.journey { display: flex; flex-direction: column; gap: 16px; }
.journey-label { font-family: var(--mono); font-size: 0.8rem; color: var(--dim); letter-spacing: 0.05em; }
.journey-steps {
  list-style: none;
  margin: 0;
  padding: 2px 0 2px 22px;
  position: relative;
}
.journey-steps::before {
  content: '';
  position: absolute;
  left: 3px; top: 10px; bottom: 10px;
  width: 1px;
  background: var(--line-2);
}
.jstep {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
}
.jstep::before {
  content: '';
  position: absolute;
  left: -22px; top: 14px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
}
.jstep--now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-2); }
.jstep-date { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.jstep--now .jstep-date { color: var(--accent); }
.jstep-title { font-size: 1.02rem; font-weight: 600; color: var(--text); }
.jstep-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }

.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-box {
  display: flex; flex-direction: column; gap: 8px;
  padding: 28px;
  border-right: 1px solid var(--line);
}
.stat-box:last-child { border-right: none; }
.stat-number {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 0.78rem; font-weight: 500; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }

/* ============ Techstack marquee ============ */
.techstack-strip {
  width: 100%;
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.techstack-track { display: flex; gap: 26px; width: max-content; animation: techscroll 20s linear infinite; will-change: transform; }
.techstack-track:has(.techstack-item:hover) { animation-play-state: paused; }
.techstack-item {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.techstack-item:hover { color: var(--accent); border-color: var(--line-2); }
@keyframes techscroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ============ Experience ============ */
.experience-layout { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }
.exp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; width: 100%; }
.exp-grid.hidden-grid { display: none; }
.exp-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 11px;
  position: relative; overflow: hidden;
  transition: transform .2s var(--ease-out), border-color .2s ease;
}
.exp-item::before { content: ''; position: absolute; top: 0; left: 0; width: 2px; height: 100%; background: var(--accent); }
.exp-item.past::before { background: var(--dim); }
.exp-item--freelance { cursor: default; border-style: dashed; }
.exp-item--freelance::before { display: none; }
.exp-freelance-badge {
  margin-top: auto; font-family: var(--mono); font-size: 0.68rem; color: var(--dim);
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px dashed var(--line-2); padding: 5px 11px; border-radius: 999px; align-self: flex-start;
}
.exp-header { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 10px; }
.exp-header h3 { margin: 0; font-size: 1.05rem; color: var(--text); font-weight: 600; word-break: break-word; min-width: 0; }
.exp-badge { font-family: var(--mono); font-size: 0.58rem; padding: 4px 9px; border-radius: 999px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.current-badge { background: var(--accent-2); color: var(--accent); border: 1px solid rgba(94, 234, 212, 0.3); }
.past-badge { background: transparent; color: var(--muted); border: 1px solid var(--line-2); }
.exp-role { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--text); font-weight: 500; }
.role-icon { font-family: 'Material Symbols Outlined'; font-size: 1.1rem; line-height: 1; color: var(--accent); }
.exp-meta { margin: 0; font-family: var(--mono); font-size: 0.8rem; color: var(--dim); margin-top: auto; }
.exp-desc { margin: 0; font-size: 0.87rem; color: var(--muted); }
.exp-reason {
  display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--dim);
  padding: 8px 12px; background: var(--bg-2); border-radius: var(--radius-sm); border-left: 2px solid var(--line-2); margin-top: 8px;
}
.reason-icon { font-family: 'Material Symbols Outlined'; font-size: 1rem; line-height: 1; opacity: 0.7; }

.exp-divider { width: 100%; display: flex; justify-content: center; margin: 10px 0; }
.projects-layout .exp-divider { margin: 40px 0 18px; }
.history-btn {
  background: transparent; border: 1px solid var(--line-2); color: var(--text);
  padding: 10px 22px; border-radius: 999px;
  font-family: var(--mono); font-size: 0.84rem; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: transform .15s var(--ease-out), background .2s ease, border-color .2s ease;
}
.history-btn:hover { background: var(--surface); border-color: var(--accent); }
.history-btn:active { transform: scale(0.98); }
.history-btn .chevron { width: 16px; height: 16px; transition: transform .3s var(--ease-out); }
.history-btn.active .chevron { transform: rotate(180deg); }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ============ Projects ============ */
.projects-layout { display: flex; flex-direction: column; }
#fav-projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; width: 100%; }
.pk-grid.hidden-grid { display: none; }

.pk-card {
  position: relative;
  display: flex; flex-direction: column; gap: 11px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none; color: inherit; overflow: hidden;
  transition: transform .25s var(--ease-out), border-color .25s ease;
}
.pk-card--soon { cursor: default; border-style: dashed; background: transparent; }
.pk-card--expandable { cursor: pointer; }
.pk-card--expandable::after {
  content: 'Open ↗';
  display: block; margin-top: 4px;
  font-family: var(--mono); font-size: 0.74rem; color: var(--dim);
  text-align: right; transition: color .15s ease;
}
.pk-card--expandable.expanded::after { display: none; }
.pk-close-btn {
  display: none; width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text); font-size: 15px; line-height: 1; cursor: pointer;
  align-items: center; justify-content: center; margin-left: auto;
  transition: background .2s ease, color .2s ease;
}
.pk-close-btn:hover { background: var(--accent); color: var(--accent-ink); }

.pk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pk-type {
  font-family: var(--mono); font-size: 0.64rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted); background: transparent;
}
.pk-compat { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.7rem; color: var(--dim); }
.pk-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent-2); }
.pk-name { font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; line-height: 1.15; }
.pk-name-accent { color: var(--accent); }
.pk-name--dim { opacity: 0.45; }
.pk-desc { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.55; flex: 1; }
.pk-desc--dim { opacity: 0.4; }
.pk-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pk-tags li {
  font-family: var(--mono); font-size: 0.68rem; padding: 4px 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted);
}
.pk-footer { position: relative; height: 0; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.pk-link--hover { display: none; }
.pk-private-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--text); }
.pk-icon { font-family: 'Material Symbols Outlined'; font-size: 1.05rem; line-height: 1; color: var(--accent); }
.pk-private-sub { font-family: var(--mono); font-size: 0.72rem; color: var(--dim); }
.pk-soon-badge {
  margin-top: auto; font-family: var(--mono); font-size: 0.68rem; color: var(--dim);
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px dashed var(--line-2); padding: 5px 11px; border-radius: 999px; align-self: flex-start;
}
.pk-expand-extra { display: none; }
.pk-expand-divider { height: 1px; background: var(--line); margin: 6px 0 12px; }
.pk-inline-tag { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--accent); }
.pk-inline-tag--deny { color: var(--muted); }

.pk-card--expandable.expanded {
  position: fixed; top: 50%; left: 50%;
  width: min(96vw, 1000px); max-height: 88vh; overflow-y: auto;
  z-index: 1001; transform: translate(-50%, -50%);
  border-color: var(--line-2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
  animation: cardExpand .22s var(--ease-out) forwards;
  isolation: isolate;
}
.pk-card--expandable.expanded .pk-expand-extra { display: block; }
@keyframes cardExpand { from { opacity: 0.6; transform: translate(-50%, -50%) scale(0.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#pk-card-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(2px); z-index: 1000; cursor: zoom-out;
}
body > *:not(#pk-card-backdrop):not(.pk-card--expandable):not(.review-box):not(script) { transition: filter .2s ease; }
body.card-expanded > *:not(#pk-card-backdrop):not(.pk-card--expandable):not(.review-box):not(script):not(#img-lightbox) { filter: blur(6px); }
#pk-card-backdrop.open { display: block; animation: fadeIn .2s ease forwards; }

.pk-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pk-gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); cursor: zoom-in; transition: border-color .2s ease; }
.pk-gallery-item:hover { border-color: var(--accent); }
.pk-gallery-item img { width: 100%; height: auto; display: block; image-rendering: pixelated; transition: transform .25s var(--ease-out); }
.pk-gallery-item:hover img { transform: scale(1.04); }
.pk-gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 9px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); font-family: var(--mono); font-size: 0.66rem; color: var(--muted); pointer-events: none; }
.pk-gallery-item--wide { grid-column: 1 / -1; cursor: default; }
.pk-gallery-item video { width: 100%; height: auto; display: block; }

#img-lightbox { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, 0.92); align-items: center; justify-content: center; cursor: zoom-out; }
#img-lightbox.open { display: flex; animation: fadeIn .15s ease forwards; }
#img-lightbox-img { max-width: 90vw; max-height: 88vh; border-radius: var(--radius-sm); box-shadow: 0 8px 60px rgba(0,0,0,0.9); pointer-events: none; image-rendering: pixelated; }
#img-lightbox-close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: var(--text); font-size: 2rem; cursor: pointer; opacity: 0.7; line-height: 1; }
#img-lightbox-close:hover { opacity: 1; }

/* ============ Reviews ============ */
.review-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.review-box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  width: 100%; min-height: 170px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--muted); text-align: left; cursor: pointer;
  transition: transform .2s var(--ease-out), border-color .2s ease;
}
.review-box::before {
  content: '\201C'; position: absolute; top: 8px; left: 18px;
  font-family: Georgia, serif; font-size: 3.4rem; line-height: 1; color: var(--line-2); pointer-events: none;
}
.review-content { position: relative; overflow: hidden; padding-top: 16px; }
.review-box:not(.expanded) .review-content .review-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.review-text { margin: 0 0 18px 0; color: var(--text); font-size: 0.98rem; line-height: 1.65; }
.review-footer { display: flex; align-items: center; gap: 13px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 15px; }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); object-fit: cover; }
.review-author { font-family: var(--mono); font-weight: 500; color: var(--accent); font-size: 0.86rem; }
.review-expand-hint { font-family: var(--mono); font-size: 0.74rem; color: var(--dim); text-align: center; margin-top: 12px; transition: opacity .2s ease, color .2s ease; }
.review-box[data-expanded="true"] .review-expand-hint { opacity: 0; pointer-events: none; }

.review-screenshot-btn {
  position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .25s ease, transform .25s var(--ease-out), background .2s ease; z-index: 2;
}
.review-screenshot-btn svg { width: 17px; height: 17px; }
.review-screenshot-btn:hover { background: var(--accent); color: var(--accent-ink); }
.review-box[data-expanded="true"] .review-screenshot-btn { opacity: 1; transform: translateY(0); pointer-events: auto; }

.review-box.expanded {
  position: fixed; top: 50%; left: 50%; width: min(96vw, 760px); max-height: 88vh; overflow-y: auto;
  transform: translate(-50%, -50%); z-index: 1000; border-color: var(--line-2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85); animation: cardExpand .22s var(--ease-out) forwards;
}
.review-box.expanded .review-content { overflow: visible; }
.review-box.expanded .review-expand-hint { display: none; }
.review-box.expanded .review-screenshot-btn { opacity: 1; transform: translateY(0); pointer-events: auto; right: 54px; }
.review-close-btn {
  position: absolute; top: 13px; right: 13px; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); color: var(--muted);
  font-size: 16px; line-height: 1; display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
  transition: background .2s ease, color .2s ease;
}
.review-close-btn:hover { background: var(--accent); color: var(--accent-ink); }
.review-box.expanded .review-close-btn { display: flex; }

/* ============ Contact ============ */
.contact-container { display: flex; justify-content: center; width: 100%; }
.contact-box { width: 100%; max-width: 960px; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.contact-grid { display: flex; gap: 36px; align-items: stretch; }
.contact-actions { display: flex; flex-direction: column; gap: 12px; flex: 0 0 240px; }
.action-btn {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; cursor: pointer; text-align: left;
  transition: transform .2s var(--ease-out), border-color .2s ease;
}
.action-btn:active { transform: scale(0.98); }
.action-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); flex-shrink: 0; }
.action-icon svg { width: 24px; height: 24px; fill: var(--accent-ink); }
.action-btn .label { font-weight: 600; color: var(--text); font-size: 1rem; }
.action-btn .sub { font-family: var(--mono); font-size: 0.82rem; color: var(--dim); margin-top: 3px; }

.contact-form { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.input-container, .message-container { display: flex; flex-direction: column; }
.input-label { font-family: var(--mono); font-weight: 500; color: var(--muted); margin-bottom: 7px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; }
.input-box, .message-box {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font-size: 0.95rem; outline: none; font-family: var(--sans); transition: border-color .2s ease;
}
.input-box::placeholder, .message-box::placeholder { color: var(--dim); }
.input-box:focus, .message-box:focus { border-color: var(--accent); }
.message-box { min-height: 138px; resize: vertical; }
.submit-btn {
  background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink);
  padding: 13px 30px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer;
  font-size: 0.92rem; transition: transform .15s var(--ease-out), opacity .2s ease;
}
.submit-btn:active { transform: scale(0.97); }
.submit-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
#status { font-family: var(--mono); font-size: 0.82rem; min-height: 1.2em; color: var(--muted); }
#status.success { color: var(--accent); }
#status.error { color: #f4a3a3; }
.contact-submit-row { display: flex; flex-direction: column; gap: 9px; align-items: center; margin-top: 4px; }
.char-counter { font-family: var(--mono); font-size: 0.74rem; color: var(--dim); text-align: right; align-self: flex-end; transition: color .2s ease; }
.char-counter.warn { color: var(--muted); }
.char-counter.limit { color: var(--accent); font-weight: 600; }

/* ============ Footer ============ */
.footer { margin-top: 90px; border-top: 1px solid var(--line); padding: 36px clamp(20px, 5vw, 40px); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.footer-logo { display: flex; align-items: center; gap: 11px; }
.footer-avatar { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; border: 1px solid var(--line-2); }
.footer-name { font-weight: 600; font-size: 0.98rem; color: var(--text); }
.footer-links { display: flex; gap: 2px; flex-wrap: wrap; }
.footer-links a { font-family: var(--mono); color: var(--dim); text-decoration: none; font-size: 0.82rem; padding: 6px 12px; border-radius: var(--radius-sm); transition: color .2s ease; }
.footer-links a:hover { color: var(--accent); }

/* ============ Back to top ============ */
.back-to-top {
  position: fixed; bottom: 26px; right: 26px; width: 44px; height: 44px;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2);
  backdrop-filter: blur(12px); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s var(--ease-out), background .2s ease, color .2s ease; z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: var(--accent-ink); }
.back-to-top svg { width: 20px; height: 20px; }

/* ============ Hover (pointer only) ============ */
@media (hover: hover) and (pointer: fine) {
  .partner:hover { border-color: var(--accent); color: var(--text); background: var(--surface); }
  .btn--solid:hover { background: #bcffd6; }
  .btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
  .gate-connect:hover, .submit-btn:hover { background: #bcffd6; }
  .timeline-step:hover { transform: translateX(3px); }
  .stat-box:hover { background: var(--surface); }
  .exp-item:hover { transform: translateY(-3px); border-color: var(--line-2); }
  .exp-item--freelance:hover { transform: none; }
  .pk-card:hover { transform: translateY(-3px); border-color: var(--accent); }
  .pk-card--soon:hover, .pk-card--expandable.expanded:hover { transform: none; border-color: var(--line-2); }
  .pk-card--expandable:hover::after { color: var(--accent); }
  .pk-card:hover .pk-link--hover { opacity: 1; }
  .review-box:hover { transform: translateY(-3px); border-color: var(--line-2); }
  .action-btn:hover { transform: translateY(-3px); border-color: var(--accent); }
}

/* ============ Polish ============ */
.pk-card, .exp-item, .review-box, .action-btn, .stat-box {
  transition: transform .22s var(--ease-out), border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
@media (hover: hover) and (pointer: fine) {
  .pk-card:hover, .exp-item:hover, .review-box:hover {
    box-shadow: 0 14px 38px rgba(0,0,0,0.45), 0 0 0 1px var(--accent-2), 0 0 26px -8px var(--accent);
  }
  .action-btn:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 22px -10px var(--accent); }
  .btn--solid { position: relative; overflow: hidden; }
  .btn--solid::after {
    content: ""; position: absolute; top: 0; left: -130%; width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: skewX(-18deg); transition: left .55s var(--ease-out);
  }
  .btn--solid:hover::after { left: 130%; }
  .stat-box:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
}

/* ============ Reduced motion ============ */
