:root {
  --black: #000;
  --ink: #0a0b0f;
  --card: #0d0f15;
  --navy: #0b1d3a;
  --navy-2: #12305e;
  --orange: #ff7a1a;
  --orange-2: #ff9a4d;
  --white: #f5f5f7;
  --muted: #8e8e96;
  --line: rgba(255, 255, 255, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none; /* replaced by the custom rail */
}
html::-webkit-scrollbar { display: none; }
body {
  background: var(--black);
  color: var(--white);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Noto Sans TC", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--orange); color: #000; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(36px, 5.4vw, 72px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.accent { color: var(--orange); }

/* ---------- Custom scroll rail (breathing) ---------- */
.rail {
  position: fixed; z-index: 70;
  top: 12px; bottom: 12px; right: 5px;
  width: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  transition: width 0.25s var(--ease), background 0.25s;
  cursor: pointer;
}
.rail:hover, .rail.dragging { width: 8px; background: rgba(255, 255, 255, 0.09); }
.rail-thumb {
  position: absolute; left: 0; right: 0; top: 0;
  height: 60px; border-radius: 4px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  transform: translateY(var(--ty, 0px));
  animation: breathe 5.5s ease-in-out infinite;
  cursor: grab;
}
.rail.dragging .rail-thumb { cursor: grabbing; }
/* Slow inhale / exhale: the thumb swells, brightens and glows, then settles */
@keyframes breathe {
  0%, 100% {
    opacity: 0.5;
    scale: 1 1;
    box-shadow: 0 0 2px rgba(255, 122, 26, 0.15);
  }
  50% {
    opacity: 1;
    scale: 1.15 1;
    box-shadow: 0 0 8px 1px rgba(255, 140, 50, 0.8), 0 0 22px 6px rgba(255, 122, 26, 0.28);
  }
}

/* ---------- Night sky: sparse stars + the odd meteor ---------- */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%;
  /* faint nebula haze behind the stars */
  background:
    radial-gradient(55% 45% at 18% 28%, rgba(40, 70, 150, 0.16), transparent 70%),
    radial-gradient(45% 40% at 85% 75%, rgba(255, 122, 26, 0.06), transparent 70%),
    radial-gradient(60% 50% at 60% 10%, rgba(90, 60, 160, 0.08), transparent 70%);
}
main, .footer { position: relative; z-index: 1; }
.rail-pct {
  position: absolute; right: 16px; top: 50%;
  transform: translate(6px, -50%);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  padding: 4px 9px; border-radius: 999px;
  background: rgba(20, 22, 30, 0.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.rail.active .rail-pct, .rail:hover .rail-pct, .rail.dragging .rail-pct { opacity: 1; transform: translate(0, -50%); }

/* ---------- Nav: navy gradient pill (matches the V. logo) ---------- */
.nav {
  --nav-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01)), radial-gradient(140% 220% at 30% 0%, rgba(16, 58, 96, 0.42), rgba(8, 34, 58, 0.34) 55%, rgba(5, 22, 40, 0.4));
  position: fixed; z-index: 50;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 32px));
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(140, 180, 230, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 40px rgba(0, 0, 0, 0.5);
  transition: top 0.4s var(--ease);
}
.nav.scrolled { top: 10px; }

.nav-logo {
  display: flex; align-items: flex-end;
  height: 40px; padding: 0 12px 7px 10px;
  color: #e9ecf0;
  -webkit-tap-highlight-color: transparent;
}
.logo-v { width: 30px; height: 25px; flex: none; overflow: visible; }
.logo-rest {
  font-family: "Sacramento", cursive;
  font-size: 30px; line-height: 1;
  margin: 0 0 -3px -3px;
  white-space: nowrap;
}
.logo-dot {
  flex: none;
  width: 5px; height: 5px; margin: 0 0 1px 6px;
  border-radius: 50%; background: var(--orange-2);
}
.nav-links { display: flex; gap: 6px; font-size: 13px; color: rgba(245, 245, 247, 0.75); }
.nav-links a { padding: 7px 14px; border-radius: 999px; transition: color 0.2s, background 0.25s; }
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--white); background: rgba(255, 255, 255, 0.12); }
.nav-cta {
  font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: 999px;
  background: var(--orange); color: #000;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.nav-cta:hover { color: #fff; transform: scale(1.04); }

.nav-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.25s;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.14); }
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px;
  background: var(--white);
  transition: transform 0.35s var(--ease);
}
.nav-toggle span:first-child { transform: translateY(-3.5px); }
.nav-toggle span:last-child { transform: translateY(3.5px); }
.nav.open .nav-toggle span:first-child { transform: rotate(45deg); }
.nav.open .nav-toggle span:last-child { transform: rotate(-45deg); }

.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  display: grid; gap: 2px; padding: 10px;
  border-radius: 26px;
  background: radial-gradient(140% 160% at 30% 0%, rgba(16, 58, 96, 0.78), rgba(6, 26, 46, 0.82));
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(140, 180, 230, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 20px 50px rgba(0, 0, 0, 0.55);
  transform-origin: top center;
  opacity: 0; visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
}
.nav.open .nav-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0s;
}
.nav-menu a {
  padding: 14px 18px; border-radius: 16px;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  opacity: 0; transform: translateY(-6px);
  transition: background 0.2s, opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.nav.open .nav-menu a { opacity: 1; transform: none; }
.nav.open .nav-menu a:nth-child(2) { transition-delay: 0.03s; }
.nav.open .nav-menu a:nth-child(3) { transition-delay: 0.06s; }
.nav.open .nav-menu a:nth-child(4) { transition-delay: 0.09s; }
.nav.open .nav-menu a:nth-child(5) { transition-delay: 0.12s; }
.nav-menu a:hover, .nav-menu a.active { background: rgba(255, 255, 255, 0.08); }
.nav-menu .menu-cta { margin-top: 6px; background: var(--orange); color: #000; text-align: center; }
.nav-menu .menu-cta:hover { background: var(--orange-2); }

/* Narrow screens: "V." mark + menu button */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .logo-rest { display: none; }
  .logo-dot { margin-left: 2px; }
}

/* ---------- Hero ---------- */
.hero { height: 420vh; position: relative; }
.hero-anchor { position: absolute; left: 0; width: 1px; height: 1px; }
.hero-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}
.hero-photo {
  position: absolute; top: 0;
  left: max(0px, calc((100vw - 1920px) / 2));
  height: 100%;
  aspect-ratio: 898 / 1600;
  opacity: 0;
  transform-origin: 50% 35%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 55%, transparent 100%), linear-gradient(to top, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 55%, transparent 100%), linear-gradient(to top, transparent 0%, #000 22%);
  mask-composite: intersect;
  will-change: transform, opacity;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 110%, rgba(18, 48, 94, 0.9), transparent 70%),
    radial-gradient(40% 40% at 10% 0%, rgba(255, 122, 26, 0.1), transparent 70%);
  opacity: 0.35;
}

/* Full-page welcome */
.hero-copy {
  position: absolute; inset: 0; z-index: 2;
  padding: 96px var(--hero-pad, 5vw) 96px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-welcome {
  font-size: clamp(30px, 4.8vw, 76px);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: rgba(245, 245, 247, 0.62);
}
.hero-name {
  align-self: flex-start;
  margin: 0.08em 0 0 -0.04em;
  font-size: 14vw;          /* fitted to the page width by main.js */
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.055em;
  white-space: nowrap;
  transform-origin: 0 0;
  will-change: transform;
}
.hero-name i { font-style: normal; color: var(--orange); }
.hero-name span { display: inline-block; opacity: 0; transform: translateY(40px); animation: rise 1.2s var(--ease) 0.15s forwards; }
.hero-name span:nth-child(2) { animation-delay: 0.27s; }
.hero-intro {
  align-self: flex-end;
  margin-top: clamp(24px, 3vw, 48px);
  max-width: 34ch;
  font-size: clamp(17px, 1.5vw, 22px);
  color: rgba(245, 245, 247, 0.72);
}
.hero.is-loading .hero-fade { opacity: 0; transform: translateY(30px); animation: rise 1.1s var(--ease) forwards; }
.hero.is-loading .hero-welcome { animation-delay: 0.05s; }
.hero.is-loading .hero-intro { animation-delay: 0.4s; }

/* Roles + About under the name (positioned by main.js) */
.hero-side { position: absolute; z-index: 2; left: 0; top: 0; opacity: 0; }
.hero-roles {
  padding-left: 16px;
  border-left: 2px solid var(--orange);
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(245, 245, 247, 0.72);
}
.hero-about {
  margin-top: 24px;
  max-width: 52ch;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.7;
  color: var(--white);
}
.hero-about .w { opacity: 0.14; transition: opacity 0.25s linear; }
.hero-about em { font-style: normal; color: var(--orange); }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.hero-scroll em { font-style: normal; }
.hero-scroll span {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--orange));
  animation: drip 2s var(--ease) infinite;
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.section-title .title-sub { display: block; margin-top: 0.3em; font-size: 0.42em; letter-spacing: -0.02em; line-height: 1.2; }

/* ---------- Experience ---------- */
.experience { padding: 140px 0; background: linear-gradient(180deg, transparent, rgba(10, 11, 15, 0.55) 25%, rgba(10, 11, 15, 0.55) 75%, transparent); }
.exp-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; }
.exp-head { position: sticky; top: 120px; align-self: start; }
.timeline {
  --rail-x: 7px;   /* centre of the line and every dot */
  --gutter: 44px;
  position: relative; padding-left: var(--gutter);
}
.timeline .line {
  position: absolute; top: 12px; bottom: -64px; /* trails a little past the last role */
  left: calc(var(--rail-x) - 1px); width: 2px;
  background: var(--line); border-radius: 2px; overflow: hidden;
}
.timeline .line span {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(180deg, var(--orange), var(--orange-2));
  transform-origin: top; transform: scaleY(var(--p, 0));
}
.job { position: relative; padding-bottom: 72px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; top: 4px;
  left: calc(var(--rail-x) - var(--gutter));
  width: 14px; height: 14px; border-radius: 50%;
  transform: translateX(-50%);
  background: var(--black); border: 2px solid var(--orange);
}
/* no scale on jobs, so the dots stay exactly on the line */
.job.reveal { transform: translateY(40px); }
.job.reveal.above { transform: translateY(-40px); }
.job.reveal.in { transform: none; }
.job time { font-size: 13px; color: var(--orange); font-weight: 600; letter-spacing: 0.04em; }
.job h3 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.025em; margin-top: 8px; line-height: 1.15; }
.job .org { color: var(--muted); margin-top: 4px; }
.job ul { margin-top: 20px; display: grid; gap: 10px; }
.job ul li { position: relative; padding-left: 20px; color: rgba(245, 245, 247, 0.8); font-size: 16px; }
.job .job-sub {
  margin-top: 26px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.job .job-sub + ul { margin-top: 12px; }
.job ul li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 8px; height: 1px; background: var(--orange); }

/* ---------- Skills ---------- */
.skills { padding: 140px 0; overflow: hidden; }
.marquee { margin: 72px 0; display: grid; gap: 4px; }
.marquee-row {
  white-space: nowrap;
  font-size: clamp(44px, 8vw, 116px);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.05;
  transform: translate3d(var(--x, 0), 0, 0);
  will-change: transform;
}
.marquee-row.ghost { color: transparent; -webkit-text-stroke: 1px rgba(245, 245, 247, 0.28); }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 36px;
  min-height: 220px;
  transition: transform 0.6s var(--ease), border-color 0.4s;
}
.tile:hover { border-color: rgba(255, 122, 26, 0.35); }
.tile-wide { grid-column: span 2; }
.tile-navy { background: radial-gradient(120% 120% at 0% 0%, var(--navy-2), var(--navy) 60%); border-color: rgba(120, 160, 255, 0.12); }
.tile-orange { background: linear-gradient(150deg, var(--orange-2), var(--orange)); color: #000; border: 0; }
.tile h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.tile p { margin-top: 8px; color: var(--muted); max-width: 46ch; }
.tile.tile-orange p { color: rgba(0, 0, 0, 0.75); }
.tile-navy p { color: rgba(245, 245, 247, 0.65); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li {
  font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

/* ---------- Education ---------- */
.education { padding: 140px 0; background: linear-gradient(180deg, transparent, rgba(10, 11, 15, 0.55) 20%, rgba(10, 11, 15, 0.55) 80%, transparent); }
.edu-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; }
.edu { display: grid; grid-template-columns: 88px 1fr; gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); }
.edu time { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; color: var(--orange); line-height: 1.1; }
.edu h3 { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.edu p { color: var(--muted); margin-top: 6px; font-size: 16px; }
.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.langs span {
  padding: 22px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line);
  font-weight: 650; font-size: 18px; letter-spacing: -0.01em;
}
.langs small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 4px; }

/* ---------- Strengths ---------- */
.strengths { padding: 140px 0; }
.strength-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.strength {
  padding: 36px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 48, 94, 0.35), rgba(13, 15, 21, 1) 70%);
  border: 1px solid var(--line);
}
.strength .num { font-size: 13px; font-weight: 700; color: var(--orange); letter-spacing: 0.1em; }
.strength h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; margin-top: 48px; line-height: 1.2; }
.strength p { color: var(--muted); margin-top: 12px; font-size: 16px; }

/* ---------- Contact ---------- */
.contact {
  padding: 180px 0 160px;
  background: radial-gradient(60% 45% at 50% 72%, rgba(18, 48, 94, 0.7), transparent 75%);
  text-align: center;
}
.contact-title {
  font-size: clamp(56px, 10vw, 148px);
  font-weight: 800; letter-spacing: -0.055em; line-height: 0.95;
}
.contact-sub { margin: 28px auto 0; color: rgba(245, 245, 247, 0.7); font-size: clamp(18px, 1.6vw, 22px); max-width: 32ch; }
.links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 44px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  border: 1px solid rgba(245, 245, 247, 0.25);
  font-weight: 600; font-size: 16px;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s;
  overflow-wrap: anywhere;
}
.btn:hover { transform: scale(1.04); border-color: var(--white); }
.btn-primary { background: var(--orange); color: #000; border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-2); border-color: var(--orange-2); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5b; border-color: #1ebe5b; }

/* ---------- Community page (bedevelope placeholder) ---------- */
.cm-hero { padding: 200px 0 100px; }
.cm-title {
  font-size: clamp(56px, 11vw, 168px);
  font-weight: 800; letter-spacing: -0.055em; line-height: 0.95;
}
.cm-title i { font-style: normal; color: var(--orange); }
.cm-sub { margin-top: 28px; max-width: 40ch; font-size: clamp(18px, 1.6vw, 22px); color: rgba(245, 245, 247, 0.72); }
.cm-pillars { padding: 40px 0 120px; }
.cm-cta { padding: 60px 0 160px; }
.cm-cta .contact-sub { margin-left: 0; }
.cm-cta .links { justify-content: flex-start; }

/* ---------- Footer (Apple-style: copyright left, language right) ---------- */
.footer { padding: 0 0 28px; font-size: 12px; color: var(--muted); }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.lang-switch { display: inline-flex; align-items: center; }
.lang-switch button {
  font-size: 12px; padding: 2px 0;
  color: var(--muted);
  transition: color 0.2s;
}
.lang-switch button:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.lang-switch button[aria-pressed="true"] { color: var(--white); }
.lang-switch .sep { margin: 0 10px; color: rgba(255, 255, 255, 0.25); }
/* ---------- Chinese typography ---------- */
html[lang^="zh"] body { font-family: "Inter", "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif; }
html[lang^="zh"] .section-title,
html[lang^="zh"] .contact-title,
html[lang^="zh"] .hero-welcome,
html[lang^="zh"] .job h3,
html[lang^="zh"] .tile h3,
html[lang^="zh"] .strength h3 { letter-spacing: 0.01em; }
html[lang^="zh"] .section-title { line-height: 1.2; }
html[lang^="zh"] .hero-about { line-height: 1.85; }
html[lang^="zh"] .contact-title { line-height: 1.15; }
html[lang^="zh"] .eyebrow { letter-spacing: 0.2em; }
html[lang^="zh"] .hero-intro { max-width: 24em; }
html[lang^="zh"] .contact-sub { max-width: 24em; }

/* ---------- Reveal (shows on enter, tucks away on leave) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.97);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.above { transform: translateY(-48px) scale(0.97); }
.reveal.in { opacity: 1; transform: none; }
.bento .reveal:nth-child(2), .strength-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.bento .reveal:nth-child(3), .strength-grid .reveal:nth-child(3) { transition-delay: 0.16s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .exp-layout, .edu-grid { grid-template-columns: 1fr; gap: 48px; }
  .exp-head { position: static; }
  .bento { grid-template-columns: 1fr 1fr; }
  .strength-grid { grid-template-columns: 1fr; }
  .hero-photo {
    left: 50%; width: 100%; height: 62%; /* height refined by main.js */
    translate: -50% 0;
    -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 45%);
    mask-image: linear-gradient(to top, transparent 0%, #000 45%);
  }
  .hero-photo img { object-position: 50% 20%; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { --hero-pad: 16px; }
  .nav { top: 10px; height: 50px; width: calc(100% - 24px); }
  .nav-toggle { width: 36px; height: 36px; }
  .nav-toggle span { left: 10px; right: 10px; }
  .hero-intro { align-self: flex-start; margin-top: 24px; }
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .tile, .strength { padding: 28px; border-radius: 24px; }
  .langs { gap: 8px; }
  .langs span { padding: 16px 14px; font-size: 15px; border-radius: 16px; }
  .edu { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner { flex-direction: column-reverse; gap: 10px; text-align: center; }
  .experience, .skills, .education, .strengths { padding: 100px 0; }
  .rail { right: 3px; width: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-name span, .hero-fade { opacity: 1; transform: none; }
  .hero-about .w { opacity: 1 !important; }
  .nav-menu a { opacity: 1; transform: none; }
  .rail-thumb { opacity: 1; }
}
