/* =========================================================
   Portfolio — Obsidian Emerald Frosted Bento Design System
   Space Grotesk Display + Plus Jakarta Sans Body + JetBrains Mono
   Zero plants, zero domes — high-contrast frosted glassmorphism & GSAP scroll choreography.
   ========================================================= */

:root {
  --display: 'Space Grotesk', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: var(--display);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --accent: #34d399;
  --accent-bright: #4ade80;
  --accent-deep: #15803d;
  --btn-grad: linear-gradient(135deg, #86efac 0%, #34d399 55%, #10b981 100%);
  --btn-grad-hover: linear-gradient(135deg, #bbf7d0 0%, #4ade80 55%, #22c55e 100%);
  --btn-grad-ink: #042211;
  --olive-btn: #153c27;
  --olive-btn-hover: #1c4e33;
  --olive-border: rgba(74, 222, 128, 0.36);

  --radius: 22px;
  --wrap: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .45s;

  /* Dark Fallback Tokens */
  --bg: #050c08;
  --bg-alt: #08130d;
  --surface: rgba(12, 28, 19, 0.62);
  --surface-2: rgba(18, 41, 28, 0.78);
  --glass-border: rgba(134, 239, 172, 0.16);
  --glass-border-top: rgba(209, 250, 229, 0.28);
  --glass-highlight: inset 0 1px 0 rgba(220, 255, 234, 0.12);

  --fg: #eef6f0;
  --fg-2: #b4cdbc;
  --fg-3: #80a38d;
  --line: rgba(134, 212, 160, 0.14);
  --line-2: rgba(134, 212, 160, 0.28);

  --shadow-sm: 0 2px 10px rgba(0, 4, 2, 0.45);
  --shadow: 0 18px 42px -12px rgba(0, 6, 3, 0.72);
  --shadow-lg: 0 32px 84px -20px rgba(0, 4, 2, 0.88);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 36%, transparent);
  --pad-sec: clamp(3.8rem, 7.5vw, 6.2rem);

  --border-w: 1px;
  --border-color: var(--glass-border);
  --card-radius: var(--radius);
  --icon-radius: 12px;
  --input-radius: 14px;
  --btn-radius: 999px;
  --chip-radius: 999px;
  --card-shadow: var(--glass-highlight), 0 18px 40px -16px rgba(0, 0, 0, 0.72);
  --card-hover-shadow: inset 0 1px 0 rgba(220, 255, 234, 0.22), 0 26px 56px -14px rgba(16, 185, 129, 0.16), 0 18px 36px -12px rgba(0, 0, 0, 0.78);
  --card-hover-lift: -4px;

  --heading-font: var(--display);
  --heading-weight: 700;
  --heading-transform: none;
  --heading-spacing: -0.025em;
  --display-spacing: -0.03em;
  --kicker-color: var(--accent);
  --kicker-transform: uppercase;
  --kicker-spacing: 0.14em;
  --btn-weight: 600;
  --btn-text-transform: none;

  --nav-bg: rgba(5, 12, 8, 0.72);
  --nav-blur: saturate(165%) blur(20px);
  --nav-height: 72px;
  --spline-stroke: rgba(52, 211, 153, 0.36);
  --spline-glow: rgba(74, 222, 128, 0.45);
  --orb-1: rgba(34, 197, 94, 0.18);
  --orb-2: rgba(16, 185, 129, 0.14);
  --body-bg-image:
    radial-gradient(840px 580px at 82% 8%, rgba(34, 197, 94, 0.16), transparent 64%),
    radial-gradient(720px 540px at 14% 42%, rgba(16, 185, 129, 0.12), transparent 66%),
    radial-gradient(900px 620px at 54% 88%, rgba(21, 128, 61, 0.14), transparent 70%);
  --glow: color-mix(in srgb, var(--accent) 45%, transparent);
}

[data-density="compact"] { --pad-sec: clamp(2.8rem, 5.5vw, 4.5rem); --wrap: 1260px; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
}

body {
  position: relative;
  overflow-x: clip;
  max-width: 100%;
  margin: 0;
  font-family: var(--font);
  font-size: clamp(15.5px, .35vw + 14.5px, 16.5px);
  line-height: 1.66;
  color: var(--fg);
  background-color: var(--bg);
  background-image: var(--body-bg-image);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

body[data-reduced-motion="1"] *,
body[data-reduced-motion="1"] *::before,
body[data-reduced-motion="1"] *::after {
  animation-duration: .001ms !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

h1, h2, h3, h4 {
  margin: 0 0 .45em;
  line-height: 1.12;
  font-family: var(--heading-font);
  letter-spacing: var(--heading-spacing);
  font-weight: var(--heading-weight);
  text-transform: var(--heading-transform);
  color: var(--fg);
}
h1 { font-size: clamp(2.05rem, 4.9vw, 3.95rem); letter-spacing: var(--display-spacing); overflow-wrap: break-word; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.65rem); }
h3 { font-size: clamp(1.18rem, 1.55vw, 1.38rem); }
p  { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
a  { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.5rem); position: relative; z-index: 2; }
.i { flex: none; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--accent-deep); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }

/* ---------------- Ambient Aura Orbs + GreenBank Animated Scroll Spline ---------------- */
.ambient-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aura-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  will-change: transform;
}
.aura-orb.orb-1 {
  width: clamp(320px, 42vw, 620px);
  height: clamp(320px, 42vw, 620px);
  top: -8%;
  right: -6%;
  background: var(--orb-1);
}
.aura-orb.orb-2 {
  width: clamp(280px, 36vw, 520px);
  height: clamp(280px, 36vw, 520px);
  top: 42%;
  left: -10%;
  background: var(--orb-2);
}
.aura-orb.orb-3 {
  width: clamp(300px, 38vw, 540px);
  height: clamp(300px, 38vw, 540px);
  bottom: -10%;
  right: 12%;
  background: var(--orb-1);
  opacity: 0.7;
}
.scroll-spline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}
#scrollTracePath {
  filter: drop-shadow(0 0 10px var(--spline-glow));
}
.spline-star {
  opacity: 0.78;
  transform-box: fill-box;
  transform-origin: center;
  animation: starTwinkle 4.5s ease-in-out infinite;
}
.spline-star.star-2 { animation-delay: 1.2s; }
.spline-star.star-3 { animation-delay: 2.4s; }
.spline-star.star-4 { animation-delay: 3.1s; }
@keyframes starTwinkle {
  0%, 100% { transform: scale(0.85) rotate(0deg); opacity: 0.55; }
  50% { transform: scale(1.18) rotate(12deg); opacity: 0.95; }
}

/* ---------------- Frosted Glass Utility ---------------- */
.glass-bento {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  border: 1px solid var(--glass-border);
  border-top-color: var(--glass-border-top);
  box-shadow: var(--card-shadow);
}
.glass-pill {
  background: var(--surface);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
}

/* ---------------- Navbar ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.nav.stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-in { display: flex; align-items: center; gap: clamp(.5rem, 1.2vw, 1.15rem); height: var(--nav-height); }

.brand {
  display: inline-flex; align-items: center; gap: .52rem;
  font-family: var(--display); font-size: 1.24rem; font-weight: 700; letter-spacing: -.015em;
  margin-right: auto;
}
.brand-glyph {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border: 1px solid var(--olive-border);
  color: var(--accent-bright);
}
.brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.nav-links { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  position: relative; padding: .4rem .62rem; border-radius: 999px; font-size: .84rem;
  color: var(--fg-2); white-space: nowrap; font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
.nav-links a.active { color: var(--fg); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.nav-links a.active::after {
  content: ''; position: absolute; left: .75rem; right: .75rem; bottom: .12rem;
  height: 2px; border-radius: 2px; background: var(--accent-bright);
}

.nav-cta { display: flex; align-items: center; gap: .48rem; }

/* Bilingual EN / ID Toggle */
.lang-switch {
  display: inline-flex; align-items: center; gap: .15rem;
  padding: .22rem .38rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-family: var(--mono);
  font-size: .74rem;
}
.lang-btn {
  padding: .24rem .46rem;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg-3);
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.lang-btn:hover { color: var(--fg); }
.lang-btn.is-active {
  background: var(--btn-grad);
  color: var(--btn-grad-ink);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.lang-sep { color: var(--fg-3); opacity: 0.45; font-size: .7rem; user-select: none; }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  border: var(--border-w) solid var(--line-2); background: var(--surface); cursor: pointer;
  transition: border-color .2s, transform .2s, background .2s, box-shadow .2s;
}
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.mode-icon { display: grid; place-items: center; }
[data-mode="dark"] .mode-icon-dark { display: none; }
[data-mode="light"] .mode-icon-light { display: none; }

.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent-bright); transition: width .12s linear; }

/* ---------------- Buttons (Leafora Frosted Gradient Pill + Clean Glass) ---------------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--fg);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .58rem 1.15rem; border-radius: var(--btn-radius); border: var(--border-w) solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: .88rem; font-weight: var(--btn-weight); letter-spacing: .01em; cursor: pointer;
  text-transform: var(--btn-text-transform);
  white-space: nowrap;
  min-height: 40px;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }

.btn-grad,
.btn-primary {
  background: var(--btn-grad);
  color: var(--btn-grad-ink);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px -8px rgba(16, 185, 129, 0.42);
}
.btn-grad:hover,
.btn-primary:hover {
  background: var(--btn-grad-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 14px 32px -6px rgba(52, 211, 153, 0.55);
}

.btn-pill-glow {
  padding: .55rem .55rem .55rem 1.4rem;
  gap: .75rem;
}
.btn-arrow-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.14);
  transition: transform .25s var(--ease);
}
[data-theme="light"] .btn-arrow-badge {
  background: rgba(255, 255, 255, 0.22);
}
.btn-pill-glow:hover .btn-arrow-badge {
  transform: translateX(3px);
}

.btn-glass,
.btn-ghost {
  border-color: var(--glass-border);
  border-top-color: var(--glass-border-top);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--fg);
}
.btn-glass:hover,
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}
.btn-quiet { color: var(--fg-2); }
.btn-quiet:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
.btn-lg { padding: .76rem 1.45rem; font-size: .94rem; min-height: 46px; }
.btn-lg.btn-pill-glow { padding: .48rem .52rem .48rem 1.5rem; }
.btn-sm { padding: .42rem .92rem; font-size: .82rem; min-height: 36px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------------- Block 1: Hero Split + Frosted Live Bento Showcase ---------------- */
.hero {
  position: relative;
  padding: clamp(2.6rem, 5.5vw, 4.4rem) 0 clamp(2rem, 4vw, 3rem);
}
.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: center;
}
.hero-copy,
.hero-art,
.hero-bento-showcase,
.about-cloche-col,
.about-text,
.contact-left,
.contact-in > * {
  min-width: 0;
  max-width: 100%;
}
.eyebrow {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.05rem;
  max-width: 100%;
  padding: .36rem .88rem .36rem .64rem; border-radius: 999px;
  font-size: .8rem; font-weight: 500; letter-spacing: .02em; color: var(--fg-2);
  box-shadow: var(--shadow-sm);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); position: relative; }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent-bright); animation: pulse 2.2s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8 } 70%,100% { transform: scale(3.2); opacity: 0 } }

.hero h1 { display: flex; flex-direction: column; margin-bottom: 1.05rem; }
.hero-name {
  font-family: var(--mono);
  font-size: .28em;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  order: -1;
  margin-bottom: .55rem;
}
.hero-headline-wrap {
  position: relative;
  display: inline-block;
}
.hero-headline {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--fg);
}
.headline-accent-svg {
  display: block;
  width: min(320px, 78%);
  height: auto;
  margin-top: .15rem;
  opacity: 0.78;
}
.headline-accent-path {
  filter: drop-shadow(0 0 8px var(--spline-glow));
}
.lede { font-size: clamp(.98rem, 1.1vw, 1.07rem); color: var(--fg-2); max-width: 54ch; line-height: 1.68; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.65rem; }
.hero-social { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.45rem; }
.hero-social a {
  display: inline-flex; align-items: center; min-height: 34px; padding: .3rem .75rem; border-radius: 999px;
  font-size: .8rem; font-weight: 500; color: var(--fg-2);
  border: 1px solid var(--line); background: var(--surface);
  transition: all .2s;
}
.hero-social a:hover { color: var(--fg); border-color: var(--accent); background: var(--surface-2); }

/* Right Column: Frosted Bento Showcase */
.hero-bento-showcase {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  width: 100%;
  max-width: 530px;
  margin-inline: auto;
}
.system-console-window {
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.hero-bento-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.bento-mini {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-radius: 18px;
}
.bento-mini-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
  border: 1px solid var(--olive-border);
  color: var(--accent-bright);
  flex: none;
}
.bento-mini-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bento-mini-meta strong {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}
.bento-mini-meta span {
  font-size: .75rem;
  line-height: 1.32;
  color: var(--fg-3);
}

.console-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .72rem 1rem;
  background: color-mix(in srgb, var(--bg-alt) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.console-window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.w-dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-red { background: #ef4444; opacity: 0.85; }
.dot-yellow { background: #eab308; opacity: 0.85; }
.dot-green { background: #22c55e; opacity: 0.85; }

.console-tabs {
  display: flex;
  align-items: center;
  gap: .3rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.cloche-tab {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-3);
  font-size: .74rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s var(--ease);
}
.cloche-tab-num { font-family: var(--mono); font-size: .68rem; color: var(--accent); }
.cloche-tab:hover { color: var(--fg); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cloche-tab.is-active {
  background: var(--btn-grad);
  color: var(--btn-grad-ink);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}
.cloche-tab.is-active .cloche-tab-num { color: var(--btn-grad-ink); opacity: 0.8; }

.console-body { padding: 1rem; display: flex; flex-direction: column; }
.console-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  padding: .72rem 1rem;
  background: color-mix(in srgb, var(--bg-alt) 55%, transparent);
  border-top: 1px solid var(--line);
}

.specimen-status-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .55rem;
  font-family: var(--mono);
  font-size: .69rem;
  color: var(--fg-2);
}
.specimen-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 8px var(--accent-bright);
}
.specimen-code { font-weight: 600; letter-spacing: .04em; color: var(--fg); }
.specimen-latency { margin-left: auto; color: var(--accent); font-weight: 600; }

.specimen-screen {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  aspect-ratio: 16 / 9.2;
  background: #040b07;
  border: 1px solid var(--line);
}
.specimen-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease), opacity .25s ease;
}
.specimen-pulse-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.34), transparent);
  transform: translateX(-100%);
  pointer-events: none;
}
.system-console-window.is-pulsing .specimen-pulse-overlay {
  animation: clocheSweep .85s var(--ease-out);
}
@keyframes clocheSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.specimen-nodes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
  margin-top: .65rem;
  font-family: var(--mono);
  font-size: .7rem;
}
.s-node {
  flex: 1;
  text-align: center;
  padding: .3rem .42rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all .25s var(--ease);
}
.s-node.is-lit { border-color: var(--olive-border); color: var(--fg); }
.s-node.is-firing {
  background: var(--btn-grad);
  border-color: var(--accent-bright);
  color: var(--btn-grad-ink);
  font-weight: 600;
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.45);
}
.s-edge { color: var(--accent); font-size: .75rem; }

.specimen-caption {
  margin: .6rem 0 0;
  font-size: .8rem;
  line-height: 1.48;
  color: var(--fg-2);
}

.cloche-action-btn {
  background: var(--olive-btn);
  color: #ebfaee;
  border: 1px solid var(--olive-border);
}
.cloche-action-btn:hover { background: var(--olive-btn-hover); border-color: var(--accent); }

/* ---------------- Floating 4-Column Frosted Metrics Strip ---------------- */
.metrics-strip-sec {
  padding: 0 0 clamp(2.2rem, 4.5vw, 3.4rem);
  position: relative;
  z-index: 2;
}
.metrics-glass-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: 24px;
  overflow: hidden;
}
.metric-cell {
  padding: clamp(1.15rem, 2.2vw, 1.65rem) clamp(1rem, 2vw, 1.6rem);
  text-align: center;
  position: relative;
}
.metric-cell + .metric-cell::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: var(--line);
}
.metric-num {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.metric-lbl {
  margin-top: .32rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--accent);
}

/* ---------------- Infinite Tech Stack Marquee ---------------- */
.marquee-sec {
  padding: .6rem 0 clamp(2.2rem, 4vw, 3.2rem);
  position: relative;
  z-index: 2;
}
.marquee-track-wrap {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 36s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  padding-right: clamp(1rem, 2.4vw, 2rem);
}
.mq-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .48rem 1.05rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--fg-2);
  white-space: nowrap;
}
.mq-item .i {
  color: var(--accent);
}
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------------- Sections ---------------- */
main, .hero, .marquee-sec, .metrics-strip-sec, .sec { overflow-x: clip; max-width: 100%; }
.sec { padding: var(--pad-sec) 0; position: relative; z-index: 2; }
.sec.alt {
  background: color-mix(in srgb, var(--bg-alt) 68%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sec-head { margin-bottom: clamp(1.6rem, 3.2vw, 2.5rem); max-width: 54ch; }
.kicker {
  margin: 0 0 .45rem;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: var(--kicker-spacing);
  text-transform: var(--kicker-transform);
  color: var(--kicker-color);
}
.sec-head h2 { margin: 0; }
.prose { color: var(--fg-2); max-width: 64ch; }
.prose h3, .prose h4 { color: var(--fg); margin: 1.35em 0 .45em; font-family: var(--display); font-size: 1.24rem; }
.prose > :first-child { margin-top: 0; }
.prose ul { margin: .8rem 0 0; display: grid; gap: .42rem; padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 1.15rem; color: var(--fg-2); font-size: .95rem; }
.prose ul li::before { content: ''; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------------- Block 2: Layered Glass Stack + About Split ---------------- */
.about-in {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2.2rem, 5vw, 4.5rem);
  align-items: center;
}
.glass-layer-stack {
  position: relative;
  width: 100%;
  max-width: 450px;
  padding-top: 38px;
  margin-inline: auto;
}
.stack-card-back,
.stack-card-mid {
  position: absolute;
  left: 14px;
  right: 14px;
  border-radius: 20px;
  padding: .75rem 1.05rem;
  transition: transform .4s var(--ease);
}
.stack-card-back {
  top: 0;
  background: color-mix(in srgb, var(--accent-deep) 35%, var(--surface));
  transform: translateY(0) scale(0.92) rotate(-2deg);
  opacity: 0.72;
}
.stack-card-mid {
  top: 18px;
  left: 7px;
  right: 7px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  transform: translateY(0) scale(0.96) rotate(1deg);
  opacity: 0.88;
}
.glass-layer-stack:hover .stack-card-back { transform: translateY(-8px) scale(0.93) rotate(-3deg); }
.glass-layer-stack:hover .stack-card-mid { transform: translateY(-4px) scale(0.97) rotate(1.5deg); }
.layer-chip {
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .08em;
}
.layer-mono {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--fg);
  opacity: 0.88;
}

.about-stack-window {
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.stack-window-top {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .78rem 1rem;
  background: color-mix(in srgb, var(--bg-alt) 68%, transparent);
  border-bottom: 1px solid var(--line);
}
.stack-window-title { font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .06em; color: var(--fg); }
.stack-status-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 600;
  padding: .16rem .48rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: var(--accent-bright);
  border: 1px solid rgba(52, 211, 153, 0.38);
}
.stack-window-body { padding: 1.15rem 1rem; display: flex; flex-direction: column; }
.stack-window-footer {
  padding: .68rem 1rem;
  background: color-mix(in srgb, var(--bg-alt) 52%, transparent);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--fg-3);
  letter-spacing: .08em;
  text-align: center;
}
.console-matrix { display: flex; flex-direction: column; gap: .62rem; }
.console-matrix .c-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  padding-bottom: .46rem;
  border-bottom: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: .75rem;
}
.console-matrix .c-k { color: var(--accent); font-weight: 600; letter-spacing: .05em; font-size: .69rem; }
.console-matrix .c-v { color: var(--fg); font-weight: 500; text-align: right; }
.console-pills { display: flex; flex-wrap: wrap; gap: .42rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.orbit-pill {
  display: inline-flex; align-items: center; padding: .24rem .62rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--glass-border);
  color: var(--fg-2); font-family: var(--mono); font-size: .68rem;
}

.spotlight-badge-row { display: inline-flex; align-items: center; gap: .65rem; margin-bottom: .5rem; }
.spotlight-icon-pill {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--olive-btn); border: 1px solid var(--olive-border); color: #d8efe0;
}
.spotlight-kicker { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.spotlight-metric {
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: .85rem;
  line-height: 1.05;
}
.about-text .sec-head { margin-bottom: 1rem; }
.about-cta-row { margin-top: 1.55rem; }
.about-photo { margin: 1.2rem 0 0; border-radius: var(--card-radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1.65rem 0 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
}
.facts > div { background: var(--surface-2); padding: .92rem 1.05rem; }
.facts dt { font-size: .71rem; text-transform: uppercase; letter-spacing: .09em; color: var(--fg-3); margin-bottom: .22rem; font-family: var(--mono); }
.facts dd { margin: 0; font-weight: 600; font-size: .92rem; color: var(--fg); }

/* ---------------- Block 3: Frosted Project Bento Cards + Category Filters ---------------- */
.projects-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: clamp(1.6rem, 3.2vw, 2.4rem);
}
.projects-head-row .sec-head { margin-bottom: 0; }

.project-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 38px;
  padding: .36rem .9rem .36rem .45rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--fg-2);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .22s var(--ease);
}
.filter-ic {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.filter-pill:hover { color: var(--fg); border-color: var(--accent); }
.filter-pill.is-active {
  background: var(--btn-grad);
  color: var(--btn-grad-ink);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 6px 20px -6px rgba(16, 185, 129, 0.45);
}
.filter-pill.is-active .filter-ic {
  background: rgba(0, 0, 0, 0.14);
  color: var(--btn-grad-ink);
}
.filter-count {
  padding: .1rem .44rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  font-family: var(--mono);
  font-size: .7rem;
}

.grid { display: grid; gap: clamp(1.1rem, 2.2vw, 1.55rem); }
.grid.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cards.three,
.services-grid { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }

.grid.cards.botanical-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.1vw, 1.5rem);
}
.botanical-cards .project.featured { grid-column: span 1; }
.botanical-card[hidden] { display: none !important; }

.card {
  border-radius: var(--card-radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover {
  transform: translateY(var(--card-hover-lift));
  box-shadow: var(--card-hover-shadow);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.botanical-card {
  border-radius: 24px;
  padding: 1.1rem 1.2rem 1.35rem;
  position: relative;
  overflow: hidden;
}
.botanical-card .card-media.specimen-frame {
  position: relative;
  margin: 0 0 .45rem;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10.5;
  background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
  border: 1px solid var(--line);
}
.botanical-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .3s ease;
}
[data-theme="dark"] .specimen-screen img,
[data-theme="dark"] .botanical-card .card-media img {
  filter: brightness(0.93) contrast(1.03);
}
.botanical-card:hover .card-media img { transform: scale(1.04); filter: brightness(1) contrast(1); }
.specimen-index {
  position: absolute;
  top: .6rem;
  right: .6rem;
  padding: .18rem .52rem;
  border-radius: 999px;
  background: rgba(5, 14, 9, 0.8);
  border: 1px solid var(--olive-border);
  color: #d8f3df;
  font-family: var(--mono);
  font-size: .68rem;
  backdrop-filter: blur(8px);
}
.specimen-code-preview {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #040c08;
  padding: .75rem .9rem;
  font-family: var(--mono);
  overflow: hidden;
}
[data-theme="light"] .specimen-code-preview { background: #ebf3ed; }
[data-theme="light"] .specimen-code-preview .c-kw { color: #9d174d; }
[data-theme="light"] .specimen-code-preview .c-cls { color: #1e40af; }
[data-theme="light"] .specimen-code-preview .c-fn { color: #0369a1; }
[data-theme="light"] .specimen-code-preview .c-comment { color: #047857; opacity: 0.9; }
[data-theme="light"] .specimen-code-preview .c-str { color: #9a3412; }
[data-theme="light"] .specimen-code-preview .c-val { color: #6d28d9; }
.code-preview-top {
  display: flex; align-items: center; gap: .55rem;
  margin-bottom: .55rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}
.code-dots { display: flex; gap: 5px; }
.code-dot { width: 7px; height: 7px; border-radius: 50%; }
.code-dot.dot-r { background: #ef4444; opacity: 0.8; }
.code-dot.dot-y { background: #eab308; opacity: 0.8; }
.code-dot.dot-g { background: #22c55e; opacity: 0.8; }
.code-title { font-size: .67rem; color: var(--fg-3); letter-spacing: .04em; }
.code-preview-body { font-size: .71rem; line-height: 1.52; color: var(--fg-2); }
.code-preview-body p { margin: 0; }
.code-preview-body .c-indent { padding-left: 1rem; }
.code-preview-body .c-indent2 { padding-left: 2rem; }
.code-preview-body .c-kw { color: #f472b6; font-weight: 600; }
.code-preview-body .c-cls { color: #60a5fa; font-weight: 600; }
.code-preview-body .c-fn { color: #38bdf8; }
.code-preview-body .c-comment { color: #6ee7b7; opacity: 0.78; font-style: italic; }
.code-preview-body .c-str { color: #fde047; }
.code-preview-body .c-val { color: #c084fc; }
.specimen-code-preview .schematic-badge {
  position: absolute; bottom: 8px; right: 10px; z-index: 2;
  padding: .2rem .58rem; border-radius: 999px;
  background: rgba(10, 26, 17, 0.88);
  border: 1px solid var(--olive-border);
  color: #bce4c8; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
}

.card-body { display: flex; flex-direction: column; gap: .52rem; flex: 1; }
.card h3 { margin: 0; font-family: var(--display); font-size: 1.24rem; font-weight: 700; line-height: 1.2; }
.card-sub { margin: 0; color: var(--accent); font-size: .86rem; font-weight: 600; }
.card-text { margin: 0; color: var(--fg-2); font-size: .9rem; line-height: 1.62; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; }
.card-head h3 { flex: 1; }
.card-year { font-family: var(--mono); font-size: .74rem; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.card-company { margin: 0; font-family: var(--mono); font-size: .73rem; font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: .06em; }

.card-price { margin: auto 0 0; padding-top: .45rem; font-family: var(--mono); font-size: .84rem; font-weight: 600; color: var(--accent); }
.svc-ic {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
  border: 1px solid var(--olive-border);
  color: var(--accent-bright);
  box-shadow: 0 4px 14px -4px rgba(52, 211, 153, 0.28);
}

.chip { display: flex; flex-wrap: wrap; gap: .34rem; margin-top: .42rem; }
.chip li {
  padding: .22rem .58rem; border-radius: var(--chip-radius); font-size: .75rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--fg-2);
  transition: all .2s;
}
.chip li:hover { border-color: var(--accent); color: var(--fg); }
.chip.sm li { font-size: .72rem; padding: .16rem .5rem; }

.links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .32rem; }
.links a { display: inline-flex; align-items: center; gap: .28rem; font-size: .8rem; font-weight: 500; color: var(--fg-2); transition: color .2s, gap .2s; }
.links a:hover { color: var(--accent); gap: .42rem; }

.card.openable { cursor: pointer; }
.card-more {
  display: inline-flex; align-items: center; justify-content: center; gap: .42rem;
  margin-top: auto; padding: .48rem 1.05rem; min-height: 38px;
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  color: var(--fg);
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  align-self: flex-start;
  transition: gap .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.card-body > :has(+ .card-more) { margin-bottom: .35rem; }
.botanical-card .card-more.pill-cta { margin-top: auto; width: 100%; }
.card.openable:hover .card-more,
.card-more:hover {
  gap: .6rem;
  background: var(--btn-grad);
  color: var(--btn-grad-ink);
  border-color: transparent;
}
.card-more .i { transition: transform .2s var(--ease); }
.card.openable:hover .card-more .i,
.card-more:hover .i { transform: translateX(4px); }

/* ---------------- Experience Accordion Timeline (#experience) ---------------- */
.timeline { position: relative; padding-left: 1.9rem; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1.5px; background: linear-gradient(var(--accent-bright), var(--line)); }
.tl-item {
  position: relative;
  border-radius: var(--card-radius);
  padding: 1.35rem 1.45rem 1.35rem 1.85rem;
  margin-bottom: 1rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-item:hover { box-shadow: var(--card-hover-shadow); border-color: color-mix(in srgb, var(--accent) 38%, transparent); }
.tl-marker {
  position: absolute; left: -1.9rem; top: 1.75rem; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2.5px solid var(--accent-bright);
  box-shadow: 0 0 0 4px var(--bg);
  transition: transform .25s var(--ease);
}
.tl-item:hover .tl-marker { transform: scale(1.25); }
.tl-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem .85rem;
  cursor: pointer;
}
.tl-top h3 { margin: 0; font-family: var(--display); font-size: 1.28rem; font-weight: 700; flex: 1 1 280px; }
.tl-at { color: var(--accent); font-weight: 600; }
.tl-head-meta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.tl-dates { display: inline-flex; align-items: baseline; gap: .5rem; font-family: var(--mono); font-size: .78rem; color: var(--fg-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-dates em { font-style: normal; font-size: .72rem; padding: .12rem .48rem; border-radius: var(--chip-radius); background: var(--surface-2); border: 1px solid var(--line); }
.tl-toggle-btn {
  display: inline-flex; align-items: center; gap: .32rem;
  padding: .3rem .72rem; min-height: 32px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: .71rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.tl-toggle-btn:hover { color: var(--fg); border-color: var(--accent); }
.tl-toggle-btn .i { transition: transform .3s var(--ease); }
.tl-item.is-expanded .tl-toggle-btn .i { transform: rotate(180deg); }

.tl-meta { display: flex; flex-wrap: wrap; gap: 1rem; margin: .35rem 0 .55rem; font-size: .84rem; color: var(--fg-3); }
.tl-meta a { display: inline-flex; align-items: center; gap: .3rem; }
.tl-meta a:hover { color: var(--accent); }
.tl-sum { color: var(--fg-2); font-size: .94rem; margin-bottom: 0; }

/* Smooth Accordion Panel */
.tl-accordion-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .36s var(--ease), opacity .3s ease, margin-top .3s ease;
  margin-top: .8rem;
  opacity: 1;
}
.tl-item.is-collapsed .tl-accordion-panel {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}
.tl-accordion-inner {
  overflow: hidden;
  min-height: 0;
}
.tl-accordion-inner .card-more { margin-top: .9rem; }

.bullets { margin: .5rem 0 0; display: grid; gap: .45rem; }
.bullets li { position: relative; padding-left: 1.15rem; color: var(--fg-2); font-size: .93rem; }
.bullets li::before { content: ''; position: absolute; left: 0; top: .64em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.tl-projects { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .65rem; }
.tl-projects li a {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 500; color: var(--accent);
  padding: .26rem .68rem; border-radius: var(--chip-radius);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  transition: background .2s, border-color .2s, gap .2s;
}
.tl-projects li a:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); border-color: var(--accent); gap: .48rem; }

/* ---------------- Skills, Quotes, Education, Awards ---------------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr)); gap: 1.1rem; }
.skill-group { border-radius: var(--card-radius); padding: 1.3rem 1.4rem; }
.skill-group h3 { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: .82rem; }

.card.quote blockquote { margin: 0; font-size: .96rem; line-height: 1.65; color: var(--fg); }
.card.quote figcaption { display: flex; align-items: center; gap: .75rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); }
.card.quote figcaption img, .ava { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--btn-grad); color: var(--btn-grad-ink); font-weight: 700; font-size: .82rem; }
.card.quote figcaption strong { display: block; font-size: .88rem; color: var(--fg); }
.card.quote figcaption em { display: block; font-style: normal; font-size: .78rem; color: var(--fg-3); }

.edu-list { display: grid; gap: .75rem; }
.edu-item {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.25rem 1.45rem;
  border-radius: var(--card-radius);
  transition: border-color .2s, transform .2s;
}
.edu-item:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateX(3px); }
.edu-main { flex: 1; }
.edu-main h3 { margin: 0; font-family: var(--display); font-size: 1.24rem; font-weight: 700; }
.edu-main .card-sub { margin: .2rem 0 0; }
.edu-main .card-text { margin: .38rem 0 0; }
.edu-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex: none; }
.edu-grade { font-family: var(--mono); font-size: .78rem; color: var(--accent); font-weight: 600; }

.awards { display: grid; gap: .65rem; }
.awards li {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.25rem;
  border-radius: var(--card-radius);
  transition: border-color .2s, transform .2s;
}
.awards li:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateX(3px); }
.aw-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--olive-btn); border: 1px solid var(--olive-border); color: #d8efe0; flex: none; }
.aw-t { flex: 1; font-weight: 500; font-size: .94rem; }
.aw-t em { display: block; font-style: normal; color: var(--fg-3); font-weight: 400; font-size: .82rem; margin-top: .12rem; }
.aw-y { font-family: var(--mono); font-size: .8rem; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------------- Block 4: Contact + Floating Scroll Top Pill ---------------- */
.contact {
  background: color-mix(in srgb, var(--bg-alt) 72%, transparent);
  border-top: 1px solid var(--line);
}
.contact-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  gap: clamp(2.2rem, 5vw, 4.2rem);
  align-items: start;
}
.contact-emblem-block {
  display: inline-flex;
  align-items: center;
  gap: .95rem;
  padding: .75rem 1.15rem;
  margin-bottom: 1.4rem;
  border-radius: 18px;
}
.contact-emblem-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--olive-btn); border: 1px solid var(--olive-border); color: #daf2e1;
}
.telemetry-tag { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; color: var(--accent); }
.telemetry-digits { font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; color: var(--fg); font-variant-numeric: tabular-nums; }
.telemetry-digits small { font-family: var(--mono); font-size: .66rem; font-weight: 500; color: var(--fg-3); margin-left: .15rem; }

.contact-list { display: grid; gap: .72rem; margin: 1.5rem 0; }
.contact-list li { display: flex; align-items: center; gap: .65rem; color: var(--fg-2); font-size: .94rem; }
.contact-list .i { color: var(--accent); }
.contact-list a:hover { color: var(--accent); }
.soc { display: flex; flex-wrap: wrap; gap: .8rem; }
.soc a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.avail {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .42rem .9rem; border-radius: 999px;
  background: color-mix(in srgb, #22c55e 14%, transparent);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--fg); font-size: .84rem; font-weight: 500; margin-bottom: 1.4rem;
}
.contact-cta-row { display: flex; flex-wrap: wrap; gap: .6rem; }

.form { padding: 1.75rem; border-radius: 24px; }
.form h3 { margin-bottom: 1.2rem; font-family: var(--display); font-size: 1.45rem; }
.field { position: relative; margin-bottom: .95rem; }
.field input, .field textarea {
  width: 100%; padding: 1.08rem .95rem .55rem; font: inherit; font-size: .94rem;
  color: var(--fg); background: color-mix(in srgb, var(--bg) 52%, var(--surface));
  border: var(--border-w) solid var(--line-2);
  border-radius: var(--input-radius); resize: vertical;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 112px; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--surface-2);
}
.field label {
  position: absolute; left: .95rem; top: .94rem; font-size: .9rem; color: var(--fg-3);
  pointer-events: none; transition: all .2s var(--ease); transform-origin: left top;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: .38rem; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-family: var(--mono);
}
.hp { position: absolute; left: -9999px; }
.form-msg { margin: .8rem 0 0; font-size: .88rem; min-height: 1.2em; }
.form-msg.ok { color: var(--accent-bright); }
.form-msg.err { color: #f87171; }
.form-note { margin: .6rem 0 0; font-size: .78rem; color: var(--fg-3); text-align: center; }

.scroll-top-pill {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-bright);
  cursor: pointer;
  transition: transform .22s var(--ease), opacity .25s ease;
}
.scroll-top-pill:hover { transform: translateY(-3px); border-color: var(--accent); }
.scroll-top-pill[hidden] { display: none; }

/* ---------------- Project & Experience Modals ---------------- */
body.modal-open { overflow: hidden; }
.pmodal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: clamp(.8rem, 3vw, 2.2rem); background: rgba(3, 10, 6, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: pfade .18s var(--ease-out);
}
.pmodal[hidden] { display: none; }
@keyframes pfade { from { opacity: 0 } }

.pmodal-card {
  width: min(900px, 100%); max-height: min(90vh, 940px); display: flex; flex-direction: column;
  background: var(--surface-2);
  border-radius: var(--card-radius); box-shadow: var(--shadow-lg); overflow: hidden;
  animation: ppop .22s var(--ease-out);
}
@keyframes ppop { from { opacity: 0; transform: translateY(10px) scale(.985) } }

.pmodal-head {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.35rem 1.5rem 1.05rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-alt) 65%, var(--surface));
}
.pmodal-head h3 { margin: 0; font-family: var(--display); font-size: clamp(1.38rem, 2.4vw, 1.85rem); }
.pmodal-year { margin: 0 0 .25rem; font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.pmodal-sub { margin: .3rem 0 0; color: var(--fg-2); font-size: .94rem; }
.pmodal-x {
  flex: none; margin-left: auto; width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--fg-2); font-size: 1.35rem; line-height: 1; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.pmodal-x:hover { background: var(--btn-grad); color: var(--btn-grad-ink); border-color: transparent; }

.pmodal-body { padding: 1.5rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.pmodal-body > :first-child { margin-top: 0; }
.pmodal-cover { margin: 0 0 1.25rem; }
.pmodal-cover img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }

.rt-img { margin: 1.3rem 0; }
.rt-img img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }
.rt a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rt strong { color: var(--fg); font-weight: 600; }

.pgal { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; margin-top: 1.4rem; }
.pgal-item { margin: 0; }
.pgal-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; }
.pgal-item figcaption { margin-top: .45rem; font-size: .8rem; color: var(--fg-3); }

.pmodal-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
  padding: 1rem 1.5rem; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-alt) 65%, var(--surface));
}
.exp-summary {
  color: var(--fg-2); font-size: .95rem; line-height: 1.65;
  padding: .95rem 1.15rem; margin-bottom: 1rem;
  background: var(--bg-alt); border-radius: 14px; border: 1px solid var(--line);
}
.exp-highlights { margin: 0; padding: 0; list-style: none; display: grid; gap: .52rem; }
.exp-highlights li { position: relative; padding-left: 1.3rem; color: var(--fg-2); font-size: .92rem; line-height: 1.58; }
.exp-highlights li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pmodal-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-left: auto; }

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(3, 10, 6, 0.90); backdrop-filter: blur(8px);
  padding: clamp(.8rem, 3vw, 2.2rem);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; box-shadow: var(--shadow-lg); }
.lightbox-x {
  position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px;
  display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--fg-2); font-size: 1.5rem; cursor: pointer;
}

/* ---------------- Theme Picker Popover ---------------- */
.theme-pick { position: relative; }
.theme-panel {
  position: absolute; top: calc(100% + .55rem); right: 0; z-index: 60;
  width: min(230px, calc(100vw - 2rem));
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: .7rem; overflow: hidden;
  backdrop-filter: blur(18px);
}
.theme-panel[hidden] { display: none; }
.theme-panel-h { margin: .15rem .35rem .5rem; font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.theme-list { display: grid; gap: .2rem; }
.theme-opt {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left;
  padding: .5rem .55rem; border: 0; border-radius: 10px; background: none;
  color: inherit; font: inherit; cursor: pointer; transition: background .15s;
}
.theme-opt:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.theme-opt.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.theme-dots { display: flex; flex: none; }
.theme-dots i { width: 14px; height: 14px; border-radius: 50%; margin-left: -5px; border: 1.5px solid var(--surface); }
.theme-dots i:first-child { margin-left: 0; }
.theme-opt-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.theme-opt-t strong { font-size: .84rem; font-weight: 600; }
.theme-check { flex: none; color: var(--accent); opacity: 0; }
.theme-opt.on .theme-check { opacity: 1; }
.theme-reset {
  display: block; width: 100%; margin-top: .45rem; padding: .48rem; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--fg-3); font: inherit; font-size: .78rem; cursor: pointer;
}
.theme-reset:hover { color: var(--accent); }

/* ---------------- Footer ---------------- */
.foot { border-top: 1px solid var(--line); padding: 2rem 0; position: relative; z-index: 2; }
.foot-in { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.foot p { margin: 0; font-size: .85rem; color: var(--fg-3); }
.foot-links { display: flex; gap: 1.1rem; }
.foot-links a:hover { color: var(--accent); }

/* ---------------- Reveal on scroll ---------------- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .65s var(--ease-out) var(--d, 0s), transform .65s var(--ease-out) var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------- Responsive Breakpoints ---------------- */
@media (max-width: 1024px) {
  .grid.cards.botanical-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-in, .about-in, .contact-in { grid-template-columns: minmax(0, 1fr); }
  .about-cloche-col { order: 2; }
  .about-text { order: 1; }
  .tl-head-meta { margin-left: 0; width: 100%; justify-content: space-between; }
  .metrics-glass-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-cell:nth-child(3)::before { display: none; }
  .metric-cell:nth-child(1),
  .metric-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .nav-in { height: auto; flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; row-gap: .5rem; }
  .brand { margin-right: 0; }
  .nav-cta { margin-left: auto; }
  .nav-links {
    display: flex; order: 3; width: 100%; margin: 0 -.35rem; padding: 0 .85rem .1rem .35rem;
    gap: .2rem; overflow-x: auto; scroll-snap-type: x proximity;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav-links a { scroll-snap-align: start; padding: .35rem .6rem; font-size: .82rem; }
}

@media (max-width: 640px) {
  .grid.cards,
  .grid.cards.three,
  .services-grid,
  .grid.cards.botanical-cards { grid-template-columns: minmax(0, 1fr); }
  .nav-cta .btn-ghost { display: none; }
  .hero-bento-subgrid { grid-template-columns: minmax(0, 1fr); }
  .console-titlebar { flex-wrap: wrap; gap: .5rem; }
  .console-tabs { width: 100%; flex-wrap: wrap; gap: .32rem; overflow-x: visible; }
  .specimen-nodes { flex-wrap: wrap; gap: .35rem; }
  .s-node { flex: 1 1 auto; }
  .s-edge { display: none; }
  .console-toolbar { flex-wrap: wrap; justify-content: flex-start; }
  .eyebrow { border-radius: 16px; font-size: .74rem; }
  .tl-top { align-items: flex-start; }
  .edu-item { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .edu-meta { align-items: flex-start; }
  .awards li { flex-wrap: wrap; align-items: flex-start; }
  .aw-t { flex: 1 1 200px; }
}

@media (max-width: 480px) {
  .nav-cta { gap: .32rem; }
  .nav-cta .btn-grad { padding: .38rem .75rem; font-size: .78rem; min-height: 34px; }
  .lang-switch { padding: .16rem .28rem; font-size: .69rem; }
  .icon-btn { width: 34px; height: 34px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn-lg { padding: .55rem 1rem; font-size: .86rem; min-height: 42px; }
  .hero-actions .btn-lg.btn-pill-glow { padding: .42rem .45rem .42rem 1.05rem; }
  .metrics-glass-bar { grid-template-columns: minmax(0, 1fr); }
  .metric-cell::before { display: none !important; }
  .metric-cell + .metric-cell { border-top: 1px solid var(--line); }
  .metric-cell:nth-child(1),
  .metric-cell:nth-child(2) { border-bottom: 0; }
}

/* ---------------- CV Print / Page ---------------- */
body.is-cv { background: #fff; color: #14141a; background-image: none; }
body.is-cv .nav { background: #fff; }
body.is-cv .ambient-canvas { display: none; }
body.is-cv { --fg: #14141a; --fg-2: #3a3a44; --fg-3: #6b6b78; --line: #e3e3e8; --bg-alt: #f6f6f8; }
.cv { max-width: 820px; margin: 0 auto; padding: 3.5rem clamp(1.15rem, 5vw, 2rem) 4rem; }
.cv-head { border-bottom: 2px solid #14141a; padding-bottom: 1.4rem; margin-bottom: 2rem; }
.cv-head h1 { font-size: 2.4rem; margin-bottom: .2rem; }
.cv-role { font-family: var(--display); font-weight: 500; font-size: 1.15rem; color: #55555f; margin: 0 0 .9rem; }
.cv-contact { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; font-size: .88rem; color: #55555f; }
.cv-contact a { border-bottom: 1px solid #ddd; }
.cv-sec { margin-bottom: 1.9rem; break-inside: avoid; }
.cv-sec > h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .13em; color: #6b6b78; border-bottom: 1px solid #e3e3e8; padding-bottom: .35rem; margin-bottom: .95rem; font-family: var(--font); }
.cv-entry { margin-bottom: 1.15rem; break-inside: avoid; }
.cv-entry:last-child { margin-bottom: 0; }
.cv-entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cv-entry-head h3 { font-size: 1.05rem; margin: 0; font-family: var(--font); }
.cv-dates { font-size: .82rem; color: #6b6b78; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cv-entry-sub { font-size: .9rem; color: #55555f; margin: .1rem 0 .35rem; }
.cv-entry p, .cv-entry li { font-size: .9rem; color: #3a3a44; }
.cv-entry ul { list-style: disc; padding-left: 1.1rem; display: grid; gap: .18rem; }
.cv-entry .chip li { background: #f4f4f7; border-color: #e6e6ec; color: #3a3a44; }
.cv-skill-row { display: flex; gap: .8rem; margin-bottom: .5rem; font-size: .9rem; }
.cv-skill-name { font-weight: 600; min-width: 140px; flex: none; }
.cv-skill-items { color: #3a3a44; }
.cv-stack { font-size: .85rem; color: #6b6b78; margin: .3rem 0 0; }
.cv-doi { font-size: .82rem; margin: .25rem 0 0; }
.cv-doi a { color: #166534; text-decoration: underline; text-underline-offset: 2px; }

@media print {
  body.is-cv { background: #fff; }
  .nav, .foot, .no-print, .ambient-canvas, .scroll-top-pill { display: none !important; }
  .tl-item.is-collapsed .tl-accordion-panel { grid-template-rows: 1fr; opacity: 1; }
  .cv { padding: 0; max-width: 100%; }
  a { text-decoration: none; color: inherit; }
  .cv-sec, .cv-entry { break-inside: avoid; }
  @page { margin: 14mm; }
}
