/* ---------- Tokens & reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --teal-400: #2dd4bf;
  --a: #7dd3fc;
  --a2: #a78bfa;
  --a3: #f472b6;
  --a4: #34d399;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-950);
  color: #fff;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.intro-active { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.text-gradient {
  background-image: linear-gradient(to right, var(--blue-500), var(--teal-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Intro ---------- */
.intro-container {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(180deg, #000 0%, #0f172a 100%);
  display: flex; justify-content: center; align-items: center; overflow: hidden;
  opacity: 0; transition: opacity .5s ease-out 1s;
}
.intro-container.ready { opacity: 1; transition: opacity .2s ease-in; }
.intro-container.fading-out {
  opacity: 0; transform: scale(.99);
  transition: opacity 2s ease-out, transform 2s ease-out;
  pointer-events: none;
}
.intro-container.gone { display: none; }

.intro-text-box {
  position: relative; color: #fff;
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(2rem, 8vw, 6rem); letter-spacing: .1em;
  text-align: center; padding: 2rem;
}
.words-container { display: flex; flex-wrap: wrap; justify-content: center; gap: .25em; }
.word { opacity: 0; transform: translateY(20px); transition: opacity .5s ease-out, transform .5s ease-out; }
.word.visible { opacity: 1; transform: translateY(0); }

.intro-text-box.glitching::before,
.intro-text-box.glitching::after {
  content: attr(data-text);
  position: absolute; inset: 0; padding: inherit;
  color: #fff; background-color: #000; overflow: hidden; opacity: 0;
}
.intro-text-box.glitching::before { animation: glitch-left 4s cubic-bezier(.25,.46,.45,.94) infinite; text-shadow: -2px 0 #f0f; z-index: 10; }
.intro-text-box.glitching::after { animation: glitch-right 4s cubic-bezier(.25,.46,.45,.94) infinite; text-shadow: 2px 0 #0ff; z-index: 10; }
.intro-text-box.glitching { animation: final-dissolve 4s ease-out forwards; }

@keyframes final-dissolve {
  0% { opacity: 1; filter: blur(0); }
  70% { opacity: 1; filter: blur(0); }
  90% { opacity: .7; filter: blur(2px); }
  100% { opacity: 0; filter: blur(10px); transform: scale(.9); }
}
@keyframes glitch-left {
  0%,2%,64%,66%,100% { clip-path: inset(0 100% 0 0); opacity: 0; }
  3% { clip-path: inset(20% 0 70% 0); opacity: .8; }
  5% { clip-path: inset(80% 0 5% 0); opacity: .7; }
  7% { clip-path: inset(50% 0 30% 0); opacity: .6; }
  9% { clip-path: inset(10% 0 85% 0); opacity: .8; }
  11% { clip-path: inset(90% 0 2% 0); opacity: .5; }
  65% { clip-path: inset(40% 0 40% 0); opacity: .9; }
}
@keyframes glitch-right {
  0%,2%,64%,66%,100% { clip-path: inset(0 0 0 100%); opacity: 0; }
  4% { clip-path: inset(70% 0 20% 0); opacity: .6; }
  6% { clip-path: inset(5% 0 80% 0); opacity: .8; }
  8% { clip-path: inset(30% 0 50% 0); opacity: .7; }
  10% { clip-path: inset(85% 0 10% 0); opacity: .5; }
  12% { clip-path: inset(2% 0 90% 0); opacity: .9; }
  65% { clip-path: inset(30% 0 55% 0); opacity: .7; }
}

/* ---------- Backgrounds & overlays ---------- */
.bg-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* The reference dye (x0.15) is tuned for a white page; boost it so it reads on the dark theme. */
.fluid-wrap { position: fixed; top: 0; left: 0; z-index: 0; pointer-events: none; mix-blend-mode: screen; filter: brightness(3.5) saturate(1.3); }
.fluid-wrap canvas { width: 100vw; height: 100vh; display: block; }

.site { position: relative; z-index: 1; opacity: 0; transition: opacity .5s ease; }
.site.show { opacity: 1; }

/* Reveal-on-scroll / on-load */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.from-left { transform: translateX(-20px); }
.reveal.from-right { transform: translateX(20px); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 1.25rem 0; transition: all .3s ease; opacity: 1;
}
.site-header.scrolled { background: rgba(17,24,39,.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: .75rem 0; }
.site-header.hidden { opacity: 0; pointer-events: none; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 1.25rem; font-weight: 700; }

.pill-nav {
  position: relative; display: none; align-items: center; gap: .25rem;
  padding: .25rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(17,24,39,.4);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.pill-nav button {
  position: relative; z-index: 1; padding: .5rem 1rem; border-radius: 999px;
  font-size: .875rem; font-weight: 500; color: var(--gray-300); transition: color .2s;
}
.pill-nav button:hover, .pill-nav button:focus-visible { color: #fff; outline: none; }
.pill-highlight {
  position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0;
  border-radius: 999px; background: rgba(30,41,59,.8); pointer-events: none;
  transition: left .35s cubic-bezier(.3,1.2,.4,1), top .35s cubic-bezier(.3,1.2,.4,1),
              width .35s cubic-bezier(.3,1.2,.4,1), height .35s cubic-bezier(.3,1.2,.4,1), opacity .2s;
}
.menu-btn { color: var(--gray-300); padding: .5rem; border-radius: 6px; }
.menu-btn:hover { color: #fff; }
.mobile-menu {
  display: none; flex-direction: column; gap: .5rem;
  position: fixed; top: 4rem; left: 0; right: 0; z-index: 40;
  background: rgba(17,24,39,.95); backdrop-filter: blur(12px);
  padding: 1rem; border-bottom: 1px solid var(--gray-800);
}
.mobile-menu.open { display: flex; }
.mobile-menu button { text-align: left; padding: .6rem .75rem; border-radius: 6px; color: var(--gray-300); }
.mobile-menu button:hover { color: #fff; background: rgba(59,130,246,.1); }
@media (min-width: 768px) {
  .pill-nav { display: flex; }
  .menu-btn, .mobile-menu { display: none !important; }
}

/* ---------- Scroll progress (terminal) ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding: .5rem .5rem; background: rgba(17,24,39,.9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-800);
  opacity: 0; transform: translateY(-20px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.scroll-progress.visible { opacity: 1; transform: none; pointer-events: auto; }
.sp-inner { max-width: 72rem; margin: 0 auto; display: flex; align-items: center; gap: .5rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.sp-pct { display: none; align-items: center; flex-shrink: 0; }
.sp-arrow { color: #4ade80; margin-right: .25rem; }
.sp-num { color: #facc15; }
.sp-track { position: relative; flex: 1; height: 1.25rem; background: var(--gray-800); border: 1px solid var(--gray-700); border-radius: 6px; overflow: hidden; }
.sp-fill {
  position: relative; height: 100%; width: 0%;
  background: linear-gradient(to right, var(--blue-600), var(--blue-400));
  transition: width .15s ease-out; overflow: hidden;
}
.sp-fill code { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 .35rem; color: #000; font-weight: 700; white-space: nowrap; overflow: hidden; }
.sp-fill code span { opacity: .9; }
.sp-fill code .crumb { cursor: pointer; }
.sp-fill code .crumb:hover { color: #fff; text-decoration: underline; }
.sp-remaining { position: absolute; top: 0; right: .35rem; height: 100%; display: flex; align-items: center; color: #fff; font-size: .75rem; }
.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sp-menu { position: relative; flex-shrink: 0; }
.sp-menu-btn { display: flex; align-items: center; justify-content: center; background: var(--gray-800); border-radius: 6px; padding: .25rem; transition: background .2s; }
.sp-menu-btn:hover { background: var(--gray-700); }
.sp-menu-btn svg { transition: transform .2s; }
.sp-menu.open .sp-menu-btn svg { transform: rotate(180deg); }
.sp-dropdown {
  display: none; position: absolute; right: 0; margin-top: .5rem; width: 10rem;
  background: var(--gray-800); border: 1px solid var(--gray-700); border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0,0,0,.5); padding: .25rem 0; z-index: 50;
}
.sp-menu.open .sp-dropdown { display: block; }
.sp-dropdown button { display: block; width: 100%; text-align: left; padding: .4rem 1rem; font-size: .875rem; color: var(--gray-300); }
.sp-dropdown button:hover { background: var(--gray-700); }
.sp-dropdown button.active { background: var(--blue-600); color: #fff; }
@media (min-width: 640px) { .sp-pct { display: flex; } .sp-track { height: 1.5rem; } .sp-inner { gap: 1rem; font-size: .875rem; } .scroll-progress { padding: .5rem 1rem; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 5rem 0; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; width: 100%; padding-top: 4rem; padding-bottom: 4rem; }
.hero-photo { order: 1; display: flex; justify-content: center; }
.hero-copy { order: 2; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-copy { order: 1; }
  .hero-photo { order: 2; }
}
.hero-hey { color: var(--blue-500); font-weight: 500; margin-bottom: .5rem; }
.hero-type {
  font-family: var(--mono); font-weight: 700; color: #fff;
  font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.1; margin-bottom: 1rem;
  min-height: 1.2em; white-space: nowrap; overflow: hidden;
  text-shadow: 0 0 5px rgba(255,152,0,.5);
}
.caret { animation: blink 1s steps(2) infinite; font-weight: 400; margin-left: 2px; }
.hero-tag { font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 600; margin-bottom: 1.5rem; }
.hero-summary { color: var(--gray-300); max-width: 32rem; margin-bottom: 1.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.5rem; padding: 0 1rem; border-radius: 6px;
  font-size: .875rem; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }
.btn-outline { border: 1px solid var(--blue-600); color: var(--blue-400); }
.btn-outline:hover { background: rgba(37,99,235,.1); }
.hero-social { display: flex; align-items: center; gap: 1rem; padding-top: .5rem; }
.hero-social a { padding: .5rem; border-radius: 50%; color: var(--gray-400); transition: color .2s, background .2s; }
.hero-social a:hover { color: #fff; background: rgba(255,255,255,.1); }

.photo-wrap { position: relative; width: 16rem; height: 16rem; }
@media (min-width: 768px) { .photo-wrap { width: 20rem; height: 20rem; } }
.photo-glow { position: absolute; inset: 0; background: rgba(59,130,246,.2); border-radius: 50%; filter: blur(64px); }
.photo-card {
  position: relative; height: 100%; width: 100%; padding: 1rem; overflow: hidden;
  background: rgba(31,41,55,.5); backdrop-filter: blur(4px);
  border: 1px solid var(--gray-700); border-radius: 1rem;
}
.bg-grid {
  position: absolute; inset: 0; opacity: .2;
  background-size: 40px 40px;
  background-image: linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 0), linear-gradient(180deg, rgba(255,255,255,.05) 1px, transparent 0);
}
.photo-inner { position: relative; height: 100%; width: 100%; border-radius: .75rem; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(59,130,246,.35), rgba(45,212,191,.25)); }
.photo-inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-mark { font-family: var(--mono); font-weight: 700; font-size: 4.5rem; letter-spacing: .05em; color: rgba(255,255,255,.9); }

.scroll-down { position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); animation: bounce 1s infinite; }
.scroll-down button {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--gray-700); background: rgba(31,41,55,.5); backdrop-filter: blur(4px); transition: background .2s;
}
.scroll-down button:hover { background: rgba(55,65,81,.7); }
@keyframes bounce {
  0%, 100% { transform: translate(-50%, -25%); animation-timing-function: cubic-bezier(.8,0,1,1); }
  50% { transform: translate(-50%, 0); animation-timing-function: cubic-bezier(0,0,.2,1); }
}

/* ---------- Sections ---------- */
.section-container { padding-top: 4rem; padding-bottom: 4rem; }
.section-title { margin-bottom: 3rem; text-align: center; font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; }
.about-section { background: transparent; padding: 5rem 0; }
.skills-section { background: transparent; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
@media (min-width: 768px) { .about-grid { gap: 3rem; } }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-card { position: relative; background: var(--gray-800); border: 1px solid var(--gray-700); border-radius: 8px; padding: 1.5rem; box-shadow: 0 10px 15px rgba(0,0,0,.3); }
.bg-dots { position: absolute; inset: 0; border-radius: 8px; opacity: .3; background-image: radial-gradient(rgba(255,255,255,.1) 1px, transparent 0); background-size: 20px 20px; pointer-events: none; }
.about-card-body { position: relative; }
.about-card p.lead { margin-bottom: 1.5rem; }
.detail-list { display: flex; flex-direction: column; gap: 1rem; }
.detail { display: flex; align-items: flex-start; gap: .75rem; }
.detail svg { color: var(--blue-400); margin-top: 2px; flex-shrink: 0; }
.detail h3 { font-weight: 500; font-size: 1rem; }
.detail p { color: var(--gray-400); font-size: .875rem; }
.areas-title { font-weight: 500; margin: 1.5rem 0 .75rem; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.badge {
  display: inline-flex; align-items: center; border-radius: 999px; padding: .125rem .625rem;
  font-size: .75rem; font-weight: 600; color: var(--blue-400);
  background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.3); transition: background .2s;
}
.badge:hover { background: rgba(59,130,246,.2); }
.section-subtitle { margin-bottom: 1.5rem; font-size: 1.25rem; font-weight: 600; }
.side-list { display: flex; flex-direction: column; gap: 1rem; }
.edu-card { background: rgba(31,41,55,.5); border: 1px solid var(--gray-700); border-radius: 8px; padding: 1.25rem; transition: border-color .2s; }
.edu-card:hover { border-color: rgba(59,130,246,.5); }
.edu-card h4 { font-weight: 700; font-size: 1.125rem; margin-bottom: .25rem; }
.edu-card .place { color: var(--blue-400); margin-bottom: .5rem; }
.edu-card .meta { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; color: var(--gray-400); }

/* Skills tabs */
.tablist {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .25rem;
  margin-bottom: 2rem; padding: .25rem; border-radius: 8px; background: rgba(31,41,55,.5);
}
@media (min-width: 768px) { .tablist { grid-template-columns: repeat(4, 1fr); } }
.tab {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .5rem .75rem; border-radius: 4px; font-size: .875rem; font-weight: 500;
  color: var(--gray-400); transition: all .2s; white-space: nowrap;
}
.tab:hover { color: #fff; }
.tab.active { background: var(--blue-600); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.tabpanel { animation: fadeIn .5s ease-out forwards; }
.panel-card { background: rgba(31,41,55,.3); border: 1px solid var(--gray-700); border-radius: 8px; padding: 1.5rem; }
.panel-card h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.panel-card h3 svg { color: var(--blue-400); }
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .skill-grid { grid-template-columns: repeat(4, 1fr); } }
.skill-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1rem;
  background: rgba(31,41,55,.5); border: 1px solid var(--gray-700); border-radius: 8px;
  opacity: 0; transform: translateY(20px); animation: slideUp .5s ease forwards;
  transition: border-color .3s cubic-bezier(.4,0,.2,1), box-shadow .3s cubic-bezier(.4,0,.2,1);
}
.skill-card:hover { border-color: rgba(59,130,246,.5); box-shadow: 0 10px 20px rgba(0,0,0,.3); }
.skill-icon { width: 3rem; height: 3rem; border-radius: 50%; margin-bottom: .75rem; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--blue-600); font-weight: 700; }
.skill-icon img { width: 1.6rem; height: 1.6rem; }
.skill-card h4 { font-weight: 500; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Projects ---------- */
.projects-section { background: transparent; position: relative; }
.projects-inner { padding-top: 4rem; }
.projects-section .section-title { color: #fff; padding-top: 2rem; }
.project {
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  min-height: 100vh; padding: 0 1rem 3rem; background: transparent;
}
@media (min-width: 640px) { .project { padding: 0 1.5rem 4rem; } }
@media (min-width: 768px) { .project { padding: 0 2rem 6rem; } }
.project-inner { max-width: 80rem; width: 100%; display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) { .project-inner { flex-direction: row; gap: 2rem; } }
.project-visual { flex: 1; }
.project-frame { border: 1px solid rgba(255,255,255,.3); border-radius: 1rem; transition: all .5s ease-in-out; }
@media (min-width: 1024px) { .project-frame { border-width: 2px; border-color: rgba(255,255,255,.5); border-radius: 1.5rem; } }
.project-frame:hover { border-color: #fff; }
.project-gradient { position: relative; border-radius: 1rem; padding: 1rem; margin: .25rem; overflow: hidden; transition: all .3s; }
@media (min-width: 640px) { .project-gradient { padding: 1.5rem; margin: .5rem; } }
@media (min-width: 768px) { .project-gradient { padding: 2rem; margin: .75rem; } }
@media (min-width: 1024px) { .project-gradient { border-radius: 1.5rem; } }
.project-heading { position: relative; z-index: 1; margin-bottom: 1.5rem; }
.project-heading h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: #fff; }
@media (min-width: 640px) { .project-heading h1 { font-size: 1.875rem; } }
@media (min-width: 768px) { .project-heading h1 { font-size: 2.25rem; } .project-heading { margin-bottom: 2rem; } }
.shot-wrap { position: relative; z-index: 1; }
.shot {
  background: var(--gray-900); border-radius: .5rem; padding: .75rem; box-shadow: 0 25px 50px rgba(0,0,0,.5);
  transform: rotate(2deg); transition: transform .5s ease; cursor: none;
}
@media (min-width: 768px) { .shot { border-radius: .75rem; padding: 1rem; } }
.shot:hover { transform: rotate(2deg) scale(1.02); }
.shot-screen { position: relative; width: 100%; aspect-ratio: 960 / 528; background: rgba(3,7,18,.8); border-radius: .375rem; overflow: hidden; }
@media (min-width: 768px) { .shot-screen { border-radius: .75rem; } }

.project-info { width: 100%; margin-top: 1rem; }
@media (min-width: 1024px) { .project-info { width: 33.333%; margin-top: 1.5rem; } }
.info-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.info-bar { width: .25rem; height: 1.25rem; flex-shrink: 0; }
@media (min-width: 768px) { .info-bar { height: 1.5rem; } .info-head { margin-bottom: 1rem; } }
.info-head h2 { font-size: 1.25rem; font-weight: 700; }
@media (min-width: 640px) { .info-head h2 { font-size: 1.5rem; } }
.check-btn {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 600;
  color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.3); border-radius: 6px;
  padding: .25rem .5rem; transition: color .1s;
}
@media (min-width: 640px) { .check-btn { font-size: .875rem; padding: .375rem .75rem; } }
.check-btn:hover { color: #fff; }
.check-btn .arrows { position: relative; width: 1rem; height: 1rem; overflow: hidden; }
.check-btn .arrows svg { position: absolute; inset: 0; transition: transform .25s ease; }
.check-btn .arrows svg + svg { transform: translate(-100%, 100%); }
.check-btn:hover .arrows svg:first-child { transform: translate(100%, -100%); }
.check-btn:hover .arrows svg + svg { transform: translate(0, 0); }
.ph-wrap { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.ph-ring { width: clamp(70px, 11vw, 120px); aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, #0b1020 78%, transparent 80%), conic-gradient(#4ade80 78%, rgba(255,255,255,.12) 0); }
.ph-ring b { font-size: clamp(16px, 2.6vw, 28px); }
.ph-ring span { font-size: clamp(8px, 1vw, 11px); opacity: .65; }
.ph-bars { display: flex; flex-direction: column; gap: clamp(6px, 1vw, 12px); width: clamp(80px, 14vw, 150px); }
.ph-bars div { position: relative; height: clamp(6px, .9vw, 9px); background: rgba(255,255,255,.12); border-radius: 99px; }
.ph-bars i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: #e879f9; border-radius: 99px; }
.ph-bars span { position: absolute; top: 100%; left: 0; font-size: clamp(7px, .8vw, 9px); opacity: .6; margin-top: 1px; }
.llm-wrap { font-family: 'Space Mono', monospace; width: 70%; }
.llm-q { font-size: clamp(9px, 1.3vw, 14px); margin-bottom: clamp(6px, 1vw, 12px); opacity: .85; }
.llm-row { display: flex; align-items: center; gap: 8px; font-size: clamp(8px, 1vw, 11px); margin-top: clamp(3px, .6vw, 7px); }
.llm-row span { width: 56px; opacity: .7; }
.llm-row i { height: clamp(5px, .8vw, 8px); width: var(--w); background: #facc15; border-radius: 99px; }
.info-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.check-btn-solid { background: rgba(255,255,255,.92); color: #0b1020; border-color: transparent; }
.check-btn-solid:hover { color: #000; background: #fff; }
.ew-card { font-family: 'Space Mono', monospace; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 14px 18px; max-width: 80%; }
.ew-ticker { font-size: clamp(9px, 1.1vw, 12px); opacity: .6; margin-bottom: 6px; }
.ew-signal { font-size: clamp(14px, 2.2vw, 24px); font-weight: 700; color: #4ade80; }
.ew-signal span { font-size: .6em; opacity: .7; margin-left: 6px; }
.ew-cite { font-size: clamp(8px, 1vw, 11px); opacity: .75; margin-top: 8px; line-height: 1.4; }
.info-desc { color: rgba(255,255,255,.85); font-size: .875rem; line-height: 1.625; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .info-desc { font-size: 1rem; } }
.info-points { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.info-points li { list-style: none; display: flex; align-items: flex-start; gap: .5rem; color: var(--gray-300); font-size: .875rem; }
@media (min-width: 640px) { .info-points li { font-size: 1rem; } .info-points { gap: .75rem; } }
.info-points svg { flex-shrink: 0; margin-top: .3rem; color: #fff; }
.tech-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (min-width: 640px) { .tech-chips { gap: .75rem; } }
.tech-chip {
  display: inline-flex; align-items: center; background: var(--gray-950);
  border: 1px solid rgba(255,255,255,.2); border-radius: .75rem; padding: .25rem .5rem;
  color: #fff; font-size: .75rem; font-weight: 600; transition: border-color .2s;
}
@media (min-width: 640px) { .tech-chip { font-size: .875rem; padding: .375rem .75rem; } }
.tech-chip:hover { border-color: rgba(255,255,255,.3); }

/* Circular "view" cursor over previews */
.view-cursor {
  position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
  transform: translate(-50%, -50%); opacity: 0; transition: opacity .2s;
}
.view-cursor.on { opacity: 1; }
.view-cursor-ring {
  position: relative; width: 100px; height: 100px; border-radius: 50%;
  border: 1px solid rgba(156,163,175,.8); background: rgba(0,0,0,.4);
  box-shadow: 0 0 20px 5px rgba(255,255,255,.2); outline: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
}
.view-cursor-core { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; color: #fff; }
.view-cursor-text { position: absolute; inset: 0; padding: .5rem; animation: spin 12s linear infinite; }
.view-cursor-text text { fill: #fff; font-size: 7.5px; font-weight: 600; letter-spacing: .12em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Project previews (CSS-only) ---------- */
.pv { position: absolute; inset: 0; }
.pv-center { display: grid; place-items: center; }
.pv-mathboard { padding: 18px; }
.mb-toolbar { display: flex; gap: 6px; margin-bottom: 12px; }
.mb-toolbar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.15); }
.mb-toolbar span:first-child { background: #ff5f57; }
.mb-toolbar span:nth-child(2) { background: #febc2e; }
.mb-toolbar span:nth-child(3) { background: #28c840; }
.mb-canvas { height: calc(100% - 22px); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; position: relative; padding: 20px; font-family: var(--mono); }
.mb-eq { color: var(--a); font-size: clamp(11px, 1.6vw, 17px); margin-bottom: 10px; opacity: 0; animation: fadeIn 1s .3s forwards; }
.mb-eq-2 { color: var(--a2); font-size: clamp(10px, 1.4vw, 14px); animation-delay: .8s; }
.mb-scribble {
  position: absolute; bottom: 20px; right: 20px; width: 60px; height: 40px; border-radius: 40%; opacity: .6;
  background: radial-gradient(circle at 20% 30%, var(--a3) 2px, transparent 3px), radial-gradient(circle at 60% 60%, var(--a3) 2px, transparent 3px), radial-gradient(circle at 80% 20%, var(--a3) 2px, transparent 3px);
  animation: spin 20s linear infinite;
}
.chessboard { width: 55%; max-width: 220px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); border: 2px solid rgba(255,255,255,.15); border-radius: 6px; overflow: hidden; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); transform: rotateX(20deg) rotateZ(-8deg); transition: transform .5s ease; }
.shot:hover .chessboard { transform: rotateX(10deg) rotateZ(0); }
.chessboard div.dark { background: #4a5568; }
.chessboard div.light { background: #e2e8f0; }
.pv-stock { padding: 20px; }
.pv-stock svg { width: 100%; height: 100%; }
.stock-line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: drawLine 2s ease forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.stock-badge { position: absolute; top: 16px; left: 16px; padding: 6px 12px; border-radius: 8px; background: rgba(52,211,153,.15); border: 1px solid rgba(52,211,153,.4); font-family: var(--mono); font-size: 12px; color: var(--a4); }
.rps-icons { display: flex; gap: 24px; font-size: clamp(30px, 5vw, 52px); }
.rps-icon { animation: bob 2s ease-in-out infinite; }
.rps-icon:nth-child(2) { animation-delay: .3s; }
.rps-icon:nth-child(3) { animation-delay: .6s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.rps-scan { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--a), transparent); animation: scan 3s ease-in-out infinite; }
@keyframes scan { 0% { top: 0; } 50% { top: 100%; } 100% { top: 0; } }
.pv-delphi { padding: 22px; display: flex; align-items: center; }
.delphi-chat { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.chat-bubble { padding: 10px 14px; border-radius: 14px; font-size: clamp(11px, 1.5vw, 14px); max-width: 80%; animation: slideUp .6s ease both; }
.chat-bubble.user { align-self: flex-end; background: linear-gradient(135deg, var(--a), var(--a2)); color: #05070c; border-bottom-right-radius: 4px; }
.chat-bubble.bot { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.1); color: #e7e9ee; border-bottom-left-radius: 4px; animation-delay: .4s; }
.pv-fridge { display: flex; align-items: center; justify-content: center; gap: 20px; font-size: clamp(26px, 4vw, 40px); }
.fridge-arrow { color: var(--a); font-size: 28px; animation: pushRight 1.6s ease-in-out infinite; }
@keyframes pushRight { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.camwb-frame { width: 70%; height: 70%; border: 2px dashed rgba(125,211,252,.5); border-radius: 10px; display: grid; place-items: center; position: relative; }
.camwb-frame::before { content: ''; position: absolute; top: 8px; left: 8px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: blink 1.5s ease-in-out infinite; }
.camwb-hand { font-size: clamp(28px, 4vw, 44px); animation: hand 3s ease-in-out infinite; }
@keyframes hand { 0%,100% { transform: translate(-10px, 5px) rotate(-8deg); } 50% { transform: translate(10px, -5px) rotate(8deg); } }
.plate { padding: 12px 22px; background: #fef3c7; color: #1f2937; font-family: var(--mono); font-weight: 700; font-size: clamp(16px, 2.4vw, 26px); border: 3px solid #1f2937; border-radius: 6px; letter-spacing: .1em; }
.plate-scan { position: absolute; left: 0; right: 0; height: 3px; background: var(--a); box-shadow: 0 0 12px var(--a); animation: plateScan 2.5s ease-in-out infinite; }
@keyframes plateScan { 0%,100% { top: 20%; } 50% { top: 80%; } }
.ticker { display: flex; flex-direction: column; gap: 10px; font-family: var(--mono); font-size: clamp(12px, 1.8vw, 16px); }
.ticker .up { color: var(--a4); }
.ticker .down { color: #f87171; }
.ticker span { animation: tickerSlide .5s ease-out both; }
.ticker span:nth-child(2) { animation-delay: .15s; }
.ticker span:nth-child(3) { animation-delay: .3s; }
@keyframes tickerSlide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.checkerboard { width: 55%; max-width: 220px; aspect-ratio: 1; background: repeating-conic-gradient(#8b4513 0% 25%, #f4d19b 0% 50%) 0 0 / 25% 25%; border: 2px solid #3b2711; border-radius: 4px; transform: rotateX(20deg); box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.gd-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; font-family: var(--mono); font-size: clamp(11px, 1.5vw, 14px); }
.gd-q { padding: 8px 14px; border-radius: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #e7e9ee; }
.gd-stages { display: flex; gap: 6px; }
.gd-stages i { width: clamp(16px, 2.6vw, 26px); height: 10px; border-radius: 5px; background: rgba(255,255,255,.12); animation: slideUp .5s ease both; }
.gd-stages i.ok { background: var(--a4); }
.gd-stages i.no { background: #f87171; box-shadow: 0 0 10px #f87171; }
.gd-stages i:nth-child(2) { animation-delay: .15s; }
.gd-stages i:nth-child(3) { animation-delay: .3s; }
.gd-res { color: #f87171; font-weight: 700; letter-spacing: .06em; }
.gd-res span { color: #cbd5e1; font-weight: 400; letter-spacing: 0; margin-left: 6px; }
.sw-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sw-pad { width: clamp(130px, 22vw, 190px); aspect-ratio: 16 / 10; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; overflow: hidden; }
.sw-fingers { display: flex; gap: 10px; animation: swipeX 2.4s ease-in-out infinite; }
.sw-fingers i { width: 14px; height: 14px; border-radius: 50%; background: #c7d2fe; box-shadow: 0 0 10px rgba(199,210,254,.8); }
@keyframes swipeX { 0%,100% { transform: translateX(-30px); } 50% { transform: translateX(30px); } }
.sw-keys { display: flex; gap: 8px; }
.sw-keys kbd { min-width: 34px; padding: 5px 10px; text-align: center; border-radius: 7px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #e7e9ee; font-family: var(--mono); font-size: 14px; }
.sw-keys kbd:first-child { background: rgba(129,140,248,.3); }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 1023px) { .project { min-height: auto; padding-top: 1rem; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .site { transition: none; }
}
