/* Profolio — Crystal Garden resume site */

:root {
  /* Crystal Garden palette - warm paper, low chroma, with dual accent (amber crystal + mint crystal + iris crystal) */
  --bg: oklch(0.97 0.008 80);
  --bg-soft: oklch(0.945 0.01 75);
  --bg-card: oklch(0.99 0.005 85);
  --bg-deep: oklch(0.92 0.012 70);
  --ink: oklch(0.22 0.015 270);
  --ink-2: oklch(0.40 0.012 270);
  --ink-3: oklch(0.55 0.012 270);
  --ink-4: oklch(0.72 0.012 270);
  --line: oklch(0.88 0.012 70);
  --line-soft: oklch(0.92 0.012 70);

  /* Crystal accents — amber (火), mint (灵), iris (深) */
  --amber: oklch(0.62 0.14 45);
  --amber-soft: oklch(0.93 0.05 60);
  --mint: oklch(0.62 0.08 160);
  --mint-soft: oklch(0.94 0.03 160);
  --iris: oklch(0.45 0.10 270);
  --iris-soft: oklch(0.92 0.04 270);

  --accent: var(--amber);
  --accent-soft: var(--amber-soft);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 270 / 0.04);
  --shadow-md: 0 4px 16px oklch(0.2 0.02 270 / 0.06), 0 1px 2px oklch(0.2 0.02 270 / 0.04);
  --shadow-lg: 0 24px 60px oklch(0.2 0.02 270 / 0.08), 0 2px 6px oklch(0.2 0.02 270 / 0.04);

  --radius: 14px;
  --radius-lg: 22px;

  --font-serif: 'Cormorant Garamond', 'Source Han Serif SC', 'Songti SC', 'Noto Serif SC', 'Times New Roman', serif;
  --font-sans: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Density scale — adjustable via Tweaks */
  --pad-x: 56px;
  --pad-y: 72px;
  --gap: 28px;
  --line-height: 1.65;

  --max-w: 1180px;
}

[data-theme='dark'] {
  --bg: oklch(0.16 0.012 270);
  --bg-soft: oklch(0.19 0.012 270);
  --bg-card: oklch(0.21 0.012 270);
  --bg-deep: oklch(0.13 0.012 270);
  --ink: oklch(0.95 0.008 80);
  --ink-2: oklch(0.78 0.012 80);
  --ink-3: oklch(0.62 0.012 80);
  --ink-4: oklch(0.45 0.012 80);
  --line: oklch(0.30 0.014 270);
  --line-soft: oklch(0.24 0.014 270);
  --amber-soft: oklch(0.32 0.07 60);
  --mint-soft: oklch(0.32 0.05 160);
  --iris-soft: oklch(0.32 0.06 270);
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35), 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-lg: 0 24px 60px oklch(0 0 0 / 0.45), 0 2px 6px oklch(0 0 0 / 0.25);
}

[data-density='compact'] {
  --pad-x: 40px;
  --pad-y: 48px;
  --gap: 18px;
  --line-height: 1.55;
}
[data-density='roomy'] {
  --pad-x: 80px;
  --pad-y: 110px;
  --gap: 36px;
  --line-height: 1.75;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: var(--line-height);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' 1, 'cv01' 1, 'cv11' 1;
}

/* Subtle paper grain — pure CSS noise via repeating gradients */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(oklch(0.5 0.02 270 / 0.03) 1px, transparent 1px),
    radial-gradient(oklch(0.5 0.02 270 / 0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
}
[data-theme='dark'] body::before { opacity: 0.4; mix-blend-mode: screen; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--amber); color: white; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.section-title .em {
  font-style: italic;
  color: var(--accent);
}
.section-sub {
  margin-top: 14px;
  color: var(--ink-2);
  max-width: 620px;
  font-size: 16px;
}
.section-sub.work-flow-line {
  max-width: none;
  white-space: nowrap;
  overflow-x: auto;
  font-size: 15px;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
h3 { font-family: var(--font-serif); font-weight: 500; margin: 0; }

.section {
  position: relative;
  padding: var(--pad-y) 0;
  z-index: 1;
}
.section + .section { border-top: 1px solid var(--line-soft); }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.15em;
}

/* ---------- Side dock (anchor nav) ---------- */
.dock {
  position: fixed;
  left: 24px; top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
  background: oklch(from var(--bg-card) l c h / 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
@media (max-width: 1100px) { .dock { display: none; } }
.dock-item {
  position: relative;
  width: 9px; height: 9px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--ink-4);
  transition: all 0.25s ease;
  display: flex; align-items: center; justify-content: center;
}
.dock-item:hover { border-color: var(--accent); }
.dock-item.active { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.dock-tip {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%; transform: translateY(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.dock-item:hover .dock-tip { opacity: 1; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(20px, 4vw, 40px);
  background: oklch(from var(--bg) l c h / 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.topbar.scrolled { border-bottom-color: var(--line-soft); }
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
}
.brand-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--amber), var(--iris));
  clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
}
.tools {
  display: flex; align-items: center; gap: 8px;
}
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: oklch(from var(--bg-card) l c h / 0.6);
  transition: all 0.2s ease;
}
.tool-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.tool-btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.tool-btn.primary:hover { background: var(--accent); border-color: var(--accent); color: white; }
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
}
.lang-toggle button {
  padding: 7px 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
.lang-toggle button.on {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 28px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 4px oklch(from var(--mint) l c h / 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px oklch(from var(--mint) l c h / 0.18); }
  50% { box-shadow: 0 0 0 8px oklch(from var(--mint) l c h / 0.05); }
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 128px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.hero-title .axiom-en {
  display: block;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
}
.hero-title .axiom-zh {
  display: block;
  font-size: 0.45em;
  color: var(--ink-3);
  font-style: normal;
  font-family: var(--font-serif);
  letter-spacing: 0.3em;
  margin-top: 12px;
}
.hero-title .axiom-zh-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.58em;
  font-style: normal;
  letter-spacing: 0.18em;
  color: var(--ink-2);
  margin-top: 28px;
  font-weight: 400;
  line-height: 1;
}
.hero-pitch {
  margin-top: 36px;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 520px;
  line-height: 1.6;
}
.hero-cta {
  margin-top: 40px;
  display: inline-flex; gap: 14px; flex-wrap: wrap;
}
.hero-cta .link-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-family: var(--font-mono);
  background: var(--ink);
  color: var(--bg);
  transition: all 0.25s ease;
}
.hero-cta .link-btn.ghost { background: transparent; color: var(--ink); }
.hero-cta .link-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hero-cta .arrow { transition: transform 0.25s ease; }
.hero-cta .link-btn:hover .arrow { transform: translate(2px, -2px); }

/* Identity card */
.identity {
  position: absolute;
  top: 100px;
  right: clamp(24px, 4vw, 48px);
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  z-index: 2;
}
.identity .name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: 0;
}

/* Crystal visual */
.crystal-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crystal {
  position: relative;
  width: 50%;
  aspect-ratio: 1;
  filter: drop-shadow(0 30px 50px oklch(0.4 0.06 160 / 0.20));
  animation: crystal-float 6s ease-in-out infinite;
}
.crystal-img { width: 100%; height: 100%; object-fit: contain; display: block; }
@keyframes crystal-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(-1.2deg); }
}
.crystal svg { width: 100%; height: 100%; }
.crystal-orbits {
  position: absolute; inset: -8%;
  border: 1px dashed var(--line);
  border-radius: 50%;
  animation: spin 60s linear infinite;
}
.crystal-orbits.inner {
  inset: 6%;
  animation-duration: 40s;
  animation-direction: reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.crystal-orbits .node {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 999px;
  top: -4px; left: 50%;
  transform: translateX(-50%);
}
.crystal-orbits.inner .node { background: var(--mint); }

/* Hero stats */
.hero-stats {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}
.hero-stats-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.hero-stats-label::before {
  content: '◆';
  color: var(--accent);
  margin-right: 8px;
  font-size: 9px;
}
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.stat .v {
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.stat .v .em { font-style: italic; color: var(--accent); }
.stat .l {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* ---------- Strengths ---------- */
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
@media (max-width: 820px) { .strengths-grid { grid-template-columns: 1fr; } }
.strength-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: all 0.3s ease;
}
.strength-card::before {
  content: '';
  position: absolute;
  top: 32px; left: 32px;
  width: 26px; height: 26px;
  background: var(--accent-soft);
  clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
  opacity: 0.7;
}
.strength-card:nth-child(2)::before { background: oklch(from var(--mint) l c h / 0.25); }
.strength-card:nth-child(3)::before { background: oklch(from var(--iris) l c h / 0.18); }
.strength-card:nth-child(4)::before { background: var(--accent-soft); }
.strength-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line);
}
.strength-tag {
  display: inline-block;
  margin-left: 42px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--bg-soft);
  border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.strength-head {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.strength-body {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 14.5px;
}

/* ---------- Project (Axiom / Prism) ---------- */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}
.project-card.feature {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ink-4);
}
.project-head {
  padding: 36px 40px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, oklch(from var(--accent) l c h / 0.04), transparent);
}
[data-theme='dark'] .project-head {
  background: linear-gradient(180deg, oklch(from var(--accent) l c h / 0.08), transparent);
}
@media (max-width: 720px) { .project-head { grid-template-columns: 1fr; } }
.project-name {
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1;
  margin: 0;
}
.project-name .it { font-style: italic; }
.project-tagline {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 15px;
}
.project-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap 0.2s ease;
}
.project-link:hover { gap: 12px; }
.project-intro {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
}
.project-body {
  padding: 36px 40px 40px;
}
.project-decisions {
  display: grid;
  gap: 24px;
}
.decision {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
}
.decision:first-child { border-top: none; padding-top: 4px; }
.decision-bullet {
  width: 10px; height: 10px;
  margin-top: 8px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
}
.decision-h {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.decision-b {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 14.5px;
  white-space: pre-wrap;
}
.tech-block {
  margin-top: 32px;
  padding: 20px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.7;
  white-space: pre-wrap;
}
.tech-block .label {
  display: inline-block;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ---------- Work timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 4px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--line) 30%, var(--line));
}
/* When any item carries art, shift the whole timeline right so the art column
   sits to the LEFT of the rail; rail stays put visually relative to its content. */
.timeline.has-art-items { margin-left: 316px; }
.timeline.has-art-items .work-art {
  position: absolute;
  left: -316px;
  top: 0;
  width: 280px;
}
.timeline.has-art-items .work-item.has-art { position: relative; }
.work-item.has-art {
  /* art is absolutely positioned; main content takes full width */
  display: block;
}
@media (max-width: 1100px) {
  .timeline.has-art-items { margin-left: 0; }
  .timeline.has-art-items .work-art {
    position: static;
    width: 100%;
    max-width: 280px;
    margin-bottom: 20px;
  }
}
.work-item-main { min-width: 0; }
.work-art {
  color: var(--accent);
  border-radius: var(--radius);
  overflow: hidden;
}
.work-art-svg { width: 100%; height: auto; display: block; }

/* OTA — pin moves along map route via animateMotion (SVG-native, follows path exactly) */
.art-ota-pin {
  animation: art-ota-pin-fade 6s ease-in-out infinite;
}
@keyframes art-ota-pin-fade {
  0%, 8%   { opacity: 0; }
  12%, 86% { opacity: 1; }
  92%, 100%{ opacity: 0; }
}
.art-ota-route {
  stroke-dasharray: 4 4;
  animation: art-ota-route-march 2.4s linear infinite;
}
@keyframes art-ota-route-march {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -16; }
}
.art-ota-pulse {
  transform-origin: center;
  transform-box: fill-box;
  animation: art-ota-pulse 1.6s ease-out infinite;
}
@keyframes art-ota-pulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(3.2); opacity: 0; }
}
.art-ota-bird {
  animation: art-ota-bird-fly 8s linear infinite;
}
@keyframes art-ota-bird-fly {
  0%   { transform: translate(20px, 32px); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translate(220px, 22px); opacity: 0; }
}
.art-ota-ripples { animation: art-ota-ripple 4s ease-in-out infinite; transform-origin: center; }
@keyframes art-ota-ripple {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.15; }
}

/* Fintech — staggered tilt + drops streaming toward the tree + sapling growth */
.art-can { transform-origin: center; transform-box: fill-box; }
.art-can-body {
  transform-origin: 0px 0px;
  animation: art-can-tilt 3s ease-in-out infinite;
}
.art-can-0 .art-can-body { animation-delay: 0s; }
.art-can-1 .art-can-body { animation-delay: 0.4s; }
.art-can-2 .art-can-body { animation-delay: 0.8s; }
.art-can-3 .art-can-body { animation-delay: 1.2s; }
.art-can-4 .art-can-body { animation-delay: 1.6s; }
@keyframes art-can-tilt {
  0%, 70%, 100% { transform: rotate(0deg) translate(0, 0); }
  30%, 50%      { transform: rotate(-26deg) translate(0, -1px); }
}
/* On flipped (right-side) cans, the spout faces left, so the parent g already mirrors;
   but our keyframes operate inside the mirrored frame so rotation direction matches naturally. */
.art-drops {
  opacity: 0;
  animation: art-drops-fall 3s ease-in-out infinite;
}
.art-can-0 .art-drops { animation-delay: 0s; }
.art-can-1 .art-drops { animation-delay: 0.4s; }
.art-can-2 .art-drops { animation-delay: 0.8s; }
.art-can-3 .art-drops { animation-delay: 1.2s; }
.art-can-4 .art-drops { animation-delay: 1.6s; }
@keyframes art-drops-fall {
  0%, 25%   { opacity: 0; transform: translate(8px, -4px) scale(0.6); }
  35%       { opacity: 0.9; transform: translate(8px, -4px) scale(1); }
  60%       { opacity: 0.7; transform: translate(calc(var(--dx) * 0.6 + 8px), calc(var(--dy) * 0.6 - 4px)) scale(1); }
  85%       { opacity: 0; transform: translate(calc(var(--dx) + 8px), calc(var(--dy) - 4px)) scale(0.7); }
  100%      { opacity: 0; transform: translate(calc(var(--dx) + 8px), calc(var(--dy) - 4px)) scale(0.7); }
}
/* Tree growth handled via SMIL animateTransform inside SVG (anchored at base via translate parent) */
.art-tree-inner { /* placeholder — animation runs via SMIL */ }

/* Live — wheel rotates via SMIL (guaranteed center rotation around its parent's translated origin) */
.art-wheel { /* placeholder — animation runs via SMIL */ }
.art-dm { animation: art-dm-scroll 5s linear infinite; }
.art-dm-0 { transform: translate(0, 8px);  animation-delay: 0s; }
.art-dm-1 { transform: translate(0, 26px); animation-delay: 0.7s; }
.art-dm-2 { transform: translate(0, 44px); animation-delay: 1.6s; }
.art-dm-3 { transform: translate(0, 62px); animation-delay: 2.4s; }
.art-dm-4 { transform: translate(0, 80px); animation-delay: 3.3s; }
@keyframes art-dm-scroll {
  0%   { transform: translateX(120px); }
  100% { transform: translateX(-90px); }
}
/* override base translate via composition trick — use a wrapper attr */
.art-dm-0 { animation-name: art-dm-row-0; }
.art-dm-1 { animation-name: art-dm-row-1; }
.art-dm-2 { animation-name: art-dm-row-2; }
.art-dm-3 { animation-name: art-dm-row-3; }
.art-dm-4 { animation-name: art-dm-row-4; }
@keyframes art-dm-row-0 { 0%{transform:translate(120px,8px);} 100%{transform:translate(-90px,8px);} }
@keyframes art-dm-row-1 { 0%{transform:translate(120px,26px);} 100%{transform:translate(-80px,26px);} }
@keyframes art-dm-row-2 { 0%{transform:translate(120px,44px);} 100%{transform:translate(-100px,44px);} }
@keyframes art-dm-row-3 { 0%{transform:translate(120px,62px);} 100%{transform:translate(-86px,62px);} }
@keyframes art-dm-row-4 { 0%{transform:translate(120px,80px);} 100%{transform:translate(-78px,80px);} }

/* Game — character hop + coin pulse */
.art-hop {
  animation: art-hop-move 4s ease-in-out infinite;
}
@keyframes art-hop-move {
  0%   { transform: translate(40px, 110px); }
  20%  { transform: translate(50px, 86px); }   /* jump up */
  25%  { transform: translate(54px, 86px); }   /* peak onto plat */
  40%  { transform: translate(110px, 86px); }
  55%  { transform: translate(160px, 70px); }  /* hop higher */
  70%  { transform: translate(180px, 110px); }
  85%  { transform: translate(220px, 78px); }
  100% { transform: translate(240px, 78px); }
}
.art-coins { animation: art-coins-pulse 1.6s ease-in-out infinite; transform-origin: center; }
@keyframes art-coins-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .art-ota-pin, .art-ota-bird, .art-ota-ripples,
  .art-can-body, .art-drops, .art-tree,
  .art-wheel, .art-dm,
  .art-hop, .art-coins {
    animation: none;
  }
}

.work-item {
  position: relative;
  padding: 0 0 56px 32px;
}
.work-item:last-child { padding-bottom: 0; }
.work-item::before {
  content: '';
  position: absolute;
  left: -32px; top: 6px;
  width: 13px; height: 13px;
  background: var(--bg);
  border: 2px solid var(--accent);
  clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
  z-index: 1;
}
.work-item.is-other::before { border-color: var(--ink-4); }
.work-period {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.work-org {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0;
}
.work-org .role {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 12px;
  letter-spacing: 0.05em;
  font-style: normal;
}
.work-headline {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
}
.work-summary {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 14.5px;
  max-width: 760px;
}
.work-toggle {
  margin-top: 18px;
  display: inline-flex;
  align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.work-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.work-toggle .chev { transition: transform 0.25s ease; }
.work-toggle.open .chev { transform: rotate(180deg); }

.work-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}
.work-detail.open { grid-template-rows: 1fr; }
.work-detail > .inner { overflow: hidden; }

.work-bullets {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}
.bullet { padding-left: 18px; position: relative; }
.bullet::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 999px;
}
.bullet-h {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
}
.bullet-b {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 14px;
  white-space: pre-wrap;
}

.phase {
  margin-top: 36px;
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
}
.phase-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.phase-intro {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 14px;
}
.phase .work-bullets { margin-top: 20px; }

/* ---------- Awards / Education / Contact ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.award-block { padding: 48px clamp(28px, 4vw, 56px); background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); }
.award-block h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 18px;
}
.award-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.award-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
}
.award-list li::before {
  content: '◆';
  color: var(--accent);
  font-size: 9px;
  line-height: 18px;
}

/* Contact */
.contact-card {
  position: relative;
  padding: 48px clamp(28px, 4vw, 56px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  overflow: hidden;
}
@media (max-width: 720px) { .contact-card { grid-template-columns: 1fr; } }
.contact-card::after {
  content: '';
  position: absolute;
  right: -80px; bottom: -80px;
  width: 240px; height: 240px;
  background: linear-gradient(135deg, var(--amber-soft), var(--mint-soft));
  clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
  opacity: 0.5;
  z-index: 0;
}
.contact-card > * { position: relative; z-index: 1; }
.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}
.contact-title .em { font-style: italic; color: var(--accent); }
.contact-meta {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 15px;
  max-width: 460px;
}
.contact-list { display: grid; gap: 14px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: oklch(from var(--bg) l c h / 0.7);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  transition: all 0.2s ease;
}
.contact-row:hover { border-color: var(--accent); transform: translateX(2px); }
.contact-row .label { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.12em; text-transform: uppercase; min-width: 60px; }
.contact-row .val { font-size: 14.5px; color: var(--ink); font-weight: 500; flex: 1; word-break: break-all; }
.copy-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.done { color: var(--mint); border-color: var(--mint); }

/* Footer */
.footer {
  padding: 60px 0 80px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer .glyph {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
  margin-right: 8px;
  vertical-align: middle;
}

/* Print */
@media print {
  .topbar, .dock, .tweaks-panel, .work-toggle { display: none !important; }
  .work-detail { grid-template-rows: 1fr !important; }
  body { background: white; color: black; }
  .section { page-break-inside: avoid; }
}

/* fade-in */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }
