:root {
  --bg: oklch(0.105 0.006 280);
  --bg-2: oklch(0.145 0.009 280);
  --bg-3: oklch(0.165 0.011 280);
  --surface: oklch(0.185 0.011 280);
  --line: oklch(0.28 0.012 280);
  --line-soft: oklch(0.23 0.01 280);
  --fg: oklch(0.96 0.006 80);
  --fg-2: oklch(0.90 0.008 80);
  --fg-3: oklch(0.86 0.008 280);
  --accent: oklch(0.68 0.16 260);
  --accent-soft: oklch(0.68 0.16 260 / 0.16);
  --card-grad: linear-gradient(180deg, oklch(0.135 0.009 280 / 0.6), oklch(0.118 0.008 280 / 0.32));
  --body-wash: linear-gradient(180deg, oklch(0.128 0.020 262 / 0.85) 0%, oklch(0.117 0.012 268 / 0.5) 28%, oklch(0.110 0.008 272 / 0.22) 52%, transparent 75%);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --nav-h: 88px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  background-color: var(--bg);
  /* One continuous, very subtle navy wash: deepest blue at the very top of the
     page, melting into the base dark by mid-page. Document-relative, so there
     are no seams between sections. */
  background-image: var(--body-wash);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.mono {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}
.italic { font-style: italic; }

/* ---------- Grain ---------- */
.grain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
}
html[data-grain="0"] .grain-layer { display: none; }

/* ---------- TOP NAV ---------- */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  background: oklch(0.12 0.008 280 / 0.92);
  border-bottom: 1px solid transparent;
}
.topnav.scrolled {
  background: oklch(0.11 0.008 280 / 0.96);
  border-bottom-color: var(--line-soft);
}
.topnav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 48px;
  height: var(--nav-h);
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  color: var(--accent);
  display: flex;
  align-items: center;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.logo:hover .logo-mark { transform: scale(1.08); }
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.logo-name {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.015em;
  line-height: 1;
}
.logo-role {
  color: var(--fg-3);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.topnav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.topnav-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--fg-3);
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}
.topnav-links a:hover { color: var(--fg); background: var(--bg-2); }
.topnav-links a.active { color: var(--fg); background: var(--bg-2); }
.topnav-links a.active .nav-num { color: var(--accent); }
.nav-num { font-size: 10px; opacity: 0.6; }

.topnav-cta { display: flex; align-items: center; gap: 10px; }
.nav-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: border-color 0.2s;
}
.nav-pill:hover { border-color: var(--accent); }
.nav-pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: oklch(0.78 0.14 150);
  box-shadow: 0 0 8px oklch(0.78 0.14 150);
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.16s var(--ease-out), background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.nav-btn:hover { background: var(--accent); color: var(--bg); transform: translateY(-1px); }
.nav-btn:active { transform: scale(0.97); }

.topnav-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform-origin: left;
}

main { padding-top: var(--nav-h); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 28px 40px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  opacity: 0.5;
}
.hero-grid-lines span {
  border-right: 1px solid var(--line-soft);
}
.hero-grid-lines span:last-child { border-right: none; }

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, var(--accent-soft) 0%, transparent 60%);
  filter: blur(60px);
  opacity: 0.7;
  animation: glowpulse 8s ease-in-out infinite;
}
@keyframes glowpulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  padding-bottom: 40px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--fg-2);
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.eyebrow-loc {
  color: var(--fg-3);
  font-size: 10px;
}

.mega {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 10vw, 160px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin-bottom: 40px;
}
.mega-line { display: block; white-space: nowrap; }
.mega-italic { color: var(--fg); }
.mega-dot { color: var(--accent); }

.hero-lede {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 680px;
  margin-bottom: 44px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.16s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.btn.primary {
  background: var(--accent);
  color: var(--bg);
}
.btn.primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
  z-index: 0;
}
.btn.primary:hover::before { transform: translateY(0); }
.btn.primary > * { position: relative; z-index: 1; transition: color 0.3s; }
.btn.primary:hover { box-shadow: none; }
.btn.primary svg { transition: transform 0.3s; }
.btn.primary:hover svg { transform: translate(2px, -2px); }

.btn.ghost {
  border-color: var(--line);
  color: var(--fg-2);
}
.btn.ghost:hover {
  border-color: var(--fg-2);
  color: var(--fg);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  position: relative;
}
.hero-stats::before,
.hero-stats::after {
  display: none;
}
.hero-stats::before { top: 0; }
.hero-stats::after { bottom: 0; }
.hero-stat {
  padding: 18px 0;
  position: relative;
}
.hero-stat-num {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.hero-stat-num .plus {
  color: var(--accent);
  font-size: 28px;
  vertical-align: super;
  margin-left: 4px;
}
.hero-stat-lbl {
  color: var(--fg-3);
  font-size: 10px;
}

/* Ticker */
.hero-ticker {
  position: relative;
  overflow: hidden;
  padding: 18px 0;
  margin-top: 24px;
  z-index: 1;
}
.hero-ticker::before,
.hero-ticker::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.06) 30%, oklch(1 0 0 / 0.06) 70%, transparent);
  z-index: 2;
}
.hero-ticker::before { top: 0; }
.hero-ticker::after { bottom: 0; }
.ticker-track {
  display: flex;
  gap: 40px;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.ticker-group {
  display: flex;
  gap: 40px;
  font-family: var(--serif);
  font-size: 32px;
  font-style: italic;
  color: var(--fg-2);
  letter-spacing: -0.01em;
}
.ticker-group .tick {
  color: var(--accent);
  font-style: normal;
  font-size: 18px;
  display: flex;
  align-items: center;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-33.33%); }
}

/* ---------- SECTIONS ---------- */
.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 40px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.section-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-num { color: var(--accent); }
.section-line {
  flex: 0 0 60px;
  height: 1px;
  background: var(--line);
}
.section-kicker { color: var(--fg-3); }
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 7vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-grid.single {
  grid-template-columns: 1fr;
  max-width: 100%;
}
.about-copy p {
  font-size: 22px;
  line-height: 1.5;
  color: var(--fg-2);
  margin-bottom: 24px;
  text-wrap: pretty;
  font-weight: 300;
}
.about-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.about-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--fg-2);
  transition: transform 0.16s var(--ease-out), border-color 0.25s var(--ease-out), color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.about-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.about-links a:active { transform: scale(0.97); }

.about-specs { display: flex; flex-direction: column; gap: 16px; }
.spec-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.spec-head {
  color: var(--fg-3);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.spec-list { display: flex; flex-direction: column; gap: 14px; }
.spec-list > div {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--fg-2);
}
.spec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.spec-dot.green { background: oklch(0.78 0.14 150); box-shadow: 0 0 8px oklch(0.78 0.14 150 / 0.5); }
.spec-dot.amber { background: oklch(0.78 0.14 70); box-shadow: 0 0 8px oklch(0.78 0.14 70 / 0.5); }
.spec-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-tags span {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--fg-2);
}

/* ---------- EDUCATION ---------- */
.ucla-wrap { max-width: 100%; }
.ucla-card {
  background:
    radial-gradient(120% 160% at 0% 0%, color-mix(in oklab, var(--sec, var(--accent)) 9%, transparent) 0%, transparent 55%),
    var(--card-grad);
  border: none;
  border-radius: 28px;
  overflow: hidden;
  transition: transform 0.5s, box-shadow 0.5s;
}
.ucla-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -30px rgba(39,116,174,0.3);
}

.ucla-top {
  background: #2774AE;
  color: #FFD100;
  padding: 28px 40px;
  display: block;
  position: relative;
  overflow: hidden;
}
.ucla-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0, transparent 18px, rgba(255,209,0,0.04) 18px, rgba(255,209,0,0.04) 19px);
  pointer-events: none;
}
.ucla-top-left { position: relative; z-index: 1; }
.ucla-kicker {
  color: #FFD100;
  opacity: 0.7;
  margin-bottom: 12px;
}
.ucla-city {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-bottom: 24px;
}
.ucla-pennant {
  display: inline-flex;
  gap: 6px;
  padding: 10px 16px;
  background: #FFD100;
  border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
}
.ucla-pennant span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  color: #2774AE;
  letter-spacing: -0.02em;
}

.ucla-seal {
  color: #FFD100;
  opacity: 0.9;
  animation: sealspin 30s linear infinite;
}
@keyframes sealspin {
  to { transform: rotate(360deg); }
}

.ucla-body {
  padding: 28px 40px;
}
.ucla-body .tag {
  color: var(--fg-3);
  font-size: 10px;
  margin-bottom: 8px;
}

.ucla-degree-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.ucla-degree-row h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ucla-years {
  display: flex;
  align-items: center;
  gap: 12px;
}
.year-big {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.year-dash {
  color: var(--fg-3);
  font-size: 24px;
}

.ucla-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line-soft);
}
.ucla-meta > div > div:last-child {
  font-size: 16px;
  color: var(--fg);
}

.ucla-focus .focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ucla-focus .focus-tags span {
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-2);
  transition: all 0.25s;
}
.ucla-focus .focus-tags span:hover {
  border-color: #2774AE;
  background: rgba(39,116,174,0.12);
  color: #FFD100;
}

/* ---------- EXPERIENCE ---------- */
.xp-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 48px;
  align-items: start;
}

.xp-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: calc(var(--nav-h) + 40px);
}
.xp-tab {
  display: grid;
  grid-template-columns: 32px 1fr auto 20px;
  gap: 16px;
  align-items: center;
  text-align: left;
  padding: 20px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out), background 0.3s var(--ease-out), color 0.3s var(--ease-out);
  color: var(--fg-3);
  background: transparent;
}
.xp-tab:hover { border-color: var(--line); color: var(--fg-2); }
.xp-tab:active { transform: scale(0.99); }
.xp-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--fg);
}
.xp-tab-num { color: var(--accent); }
.xp-tab-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xp-tab-company {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: inherit;
}
.xp-tab-role { color: var(--fg-3); font-size: 9px; }
.xp-tab.active .xp-tab-role { color: var(--fg-2); }
.xp-tab-period { color: var(--fg-3); font-size: 9px; white-space: nowrap; }
.xp-tab-arrow {
  opacity: 0;
  transform: translateX(-6px);
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
  color: var(--accent);
}
.xp-tab.active .xp-tab-arrow {
  opacity: 1;
  transform: translateX(0);
}

.xp-panel-wrap { position: relative; }
.xp-measure {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}
.xp-panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 36px;
  animation: xpfade 0.36s var(--ease-out);
}
@keyframes xpfade {
  from { opacity: 0; transform: translateY(8px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.xp-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.xp-panel-head .tag { color: var(--fg-3); font-size: 10px; margin-bottom: 12px; }
.xp-panel-head h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.xp-panel-head h3 .at { color: var(--fg-3); font-style: italic; font-size: 28px; }
.xp-panel-head h3 .co { color: var(--proj, var(--accent)); }
.xp-panel-when { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; padding-top: 8px; }
.xp-panel-period { color: var(--fg-2); white-space: nowrap; }
.xp-panel-loc { color: var(--fg-3); white-space: nowrap; opacity: 0.85; }

.xp-panel-short {
  font-size: 18px;
  color: var(--fg-2);
  line-height: 1.5;
  margin-bottom: 32px;
  text-wrap: pretty;
}

.xp-panel-bullets { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.xp-panel-bullets li {
  position: relative;
  display: block;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
  animation: fadeup 0.5s ease backwards;
}
.xp-panel-bullets li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1.5px;
  background: var(--proj, var(--accent));
}
.bullet-idx { color: var(--accent); padding-top: 2px; }
@keyframes fadeup {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.xp-panel-stack { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.stack-chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg-2);
  font-size: 10px;
}

/* --- Experience: scroll-through timeline --- */
.xp-flow {
  position: relative;
  padding-left: 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.xp-rail {
  position: absolute;
  left: 19px;
  top: 10px;
  bottom: 10px;
  width: 1.5px;
  background: var(--line-soft);
  border-radius: 1px;
  overflow: hidden;
}
.xp-rail-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--accent) 0%, oklch(0.62 0.14 250 / 0.35) 100%);
  transform-origin: top;
  transform: scaleY(var(--xp-progress, 0));
}
.xp-entry {
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out);
}
.xp-entry.in { opacity: 1; transform: none; }
.xp-node {
  position: absolute;
  left: -42.5px;
  top: 42px;
}
.xp-node-dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--proj, var(--accent));
  background: var(--bg);
  transform: scale(0);
  transition: transform 0.55s cubic-bezier(.34,1.56,.64,1) 0.2s, box-shadow 0.55s ease 0.2s;
}
.xp-entry.in .xp-node-dot {
  transform: scale(1);
  box-shadow: 0 0 16px color-mix(in oklab, var(--proj, var(--accent)) 55%, transparent);
}
.xp-card {
  background:
    radial-gradient(120% 160% at 0% 0%, color-mix(in oklab, var(--proj, var(--accent)) 10%, transparent) 0%, transparent 55%),
    var(--card-grad);
  border: none;
  border-radius: 28px;
  padding: 28px 30px;
  transition: transform 0.35s var(--ease-out);
}
.xp-entry:hover .xp-card { transform: translateY(-2px); }
.xp-flow-bullets { margin-bottom: 0; }
.xp-flow-bullets li {
  animation: none;
  opacity: 0;
  transform: translateX(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.xp-entry.in .xp-flow-bullets li { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .xp-flow { padding-left: 30px; }
  .xp-rail { left: 8px; }
  .xp-node { left: -28px; top: 34px; }
  .xp-card { padding: 26px 22px; }
}

/* --- Projects: editorial row reveals --- */
.proj-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.proj-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: clamp(20px, 2.4vw, 30px);
  border-radius: 26px;
  background:
    radial-gradient(120% 160% at 0% 0%, color-mix(in oklab, var(--proj) 9%, transparent) 0%, transparent 55%),
    var(--card-grad);
  overflow: hidden;
}
.proj-row.rev {
  background:
    radial-gradient(120% 160% at 100% 0%, color-mix(in oklab, var(--proj) 9%, transparent) 0%, transparent 55%),
    var(--card-grad);
}
/* body cascade */
.proj-row-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.proj-row-meta, .proj-row-title, .proj-row-sub, .proj-row-desc, .proj-row-foot {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.proj-row.in .proj-row-meta  { opacity: 1; transform: none; transition-delay: 0.05s; }
.proj-row.in .proj-row-title { opacity: 1; transform: none; transition-delay: 0.12s; }
.proj-row.in .proj-row-sub   { opacity: 1; transform: none; transition-delay: 0.18s; }
.proj-row.in .proj-row-desc  { opacity: 1; transform: none; transition-delay: 0.24s; }
.proj-row.in .proj-row-foot  { opacity: 1; transform: none; transition-delay: 0.75s; }

.proj-row-meta { display: flex; align-items: baseline; gap: 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.proj-row-period { color: var(--fg-1, var(--fg)); background: color-mix(in oklab, var(--proj) 22%, transparent); border: 1px solid color-mix(in oklab, var(--proj) 35%, transparent); padding: 5px 12px; border-radius: 8px; }
.proj-row-dot { color: var(--fg-3); }
.proj-row-status { color: var(--proj); }
.proj-row-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 2.6vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.proj-row-sub { color: var(--fg-3); font-size: 11px; letter-spacing: 0.06em; }
.proj-row-desc { color: var(--fg-2); font-size: 15px; line-height: 1.6; text-wrap: pretty; max-width: 75ch; }

.proj-row-depth {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  max-width: 85ch;
}
.proj-row-depth li {
  position: relative;
  padding-left: 22px;
  color: var(--fg-2);
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: pretty;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.proj-row-depth li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1.5px;
  background: var(--proj);
}
.proj-row.in .proj-row-depth li { opacity: 1; transform: none; }

.proj-row-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.proj-row-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-tag {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg-2);
  font-size: 10px;
}



@media (prefers-reduced-motion: reduce) {
  .xp-entry, .xp-flow-bullets li, .xp-node-dot,
  .proj-row-meta, .proj-row-title, .proj-row-sub, .proj-row-desc, .proj-row-foot, .proj-row-depth li { opacity: 1 !important; transform: none !important; transition: none !important; }
    .xp-rail-fill { transform: scaleY(1) !important; }
}

/* ---------- PROJECTS (shared bits) ---------- */
.proj-svg {
  color: currentColor;
  mix-blend-mode: screen;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-decoration: none;
  width: fit-content;
  transition: color 0.25s var(--ease-out), transform 0.16s var(--ease-out);
}
.proj-link svg { opacity: 0.7; transition: opacity 0.25s var(--ease-out); }
.proj-link-arrow { transition: transform 0.25s var(--ease-out); }
.proj-link:hover { color: var(--proj); }
.proj-link:hover svg { opacity: 1; }
.proj-link:hover .proj-link-arrow { transform: translate(2px, -2px); }
.proj-link:active { transform: scale(0.97); }

/* ---------- SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.skill-col-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.skill-col-head .mono:first-child { color: var(--proj, var(--accent)); }
.skill-col-title {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  flex: 1;
}
.skill-col-count { color: var(--fg-3); font-size: 10px; }
.skill-items { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-col {
  background:
    radial-gradient(120% 160% at 0% 0%, color-mix(in oklab, var(--proj, var(--sec, var(--accent))) 10%, transparent) 0%, transparent 55%),
    var(--card-grad);
  border-radius: 26px;
  padding: 24px 28px;
}
.skill-chip {
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out),
    border-color 0.25s var(--ease-out), color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  cursor: default;
}
.skill-col[data-in="true"] .skill-chip {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--i, 0) * 35ms);
}
@media (hover: hover) and (pointer: fine) {
  .skill-col[data-in="true"] .skill-chip:hover {
    border-color: color-mix(in oklab, var(--proj, var(--accent)) 70%, transparent);
    color: color-mix(in oklab, var(--proj, var(--accent)) 78%, var(--fg));
    transform: translateY(-2px);
    box-shadow: 0 0 20px color-mix(in oklab, var(--proj, var(--accent)) 26%, transparent);
    transition-delay: 0s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skill-chip { transform: none !important; transition: opacity 0.3s ease, border-color 0.25s ease, color 0.25s ease; }
}

/* ---------- CONTACT ---------- */
.contact { padding-bottom: 60px; }
.contact-big {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 44px;
}
.contact-prefix { color: var(--fg-3); }
.big-mail {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--fg);
  position: relative;
  transition: color 0.3s;
  text-align: left;
  padding: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 24px;
  background: none;
  border: none;
  cursor: pointer;
}
.big-mail::after {
  content: '';
  position: absolute;
  left: 0; bottom: -8px;
  height: 2px; width: 0;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(.2,.7,.2,1);
}
.big-mail:hover { color: var(--accent); }
.big-mail:hover::after { width: 100%; }
.mail-copied {
  color: var(--fg-3);
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background:
    radial-gradient(120% 160% at 100% 0%, color-mix(in oklab, var(--sec, var(--accent)) 10%, transparent) 0%, transparent 55%),
    var(--card-grad);
  border: none;
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 48px;
}
.contact-links > *:hover { z-index: 1; }
.contact-links a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 32px;
  background: transparent;
  transition: background 0.3s;
  position: relative;
}
.contact-links a:hover { background: oklch(0.3 0.05 262 / 0.05); }
.contact-links a .label { color: var(--fg-3); grid-column: 1; grid-row: 1; }
.contact-links a .big {
  grid-column: 1; grid-row: 2;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
  transition: color 0.3s;
}
.contact-links a:hover .big { color: var(--accent); }
.contact-links a .arr {
  grid-column: 2; grid-row: 1 / 3;
  align-self: center;
  color: var(--fg-3);
  font-size: 14px;
  transition: transform 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.contact-links a:hover .arr { color: var(--accent); transform: translate(3px, -3px); }

.megafoot {
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.megafoot-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(60px, 14vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: 24px;
  word-break: break-word;
}
.megafoot-name span { color: var(--accent); }
.megafoot-row {
  display: flex;
  justify-content: space-between;
  color: var(--fg-3);
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- TWEAKS ---------- */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: oklch(0.15 0.008 280 / 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  min-width: 280px;
  z-index: 200;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  backdrop-filter: blur(16px);
}
.tweaks-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg-2);
}
.tweaks-head button { font-size: 18px; color: var(--fg-3); line-height: 1; }
.tweaks-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; gap: 16px;
}
.tweaks-row label { color: var(--fg-3); font-size: 9px; }
.swatches { display: flex; gap: 6px; }
.sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.sw.active { border-color: var(--fg); box-shadow: 0 0 0 1px var(--bg); }
.seg {
  display: flex; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 2px; gap: 2px;
}
.seg-btn { padding: 5px 10px; font-size: 10px; color: var(--fg-3); border-radius: 8px; transition: all 0.2s; }
.seg-btn.active { background: var(--accent); color: var(--bg); }
.toggle {
  width: 34px; height: 18px; border-radius: 8px;
  background: var(--line); position: relative; transition: background 0.2s;
}
.toggle span {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--fg-2); border-radius: 50%; transition: all 0.2s;
}
.toggle.on { background: var(--accent); }
.toggle.on span { left: 18px; background: var(--bg); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1240px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .xp-layout { grid-template-columns: 1fr; }
  .xp-tabs { position: static; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .topnav-links { display: none; }
  .topnav-inner { grid-template-columns: 1fr auto; gap: 20px; padding: 14px 24px; }
}
@media (max-width: 760px) {
  .hero { padding: 40px 24px 0; }
  .section { padding: 56px 24px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2)::after { display: none; }
  .ucla-top { grid-template-columns: 1fr; gap: 20px; padding: 32px 28px; }
  .ucla-body { padding: 32px 28px; }
  .ucla-meta { grid-template-columns: 1fr 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-links { grid-template-columns: 1fr; }
  .topnav-cta .nav-pill { display: none; }
}

/* ============================================================
   MOTION SYSTEM  (tuned per Emil Kowalski's design-eng principles)
   ============================================================ */
:root {
  /* Strong custom curves — built-in easings lack punch */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-editorial: cubic-bezier(0.23, 1, 0.32, 1);
}

.btn span { white-space: nowrap; }

/* --- Hero name: per-character rise from behind a mask --- */
.mega-line { display: flex; align-items: baseline; flex-wrap: wrap; }
.mega-space { display: inline-block; width: 0.26em; }
.anim-word {
  display: inline-flex;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.anim-char {
  display: inline-block;
  white-space: pre;
  transform: translateY(0);
  animation: charRise 0.62s var(--ease-editorial) backwards;
}
@keyframes charRise { from { transform: translateY(115%); } to { transform: translateY(0); } }

/* --- Masked line reveal for headings --- */
.line-reveal {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
  vertical-align: top;
}
.line-reveal-in {
  display: inline-block;
  transition: transform 1s var(--ease-editorial);
  will-change: transform;
}

/* --- Project card: tilt + parallax art --- */
.proj-card.has-tilt {
  transition: transform 0.35s var(--ease-editorial), border-color 0.5s, box-shadow 0.5s;
  transform-style: preserve-3d;
  will-change: transform;
}
.proj-card.has-tilt:hover { transform: none; } /* tilt handled inline via JS */
.proj-art-inner {
  position: absolute;
  inset: -12%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.proj-art-inner .proj-svg { width: 100%; height: 100%; }
.proj-card.has-tilt .proj-card-body,
.proj-card.has-tilt .proj-art { transform: translateZ(0); }

@media (prefers-reduced-motion: reduce) {
  .anim-char { animation: none; transform: none; }
  .line-reveal-in { transition: none; transform: none !important; }
  .hero-glow { animation: none; }
}

/* --- Depth backdrop: drifting atmospheric glows that connect sections --- */
main { position: relative; z-index: 1; }
.depth-bg { overflow: hidden; position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.depth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  will-change: transform;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 55%);
}
.depth-blob.b0 { width: 58vw; height: 58vw; left: 21vw; top: -16vw; opacity: 0.24; transform: translate3d(0, calc(var(--sc,0) * -0.04px), 0); }
.depth-blob.b1 { width: 62vw; height: 62vw; left: -12vw; top: 6vh;   opacity: 0.30; transform: translate3d(0, calc(var(--sc,0) * -0.06px), 0); }
.depth-blob.b2 { width: 52vw; height: 52vw; right: -10vw; top: 118vh; opacity: 0.22; transform: translate3d(0, calc(var(--sc,0) * -0.13px), 0); }
.depth-blob.b3 { width: 46vw; height: 46vw; left: 18vw;  top: 230vh; opacity: 0.19; transform: translate3d(0, calc(var(--sc,0) * -0.09px), 0); }

/* --- Hero mouse-parallax planes (glow far, name/lede near) --- */
.hero-glow-wrap {
  position: absolute; inset: 0;
  transform: translate3d(calc(var(--mx,0) * 42px), calc(var(--my,0) * 42px), 0);
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.hero .mega {
  position: relative;
}
.hero .hero-lede {
  position: relative;
}

/* --- Giant ghost numeral layered behind each section header --- */
.section-head { position: relative; }
.section-meta, .section-title { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-glow-wrap, .hero .mega, .hero .hero-lede, .depth-blob { transition: none; }
}


/* ---------- NAV VARIANTS (Tweaks: Navigation) ---------- */
/* Option B: slim chapter rail down the left edge, top bar stays */
.dotrail {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 60;
}
.dotrail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 8px;
  color: var(--fg-3);
}
.dotrail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.dotrail-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.dotrail-item:hover .dotrail-label,
.dotrail-item.active .dotrail-label { opacity: 1; transform: none; }
.dotrail-item:hover .dotrail-dot { background: var(--fg-2); }
.dotrail-item.active { color: var(--fg); }
.dotrail-item.active .dotrail-dot {
  background: var(--accent);
  transform: scale(1.25);
  box-shadow: 0 0 12px var(--accent-soft), 0 0 0 3px var(--accent-soft);
}
@media (max-width: 1180px) { .dotrail { display: none; } }

/* Option C: full left sidebar */
.sidenav {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 218px;
  display: flex;
  flex-direction: column;
  padding: 26px 20px 24px;
  border-right: none;
  background: linear-gradient(90deg,
    oklch(0.135 0.01 280 / 0.55) 0%,
    oklch(0.135 0.01 280 / 0.22) 62%,
    transparent 100%);
  z-index: 60;
}
.sidenav-logo { margin-bottom: 36px; }
.sidenav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidenav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--fg-2);
  transition: color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.sidenav-links a .nav-num { font-size: 10px; color: var(--fg-3); transition: color 0.25s var(--ease-out); }
.sidenav-links a:hover { color: var(--fg); background: oklch(0.3 0.05 262 / 0.06); }
.sidenav-links a.active { color: var(--fg); background: oklch(0.3 0.05 262 / 0.1); }
.sidenav-links a.active .nav-num { color: var(--accent); }
.sidenav-foot { margin-top: auto; }
.sidenav-foot .nav-btn { width: 100%; justify-content: center; }
.sidenav-progress {
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 2px;
  background: transparent;
}
.sidenav-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), oklch(0.62 0.14 250 / 0.3));
  clip-path: inset(0 0 100% 0);
}

/* section dash — kept for potential reuse */
.section-dash {
  display: block;
  width: 30px;
  height: 2px;
  border-radius: 1px;
  background: var(--sec, var(--accent));
}

/* sidebar mode: shift content, hide the top bar on desktop */
.app.nav-side .topnav { display: none; }
.app.nav-side main { margin-left: 218px; }
@media (max-width: 899px) {
  .sidenav { display: none; }
  .app.nav-side .topnav { display: block; }
  .app.nav-side main { margin-left: 0; }
}

/* ---------- MOBILE PASS ---------- */
/* Burger (hidden on desktop) */
.nav-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
  flex: none;
  align-items: center;
  justify-content: center;
}
.nav-burger span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.6px;
  background: var(--fg);
  border-radius: 1px;
  transition: transform 0.32s var(--ease-out), top 0.32s var(--ease-out);
}
.nav-burger span:nth-child(1) { top: 17px; }
.nav-burger span:nth-child(2) { top: 23px; }
.nav-burger.open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-burger.open span:nth-child(2) { top: 20px; transform: rotate(-45deg); }
.topnav-cta { display: flex; align-items: center; gap: 10px; }

/* Fullscreen mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: oklch(0.105 0.006 280 / 0.99);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 96px 32px 40px;
}
.mobile-menu.open {
  display: flex;
  animation: menufade 0.3s var(--ease-out);
}
@keyframes menufade { from { opacity: 0; } to { opacity: 1; } }
.mobile-menu-links { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu-links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 8px;
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: -0.02em;
  color: var(--fg-2);
  border-radius: 12px;
}
.mobile-menu.open .mobile-menu-links a {
  animation: menulink 0.5s var(--ease-out);
}
@keyframes menulink { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.mobile-menu-links a.active { color: var(--fg); }
.mobile-menu-links a.active .nav-num { color: var(--accent); }
.mobile-menu-links a .nav-num { font-family: var(--mono); font-size: 12px; color: var(--fg-3); }

@media (max-width: 1100px) {
  .nav-burger { display: inline-flex; }
}
.topnav { z-index: 100; }

/* Mobile layout fixes */
@media (max-width: 760px) {
  /* experience card heads: stack, dates stop overflowing */
  .xp-panel-head { flex-direction: column; gap: 10px; }
  .xp-panel-when { align-items: flex-start; padding-top: 0; }
  .xp-panel-period { padding-top: 0; white-space: normal; }
  .xp-panel-head h3 { font-size: 26px; }
  .xp-panel-head h3 .at { font-size: 20px; }
  .xp-card { padding: 24px 20px; }
  .xp-panel-bullets li { grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; }

  /* project rows */
  .proj-row { padding: 22px 18px; border-radius: 24px; }
  .proj-row-title { font-size: 28px; }
  .proj-row-desc { font-size: 14.5px; }
  .proj-row-depth li { font-size: 13px; }
  .proj-row-meta { flex-wrap: wrap; row-gap: 6px; }
  .proj-row-foot { flex-direction: column; align-items: flex-start; gap: 14px; }

  /* contact */
  .contact-links a { padding: 24px 20px; }
  .mail-copied { display: none; }
  .big-mail { word-break: break-all; }

  /* skills */
  .skill-col { padding: 24px 20px; }
  .skill-col-title { font-size: 26px; }

  /* education */
  .ucla-degree-row { flex-direction: column; align-items: flex-start; gap: 18px; }

  /* about */
  .about-grid.single p { font-size: 16px; }

  /* nav */
  .topnav-inner { padding: 12px 18px; }
  .logo-name { font-size: 15px; }
}

/* ============================================================
   DEPTH RAMP — the page descends from bright blue to deep navy.
   Section identity elements step down a shared color ramp;
   interactive elements keep the bright accent. Toggle: Tweaks.
   ============================================================ */
html[data-ramp="1"] #about      { --sec: oklch(0.740 0.15 252); }
html[data-ramp="1"] #education  { --sec: oklch(0.708 0.15 256); }
html[data-ramp="1"] #experience { --sec: oklch(0.676 0.15 260); }
html[data-ramp="1"] #work       { --sec: oklch(0.644 0.15 264); }
html[data-ramp="1"] #skills     { --sec: oklch(0.612 0.15 268); }
html[data-ramp="1"] #contact    { --sec: oklch(0.580 0.15 272); }

/* section numbers wear their depth color */
.section-num { color: var(--sec, var(--accent)) !important; }

/* Experience: 5 entries step through the full ramp */
html[data-ramp="1"] .xp-flow .xp-entry:nth-child(1) { --proj: oklch(0.740 0.15 252); }
html[data-ramp="1"] .xp-flow .xp-entry:nth-child(2) { --proj: oklch(0.700 0.15 257); }
html[data-ramp="1"] .xp-flow .xp-entry:nth-child(3) { --proj: oklch(0.660 0.15 262); }
html[data-ramp="1"] .xp-flow .xp-entry:nth-child(4) { --proj: oklch(0.620 0.15 267); }
html[data-ramp="1"] .xp-flow .xp-entry:nth-child(5) { --proj: oklch(0.580 0.15 272); }

/* Projects: 5 rows, same journey */
html[data-ramp="1"] .proj-flow .proj-row:nth-child(1) { --proj: oklch(0.740 0.15 252); }
html[data-ramp="1"] .proj-flow .proj-row:nth-child(2) { --proj: oklch(0.700 0.15 257); }
html[data-ramp="1"] .proj-flow .proj-row:nth-child(3) { --proj: oklch(0.660 0.15 262); }
html[data-ramp="1"] .proj-flow .proj-row:nth-child(4) { --proj: oklch(0.620 0.15 267); }
html[data-ramp="1"] .proj-flow .proj-row:nth-child(5) { --proj: oklch(0.580 0.15 272); }

/* Sidebar + mobile menu as a depth gauge: each number previews its section */
html[data-ramp="1"] .sidenav-links a:nth-child(1) .nav-num, html[data-ramp="1"] .mobile-menu-links a:nth-child(1) .nav-num { color: oklch(0.740 0.15 252); }
html[data-ramp="1"] .sidenav-links a:nth-child(2) .nav-num, html[data-ramp="1"] .mobile-menu-links a:nth-child(2) .nav-num { color: oklch(0.708 0.15 256); }
html[data-ramp="1"] .sidenav-links a:nth-child(3) .nav-num, html[data-ramp="1"] .mobile-menu-links a:nth-child(3) .nav-num { color: oklch(0.676 0.15 260); }
html[data-ramp="1"] .sidenav-links a:nth-child(4) .nav-num, html[data-ramp="1"] .mobile-menu-links a:nth-child(4) .nav-num { color: oklch(0.644 0.15 264); }
html[data-ramp="1"] .sidenav-links a:nth-child(5) .nav-num, html[data-ramp="1"] .mobile-menu-links a:nth-child(5) .nav-num { color: oklch(0.612 0.15 268); }
html[data-ramp="1"] .sidenav-links a:nth-child(6) .nav-num, html[data-ramp="1"] .mobile-menu-links a:nth-child(6) .nav-num { color: oklch(0.580 0.15 272); }

/* top-bar nav numbers too (desktop fallback when sidebar is off) */
html[data-ramp="1"] .topnav-links a:nth-child(1) .nav-num { color: oklch(0.740 0.15 252); }
html[data-ramp="1"] .topnav-links a:nth-child(2) .nav-num { color: oklch(0.708 0.15 256); }
html[data-ramp="1"] .topnav-links a:nth-child(3) .nav-num { color: oklch(0.676 0.15 260); }
html[data-ramp="1"] .topnav-links a:nth-child(4) .nav-num { color: oklch(0.644 0.15 264); }
html[data-ramp="1"] .topnav-links a:nth-child(5) .nav-num { color: oklch(0.612 0.15 268); }
html[data-ramp="1"] .topnav-links a:nth-child(6) .nav-num { color: oklch(0.580 0.15 272); }

/* Skills: 3 panels step through the ramp too */
html[data-ramp="1"] .skills-grid .skill-col:nth-child(1) { --proj: oklch(0.740 0.15 252); }
html[data-ramp="1"] .skills-grid .skill-col:nth-child(2) { --proj: oklch(0.660 0.15 262); }
html[data-ramp="1"] .skills-grid .skill-col:nth-child(3) { --proj: oklch(0.580 0.15 272); }

/* Progress lines ride the ramp too: bright at the start, deep navy at the end */
html[data-ramp="1"] .sidenav-progress span {
  background: linear-gradient(180deg, oklch(0.740 0.15 252 / 0.75) 0%, oklch(0.580 0.15 272 / 0.4) 100%);
}
html[data-ramp="1"] .topnav-progress {
  background: linear-gradient(90deg, oklch(0.740 0.15 252 / 0.85) 0%, oklch(0.580 0.15 272 / 0.55) 100%);
}
html[data-ramp="1"] .xp-rail-fill {
  background: linear-gradient(180deg, oklch(0.740 0.15 252 / 0.65) 0%, oklch(0.580 0.15 272 / 0.35) 100%);
  transform: none;
  clip-path: inset(0 0 calc(100% - var(--xp-progress, 0) * 100%) 0);
}

/* ---------- HONORS LINE (About) ---------- */
.about-honors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 22px;
}
.honor {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.honor-place {
  color: var(--sec, var(--accent));
  font-size: 13px;
}
.proj-honors {
  margin-top: -10px;
  margin-bottom: 22px;
}



/* tweaks controls keep their native rounded shape */
.seg, .seg-btn, .toggle { border-radius: 100px; }

/* --- Timeline comet: bright head + trail riding the leading edge of the rail --- */
.xp-rail { overflow: visible; }
.xp-rail-head {
  position: absolute;
  left: 50%;
  top: calc(var(--xp-progress, 0) * 100%);
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: oklch(0.84 0.11 250);
  box-shadow:
    0 0 10px 2px oklch(0.74 0.15 252 / 0.8),
    0 0 30px 8px oklch(0.68 0.15 257 / 0.3);
  opacity: calc(var(--xp-progress, 0) * 40);
  pointer-events: none;
}
.xp-rail-head::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 70px;
  background: linear-gradient(180deg, transparent, oklch(0.80 0.13 252 / 0.9));
}

/* --- Node ignition: dot fills + one radar ping when the entry arrives --- */
.xp-node-dot { position: relative; }
.xp-node-dot::after {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
}
.xp-entry.in .xp-node-dot { background: var(--accent); }
.xp-entry.in .xp-node-dot::after { animation: nodeping 1s var(--ease-out) 0.4s both; }
@keyframes nodeping {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(3.6); }
}

@media (prefers-reduced-motion: reduce) {
  .xp-rail-head { display: none; }
  .xp-entry.in .xp-node-dot::after { animation: none; }
}

/* --- Skills: descending ramp, tinted chips, gradient underline --- */
.skill-col-head {
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, color-mix(in oklab, var(--proj, var(--accent)) 40%, transparent), transparent 75%) 1;
}
.skill-chip {
  background: color-mix(in oklab, var(--proj, var(--accent)) 6%, var(--bg-2));
  border-color: color-mix(in oklab, var(--proj, var(--accent)) 18%, transparent);
}
.skill-chip:hover { border-color: color-mix(in oklab, var(--proj, var(--accent)) 38%, transparent); }


/* --- Timeline depth-gauge: dashed scale, tick + year markers; the solid fill draws over the dashes --- */
.xp-flow { padding-left: 96px; }
.xp-rail {
  left: 60px;
  background: repeating-linear-gradient(180deg, var(--line-soft) 0 6px, transparent 6px 16px);
}
.xp-node {
  left: -96px;
  top: 44px;
  width: 68px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.xp-node-dot { display: none; }
.xp-year {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.7s var(--ease-out) 0.2s, transform 0.7s var(--ease-out) 0.2s, color 0.4s ease;
}
.xp-tick {
  width: 15px;
  height: 1.5px;
  background: var(--line);
  transform: scaleX(0.35);
  transform-origin: right center;
  transition: transform 0.6s var(--ease-out) 0.15s, background 0.4s ease, box-shadow 0.4s ease;
}
.xp-entry.in .xp-tick {
  transform: scaleX(1);
  background: var(--accent);
  box-shadow: 0 0 10px oklch(0.62 0.14 250 / 0.5);
}
.xp-entry.in .xp-year {
  opacity: 1;
  transform: none;
  color: oklch(0.74 0.13 252);
}

@media (max-width: 720px) {
  .xp-flow { padding-left: 42px; }
  .xp-rail { left: 14px; }
  .xp-node { left: -42px; width: 28px; }
  .xp-year { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .xp-tick { transform: scaleX(1) !important; }
  .xp-year { opacity: 1 !important; transform: none !important; }
}

/* --- Experience: no side apparatus. Cards stand on their own, full width. --- */
.xp-flow { padding-left: 0; }
.xp-rail, .xp-node { display: none; }
@media (max-width: 720px) {
  .xp-flow { padding-left: 0; }
}

/* ---------- HERO PROOF LINE ---------- */
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin: -14px 0 34px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.74 0.13 252);
}
.hp-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: oklch(0.62 0.14 250 / 0.55);
}

/* ---------- HERO BUTTONS: heavier presence ---------- */
.hero-actions .btn {
  padding: 19px 36px;
  font-size: 15.5px;
  font-weight: 500;
  border-radius: 14px;
  letter-spacing: 0.005em;
}
.hero-actions .btn.primary {
  background: linear-gradient(135deg, oklch(0.72 0.16 250), oklch(0.56 0.17 268));
  color: oklch(0.985 0.004 250);
  box-shadow: 0 10px 36px -10px oklch(0.62 0.16 258 / 0.65), inset 0 1px 0 oklch(1 0 0 / 0.22);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), filter 0.22s var(--ease-out);
}
.hero-actions .btn.primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 16px 44px -10px oklch(0.62 0.16 258 / 0.8), inset 0 1px 0 oklch(1 0 0 / 0.22);
}
.hero-actions .btn.primary:active { transform: translateY(0); filter: brightness(0.97); }
.hero-actions .btn.primary svg { transition: transform 0.22s var(--ease-out); }
.hero-actions .btn.primary:hover svg { transform: translate(2px, -2px); }
.hero-actions .btn.ghost {
  border: 1px solid oklch(1 0 0 / 0.16);
  background: oklch(1 0 0 / 0.025);
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out), background 0.22s var(--ease-out), color 0.22s var(--ease-out);
}
.hero-actions .btn.ghost:hover {
  transform: translateY(-2px);
  border-color: oklch(0.68 0.15 256 / 0.65);
  background: oklch(0.62 0.15 258 / 0.09);
  color: var(--fg);
}

/* ---------- SIDENAV: deep-dive link + socials ---------- */
.sidenav-deep {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-top: 14px;
  border-radius: 10px;
  font-size: 13.5px;
  color: oklch(0.74 0.13 252);
  border: 1px solid oklch(0.62 0.15 258 / 0.4);
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.sidenav-deep .arr { font-family: var(--mono); font-size: 11px; transition: transform 0.25s var(--ease-out); }
.sidenav-deep:hover {
  border-color: oklch(0.68 0.15 256 / 0.7);
  background: oklch(0.62 0.15 258 / 0.08);
  color: var(--fg);
}
.sidenav-deep:hover .arr { transform: translate(2px, -2px); }
.sidenav-socials {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.sidenav-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--fg-3);
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.18s var(--ease-out);
}
.sidenav-socials a:hover { color: var(--fg); border-color: oklch(0.68 0.15 256 / 0.6); transform: translateY(-2px); }

/* ---------- DEEP DIVE CTA (end of projects) ---------- */
.deep-cta { margin-top: 26px; }
.deep-cta a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(26px, 3vw, 38px) clamp(24px, 3vw, 40px);
  border-radius: 26px;
  background:
    radial-gradient(130% 180% at 0% 0%, oklch(0.62 0.15 262 / 0.16) 0%, transparent 55%),
    var(--card-grad);
  border: 1px solid oklch(0.62 0.15 258 / 0.4);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.deep-cta a:hover { border-color: oklch(0.68 0.15 256 / 0.75); transform: translateY(-3px); }
.deep-cta-kicker { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.deep-cta-title { font-family: var(--serif); font-size: clamp(26px, 3vw, 38px); color: var(--fg); letter-spacing: -0.01em; }
.deep-cta-title .arr { color: oklch(0.7 0.15 254); display: inline-block; transition: transform 0.3s var(--ease-out); }
.deep-cta a:hover .arr { transform: translateX(8px); }

@media (max-width: 760px) {
  .hero-proof { font-size: 10px; gap: 8px 10px; }
  .hero-actions .btn { padding: 16px 26px; font-size: 14.5px; }
}

/* ---------- SIDENAV FOOT: tidy stack (Deep Dive / socials / Resume) ---------- */
.sidenav-deep {
  margin: 0 0 10px;
  border: 1px solid oklch(0.62 0.15 258 / 0.4);
  border-radius: 10px;
  padding: 11px 14px;
  background: oklch(0.62 0.15 258 / 0.06);
}
.sidenav-socials {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.sidenav-socials a {
  flex: 1;
  width: auto;
  height: 40px;
  border-radius: 10px;
}

/* ---------- Tighter hero → about gap ---------- */
.hero-content { padding-bottom: 8px; }
#about.section { padding-top: 16px; }

/* ---------- WHOLE-SITE DEPTH RAMP ----------
   The accent itself descends as you go down the page: bright blue at the
   surface, deep violet at the bottom. Every component inside a section that
   uses var(--accent) inherits its depth automatically. */
#about      { --accent: oklch(0.71 0.145 254); --accent-soft: oklch(0.71 0.145 254 / 0.16); }
#education  { --accent: oklch(0.68 0.15 258);  --accent-soft: oklch(0.68 0.15 258 / 0.16); }
#experience { --accent: oklch(0.65 0.15 262);  --accent-soft: oklch(0.65 0.15 262 / 0.16); }
#work       { --accent: oklch(0.61 0.15 267);  --accent-soft: oklch(0.61 0.15 267 / 0.16); }
#skills     { --accent: oklch(0.57 0.155 272); --accent-soft: oklch(0.57 0.155 272 / 0.16); }
#contact    { --accent: oklch(0.54 0.16 278);  --accent-soft: oklch(0.54 0.16 278 / 0.16); }

/* experience cards ride the ramp within their own section too */
.xp-entry:nth-child(1) { --accent: oklch(0.67 0.15 260); }
.xp-entry:nth-child(2) { --accent: oklch(0.655 0.15 262); }
.xp-entry:nth-child(3) { --accent: oklch(0.64 0.15 264); }
.xp-entry:nth-child(4) { --accent: oklch(0.625 0.15 266); }
.xp-entry:nth-child(5) { --accent: oklch(0.61 0.15 268); }

/* ---------- UCLA card: single clean serif name, no italics ---------- */
.ucla-kicker, .ucla-city { display: none; }
.ucla-name {
  font-family: var(--serif);
  font-style: normal;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 20px;
  max-width: 15em;
  text-wrap: balance;
}

/* ---------- COMPACT PASS: faster scroll, less air ---------- */
.section { padding: 34px 40px; }
.section-head { margin-bottom: 20px; }
.hero { padding: 20px 40px 0; }
.hero-eyebrow { margin-bottom: 28px; }
.mega { margin-bottom: 28px; }
.hero-proof { margin: -8px 0 26px; }
.hero-content { padding-bottom: 2px; }
#about.section { padding-top: 4px; }
.ucla-top { padding: 22px 36px; }
.ucla-body { padding: 24px 36px; }
.xp-card { padding: 26px 30px; }
.xp-flow { gap: 16px; }
.deep-cta { margin-top: 18px; }
@media (max-width: 760px) {
  .section { padding: 30px 24px; }
  .hero { padding: 24px 24px 0; }
}

/* ---------- UCLA card v3: the big editorial two-line treatment, no italics ---------- */
.ucla-kicker { display: block; }
.ucla-city {
  display: block;
  font-style: normal;
  font-size: clamp(44px, 6vw, 84px);
  margin-bottom: 18px;
}
.ucla-name { display: none; }

/* ---------- Projects: compact rows ---------- */
.proj-flow { gap: 14px; }
.proj-row { padding: 18px 22px; gap: 4px; }
.proj-row-title { font-size: clamp(24px, 2.6vw, 34px); }
.proj-row-desc { font-size: 14.5px; line-height: 1.55; }
.proj-row-meta { font-size: 10.5px; }

/* ---------- DEEP-DIVE CTA: compact, violet (the floor of the depth ramp) ---------- */
.deep-cta a {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
  max-width: 100%;
  padding: 18px 26px;
  gap: 18px;
  border-color: oklch(0.55 0.16 280 / 0.45);
  background:
    radial-gradient(120% 180% at 0% 0%, oklch(0.5 0.16 282 / 0.2) 0%, transparent 60%),
    linear-gradient(180deg, oklch(0.135 0.012 285 / 0.6), oklch(0.118 0.01 285 / 0.32));
}
.deep-cta a:hover { border-color: oklch(0.6 0.17 282 / 0.8); }
.deep-cta-title { font-size: clamp(22px, 2.4vw, 30px); }
.deep-cta-title .arr { color: oklch(0.62 0.17 283); }

/* ============================================================
   LIGHT "PAPER" THEME (now the only theme)
   A soft blue-grey paper, deep-ink text, deeper blue accents.
   ============================================================ */
:root {
  --bg: oklch(0.963 0.008 250);
  --bg-2: oklch(0.986 0.005 250);
  --bg-3: oklch(0.928 0.012 252);
  --surface: oklch(0.992 0.004 250);
  --line: oklch(0.81 0.02 255);
  --line-soft: oklch(0.885 0.014 255);
  --fg: oklch(0.26 0.026 266);
  --fg-2: oklch(0.38 0.028 264);
  --fg-3: oklch(0.50 0.032 262);
  --accent: oklch(0.50 0.18 262);
  --accent-soft: oklch(0.50 0.18 262 / 0.14);
  --card-grad: linear-gradient(180deg, oklch(0.999 0.002 250 / 0.94), oklch(0.974 0.007 255 / 0.7));
  --body-wash: linear-gradient(180deg, oklch(0.915 0.034 256 / 0.82) 0%, oklch(0.945 0.022 258 / 0.46) 30%, oklch(0.96 0.012 252 / 0.18) 55%, transparent 78%);
}
/* depth ramp: darken as the page descends, ending deep violet */
html #about      { --accent: oklch(0.52 0.18 256); --accent-soft: oklch(0.52 0.18 256 / 0.14); }
html #education  { --accent: oklch(0.50 0.18 260); --accent-soft: oklch(0.50 0.18 260 / 0.14); }
html #experience { --accent: oklch(0.48 0.18 264); --accent-soft: oklch(0.48 0.18 264 / 0.14); }
html #work       { --accent: oklch(0.46 0.18 268); --accent-soft: oklch(0.46 0.18 268 / 0.14); }
html #skills     { --accent: oklch(0.44 0.18 273); --accent-soft: oklch(0.44 0.18 273 / 0.14); }
html #contact    { --accent: oklch(0.42 0.18 279); --accent-soft: oklch(0.42 0.18 279 / 0.14); }
html .xp-entry:nth-child(1) { --accent: oklch(0.49 0.18 261); }
html .xp-entry:nth-child(2) { --accent: oklch(0.475 0.18 263); }
html .xp-entry:nth-child(3) { --accent: oklch(0.46 0.18 265); }
html .xp-entry:nth-child(4) { --accent: oklch(0.445 0.18 267); }
html .xp-entry:nth-child(5) { --accent: oklch(0.43 0.18 269); }
/* softer atmospheric blobs + grain on paper */
html .depth-blob { opacity: 0.12 !important; filter: blur(150px); }
html .grain-layer { opacity: 0.025; mix-blend-mode: multiply; }
html .hero-glow { opacity: 0.32; }
/* dark glass surfaces -> paper glass */
html .topnav { background: transparent; }
html .topnav.scrolled { background: oklch(0.94 0.018 254 / 0.96); }
html .mobile-menu { background: oklch(0.955 0.012 252 / 0.99); }
html .tweaks-panel { background: oklch(0.97 0.01 252 / 0.94); box-shadow: 0 20px 60px -20px oklch(0.4 0.04 262 / 0.3); }
html .spec-card,
html .skill-chip { background: var(--bg-2); }
/* sidebar = exactly the background (no edge-darkening overlay) */
html .sidenav { background: transparent; }
/* ghost button: clean border only on paper, no fill */
html .hero-actions .btn.ghost {
  background: transparent;
  border-color: oklch(0.62 0.04 262 / 0.55);
}
html .hero-actions .btn.ghost:hover {
  background: transparent;
  border-color: oklch(0.5 0.16 262 / 0.7);
}
/* deep-dive CTA -> light paper with a violet tint */
html .deep-cta a {
  background:
    radial-gradient(120% 180% at 0% 0%, oklch(0.55 0.13 282 / 0.05) 0%, transparent 60%),
    linear-gradient(180deg, oklch(0.999 0.002 285), oklch(0.982 0.006 282 / 0.9));
}
/* the nav-btn (Resume) inverts to ink-on-paper, keep it readable */
html .nav-btn { background: var(--fg); color: var(--bg-2); }

/* ---------- MOBILE NAV POLISH ---------- */
/* badge only on phones, no name text */
@media (max-width: 899px) {
  .topnav .logo-text { display: none; }
}
/* small Dive pill in the top bar */
.nav-dive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid oklch(0.62 0.15 258 / 0.45);
  border-radius: 8px;
  color: oklch(0.72 0.13 254);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.nav-dive:hover { color: var(--fg); border-color: oklch(0.68 0.15 256 / 0.8); background: oklch(0.62 0.15 258 / 0.08); }
html .nav-dive { color: oklch(0.45 0.16 262); border-color: oklch(0.5 0.16 262 / 0.5); }
/* deep dive + theme rows inside the burger menu */
.mm-deep {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  color: oklch(0.7 0.14 254) !important;
}
html .mm-deep { color: oklch(0.45 0.16 262) !important; }
.mm-deep .arr { font-family: var(--mono); font-size: 14px; }
.mobile-menu-foot { margin-top: auto; padding: 18px 0 6px; }

/* education is the first section now */
#education.section { padding-top: 8px; }

/* ---------- HERO ACTIONS v3: solid resume, icon-only socials ---------- */
.hero-actions .btn.solid {
  background: var(--fg);
  color: var(--bg);
  padding: 17px 34px;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 500;
  transition: transform 0.2s var(--ease-out), filter 0.2s var(--ease-out);
}
.hero-actions .btn.solid:hover { transform: translateY(-2px); filter: brightness(0.92); }
html .hero-actions .btn.solid { color: var(--bg-2); }
html .hero-actions .btn.solid:hover { filter: brightness(1.25); }
.hero-actions .btn.icon {
  width: 54px;
  height: 54px;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
}

/* ============================================================
   COMPACT LAYOUT  (html[data-layout="compact"], front page only)
   Experiences 5-up, projects 5-up, skills 3-up, slim education.
   ============================================================ */
html[data-layout="compact"] .section { padding: 20px 40px; }
html[data-layout="compact"] .section-head { margin-bottom: 12px; }
html[data-layout="compact"] .section-title { font-size: clamp(30px, 3.4vw, 44px); }

/* --- education: slim strip --- */
html[data-layout="compact"] .ucla-top { padding: 12px 24px; }
html[data-layout="compact"] .ucla-kicker { margin-bottom: 2px; font-size: 9px; }
html[data-layout="compact"] .ucla-city { font-size: 30px; margin-bottom: 0; }
html[data-layout="compact"] .ucla-pennant { display: none; }
html[data-layout="compact"] .ucla-body { padding: 14px 24px; }
html[data-layout="compact"] .ucla-degree-row h3 { font-size: 19px; }
html[data-layout="compact"] .year-big { font-size: 22px; }

/* --- experience: 5 cards across --- */
html[data-layout="compact"] .xp-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
html[data-layout="compact"] .xp-card { padding: 16px 15px; height: 100%; display: flex; flex-direction: column; gap: 8px; border-radius: 18px; }
html[data-layout="compact"] .xp-panel-head { flex-direction: column; gap: 6px; }
html[data-layout="compact"] .xp-panel-head h3 { font-size: 17px; line-height: 1.25; }
html[data-layout="compact"] .xp-panel-head h3 .at { font-size: 14px; }
html[data-layout="compact"] .xp-panel-when { align-items: flex-start; padding-top: 0; gap: 2px; }
html[data-layout="compact"] .xp-panel-period, html[data-layout="compact"] .xp-panel-loc { font-size: 9.5px; white-space: normal; }
html[data-layout="compact"] .xp-panel-short { font-size: 12.5px; line-height: 1.5; margin: 0; }
html[data-layout="compact"] .xp-flow-bullets { display: none; }

/* --- projects: 5 cards across, headline-only --- */
html[data-layout="compact"] .proj-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
html[data-layout="compact"] .proj-row { padding: 16px 15px; border-radius: 18px; height: 100%; }
html[data-layout="compact"] .proj-row-title { font-size: 19px; }
html[data-layout="compact"] .proj-row-sub { display: none; }
html[data-layout="compact"] .proj-row-desc { display: none; }
html[data-layout="compact"] .proj-row-depth { display: none; }
html[data-layout="compact"] .proj-tag { font-size: 9px; padding: 4px 8px; }
html[data-layout="compact"] .proj-row-meta { flex-wrap: wrap; gap: 6px; font-size: 9px; }
html[data-layout="compact"] .proj-row-period { padding: 3px 8px; }

/* --- skills: 3 across --- */
html[data-layout="compact"] .skills-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
html[data-layout="compact"] .skill-col { padding: 14px 16px; border-radius: 18px; }
html[data-layout="compact"] .skill-chip { padding: 6px 10px; font-size: 11px; }

html[data-layout="compact"] .deep-cta { margin-top: 12px; }

/* compact on phones: side-by-side becomes swipeable rows */
@media (max-width: 900px) {
  html[data-layout="compact"] .xp-flow,
  html[data-layout="compact"] .proj-flow {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -24px;
    padding: 0 24px 8px;
  }
  html[data-layout="compact"] .xp-flow::-webkit-scrollbar,
  html[data-layout="compact"] .proj-flow::-webkit-scrollbar { display: none; }
  html[data-layout="compact"] .xp-entry, html[data-layout="compact"] .proj-row { flex: 0 0 72%; }
  html[data-layout="compact"] .xp-card { height: 100%; }
  html[data-layout="compact"] .skills-grid { grid-template-columns: 1fr; }
  html[data-layout="compact"] .section { padding: 18px 24px; }
}

/* ============================================================
   COMPACT v2: bigger type, bullets back, full-width grids,
   aligned card bottoms. Compact mode only.
   ============================================================ */
/* the name by default stays hidden everywhere */
.ucla-name { display: none; }

html[data-layout="compact"] .section { max-width: none; padding: 22px 44px; }
html[data-layout="compact"] .hero-lede { display: none; }
html[data-layout="compact"] .hero { padding-bottom: 0; }
html[data-layout="compact"] .mega { margin-bottom: 22px; }

/* --- experience: bigger heads, bullets shown, aligned --- */
html[data-layout="compact"] .xp-flow { gap: 12px; }
html[data-layout="compact"] .xp-card { padding: 20px 18px; gap: 10px; }
html[data-layout="compact"] .xp-panel-head h3 { font-size: 22px; line-height: 1.15; }
html[data-layout="compact"] .xp-panel-head h3 .at { font-size: 17px; }
html[data-layout="compact"] .xp-panel-period, html[data-layout="compact"] .xp-panel-loc { font-size: 10px; }
html[data-layout="compact"] .xp-panel-short { display: none; }
html[data-layout="compact"] .xp-flow-bullets { display: flex; flex-direction: column; gap: 10px; margin: 0; }
html[data-layout="compact"] .xp-flow-bullets li { font-size: 13px; line-height: 1.55; grid-template-columns: 16px 1fr; gap: 8px; }
html[data-layout="compact"] .xp-flow-bullets li::before { width: 11px; margin-top: 9px; }

/* --- projects: bigger titles, 2 strong bullets, no status labels, aligned source links --- */
html[data-layout="compact"] .proj-row { padding: 20px 18px; }
html[data-layout="compact"] .proj-row-title { font-size: 24px; }
html[data-layout="compact"] .proj-row-status, html[data-layout="compact"] .proj-row-dot { display: none; }
html[data-layout="compact"] .proj-row-depth { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
html[data-layout="compact"] .proj-row-depth li { font-size: 13px; line-height: 1.55; }
html[data-layout="compact"] .proj-row-foot { margin-top: auto; padding-top: 10px; }
html[data-layout="compact"] .proj-row { display: flex; flex-direction: column; }

/* --- education: one big white line + readable degree --- */
html[data-layout="compact"] .ucla-kicker, html[data-layout="compact"] .ucla-city { display: none; }
html[data-layout="compact"] .ucla-name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #FFFFFF;
}
html[data-layout="compact"] .ucla-top { padding: 18px 26px; }
html[data-layout="compact"] .ucla-degree-row h3 { font-size: 26px; }
html[data-layout="compact"] .year-big { font-size: 26px; }

/* --- deep dive CTA: slim full-width bar --- */
html[data-layout="compact"] .deep-cta a {
  width: 100%;
  justify-content: space-between;
  padding: 13px 24px;
}
html[data-layout="compact"] .deep-cta-title { font-size: 20px; }

/* --- hero buttons a notch smaller (both modes) --- */
.hero-actions .btn.solid { padding: 14px 28px; font-size: 14.5px; border-radius: 12px; }
.hero-actions .btn.icon { width: 47px; height: 47px; border-radius: 12px; }

/* --- sidebar foot: shorter controls --- */
.sidenav-deep { padding: 8px 12px; font-size: 12.5px; }

/* compact v2 fixes: pin source links to the real card bottom; stop foot-button wrap */
html[data-layout="compact"] .proj-row-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sidenav-deep { white-space: nowrap; }

/* ============================================================
   FULL VIEW v2: heavily compacted. Two-column project rows,
   3-up skills, slim CTA, tight spacing everywhere.
   ============================================================ */
/* top of page: cut the air */
.hero { padding: 12px 40px 0; }
.hero-eyebrow { margin-bottom: 16px; }
.mega { margin-bottom: 20px; font-size: clamp(62px, 9.5vw, 150px); }
.hero-content { padding-bottom: 0; }
.section { padding: 18px 40px; }
.section-head { margin-bottom: 12px; }
#education.section { padding-top: 4px; }

/* education: slimmer banner */
.ucla-top { padding: 16px 28px; }
.ucla-city { font-size: clamp(34px, 4.4vw, 58px); margin-bottom: 0; }
.ucla-kicker { margin-bottom: 6px; }
.ucla-body { padding: 16px 28px; }

/* experience: tighter cards */
.xp-card { padding: 20px 24px; }
.xp-flow { gap: 12px; }
.xp-panel-head h3 { font-size: 32px; }
.xp-panel-head h3 .at { font-size: 23px; }
.xp-flow-bullets { gap: 10px; }

/* projects: two-column rows that use the width */
.proj-row { padding: 18px 24px; }
.proj-flow { gap: 10px; }
.proj-row-titlerow { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.proj-row-titlerow .proj-link { margin: 0; padding-top: 0; }
@media (min-width: 1000px) {
  html:not([data-layout="compact"]) .proj-row-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    column-gap: clamp(28px, 4vw, 64px);
    row-gap: 6px;
  }
  html:not([data-layout="compact"]) .proj-row-titlerow,
  html:not([data-layout="compact"]) .proj-row-when,
  html:not([data-layout="compact"]) .proj-row-desc { grid-column: 1; }
  html:not([data-layout="compact"]) .proj-row-depth { grid-column: 2; grid-row: 1 / 5; align-self: center; margin: 0; }
}

/* skills: 3 across in full view too */
.skills-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skill-col { padding: 16px 18px; }

/* deep dive CTA: slim full-width bar everywhere */
.deep-cta { margin-top: 12px; }
.deep-cta a { width: 100%; justify-content: space-between; padding: 13px 24px; }
.deep-cta-title { font-size: 20px; }

@media (max-width: 760px) {
  .hero { padding: 16px 24px 0; }
  .section { padding: 16px 24px; }
  .skills-grid { grid-template-columns: 1fr; }
}

/* smaller section headings everywhere (name stays as-is) */
.section-title { font-size: clamp(50px, 6.2vw, 104px); }
html[data-layout="compact"] .section-title { font-size: clamp(44px, 5.4vw, 84px); }

/* ---------- project date under the title ---------- */
.proj-row-when { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in oklab, var(--proj, var(--accent)) 80%, var(--fg-3)); }

/* ---------- skills: plain dash lists, no boxes ---------- */
.skill-items { display: flex; flex-direction: column; gap: 9px; }
.skill-chip {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: baseline;
  gap: 11px;
  font-size: 14.5px;
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-2);
}
.skill-chip::before {
  content: '';
  width: 12px;
  height: 1.5px;
  border-radius: 1px;
  flex: none;
  align-self: center;
  background: color-mix(in oklab, var(--proj, var(--accent)) 75%, transparent);
}
html[data-layout="compact"] .skill-chip { font-size: 13px !important; }

/* ---------- contact grid: faint dividers between the 4 cells ---------- */
.contact-links { gap: 0; }
.contact-links > *:nth-child(even) { border-left: 1px solid var(--line-soft); }
.contact-links > *:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
@media (max-width: 760px) {
  .contact-links > *:nth-child(even) { border-left: none; }
  .contact-links > *:nth-child(n+2) { border-top: 1px solid var(--line-soft); }
}

/* ---------- experience: project-tight density, no head divider ---------- */
.xp-panel-head {
  padding-bottom: 0;
  margin-bottom: 8px;
  border-bottom: none;
}
.xp-card { padding: 16px 24px; }
.xp-flow { gap: 10px; }
.xp-panel-head h3 { font-size: 28px; }
.xp-panel-head h3 .at { font-size: 20px; }
.xp-panel-when { padding-top: 6px; }
.xp-flow-bullets { gap: 8px; margin-top: 0; }
.xp-flow-bullets li { font-size: 14px; line-height: 1.55; }

/* tighter hero -> education + slightly bigger experience heads */
.hero-actions { margin-bottom: 18px; }
.xp-panel-head h3 { font-size: 31px; }
.xp-panel-head h3 .at { font-size: 22px; }

/* education years: same ink as the degree text */
.year-big, .year-dash { color: var(--fg) !important; }

/* Deep Dive sidebar button: real contrast */
.sidenav-deep { background: oklch(0.62 0.15 258 / 0.14); }
html .sidenav-deep {
  background: var(--fg);
  color: var(--bg-2);
  border-color: transparent;
}
html .sidenav-deep:hover {
  background: oklch(0.32 0.05 264);
  color: #fff;
}

/* email hover underline ends at the text, not the row */
.big-mail::after { display: none; }
.mail-text { position: relative; }
.mail-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(.2,.7,.2,1);
}
.big-mail:hover .mail-text::after { width: 100%; }

/* experience: ~30% less gap between summary and bullets */
.xp-panel-short { margin-bottom: 22px; }


/* mobile top bar: Resume and Dive buttons match size */
@media (max-width: 899px) {
  .topnav-cta { display: flex; align-items: center; gap: 8px; }
  .topnav-cta .nav-btn,
  .topnav-cta .nav-dive {
    height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    box-sizing: border-box;
  }
}

/* slimmer hero resume button */
.hero-actions .btn.solid { padding: 14px 16px; }
