/* ============================================================
   Alex Wang · Portfolio — design system + layout
   Plain CSS, no external fonts, no frameworks.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #070b14;
  --bg-soft: #0a1120;
  --surface: rgba(17, 26, 46, 0.55);
  --surface-solid: #0d1628;
  --text: #e9effc;
  --text-soft: #a7b4cc;
  --muted: #6f7f9c;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --accent: #5eead4;
  --accent-2: #818cf8;
  --accent-3: #c084fc;
  --glow: rgba(94, 234, 212, 0.16);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: min(1600px, 94vw);
  --font-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* photo-section scrims + on-image text (theme-aware) */
  --veil-hero: linear-gradient(180deg, rgba(2, 6, 14, 0.6) 0%, rgba(2, 6, 14, 0.25) 34%, rgba(2, 6, 14, 0.74) 72%, var(--bg) 100%), linear-gradient(90deg, rgba(2, 6, 14, 0.55), transparent 55%);
  --veil-feature: linear-gradient(200deg, rgba(2, 6, 14, 0.18) 0%, rgba(2, 6, 14, 0.52) 46%, rgba(2, 6, 14, 0.92) 100%);
  --veil-feature-indigo: linear-gradient(200deg, rgba(4, 8, 22, 0.2) 0%, rgba(10, 16, 40, 0.62) 48%, rgba(3, 6, 16, 0.94) 100%);
  --veil-feature-violet: linear-gradient(200deg, rgba(10, 6, 20, 0.25) 0%, rgba(24, 14, 42, 0.6) 48%, rgba(4, 3, 10, 0.95) 100%);
  --veil-feature-cyan: linear-gradient(200deg, rgba(2, 10, 16, 0.2) 0%, rgba(4, 20, 28, 0.56) 48%, rgba(1, 6, 10, 0.94) 100%);
  --on-image: #ffffff;
  --on-image-soft: rgba(233, 239, 252, 0.78);
  --on-image-dim: rgba(233, 239, 252, 0.72);
  --on-image-eyebrow: rgba(226, 238, 254, 0.9);
  --on-image-line: rgba(255, 255, 255, 0.26);
  --on-image-fill: rgba(255, 255, 255, 0.1);
  --on-image-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --veil-scrim: linear-gradient(90deg, rgba(2, 6, 14, 0.72) 0%, rgba(2, 6, 14, 0.42) 38%, rgba(2, 6, 14, 0.08) 68%, transparent 100%);
  --header-scrim: rgba(5, 9, 17, 0.82);
}

[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --text-soft: #46536b;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.22);
  --accent: #0d9488;
  --accent-2: #4f46e5;
  --accent-3: #9333ea;
  --glow: rgba(13, 148, 136, 0.14);
  --shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.28);

  /* photo sections turn light too: light scrim + dark text on image */
  --veil-hero: linear-gradient(180deg, rgba(245, 247, 251, 0.55) 0%, rgba(245, 247, 251, 0.2) 34%, rgba(245, 247, 251, 0.8) 72%, var(--bg) 100%), linear-gradient(90deg, rgba(245, 247, 251, 0.62), transparent 55%);
  --veil-feature: linear-gradient(200deg, rgba(245, 247, 251, 0.32) 0%, rgba(245, 247, 251, 0.64) 46%, rgba(245, 247, 251, 0.94) 100%);
  --veil-feature-indigo: var(--veil-feature);
  --veil-feature-violet: var(--veil-feature);
  --veil-feature-cyan: var(--veil-feature);
  --on-image: #0f172a;
  --on-image-soft: rgba(15, 23, 42, 0.76);
  --on-image-dim: rgba(15, 23, 42, 0.7);
  --on-image-eyebrow: rgba(15, 23, 42, 0.82);
  --on-image-line: rgba(15, 23, 42, 0.24);
  --on-image-fill: rgba(15, 23, 42, 0.06);
  --on-image-shadow: 0 18px 60px rgba(255, 255, 255, 0.6);
  --veil-scrim: linear-gradient(90deg, rgba(245, 247, 251, 0.86) 0%, rgba(245, 247, 251, 0.55) 38%, rgba(245, 247, 251, 0.12) 68%, transparent 100%);
  --header-scrim: rgba(245, 247, 251, 0.9);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* fluid base: phones ~15px, desktop ~17.5px, never runaway on ultra-wide or zoomed */
  font-size: clamp(15.5px, 0.25vw + 0.2vh + 12.5px, 21px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 8% -10%, rgba(94, 234, 212, 0.10), transparent 62%),
    radial-gradient(1000px 720px at 96% 2%, rgba(129, 140, 248, 0.10), transparent 58%),
    radial-gradient(820px 620px at 50% 112%, rgba(192, 132, 252, 0.06), transparent 62%);
}

h1, h2, h3, h4, p, dl, dd, dt { margin: 0; }
ul { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

::selection {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text);
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #04121a;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--header-scrim) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.site-header.is-scrolled::before { opacity: 0; }
.page-home .site-header::before { opacity: 0.45; }
.page-home .site-header:hover::before,
.page-home .site-header.is-scrolled::before { opacity: 0.92; }
.header-inner { position: relative; z-index: 1; }
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px -30px rgba(0, 0, 0, 0.55);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 26px);
  height: clamp(72px, 9vh, 92px);
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: clamp(40px, 2.2vw, 46px);
  height: clamp(40px, 2.2vw, 46px);
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(140deg, rgba(94, 234, 212, 0.16), rgba(129, 140, 248, 0.18));
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 0.3vw + 0.65rem, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: clamp(0.98rem, 0.45vw + 0.78rem, 1.18rem); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.brand-text span {
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 0.28vw + 0.55rem, 0.8rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav { display: flex; align-items: center; gap: clamp(14px, 1.5vw, 28px); }
.nav-link {
  position: relative;
  font-size: clamp(0.95rem, 0.4vw + 0.8rem, 1.18rem);
  color: var(--text-soft);
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: clamp(8px, 0.8vw, 14px); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-soft) 50%, transparent);
}
.lang {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: clamp(0.74rem, 0.3vw + 0.6rem, 0.9rem);
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}
.lang.is-active { color: var(--text); background: var(--line); }
.lang:hover { color: var(--text); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: clamp(38px, 2.2vw, 46px);
  height: clamp(38px, 2.2vw, 46px);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: var(--text-soft);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--line-strong); }

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; }
.menu-line { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform 0.25s ease; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 104px 0 72px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  right: -120px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.12), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 56px;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.4rem, min(6vw, 9vh), 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero-greeting {
  display: block;
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.hero-name {
  display: inline-block;
  background: linear-gradient(118deg, var(--text) 26%, var(--accent) 62%, var(--accent-2) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-latin {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.3em;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-headline {
  margin-top: 22px;
  font-size: clamp(1rem, min(1.8vw, 2.6vh), 1.3rem);
  font-weight: 550;
  letter-spacing: -0.01em;
}
.hero-intro {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--text-soft);
  line-height: 1.78;
  font-size: 0.98rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn-primary {
  background: linear-gradient(118deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: 0 14px 36px -16px var(--glow);
}
[data-theme="light"] .btn-primary { color: #ffffff; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -16px var(--glow);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stats .stat dd {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}
.hero-stats .stat dt {
  margin-top: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* hero visual */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
}
.visual-grid {
  position: absolute;
  inset: -12% -8%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 12%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 12%, transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}
.orbit {
  position: relative;
  width: min(380px, 82%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.orbit-ring--1 { inset: 0; }
.orbit-ring--2 { inset: 15%; border-color: rgba(94, 234, 212, 0.24); border-style: dashed; }
.orbit-ring--3 { inset: 31%; border-color: rgba(129, 140, 248, 0.28); }
.orbit-core {
  width: 15%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #d3fbf3, var(--accent) 42%, var(--accent-2) 100%);
  box-shadow:
    0 0 46px 6px var(--glow),
    0 0 110px 22px rgba(129, 140, 248, 0.16);
  animation: core-pulse 5.5s ease-in-out infinite;
}
.orbit-satellite {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px var(--glow);
  animation: orbit-spin 26s linear infinite;
}
.orbit-satellite.sat-2 {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--accent-2);
  box-shadow: 0 0 12px 2px rgba(129, 140, 248, 0.3);
  animation-duration: 38s;
  animation-direction: reverse;
}
.orbit-label {
  position: absolute;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.orbit-label.label-1 { top: 7%; left: 2%; }
.orbit-label.label-2 { bottom: 12%; right: 0; }

@keyframes core-pulse {
  0%, 100% { box-shadow: 0 0 40px 4px var(--glow), 0 0 100px 18px rgba(129, 140, 248, 0.14); }
  50% { box-shadow: 0 0 58px 8px var(--glow), 0 0 130px 28px rgba(129, 140, 248, 0.22); }
}
@keyframes orbit-spin {
  from { transform: rotate(0deg) translateX(clamp(72px, 13vw, 128px)); }
  to { transform: rotate(360deg) translateX(clamp(72px, 13vw, 128px)); }
}

/* ---------- section heads ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--glow);
}
.section-head { max-width: 660px; margin-bottom: 48px; }
.section-title {
  font-size: clamp(1.6rem, min(3.2vw, 5vh), 2.25rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.16;
}
.section-desc {
  margin-top: 14px;
  color: var(--text-soft);
  line-height: 1.78;
  font-size: 0.98rem;
  max-width: 62ch;
}
.section-foot { margin-top: 38px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
}
.text-link span { transition: transform 0.2s ease; }
.text-link:hover span { transform: translateX(4px); }

/* ---------- project cards ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.project-media {
  position: relative;
  height: 148px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.14), rgba(129, 140, 248, 0.12));
}
.accent-cyan .project-media { background: linear-gradient(135deg, rgba(94, 234, 212, 0.22), rgba(14, 165, 233, 0.1)); }
.accent-indigo .project-media { background: linear-gradient(135deg, rgba(129, 140, 248, 0.22), rgba(59, 130, 246, 0.1)); }
.accent-violet .project-media { background: linear-gradient(135deg, rgba(192, 132, 252, 0.2), rgba(129, 140, 248, 0.12)); }
.project-orb {
  position: absolute;
  width: 140px;
  height: 140px;
  right: -34px;
  top: -46px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.4), rgba(94, 234, 212, 0.35) 44%, transparent 72%);
  filter: blur(1px);
}
.accent-indigo .project-orb { background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.36), rgba(129, 140, 248, 0.4) 44%, transparent 72%); }
.accent-violet .project-orb { background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.36), rgba(192, 132, 252, 0.4) 44%, transparent 72%); }
.project-ring {
  position: absolute;
  width: 190px;
  height: 190px;
  left: -56px;
  bottom: -92px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.22);
}
.project-year {
  position: absolute;
  left: 18px;
  bottom: 13px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--text-soft);
}
.project-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 24px;
  flex: 1;
}
.project-title { font-size: 1.06rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.35; }
.project-summary { flex: 1; color: var(--text-soft); font-size: 0.92rem; line-height: 1.7; }
.project-link { align-self: flex-start; font-size: 0.84rem; font-weight: 600; color: var(--accent); }

/* ---------- tags ---------- */
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; }
.tag-list--wrap { gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-soft) 52%, transparent);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.skill-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.skill-title {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ---------- about ---------- */
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: start;
}
.about-p {
  margin-top: 16px;
  max-width: 60ch;
  color: var(--text-soft);
  line-height: 1.85;
}
.about-copy .btn { margin-top: 26px; }
.panel-card {
  position: sticky;
  top: 104px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(360px 220px at 85% -10%, rgba(94, 234, 212, 0.12), transparent 60%),
    linear-gradient(160deg, rgba(129, 140, 248, 0.08), rgba(192, 132, 252, 0.06));
}
.panel-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.focus-list { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; list-style: none; }
.focus-list li { display: flex; align-items: baseline; gap: 12px; font-weight: 550; font-size: 0.97rem; }
.focus-num { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); }
.panel-line { height: 1px; margin: 24px 0; background: var(--line); }
.panel-caption { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); }

/* ---------- contact ---------- */
.contact-card {
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(520px 280px at 16% -10%, rgba(94, 234, 212, 0.13), transparent 55%),
    radial-gradient(620px 340px at 92% 110%, rgba(129, 140, 248, 0.15), transparent 58%),
    var(--surface);
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 48px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-meta { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.footer-brand { font-weight: 650; font-size: 0.95rem; }
.footer-note { color: var(--muted); font-size: 0.8rem; }
.footer-links { display: flex; align-items: center; gap: 20px; font-size: 0.85rem; }
.footer-links a { color: var(--text-soft); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-links .to-top { font-family: var(--font-mono); }

/* ---------- inner pages ---------- */
.page-hero { padding: 88px 0 20px; }
.page-title {
  font-size: clamp(1.9rem, min(4.4vw, 7vh), 2.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.page-desc {
  margin-top: 16px;
  max-width: 64ch;
  color: var(--text-soft);
  line-height: 1.78;
}
.prose-wrap { max-width: 760px; }
.prose { color: var(--text-soft); font-size: 1rem; line-height: 1.92; }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  margin: 42px 0 14px;
  color: var(--text);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.prose h3 { margin: 30px 0 10px; color: var(--text); font-size: 1.08rem; }
.prose p { margin: 12px 0; }
.prose ul { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; padding-left: 20px; }
.prose li::marker { color: var(--accent); }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent);
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--text); font-weight: 650; }
.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.86em;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

/* project list rows */
.project-list { display: flex; flex-direction: column; gap: 24px; }
.project-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 28px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.project-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.project-row__index {
  padding-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.project-row__title { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.project-row__summary { margin-top: 10px; color: var(--text); line-height: 1.7; font-size: 0.96rem; }
.project-row__details { margin-top: 8px; color: var(--text-soft); font-size: 0.93rem; line-height: 1.78; }
.project-row .tag-list { margin-top: 16px; }
.project-row .text-link { margin-top: 18px; }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { padding: 84px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { min-height: 340px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
  .panel-card { position: static; }
  .project-row { grid-template-columns: 1fr; gap: 10px; padding: 28px; }
}

@media (max-width: 1024px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 14px 24px 18px;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav .nav-link { width: 100%; padding: 10px 0; font-size: 0.98rem; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 72px 0; }
  .brand-text span { display: none; }
  .hero-title { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hero-stats { gap: 26px; }
  .hero-stats .stat dd { font-size: 1.25rem; }
  .project-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 34px 22px; border-radius: 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .section-head { margin-bottom: 34px; }
  /* keep the language switch reachable on phones, just compact */
  .lang-switch { gap: 2px; padding: 2px; }
  .lang-switch .lang { padding: 4px 7px; font-size: 0.68rem; letter-spacing: 0.02em; }
  .header-actions { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .orbit-satellite, .orbit-core { animation: none; }
  .project-card:hover, .btn:hover { transform: none; }
}


/* ---------- phone layout fixes (<=560px) ---------- */
.nav-langs { display: none; }
@media (max-width: 560px) {
  /* the hover scrim double-darkens the bar on phones: drop it, keep the blur */
  .site-header::before { display: none; }
  .page-home .site-header.is-scrolled {
    background: color-mix(in srgb, var(--bg) 97%, transparent);
  }
  /* brand text would push the language pills out of the viewport */
  .brand-text { display: none; }
  .brand { flex: 0 0 auto; }
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; margin-left: auto; }
  .lang-switch { padding: 2px; gap: 1px; }
  .lang-switch .lang { padding: 4px 6px; font-size: 0.64rem; }
  .icon-btn { width: 34px; height: 34px; }
  /* language links also live inside the collapsed menu */
  .site-nav.is-open .nav-langs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 4px;
    border-top: 1px solid var(--line);
    width: 100%;
  }
  .site-nav.is-open .nav-langs .lang { border: 1px solid var(--line); }
}

