/* =========================================================
   Design tokens
   ========================================================= */
:root {
  /* colors */
  --bg: #0d1a2d;
  --bg-2: #12233a;
  --bg-3: #172a42;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eef2f9;
  --text-dim: #aab3c7;
  --text-mute: #76819a;

  --accent: #60a5fa;      /* blue-400 */
  --accent-2: #a78bfa;    /* violet-400 */
  --accent-3: #34d399;    /* emerald-400 */
  --accent-4: #fbbf24;    /* amber-400 */
  --gradient: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
  --gradient-2: linear-gradient(135deg, #34d399 0%, #60a5fa 100%);

  /* spacing scale — 8pt system */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-1: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-2: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 32px rgba(96, 165, 250, 0.18);

  --font-sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}

/* =========================================================
   Reset & base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--bg); }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Animated background
   ========================================================= */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at top, #15263c 0%, #0d1a2d 55%, #12233a 100%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: float 20s ease-in-out infinite;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: -100px; left: -100px;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
  top: 40%; right: -80px;
  animation-delay: -7s;
}
.orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #f472b6 0%, transparent 70%);
  bottom: -80px; left: 40%;
  animation-delay: -14s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.05); }
  66% { transform: translate(-40px, 60px) scale(0.95); }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  transition: all 0.3s var(--ease-out);
}
.nav.scrolled {
  background: rgba(13, 26, 45, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gradient);
  color: var(--bg);
  font-weight: 800;
  font-size: 18px;
}
.brand-text em { font-style: normal; color: var(--text-mute); font-weight: 500; }
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.lang-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.lang-sep { color: var(--text-mute); margin: 0 4px; }
body[data-lang="zh"] .lang-cn { color: var(--accent); }
body[data-lang="en"] .lang-en { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease-out);
  min-height: 40px;
}
.btn-primary {
  background: var(--gradient);
  color: #0a0d15;
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(96, 165, 250, 0.4);
}
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--surface);
  border-color: var(--accent);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  padding: 8px 14px;
  font-size: 13px;
  min-height: 36px;
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.menu-btn {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  width: 40px; height: 40px;
  justify-content: center;
  align-items: center;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  min-height: min(100dvh, 860px);
  display: flex;
  align-items: center;
  padding: 112px 0 64px;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: var(--accent-3);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}
.pulse {
  width: 8px; height: 8px;
  background: var(--accent-3);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}
.hero-title {
  font-size: clamp(38px, 5.4vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.hero-title span:first-child {
  display: block;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0;
  margin-bottom: 8px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.hero-role {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text);
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-role .sep { color: var(--text-mute); margin: 0 10px; }
.hero-desc {
  max-width: 520px;
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 32px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.hero-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.meta-item {}
.meta-num {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  font-family: var(--font-mono);
}
.meta-label {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 6px;
}

/* Hero code visual */
.hero-visual {
  perspective: 1000px;
}
.code-card {
  background: rgba(11, 15, 26, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2), 0 0 60px rgba(96, 165, 250, 0.1);
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform 0.6s var(--ease-out);
}
.code-card:hover {
  transform: rotateY(-2deg) rotateX(1deg);
}
.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-file {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
}
.code-body {
  padding: 20px 22px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: #cbd5e1;
  overflow-x: auto;
}
.code-body .kw { color: #f472b6; }
.code-body .cls { color: #60a5fa; }
.code-body .str { color: #34d399; }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 40px;
  border: 2px solid var(--text-mute);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-hint span {
  width: 3px; height: 8px;
  background: var(--text-mute);
  border-radius: 2px;
  animation: scroll-down 1.8s ease-in-out infinite;
}
@keyframes scroll-down {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* =========================================================
   Section base
   ========================================================= */
.section {
  padding: 96px 0;
  position: relative;
}
.section-alt {
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.015), transparent);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.05em;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-strong), transparent);
  max-width: 240px;
}
.section-sub {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 56px;
  max-width: 640px;
}

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  margin-top: 32px;
}
.about-text p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text-dim);
}
.about-facts {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}
.about-facts li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.about-facts li:last-child { border-bottom: 0; }
.fact-key { color: var(--text-mute); }
.fact-val { color: var(--text); font-weight: 500; }

.about-highlights {
  display: grid;
  gap: 16px;
}
.hl-card {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease-out);
}
.hl-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateX(4px);
}
.hl-icon {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.12);
  color: var(--accent);
  margin-bottom: 14px;
}
.hl-icon svg { width: 20px; height: 20px; }
.hl-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.hl-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* =========================================================
   Skills
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.skill-cat {
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--ease-out);
}
.skill-cat:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.cat-icon {
  font-size: 24px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
.cat-head h3 {
  font-size: 16px;
  font-weight: 600;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  transition: all 0.2s;
}
.tag:hover {
  color: var(--accent);
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(96, 165, 250, 0.08);
}
/* =========================================================
   Timeline — horizontal & playful
   ========================================================= */
.tl-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-mute);
}
.tl-hint::after {
  content: "→";
  animation: hint-nudge 1.6s ease-in-out infinite;
}
@keyframes hint-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

.timeline-wrap {
  position: relative;
  margin-top: 40px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.4) transparent;
}
.timeline-wrap::-webkit-scrollbar { height: 6px; }
.timeline-wrap::-webkit-scrollbar-track { background: transparent; }
.timeline-wrap::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.4);
  border-radius: 999px;
}
.timeline {
  position: relative;
  display: flex;
  gap: 24px;
  padding: 68px 8px 32px;
  width: max-content;
}
/* horizontal spine spanning the FULL scrollable width, through the icon centers */
.tl-spine {
  position: absolute;
  top: 110px; /* passes through the icon bubbles (centers at 112px) */
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(96, 165, 250, 0.25),
    rgba(167, 139, 250, 0.45),
    rgba(52, 211, 153, 0.55),
    rgba(96, 165, 250, 0.7));
}
.tl-item {
  position: relative;
  flex: 0 0 320px;
  scroll-snap-align: start;
  padding-top: 76px;
}
.tl-icon {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.tl-item[data-kind="project"] .tl-icon { background: rgba(96, 165, 250, 0.16); border-color: rgba(96, 165, 250, 0.45); }
.tl-item[data-kind="ai"] .tl-icon { background: rgba(244, 114, 182, 0.16); border-color: rgba(244, 114, 182, 0.45); }
.tl-item[data-kind="award"] .tl-icon { background: rgba(251, 191, 36, 0.16); border-color: rgba(251, 191, 36, 0.45); }
.tl-item[data-kind="edu"] .tl-icon { background: rgba(52, 211, 153, 0.16); border-color: rgba(52, 211, 153, 0.45); }
.tl-item[data-kind="work"] .tl-icon { background: rgba(167, 139, 250, 0.16); border-color: rgba(167, 139, 250, 0.45); }
/* "now" entry (rightmost) gets a gradient bubble that floats */
.tl-item:last-child .tl-icon {
  background: var(--gradient);
  border-color: transparent;
  animation: icon-float 3s ease-in-out infinite;
}
@keyframes icon-float {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(96, 165, 250, 0.45);
  }
  50% {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), 0 0 0 12px rgba(96, 165, 250, 0);
  }
}
.tl-card {
  height: 100%;
  padding: 22px 22px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.tl-item:hover .tl-card {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), 0 0 28px rgba(96, 165, 250, 0.14);
}
.tl-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tl-date {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.16), rgba(167, 139, 250, 0.16));
  border: 1px solid rgba(139, 155, 255, 0.35);
  white-space: nowrap;
}
.tl-sep { color: var(--text-mute); }
.tl-tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tl-tag-project { background: rgba(96, 165, 250, 0.14); color: var(--accent); }
.tl-tag-ai { background: rgba(244, 114, 182, 0.14); color: #f472b6; }
.tl-tag-award { background: rgba(251, 191, 36, 0.14); color: var(--accent-4); }
.tl-tag-edu { background: rgba(52, 211, 153, 0.14); color: var(--accent-3); }
.tl-tag-work { background: rgba(167, 139, 250, 0.14); color: var(--accent-2); }
.tl-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}
.tl-card p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-dim);
}

/* =========================================================
   Projects
   ========================================================= */
.projects {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}
.project {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.project::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
  border-radius: var(--radius-lg);
}
.project:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}
.pj-head {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.pj-index {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.6;
}
.pj-meta { flex: 1; }
.pj-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 6px;
}
.pj-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.pj-role {
  font-size: 14px;
  color: var(--text-mute);
}
.pj-body p {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 16px;
}
.pj-points {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.pj-points li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-dim);
}
.pj-points li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.pj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.pj-stack .tag {
  font-size: 11.5px;
  padding: 4px 10px;
}

/* =========================================================
   Contact
   ========================================================= */
.contact-card {
  margin-top: 32px;
  padding: 48px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(167, 139, 250, 0.06));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact-copy h3 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.contact-copy p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dim);
}
.contact-links {
  display: grid;
  gap: 12px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.25s var(--ease-out);
}
.contact-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent);
  transform: translateX(4px);
}
.ct-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(96, 165, 250, 0.12);
  color: var(--accent);
  border-radius: 10px;
  flex-shrink: 0;
}
.ct-icon svg { width: 20px; height: 20px; }
.ct-label {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.ct-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}
.footer-brand em { color: var(--text-mute); font-style: normal; font-weight: 500; }
.footer-left p {
  font-size: 13.5px;
  color: var(--text-mute);
}
.footer-right p {
  font-size: 13px;
  color: var(--text-mute);
}

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .nav { padding: 14px 20px; }
  .nav.scrolled { padding: 10px 20px; }
  .nav-links {
    position: fixed;
    inset: 60px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: rgba(13, 26, 45, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    transform: translateY(-120%);
    transition: transform 0.35s var(--ease-out);
    z-index: 90;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
    width: 100%;
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.active::after { display: none; }
  .menu-btn { display: flex; }
  .btn-ghost span { display: none; }
  .btn-ghost { padding: 8px; }

  .hero { padding: 100px 0 60px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-visual { order: -1; }
  .code-card { transform: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section { padding: 72px 0; }
  .section-line { display: none; }

  .timeline { gap: 16px; }
  .tl-item { flex-basis: 300px; }
  .tl-hint { justify-content: flex-start; }

  .project { padding: 24px 22px; }
  .pj-head { gap: 16px; }
  .pj-index { font-size: 32px; }
  .pj-title { font-size: 18px; }

  .contact-card {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 32px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .nav { padding: 12px 16px; }
  .hero-title { font-size: 40px; }
  .hero-meta { gap: 24px; }
  .meta-num { font-size: 22px; }
  .section { padding: 64px 0; }
  .section-num { font-size: 13px; }
  .code-body { font-size: 12px; padding: 16px; }
  .project { padding: 20px 18px; }
  .contact-card { padding: 28px 20px; }
  .tl-item { flex-basis: 280px; }
  .tl-hint { display: none; }
}

/* Print */
@media print {
  .nav, .bg-fx, .scroll-hint, .hero-cta, .menu-btn { display: none !important; }
  body { color: #000; background: #fff; }
  .hero { min-height: auto; padding: 24px 0; }
  .section { padding: 24px 0; }
  .project, .tl-card, .skill-cat, .hl-card {
    background: #fafafa;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  * { color: #000 !important; text-shadow: none !important; }
  .gradient-text, .pj-index, .meta-num { -webkit-text-fill-color: #000 !important; color: #000 !important; }

  /* timeline: collapse to a vertical list for print */
  .timeline-wrap { overflow: visible; }
  .timeline { display: block; overflow: visible; padding: 0; width: auto; scrollbar-width: auto; }
  .tl-spine { display: none; }
  .tl-item { flex: none; padding-top: 0; margin-bottom: 16px; }
  .tl-icon { display: none; }
}

