/* TOKENS */
:root {
  /* light: warm paper, leaf green */
  --bg: #f3f1e7;
  --bg-2: #fbfaf4;
  --surface: rgba(255,255,255,.5);
  --surface-2: rgba(40,70,40,.07);
  --border: rgba(40,70,45,.16);
  --text: #18281d;
  --muted: #55675a;
  --accent: #2a8a4a;
  --accent-2: #6fa02c;
  --accent-3: #1f8a7a;
  --on-accent: #f6fff4;
  --net: #2f8f4e;
  --tree: #2c6b43;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  --shadow: 0 20px 50px -25px rgba(30,60,35,.4);
  --safelight: rgba(70,150,80,.18);
  --radius: 22px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --nav-h: 68px;
}
:root[data-theme="dark"] {
  /* dark: night forest, bioluminescent green */
  --bg: #07120c;
  --bg-2: #0d1b13;
  --surface: rgba(190,255,205,.045);
  --surface-2: rgba(190,255,205,.08);
  --border: rgba(190,255,205,.12);
  --text: #e4efe6;
  --muted: #8fa595;
  --accent: #3ddc84;
  --accent-2: #b5e655;
  --accent-3: #2dd4bf;
  --on-accent: #03140a;
  --net: #3ddc84;
  --tree: #46d58a;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.7);
  --safelight: rgba(60,220,130,.16);
}

/* BASE */
*, *::before, *::after { 
  box-sizing: border-box; 
}
html { 
  scroll-behavior: smooth; 
  scroll-padding-top: calc(var(--nav-h) + 10px);
}
body {
  margin: 0; background: var(--bg); 
  color: var(--text);
  font: 400 16px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased; 
  overflow-x: hidden;
  transition: background .4s, color .4s;
}
a { 
  color: inherit; 
  text-decoration: none; 
}
h1,h2,h3 { 
  font-family: var(--font-display); 
  font-weight: 600; 
  line-height: 1.1; 
  margin: 0; 
  letter-spacing: -.02em; 
}
p { margin: 0 0 1rem; }
ul { 
  margin: 0; 
  padding: 0; 
  list-style: none;
}
img { max-width: 100%; }
button { 
  font: inherit; 
  color: inherit; 
  cursor: pointer; 
}
kbd { 
  font: 500 .72rem var(--font-mono); 
  padding: 2px 6px; 
  border: 1px solid var(--border); 
  border-bottom-width: 2px; 
  border-radius: 6px; 
  background: var(--surface); 
}
.muted { color: var(--muted); }
::selection { 
  background: var(--accent); 
  color: var(--on-accent); 
}
:focus-visible { 
  outline: 2px solid var(--accent); 
  outline-offset: 3px; 
  border-radius: 6px; 
}

.progress { 
  position: fixed; 
  top: 0; 
  left: 0; 
  height: 3px; 
  width: 100%; 
  transform-origin: 0 50%; 
  transform: scaleX(0); 
  background: var(--grad); 
  z-index: 100; 
}
.noise { 
  position: fixed; 
  inset: 0; 
  pointer-events: none; 
  z-index: 1; 
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); 
}
.cursor-glow { 
  position: fixed; 
  left: 0; 
  top: 0; 
  width: 520px; 
  height: 520px; 
  margin: -260px 0 0 -260px; 
  border-radius: 50%; 
  pointer-events: none; 
  z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%); opacity: 0; transition: opacity .4s; will-change: transform; 
}
.cursor-glow.on { opacity: 1; }
@media (hover: none) { .cursor-glow { display: none; } }

/* NAV */
.nav { 
  position: fixed; 
  inset: 0 0 auto 0; 
  height: var(--nav-h); 
  z-index: 90; display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0 clamp(16px, 4vw, 48px);
  transition: background .3s, backdrop-filter .3s, border-color .3s; 
  border-bottom: 1px solid transparent; 
}
.nav.scrolled { 
  background: color-mix(in srgb, var(--bg) 72%, transparent); 
  backdrop-filter: blur(16px) saturate(1.4); 
  border-color: var(--border); 
}
.logo { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  font: 700 1.05rem var(--font-mono); 
}
.logo-mark { 
  display: grid; 
  place-items: center; 
  width: 36px; 
  height: 36px; 
  border-radius: 10px; 
  background: var(--grad); 
  color: var(--on-accent); 
  font-size: .85rem; 
}
.logo-text span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; 
  border-radius: 999px; 
  font-size: .9rem; 
  color: var(--muted); 
  transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .kbd-btn { display: grid; place-items: center; height: 38px; min-width: 38px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: .2s; }
.kbd-btn { display: flex; gap: 4px; padding: 0 10px; place-items: unset; align-items: center; }
.icon-btn:hover, .kbd-btn:hover { border-color: var(--accent); }
.i-sun { display: none; } [data-theme="light"] .i-sun { display: block; } [data-theme="light"] .i-moon { display: none; }
.burger { display: none; position: relative; }
.burger span { position: absolute; width: 16px; height: 2px; background: currentColor; transition: .3s; }
.burger span:first-child { transform: translateY(-3px); } .burger span:last-child { transform: translateY(3px); }
.burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); } .burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

/* LAYOUT  */
main, .footer { position: relative; z-index: 2; }
.section { 
  max-width: 1180px; 
  margin: 0 auto; 
  padding: clamp(70px, 10vw, 120px) clamp(16px, 4vw, 32px) 20px; 
}
.section-head { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  margin-bottom: 36px; 
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); white-space: nowrap; }
.section-head .idx { font: 500 .9rem var(--font-mono); color: var(--accent); }
.section-head i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.section-lead { color: var(--muted); max-width: 60ch; margin: -14px 0 28px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 14px; font: 500 .95rem var(--font-body); border: 1px solid var(--border); transition: transform .25s, box-shadow .25s, border-color .25s, background .25s; }
.btn-primary { background: var(--grad); color: var(--on-accent); border-color: transparent; font-weight: 600; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { box-shadow: 0 14px 40px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary span { transition: transform .25s; } .btn-primary:hover span { transform: translateX(4px); }
.btn-ghost { background: var(--surface); } .btn-ghost:hover { border-color: var(--accent); background: var(--surface-2); }

/* HERO  */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: calc(var(--nav-h) + 30px) clamp(16px, 4vw, 48px) 60px; overflow: hidden; z-index: 2; }
.hero::before { content: ""; position: absolute; inset: -20%; z-index: -1;
  background: radial-gradient(40% 40% at 20% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
              radial-gradient(40% 45% at 80% 20%, color-mix(in srgb, var(--accent-3) 22%, transparent), transparent 70%),
              radial-gradient(45% 45% at 60% 90%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate; filter: blur(30px); }
@keyframes aurora { to { transform: translate3d(4%, 3%, 0) rotate(6deg) scale(1.08); } }
#network { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.blob { position: absolute; z-index: -1; border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%; filter: blur(2px); opacity: .5; animation: morph 14s ease-in-out infinite alternate; }
.blob.b1 { width: min(44vw, 520px); aspect-ratio: 1; right: -8%; top: 12%; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 70%); }
.blob.b2 { width: min(34vw, 400px); aspect-ratio: 1; left: -6%; bottom: 4%; background: radial-gradient(circle at 60% 40%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%); animation-duration: 18s; animation-direction: alternate-reverse; }
@keyframes morph { 50% { border-radius: 40% 60% 35% 65% / 62% 40% 60% 38%; transform: translate(-4%, 5%) rotate(25deg) scale(1.08); } 100% { border-radius: 58% 42% 66% 34% / 40% 60% 40% 60%; transform: translate(3%, -4%) rotate(-15deg); } }
.hero-inner { max-width: 1180px; width: 100%; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: 500 .8rem var(--font-mono); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 0 #30d158; animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero-title { font-size: clamp(2.8rem, 9vw, 7rem); margin: 22px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.hero-hi { font: 400 clamp(1.1rem, 2.4vw, 1.6rem) var(--font-mono); color: var(--accent); letter-spacing: 0; }
.glitch 
{ position: relative; 
  width: fit-content; 
  background: var(--grad); 
  -webkit-background-clip: text; 
  background-clip: text; 
  color: transparent; 
  background-size: 200% 100%; 
  animation: shimmer 8s linear infinite; 
}
@keyframes shimmer { to { background-position: -200% 0; } }
.glitch::before, .glitch::after { 
  content: attr(data-text); 
  position: absolute; 
  inset: 0; opacity: 0; 
  pointer-events: none; 
}
.glitch:hover::before { 
  opacity: .8; 
  color: #FFFFFF; 
  transform: translate(3px, -2px); 
  clip-path: inset(0 0 55% 0); 
  animation: gl 0.4s steps(2) infinite; 
}
.glitch:hover::after { 
  opacity: .8; 
  color: #204825;
  transform: translate(-3px, 2px); 
  clip-path: inset(50% 0 0 0); 
  animation: gl 0.4s steps(2) infinite reverse; 
}
@keyframes gl { 50% { transform: translate(-2px, 1px); } }
.hero-role { font: 500 clamp(1.1rem, 2.6vw, 1.7rem) var(--font-display); min-height: 1.6em; }
.typed { color: var(--accent); } .caret { color: var(--accent); animation: blink 1s steps(2) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { max-width: 62ch; color: var(--muted); font-size: 1.05rem; margin: 6px 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; max-width: 760px; }
.hero-stats li { border-left: 2px solid var(--border); padding-left: 16px; }
.hero-stats b { display: block; font: 700 clamp(1.7rem, 4vw, 2.4rem) var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { font-size: .8rem; color: var(--muted); line-height: 1.3; display: block; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; width: 24px; height: 40px; margin-left: -12px; border: 2px solid var(--border); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 380px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.profile { border: 1px solid var(--border); border-radius: 26px 26px 26px 80px; background: #0b1a12; color: #dcebdc; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; transform-style: preserve-3d; }
.profile-bar, .term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; background: rgba(255,255,255,.05); font: .75rem var(--font-mono); color: #8fa595; }
.profile-bar i, .term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .profile-bar i:nth-child(2), .term-bar i:nth-child(2) { background: #febc2e; } .profile-bar i:nth-child(3), .term-bar i:nth-child(3) { background: #28c840; }
.profile-bar span, .term-bar span { margin-left: 10px; }
.profile pre { margin: 0; padding: 20px 22px 26px; overflow-x: auto; font: .85rem/1.75 var(--font-mono); }
.profile .k { color: #7fd6a0; } .profile .s { color: #e8c97a; } .profile .n { color: #8ec9ff; }
.about-text h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 18px; }
.about-text p { color: var(--muted); }
.terminal { margin-top: 26px; border: 1px solid var(--border); border-radius: 16px; background: #0b1a12; overflow: hidden; box-shadow: var(--shadow); }
.terminal pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: .85rem/1.7 var(--font-mono); color: #e4efe6; }
.terminal .p { color: #3ddc84; } .terminal .o { color: #b4c9b9; } .blink { animation: blink 1s steps(2) infinite; }

/*  PROJECTS: the darkroom */
.section-lead a { color: var(--accent); border-bottom: 1px solid currentColor; }
.print { display: flex; flex-direction: column; gap: 8px; padding: 0; font: inherit; color: inherit; text-align: left; background: none; border: none; cursor: zoom-in; }
.print--loose { position: absolute; left: 50%; top: 50%; will-change: transform, opacity; }
.print--loose:hover, .print--loose:focus-visible { z-index: 40 !important; }
.print__mount { position: relative; display: block; }
.print__frame { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 0 0 1px var(--border), 0 22px 40px -22px rgba(10,40,20,.55); transition: box-shadow .4s ease; }
.print__frame::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.09) 0 1px, transparent 1px 18px), repeating-linear-gradient(90deg, rgba(255,255,255,.09) 0 1px, transparent 1px 18px); transform: perspective(240px) rotateX(48deg) scale(1.8) translateY(18%); transform-origin: 50% 100%; transition: scale .8s cubic-bezier(.22,1,.36,1); }
.print:hover .print__frame::before { scale: 1.08; }
.print__glyph { position: absolute; right: 10px; top: -8%; font: 700 clamp(4rem, 8vw, 7rem)/1 var(--font-display); color: rgba(255,255,255,.22); }
.print__cat { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.32); backdrop-filter: blur(6px); color: #fff; font: 500 .66rem var(--font-mono); }
.print__title { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; font: 600 clamp(.85rem, 1.25vw, 1.05rem)/1.15 var(--font-display); }
.print__latent { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(40,110,60,.6), transparent 75%), #06140b; opacity: var(--latent, 0); pointer-events: none; }
.print:focus-visible { outline: none; }
.print:focus-visible .print__frame { box-shadow: 0 0 0 2px var(--accent), 0 22px 40px -22px rgba(10,40,20,.55); }
.print__edge { display: flex; justify-content: space-between; padding-inline: 2px; font: 600 .68rem var(--font-mono); letter-spacing: .18em; color: var(--muted); }
.print__pencil { position: absolute; inset: -12px -14px; width: calc(100% + 28px); height: calc(100% + 24px); overflow: visible; pointer-events: none; }
.print__pencil path { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .7s cubic-bezier(.65,0,.35,1), opacity .2s ease .5s; }
.print:hover .print__pencil path, .print:focus-visible .print__pencil path, .is-developed .print__pencil path, .print.is-marked .print__pencil path { stroke-dashoffset: 0; opacity: .9; transition: stroke-dashoffset 1.1s cubic-bezier(.65,0,.35,1), opacity .1s ease; }

.darkroom { position: relative; }
.darkroom__view { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); }
.darkroom__safelight { position: absolute; inset: 4% -6%; background: radial-gradient(ellipse 55% 50% at 50% 46%, var(--safelight), transparent 70%); pointer-events: none; opacity: 0; }
.darkroom__waiting { position: absolute; inset: 28px 0 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; pointer-events: none; }
.darkroom__waiting-title { font: 600 clamp(1.4rem, 2.6vw, 2rem) var(--font-display); }
.darkroom__waiting-note { font-size: .95rem; color: var(--muted); margin: 0; }
.darkroom__cue { position: relative; width: 2px; height: 56px; margin-top: 18px; overflow: hidden; background: var(--border); border-radius: 2px; }
.darkroom__cue::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--accent); border-radius: inherit; animation: cue 2.4s cubic-bezier(.65,0,.35,1) infinite; }
@keyframes cue { from { translate: 0 -100%; } to { translate: 0 250%; } }
.darkroom__status { position: absolute; left: 0; right: 0; bottom: 104px; margin: 0; font: 600 .75rem var(--font-mono); letter-spacing: .2em; text-align: center; text-transform: uppercase; color: var(--muted); opacity: 0; }
.darkroom__percent { display: inline-block; min-width: 4ch; color: var(--accent); }
.contact-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; margin-top: 12px; }

.no-scroll, .no-scroll body { overflow: hidden; }
html { scrollbar-gutter: stable; }
.loupe { position: fixed; inset: 0; z-index: 400; }
.loupe__backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); }
.loupe__frame { position: fixed; overflow: hidden; will-change: transform; border-radius: 22px; background: var(--bg-2); box-shadow: 0 50px 90px -40px rgba(10,40,20,.6); }
.loupe__art { position: absolute; inset: 0; background: linear-gradient(135deg, var(--a), var(--b)); color: #fff; }
.loupe__art::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.09) 0 1px, transparent 1px 28px), repeating-linear-gradient(90deg, rgba(255,255,255,.09) 0 1px, transparent 1px 28px); transform: perspective(500px) rotateX(52deg) scale(2) translateY(18%); transform-origin: 50% 100%; }
.loupe__glyph { position: absolute; right: 4%; top: -6%; font: 700 clamp(9rem, 28vw, 24rem)/1 var(--font-display); color: rgba(255,255,255,.18); }
.loupe__content { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(60px, 10vw, 120px) clamp(20px, 4vw, 48px) clamp(18px, 3vw, 40px); background: linear-gradient(transparent, rgba(0,0,0,.6)); display: flex; flex-direction: column; gap: 10px; }
.loupe__chip { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.3); font: 500 .75rem var(--font-mono); }
.loupe__content h3 { font-size: clamp(1.5rem, 4vw, 3rem); }
.loupe__content p { max-width: 62ch; margin: 0; color: rgba(255,255,255,.88); font-size: clamp(.85rem, 1.4vw, 1.05rem); }
.loupe__content .stack { margin-top: 4px; padding: 0; }
.loupe__content .stack li { background: rgba(255,255,255,.18); color: #fff; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack li { padding: 3px 10px; border-radius: 8px; background: var(--surface-2); font: .72rem var(--font-mono); }
.loupe__bar { position: fixed; display: flex; align-items: center; gap: 20px; }
.loupe__count { flex-shrink: 0; margin: 0; font: 700 1.6rem/1 var(--font-display); }
.loupe__count span { font: 600 .9rem var(--font-mono); color: var(--muted); }
.loupe__meta { flex: 1; min-width: 0; padding-left: 20px; border-left: 1px solid var(--border); }
.loupe__title { margin: 0; font-weight: 700; }
.loupe__place { margin: 0; font-size: .85rem; color: var(--muted); }
.loupe__place a { color: var(--accent); font-weight: 600; }
.loupe__actions { display: flex; gap: 8px; }
.loupe__button { display: grid; place-items: center; width: 40px; height: 40px; color: var(--text); background: var(--surface-2); border: none; border-radius: 50%; transition: background .2s, opacity .2s; }
.loupe__button:hover, .loupe__button:focus-visible { background: color-mix(in srgb, var(--accent) 22%, transparent); outline: none; }
.loupe__button:disabled { opacity: .35; cursor: default; }

/* SKILLS: competency tree  */
.tree { position: relative; margin: 10px auto 0; max-width: 1200px; }
.tree-svg { display: block; width: 100%; height: auto; overflow: visible; }
.tree-svg path { fill: none; stroke: var(--tree); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.5,.1,.2,1) var(--dl, 0s); }
.tree.grown .tree-svg path { stroke-dashoffset: 0; }
.tree-svg .trunk { stroke-width: 2; opacity: .75; } .tree-svg .trunk.bold { stroke-width: 4.5; opacity: 1; }
.tree-svg .root { stroke-width: 1.6; opacity: .7; }
.tree-svg .branch.main { stroke-width: 4; } .tree-svg .tip-branch { stroke-width: 2.2; } .tree-svg .twig { stroke-width: 1.2; opacity: .6; }
.tree-svg .ground { fill: none; stroke: var(--tree); stroke-width: 1; opacity: .25; } .tree-svg .ground.g2 { opacity: .4; }
.tree-svg .node, .tree-svg .tip, .tree-svg .group-label { opacity: 0; transition: opacity .6s ease var(--dl, 0s); }
.tree.grown .tree-svg .node, .tree.grown .tree-svg .tip, .tree.grown .tree-svg .group-label { opacity: 1; }
.tree-svg .node { fill: var(--accent); }
.tree-svg .node.small, .tree-svg .root-node { fill: var(--tree); }
.tree-svg .node.hub { fill: var(--bg); stroke: var(--accent); stroke-width: 2.5; }
.tree-svg .tip-dot { fill: var(--accent); transition: r .25s; }
.tree-svg .tip-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ring 3s ease-out infinite; }
.tree-svg .tip:nth-of-type(3n) .tip-ring { animation-delay: -1s; } .tree-svg .tip:nth-of-type(3n+1) .tip-ring { animation-delay: -2s; }
@keyframes ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }
.tree-svg .tip { cursor: default; }
.tree-svg .tip-label { font: 500 14.5px var(--font-body); fill: var(--text); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; transition: fill .2s; }
.tree-svg .tip:hover .tip-label { fill: var(--accent); font-weight: 600; }
.tree-svg .tip:hover .tip-dot { r: 8; }
.tree-svg .group-label { font: 600 11.5px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; fill: var(--accent); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.tree-list { display: none; }
@media (max-width: 860px) {
  .tree-svg { display: none; }
  .tree-list { display: grid; position: relative; gap: 22px; padding-left: 26px; border-left: 3px solid var(--tree); margin-left: 10px; }
  .tree-list > li { position: relative; }
  .tree-list > li::before { content: ""; position: absolute; left: -26px; top: 12px; width: 20px; height: 3px; background: var(--tree); }
  .tree-list b { display: block; margin-bottom: 8px; font: 600 .8rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
  .tree-list ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .tree-list ul li { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .85rem; }
}

/*  THEME EXPLOSION */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; } ::view-transition-new(root) { z-index: 2; }
.burst { position: fixed; inset: 0; z-index: 999; pointer-events: none; overflow: hidden; view-transition-name: burst; }
::view-transition-group(burst) { animation: none; z-index: 3; } ::view-transition-old(burst) { display: none; } ::view-transition-new(burst) { animation: none; }
.burst > * { position: absolute; left: var(--x); top: var(--y); }
.burst .shock { width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 4px solid var(--accent); animation: shock 1.1s cubic-bezier(.16,.84,.3,1) forwards; }
.burst .shock.s2 { border-color: var(--accent-2); border-width: 2px; animation-delay: .12s; }
.burst .flash { width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: radial-gradient(circle, #fff, var(--accent) 40%, transparent 70%); animation: flash .7s ease-out forwards; }
.burst b { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 0 100% 0 100%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); opacity: 0; animation: shard 1.2s cubic-bezier(.16,.84,.3,1) var(--dl) forwards; }
@keyframes shock { from { transform: scale(.2); opacity: 1; } to { transform: scale(60); opacity: 0; } }
@keyframes flash { from { transform: scale(.1); opacity: 1; } to { transform: scale(14); opacity: 0; } }
@keyframes shard { 0% { opacity: 1; transform: translate(0,0) rotate(0) scale(var(--s)); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(0); } }

/*  TIMELINE  */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2), var(--accent-3), transparent); }
.job { position: relative; padding: 24px 26px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .3s, transform .3s; }
.job:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); transform: translateX(4px); }
.job::before { content: ""; position: absolute; left: -34px; top: 32px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.job:first-child::before { background: var(--accent); }
.job-date { font: 500 .78rem var(--font-mono); color: var(--accent); }
.job h3 { font-size: 1.35rem; margin: 6px 0 2px; }
.job .company { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.job .company b { color: var(--text); font-weight: 600; }
.job ul { display: grid; gap: 8px; }
.job li { position: relative; padding-left: 20px; font-size: .93rem; color: var(--muted); }
.job li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }
.job .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.job .tags span { padding: 3px 10px; border-radius: 8px; border: 1px solid var(--border); font: .72rem var(--font-mono); }

/*  SKILLS */
.marquee { overflow: hidden; margin: 0 -32px 30px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { padding: 10px 22px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: 500 .95rem var(--font-mono); white-space: nowrap; }
@keyframes scroll { to { transform: translateX(-50%); } }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 24px; transition: .3s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.bento .card { grid-column: span var(--span, 1); position: relative; overflow: hidden; }
.bento .card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%); opacity: 0; transition: .3s; pointer-events: none; }
.bento .card:hover::before { opacity: 1; }
.bento h3 { font-size: 1rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bento h3 .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: var(--on-accent); font: 700 .9rem var(--font-mono); }
.pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pills li { padding: 4px 12px; border-radius: 8px; background: var(--surface-2); font: .8rem var(--font-mono); }

/*  EDUCATION */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.edu-date { font: 500 .8rem var(--font-mono); color: var(--accent); }
.edu h3 { font-size: 1.25rem; margin: 8px 0 4px; }
.edu ul { margin-top: 14px; display: grid; gap: 8px; font-size: .92rem; color: var(--muted); }
.edu li { padding-left: 18px; position: relative; } .edu li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.edu li b { color: var(--text); }
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 18px; }
.cert { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font-size: .88rem; transition: .25s; }
.cert:hover { transform: translateY(-3px); border-color: var(--accent); }
.cert i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-style: normal; font-size: .85rem; }

/*  CONTACT  */
.contact-card { position: relative; text-align: center; padding: clamp(36px, 7vw, 80px) 24px; border-radius: 28px; border: 1px solid var(--border); overflow: hidden;
  background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), radial-gradient(50% 60% at 100% 100%, color-mix(in srgb, var(--accent-3) 16%, transparent), transparent 70%), var(--surface); }
.contact-card h3 { font-size: clamp(1.8rem, 5vw, 3.4rem); margin-bottom: 18px; }
.contact-card em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-card p { max-width: 54ch; margin: 0 auto 28px; color: var(--muted); }
.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; margin-top: 30px; font: 500 .9rem var(--font-mono); }
.socials a { color: var(--muted); border-bottom: 1px solid transparent; transition: .2s; } .socials a:hover { color: var(--accent); border-color: var(--accent); }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; max-width: 1180px; margin: 50px auto 0; padding: 26px clamp(16px, 4vw, 32px) 40px; border-top: 1px solid var(--border); font-size: .85rem; }

/*  PALETTE / TOAST  */
.palette { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding-top: 14vh; background: rgba(3,4,10,.6); backdrop-filter: blur(6px); }
.palette[hidden] { display: none; }
.palette-box { width: min(600px, 92vw); border: 1px solid var(--border); border-radius: 18px; background: var(--bg-2); box-shadow: 0 40px 100px -20px rgba(0,0,0,.8); overflow: hidden; animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
#paletteInput { width: 100%; padding: 18px 22px; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: 1rem var(--font-body); outline: none; }
#paletteList { max-height: 340px; overflow-y: auto; padding: 8px; }
#paletteList li { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: 10px; cursor: pointer; font-size: .93rem; }
#paletteList li small { font: .72rem var(--font-mono); color: var(--muted); }
#paletteList li.sel { background: var(--surface-2); color: var(--accent); }
.palette-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: .75rem; color: var(--muted); }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 30px); opacity: 0; z-index: 300; padding: 12px 22px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .9rem; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/*  RESPONSIVE  */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; } .about-photo { max-width: 320px; margin: 0 auto 10px; }
  .bento { grid-template-columns: repeat(2, 1fr); } .bento .card { grid-column: span min(var(--span, 1), 2); }
  .project.featured { grid-column: span 1; } .edu-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .kbd-btn { display: none; } .burger { display: grid; }
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; padding: 14px; background: var(--bg-2); border-bottom: 1px solid var(--border); transform: translateY(-120%); transition: transform .35s; }
  .nav-links.open { transform: none; } .nav-links a { padding: 14px; font-size: 1rem; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; } .bento .card { grid-column: span 1; }
  .project-grid { grid-template-columns: 1fr; } .section-head h2 { white-space: normal; }
  .c1 { right: 0; } .c2 { left: 0; } .logo-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* translucent panels read cleanly over the live network */
.card, .job, .cert, .contact-card, .repo, .eyebrow, .hero-stats li { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (max-width: 560px) { .loupe__bar { flex-wrap: wrap; gap: 12px; } .loupe__meta { padding-left: 12px; } .loupe__content p { display: none; } }
