@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,600;1,400&family=JetBrains+Mono:wght@300;400;500&display=swap");

:root {
  --paper: #f4f6fb;
  --paper2: #eceef6;
  --paper3: #e2e5f0;
  --ink: #0f0e0c;
  --ink2: #3d3a34;
  --ink3: #7a766e;
  --ink4: #b0aa9f;
  --rule: rgba(15, 14, 12, 0.1);
  --rule2: rgba(15, 14, 12, 0.06);

  --spot: #2563eb;
  --spot2: rgba(37, 99, 235, 0.07);
  --spot3: rgba(37, 99, 235, 0.18);
  --spoth: #1d4ed8;
  --pur: #7c3aed;
  --pur2: rgba(124, 58, 237, 0.08);
  --pur3: rgba(124, 58, 237, 0.2);
  --azure: #38bdf8;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);

  --mono: "JetBrains Mono", monospace;
  --serif: "Playfair Display", serif;
  --sans: "Inter", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease2: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  cursor: none;
}
body {
  font-family: var(--sans);
  font-optical-sizing: auto;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.55;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
}

/* ── DARK MODE VARIABLES ───────────────────────────── */
[data-theme="dark"] {
  --paper: #161614;
  --paper2: #1e1e1b;
  --paper3: #272724;
  --ink: #ede9e0;
  --ink2: #c4bfb5;
  --ink3: #8a857c;
  --ink4: #4a4740;
  --rule: rgba(237, 233, 224, 0.1);
  --rule2: rgba(237, 233, 224, 0.06);

  --spot: #7aacff;
  --spot2: rgba(122, 172, 255, 0.1);
  --spot3: rgba(122, 172, 255, 0.25);
  --spoth: #5e96ff;
  --pur: #b98fff;
  --pur2: rgba(185, 143, 255, 0.1);
  --pur3: rgba(185, 143, 255, 0.25);
  --azure: #7ddcfc;
  --grad: linear-gradient(135deg, #7aacff 0%, #b98fff 100%);
}

/* ── DARK — global ─────────────────────────────────── */
[data-theme="dark"] body {
  background: var(--paper);
  color: var(--ink);
}

/* ── DARK — section backgrounds ───────────────────── */
[data-theme="dark"] #home,
[data-theme="dark"] #about,
[data-theme="dark"] #education,
[data-theme="dark"] #skills {
  background: var(--paper);
}
[data-theme="dark"] #experience,
[data-theme="dark"] #projects,
[data-theme="dark"] #achievements {
  background: var(--paper2);
}
[data-theme="dark"] #contact,
[data-theme="dark"] .footer {
  background: #0f0f0d;
}

/* ── DARK — nav ────────────────────────────────────── */
[data-theme="dark"] #nav {
  background: rgba(22, 22, 20, 0.88);
  border-color: rgba(237, 233, 224, 0.09);
}
[data-theme="dark"] #nav.scrolled {
  background: rgba(22, 22, 20, 0.98);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .nav-brand {
  color: var(--ink3);
}
[data-theme="dark"] .nav-items a {
  color: var(--ink3);
}
[data-theme="dark"] .nav-items a:hover {
  background: var(--paper3);
  color: var(--ink);
}
[data-theme="dark"] .nav-items a.active {
  background: var(--ink);
  color: var(--paper);
}
[data-theme="dark"] .nav-hire {
  color: var(--ink3);
}
[data-theme="dark"] .nav-hire:hover {
  background: var(--paper3);
  color: var(--ink);
}
[data-theme="dark"] .nav-hire.active {
  background: var(--ink);
  color: var(--paper);
}

/* ── DARK — hero ───────────────────────────────────── */
[data-theme="dark"] #home {
  background: var(--paper);
}
[data-theme="dark"] .hero-bg {
  -webkit-text-stroke: 1px rgba(237, 233, 224, 0.055);
}
[data-theme="dark"] .hero-h {
  color: var(--ink);
}
[data-theme="dark"] .h-etext {
  color: var(--ink3);
}
[data-theme="dark"] .hero-sub {
  color: var(--ink3);
}
[data-theme="dark"] .hero-desc {
  color: var(--ink2);
}
[data-theme="dark"] .hero-stats {
  background: var(--rule2);
  border-color: var(--rule2);
}
[data-theme="dark"] .hstat {
  background: var(--paper2);
}
[data-theme="dark"] .hstat:hover {
  background: var(--paper3);
}
[data-theme="dark"] .hstat-v {
  color: var(--ink);
}
[data-theme="dark"] .hstat-k {
  color: var(--ink4);
}
[data-theme="dark"] .hero-band {
  border-top-color: var(--rule);
}
[data-theme="dark"] .band-t span {
  color: var(--ink4);
}
[data-theme="dark"] .btn-fill {
  background: var(--ink);
  color: var(--paper);
}
[data-theme="dark"] .btn-fill:hover {
  background: var(--ink2);
  color: var(--paper);
}
[data-theme="dark"] .btn-out {
  color: var(--ink2);
  border-color: var(--rule);
}
[data-theme="dark"] .btn-out:hover {
  color: var(--spot);
  border-color: var(--spot3);
}

/* ── THEME TOGGLE BUTTON ───────────────────────────── */
#theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: var(--ink3);
  cursor: none;
  margin-left: 2px;
  margin-right: 4px;
  flex-shrink: 0;
  transition:
    background 0.18s,
    color 0.18s;
}
#theme-toggle:hover {
  background: var(--paper3);
  color: var(--ink2);
}
[data-theme="dark"] #theme-toggle {
  color: var(--ink3);
}
[data-theme="dark"] #theme-toggle:hover {
  background: var(--paper3);
  color: var(--ink);
}

/* ── DARK — about ──────────────────────────────────── */
[data-theme="dark"] .about-lede {
  color: var(--ink);
}
[data-theme="dark"] .about-body {
  color: var(--ink2);
}
[data-theme="dark"] .akey {
  color: var(--ink4);
}
[data-theme="dark"] .aval {
  color: var(--ink2);
}
[data-theme="dark"] .arow {
  border-bottom-color: var(--rule2);
}
[data-theme="dark"] .kpi-col {
  background: var(--rule2);
}
[data-theme="dark"] .krow {
  background: var(--paper2);
}
[data-theme="dark"] .krow:hover {
  background: var(--paper3);
}
[data-theme="dark"] .kkey {
  color: var(--ink3);
}
[data-theme="dark"] .kval {
  color: var(--ink);
}
[data-theme="dark"] .kval.badge {
  color: var(--spot);
  background: var(--spot2);
  border-color: var(--spot3);
}

/* ── DARK — experience ─────────────────────────────── */
[data-theme="dark"] .exp-vline {
  background: var(--rule);
}
[data-theme="dark"] .exp-vline::before {
  background: var(--paper2);
  border-color: var(--ink4);
}
[data-theme="dark"] .exp-e:first-child .exp-vline::before {
  background: var(--spot);
  border-color: var(--spot);
}
[data-theme="dark"] .exp-body {
  border-bottom-color: var(--rule2);
}
[data-theme="dark"] .exp-role {
  color: var(--ink);
}
[data-theme="dark"] .exp-co {
  color: var(--ink3);
}
[data-theme="dark"] .exp-period {
  color: var(--ink3);
}
[data-theme="dark"] .exp-loc {
  color: var(--ink4);
}
[data-theme="dark"] .exp-li li {
  color: var(--ink2);
}
[data-theme="dark"] .exp-li li:hover {
  color: var(--ink);
}
[data-theme="dark"] .exp-chips span {
  background: var(--paper3);
  border-color: var(--rule);
  color: var(--ink2);
}
[data-theme="dark"] .exp-chips span:hover {
  background: var(--spot2);
  border-color: var(--spot3);
  color: var(--spot);
}

/* ── DARK — education ──────────────────────────────── */
[data-theme="dark"] .edu-c {
  background: var(--paper2);
  border-color: var(--rule2);
}
[data-theme="dark"] .edu-c:hover {
  background: var(--paper3);
  border-color: var(--rule);
}
[data-theme="dark"] .edu-c.inv {
  background: #111110;
  border-color: #111110;
}
[data-theme="dark"] .edu-c.inv:hover {
  background: #181816;
}
[data-theme="dark"] .edu-deg {
  color: var(--ink);
}
[data-theme="dark"] .edu-gpa {
  color: var(--spot);
  background: var(--spot2);
  border-color: var(--spot3);
}
[data-theme="dark"] .edu-inst {
  color: var(--ink3);
}
[data-theme="dark"] .edu-period {
  color: var(--ink4);
}
[data-theme="dark"] .edu-note {
  color: var(--pur);
}
[data-theme="dark"] .sem-c {
  background: var(--paper3);
  border-color: var(--rule2);
}
[data-theme="dark"] .sem-c:hover {
  background: var(--spot2);
  border-color: var(--spot3);
}
[data-theme="dark"] .sem-lbl {
  color: var(--ink3);
}
[data-theme="dark"] .sem-v {
  color: var(--ink2);
}
[data-theme="dark"] .sem-v.p {
  color: var(--spot);
}

/* ── DARK — projects ───────────────────────────────── */
[data-theme="dark"] .pc {
  background: var(--paper2);
  border-color: var(--rule2);
}
[data-theme="dark"] .pc:hover {
  background: var(--paper3);
  border-color: var(--rule);
}
[data-theme="dark"] .pc.inv {
  background: #111110;
  border-color: #111110;
}
[data-theme="dark"] .pc.inv:hover {
  background: #181816;
}
[data-theme="dark"] .pc.inv:hover .pdesc {
  color: var(--paper);
}
[data-theme="dark"] .pname {
  color: var(--ink);
}
[data-theme="dark"] .pdesc {
  color: var(--ink2);
}
[data-theme="dark"] .pc:hover .pdesc {
  color: var(--ink);
}
[data-theme="dark"] .pcat {
  color: var(--ink3);
}
[data-theme="dark"] .psub {
  color: var(--ink3);
}
[data-theme="dark"] .ppub {
  background: var(--paper3);
  border-color: var(--rule);
}
[data-theme="dark"] .ppub-v {
  color: var(--ink2);
}
[data-theme="dark"] .ptag {
  background: var(--paper3);
  border-color: var(--rule);
  color: var(--ink2);
}
[data-theme="dark"] .ptag:hover {
  background: var(--spot2);
  border-color: var(--spot3);
  color: var(--spot);
}
[data-theme="dark"] .plink {
  color: var(--spot);
  border-color: var(--spot3);
  background: var(--spot2);
}
[data-theme="dark"] .plink:hover {
  background: var(--spot);
  color: var(--paper);
  border-color: var(--spot);
}

/* ── DARK — skills ─────────────────────────────────── */
[data-theme="dark"] .sg-lbl {
  color: var(--spot);
}
[data-theme="dark"] .sg-lbl::after {
  background: var(--rule);
}
[data-theme="dark"] .sk-intro {
  color: var(--ink2);
}
[data-theme="dark"] .sk-note {
  color: var(--ink3);
}
[data-theme="dark"] .sp {
  background: var(--paper2);
  border-color: var(--rule2);
  color: var(--ink2);
}
[data-theme="dark"] .sp.core {
  background: var(--paper3);
  border-color: var(--rule);
  color: var(--ink);
}
[data-theme="dark"] .sp:hover {
  background: var(--spot2);
  border-color: var(--spot3);
  color: var(--spot);
}
[data-theme="dark"] .sp.core:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ── DARK — research ───────────────────────────────── */
[data-theme="dark"] .research-hero {
  background: #0f0f0d;
}
[data-theme="dark"] .cert-lbl {
  color: var(--ink3);
}
[data-theme="dark"] .ctile {
  background: var(--paper3);
  border-color: var(--rule2);
}

/* ── DARK — contact ────────────────────────────────── */
[data-theme="dark"] #contact {
  background: #0f0f0d;
}
[data-theme="dark"] #contact .s-title {
  color: #f0ece2;
}
[data-theme="dark"] #contact .s-title em {
  color: var(--spot);
}
[data-theme="dark"] #contact .s-num {
  color: var(--spot);
}
[data-theme="dark"] #contact .s-sub {
  color: rgba(240, 236, 226, 0.4);
}
[data-theme="dark"] #contact .s-header {
  border-bottom-color: rgba(240, 236, 226, 0.12);
}
[data-theme="dark"] .contact-lede {
  color: rgba(240, 236, 226, 0.72);
}
[data-theme="dark"] .crow {
  border-bottom-color: rgba(240, 236, 226, 0.08);
}
[data-theme="dark"] .ckey {
  color: rgba(240, 236, 226, 0.45);
}
[data-theme="dark"] .cval {
  color: rgba(240, 236, 226, 0.82);
}
[data-theme="dark"] a.cval:hover {
  color: var(--azure);
}
[data-theme="dark"] .fg label {
  color: rgba(240, 236, 226, 0.45);
}
[data-theme="dark"] .fg input,
[data-theme="dark"] .fg textarea {
  background: rgba(240, 236, 226, 0.06);
  border-color: rgba(240, 236, 226, 0.12);
  color: #f0ece2;
}
[data-theme="dark"] .fg input::placeholder,
[data-theme="dark"] .fg textarea::placeholder {
  color: rgba(240, 236, 226, 0.25);
}
[data-theme="dark"] .fg input:focus,
[data-theme="dark"] .fg textarea:focus {
  border-color: var(--spot3);
  background: var(--spot2);
}
/* ── DARK — canvas opacity boost ───────────────────── */
[data-theme="dark"] .s-canvas {
  opacity: 0.7;
}
[data-theme="dark"] #neural-canvas {
  opacity: 0.6;
}

/* ── DARK — section headers ────────────────────────── */
[data-theme="dark"] .s-header {
  border-bottom-color: var(--rule);
}
[data-theme="dark"] .s-title {
  color: var(--ink);
}
[data-theme="dark"] .s-sub {
  color: var(--ink3);
}
[data-theme="dark"] .s-num {
  color: var(--spot);
}

/* ── DARK — scroll / totop ─────────────────────────── */
[data-theme="dark"] #totop {
  background: var(--paper3);
  color: var(--ink);
  border: 1px solid var(--rule);
}
[data-theme="dark"] #totop:hover {
  background: var(--spot);
  color: #fff;
  border-color: var(--spot);
}

/* ── DARK — footer ─────────────────────────────────── */
[data-theme="dark"] .footer-c {
  color: rgba(237, 233, 224, 0.22);
}
[data-theme="dark"] .footer-l a {
  color: rgba(237, 233, 224, 0.32);
}
[data-theme="dark"] .footer-l a:hover {
  color: var(--azure);
}

/* ── DARK — mobile menu ────────────────────────────── */
[data-theme="dark"] #mob-menu {
  background: #0f0f0d;
}

/* CURSOR */
#cursor {
  position: fixed;
  width: 9px;
  height: 9px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    transform 0.15s var(--ease2),
    background 0.2s,
    width 0.25s var(--ease),
    height 0.25s var(--ease);
}
#cursor-ring {
  position: fixed;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0.22;
  transition:
    width 0.3s var(--ease),
    height 0.3s var(--ease),
    opacity 0.3s,
    border-color 0.2s;
}
body.ch #cursor {
  transform: translate(-50%, -50%) scale(2.6);
  background: var(--spot);
}
body.ch #cursor-ring {
  width: 54px;
  height: 54px;
  opacity: 0.14;
  border-color: var(--spot);
}
body.ck #cursor {
  transform: translate(-50%, -50%) scale(0.65);
}

/* SCROLL PROGRESS */
#prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 9000;
  background: var(--grad);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* NAV */
#nav {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  background: rgba(245, 242, 237, 0.84);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(15, 14, 12, 0.08);
  border-radius: 100px;
  padding: 5px 5px 5px 22px;
  white-space: nowrap;
  gap: 0;
  transition:
    background 0.3s,
    box-shadow 0.3s;
}
#nav.scrolled {
  background: rgba(245, 242, 237, 0.97);
  box-shadow: 0 4px 32px rgba(15, 14, 12, 0.07);
}
.nav-brand {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink3);
  margin-right: 18px;
}
.nav-items {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-items a {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 7px 13px;
  border-radius: 100px;
  transition: all 0.18s;
}
.nav-items a:hover {
  background: var(--paper3);
  color: var(--ink2);
}
.nav-items a.active {
  background: var(--ink);
  color: var(--paper);
}
.nav-hire {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink3);
  background: transparent;
  padding: 7px 13px;
  border-radius: 100px;
  margin-left: 2px;
  border: none;
  cursor: none;
  transition: all 0.18s;
}
.nav-hire:hover {
  background: var(--paper3);
  color: var(--ink2);
  box-shadow: none;
}

#mob-btn {
  display: none;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 600;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  cursor: pointer;
}
#mob-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 550;
  background: var(--ink);
  padding: 90px 40px 40px;
  flex-direction: column;
  gap: 6px;
}
#mob-menu a {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: rgba(245, 242, 237, 0.65);
  transition: color 0.2s;
}
#mob-menu a:hover {
  color: var(--paper);
}

/* SECTION BASE */
section {
  position: relative;
  overflow: hidden;
}
.s-wrap {
  position: relative;
  z-index: 2;
  padding: 112px 80px;
}
.s-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 64px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.s-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--spot);
}
.s-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  margin-top: 6px;
}
.s-title em {
  font-style: italic;
}
.s-sub {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  align-self: end;
}
.s-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* HERO */
#home {
  min-height: 100vh;
  background: var(--paper);
  display: flex;
  align-items: flex-end;
}
#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-bg {
  position: absolute;
  right: 40px;
  bottom: -20px;
  font-family: var(--serif);
  font-size: clamp(160px, 20vw, 280px);
  font-weight: 400;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(15, 14, 12, 0.045);
  pointer-events: none;
  user-select: none;
  z-index: 1;
  letter-spacing: -0.05em;
}
.hero-in {
  position: relative;
  z-index: 2;
  padding: 0 80px;
  padding-top: max(110px, 16vh);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
}
.hero-eyebrow {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.h-eline {
  width: 36px;
  height: 1px;
  background: var(--spot);
}
.h-etext {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
}
.h-edot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.hero-h {
  grid-column: 1/2;
  font-family: var(--serif);
  font-size: clamp(3.6rem, 6.2vw, 6.2rem);
  font-weight: 400;
  line-height: 1.01;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.hero-h em {
  font-style: italic;
  color: var(--spot);
}
.hero-sub {
  display: block;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink3);
  margin-top: 12px;
}
#typewriter {
  border-right: 2px solid var(--spot);
  padding-right: 3px;
  animation: blink 0.75s step-end infinite;
}
@keyframes blink {
  0%,
  100% {
    border-color: var(--spot);
  }
  50% {
    border-color: transparent;
  }
}

.hero-r {
  grid-column: 2/3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 28px;
  padding-bottom: 72px;
}
.hero-desc {
  font-size: 0.96rem;
  line-height: 1.9;
  color: var(--ink2);
  max-width: 400px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule2);
  border: 1px solid var(--rule2);
}
.hstat {
  background: var(--paper);
  padding: 18px 14px;
  transition: background 0.18s;
}
.hstat:hover {
  background: var(--paper2);
}
.hstat-v {
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.hstat-v.blue {
  color: var(--spot);
}
.hstat-v.pur {
  color: var(--pur);
}
.hstat-k {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink4);
  margin-top: 5px;
  display: block;
}
.hero-btns {
  display: flex;
  gap: 10px;
}

.hero-band {
  grid-column: 1/-1;
  padding: 36px 0 0;
  border-top: 1px solid var(--rule);
  margin-top: 56px;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}
.band-t {
  display: flex;
  white-space: nowrap;
  animation: band 36s linear infinite;
  padding-bottom: 36px;
}
.band-t span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink4);
  padding: 0 18px;
}
.band-t .sep {
  color: var(--spot);
  opacity: 0.5;
  padding: 0 4px;
}
@keyframes band {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ABOUT */
#about {
  background: var(--paper);
}
.about-g {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 72px;
}
.about-lede {
  font-family: var(--sans);
  font-size: clamp(1.45rem, 2.1vw, 1.95rem);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 28px;
  letter-spacing: 0;
}
.about-body {
  font-size: 0.94rem;
  line-height: 1.9;
  color: var(--ink2);
  margin-bottom: 14px;
}
.about-meta {
  margin-top: 36px;
}
.arow {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule2);
  align-items: baseline;
}
.akey {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink4);
}
.aval {
  font-size: 0.92rem;
  color: var(--ink2);
}
.about-ctas {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.kpi-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule2);
}
.krow {
  background: var(--paper);
  padding: 22px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  transition: background 0.18s;
  position: relative;
  overflow: hidden;
  cursor: default;
}
.krow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.28s var(--ease);
}
.krow:hover {
  background: var(--paper2);
}
.krow:hover::before {
  transform: scaleY(1);
}
.kkey {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink3);
  line-height: 1.55;
}
.kval {
  font-family: var(--serif);
  font-size: 2.1rem;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}
.kval.blue {
  color: var(--spot);
}
.kval.pur {
  color: var(--pur);
}
.kval.badge {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--spot);
  background: var(--spot2);
  border: 1px solid var(--spot3);
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 500;
}

/* EXPERIENCE */
#experience {
  background: var(--paper2);
}
.exp-tl {
  display: flex;
  flex-direction: column;
}
.exp-e {
  display: grid;
  grid-template-columns: 190px 1px 1fr;
  column-gap: 48px;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}
.exp-e.vis {
  opacity: 1;
  transform: translateY(0);
}
.exp-vline {
  background: var(--rule);
  position: relative;
}
.exp-vline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper2);
  border: 1.5px solid var(--ink4);
  z-index: 1;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.25s;
}
.exp-e:first-child .exp-vline::before {
  border-color: var(--spot);
  background: var(--spot);
  box-shadow: 0 0 0 4px var(--spot2);
}
.exp-e:hover .exp-vline::before {
  border-color: var(--pur);
  box-shadow: 0 0 0 4px var(--pur2);
}
.exp-left {
  padding: 26px 0 44px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}
.exp-period {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--ink3);
}
.exp-loc {
  font-size: 0.78rem;
  color: var(--ink4);
}
.exp-body {
  padding: 22px 0 44px;
  border-bottom: 1px solid var(--rule2);
}
.exp-e:last-child .exp-body {
  border-bottom: none;
}
.exp-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spot);
  background: var(--spot2);
  border: 1px solid var(--spot3);
  padding: 3px 9px;
  border-radius: 2px;
  margin-bottom: 8px;
}
.exp-role {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: 3px;
}
.exp-co {
  font-size: 0.92rem;
  color: var(--ink3);
  margin-bottom: 16px;
}
.exp-li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.exp-li li {
  font-size: 0.94rem;
  line-height: 1.8;
  color: var(--ink2);
  padding-left: 14px;
  position: relative;
  transition: color 0.2s;
}
.exp-li li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 1px;
  background: var(--spot);
  opacity: 0.65;
}
.exp-li li:hover {
  color: var(--ink);
}
.exp-li li strong {
  color: var(--spot);
}
.exp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.exp-chips span {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink2);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 4px 10px;
  border-radius: 2px;
  transition:
    border-color 0.18s,
    color 0.18s,
    background 0.18s;
  cursor: default;
}
.exp-chips span:hover {
  border-color: var(--spot3);
  color: var(--spot);
  background: var(--spot2);
}

/* EDUCATION */
#education {
  background: var(--paper);
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 28px 28px;
}

[data-theme="dark"] #education {
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(237, 233, 224, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 233, 224, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}
.edu-g {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.edu-c {
  background: var(--paper2);
  border: 1px solid var(--rule2);
  padding: 30px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease),
    border-color 0.2s,
    background 0.2s;
}
.edu-c::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.edu-c:hover {
  border-color: rgba(15, 14, 12, 0.13);
  background: var(--paper3);
}
.edu-c:hover::after {
  transform: scaleX(1);
}
.edu-c.vis {
  opacity: 1;
  transform: translateY(0);
}
.edu-c.span2 {
  grid-column: 1/-1;
}
.edu-c.inv {
  background: var(--ink);
  border-color: var(--ink);
}
.edu-c.inv:hover {
  background: #1a1916;
}
.edu-c.inv .edu-period,
.edu-c.inv .edu-inst {
  color: rgba(245, 242, 237, 0.4);
}
.edu-c.inv .edu-deg {
  color: var(--paper);
}
.edu-badge-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad);
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 14px;
}
.edu-period {
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.06em;
  color: var(--ink4);
  margin-bottom: 8px;
}
.edu-deg {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.2;
}
.edu-gpa {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--spot);
  background: var(--spot2);
  border: 1px solid var(--spot3);
  padding: 2px 7px;
  border-radius: 2px;
  margin-left: 8px;
  vertical-align: middle;
}
.edu-inst {
  font-size: 0.88rem;
  color: var(--ink3);
  margin-top: 3px;
}
.edu-note {
  font-size: 0.8rem;
  color: var(--pur);
  font-style: italic;
  margin-top: 5px;
}

[data-theme="dark"] .edu-c.inv .edu-deg {
  color: #f0ece2;
}
[data-theme="dark"] .edu-c.inv .edu-period,
[data-theme="dark"] .edu-c.inv .edu-inst {
  color: rgba(240, 236, 226, 0.55);
}
[data-theme="dark"] .edu-c.inv .edu-badge-pill {
  color: #fff;
}
.sem-g {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin-top: 20px;
}
.sem-c {
  background: var(--paper);
  border: 1px solid var(--rule2);
  padding: 10px 4px 8px;
  text-align: center;
  cursor: default;
  transition:
    border-color 0.18s,
    transform 0.2s var(--ease),
    background 0.18s;
}
.sem-c:hover {
  border-color: var(--spot3);
  transform: translateY(-2px);
  background: var(--spot2);
}
.sem-lbl {
  display: block;
  font-family: var(--mono);
  font-size: 0.56rem;
  color: var(--ink3);
  margin-bottom: 5px;
  letter-spacing: 0.03em;
}
.sem-v {
  display: block;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink2);
}
.sem-v.p {
  color: var(--spot);
}

/* PROJECTS */
#projects {
  background: var(--paper2);
}
.proj-masonry {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
}
.pc {
  background: var(--paper);
  border: 1px solid var(--rule2);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease),
    border-color 0.2s,
    background 0.2s;
}
.pc::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.pc:hover {
  border-color: rgba(15, 14, 12, 0.13);
  background: var(--paper3);
}
.pc:hover::after {
  transform: scaleX(1);
}
.pc.vis {
  opacity: 1;
  transform: translateY(0);
}
.pc.c7 {
  grid-column: span 7;
}
.pc.c5 {
  grid-column: span 5;
}
.pc.c4 {
  grid-column: span 4;
}
.pc.c8 {
  grid-column: span 8;
}
.pc.inv {
  background: var(--ink);
  border-color: var(--ink);
}
.pc.inv:hover {
  background: #1a1916;
}

.pc.inv .pcat,
.pc.inv .psub {
  color: rgba(245, 242, 237, 0.45);
}
.pc.inv .pname,
.pc.inv .pdesc {
  color: var(--paper);
}
.pc.inv .ptag {
  background: rgba(245, 242, 237, 0.06);
  border-color: rgba(245, 242, 237, 0.12);
  color: rgba(245, 242, 237, 0.55);
}
.pc.inv .ptag:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.pc.inv .ppub {
  background: rgba(245, 242, 237, 0.04);
  border-color: rgba(245, 242, 237, 0.08);
}
.pc.inv .ppub-v {
  color: rgba(245, 242, 237, 0.6);
}
.ptop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.pcat {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 6px;
  display: block;
}
.pname {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--ink);
  line-height: 1.1;
}
.psub {
  font-size: 0.84rem;
  color: var(--ink3);
  margin-top: 2px;
}
.plink {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spot);
  border: 1px solid var(--spot3);
  background: var(--spot2);
  padding: 5px 12px;
  border-radius: 2px;
  flex-shrink: 0;
  transition: all 0.18s;
}
.plink:hover {
  background: var(--spot);
  color: #fff;
  border-color: var(--spot);
}
.ppub {
  background: var(--paper2);
  border: 1px solid var(--rule);
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.ppub-l {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pur);
  white-space: nowrap;
}
.ppub-v {
  font-size: 0.84rem;
  color: var(--ink2);
}
.pdesc {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ink2);
  flex: 1;
  transition: color 0.18s;
}
.pc:hover .pdesc {
  color: var(--ink);
}
.ptags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}
.ptag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink2);
  background: var(--paper2);
  border: 1px solid var(--rule);
  padding: 4px 9px;
  border-radius: 2px;
  transition: all 0.18s;
  cursor: default;
}
.ptag:hover {
  border-color: var(--spot3);
  color: var(--spot);
  background: var(--spot2);
}

/* SKILLS */
#skills {
  background: var(--paper);
}
.skills-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 72px;
  align-items: start;
}
.sk-left {
  position: sticky;
  top: 112px;
}
.sk-intro {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink2);
  line-height: 1.65;
  margin-bottom: 24px;
}
.sk-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink3);
  line-height: 1.9;
}
.sk-groups {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.sg-lbl {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--spot);
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sg-lbl::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 100px;
}
.sk-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sp {
  font-size: 0.84rem;
  color: var(--ink2);
  background: var(--paper2);
  border: 1px solid var(--rule2);
  padding: 7px 14px;
  border-radius: 2px;
  transition: all 0.18s;
  cursor: default;
}
.sp.core {
  color: var(--ink);
  font-weight: 500;
  border-color: var(--rule);
}
.sp:hover {
  background: var(--spot2);
  border-color: var(--spot3);
  color: var(--spot);
  transform: translateY(-1px);
}
.sp.core:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* RESEARCH */
#achievements {
  background: var(--paper2);
}
.research-hero {
  background: var(--ink);
  padding: 44px 48px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 36px;
}
.research-hero::before {
  content: '"';
  position: absolute;
  right: 28px;
  top: -50px;
  font-family: var(--serif);
  font-size: 220px;
  color: rgba(245, 242, 237, 0.03);
  line-height: 1;
  pointer-events: none;
}
.research-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
}
.rbadge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--azure);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
}
.rtitle {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--paper);
  line-height: 1.35;
  margin-bottom: 10px;
}
.rauthors {
  font-size: 0.88rem;
  color: rgba(245, 242, 237, 0.55);
  margin-bottom: 7px;
}
.rauthors strong {
  color: rgba(245, 242, 237, 0.88);
  font-weight: 500;
}
.rvenue {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: rgba(245, 242, 237, 0.35);
  letter-spacing: 0.03em;
  line-height: 1.8;
}
.ryear {
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.45;
  align-self: start;
}
.cert-lbl {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 12px;
  margin-top: 40px;
}
.cert-g {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.ctile {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 1px solid var(--rule2);
  background: var(--paper3);
  transition:
    transform 0.28s var(--ease),
    border-color 0.18s,
    box-shadow 0.28s;
}
.ctile:hover {
  transform: translateY(-3px);
  border-color: var(--spot3);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
}
.ctile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.ctile:hover img {
  transform: scale(1.05);
}
.cveil {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 12, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0;
  transition: opacity 0.22s;
}
.ctile:hover .cveil {
  opacity: 1;
}

/* CONTACT */
#contact {
  background: var(--ink);
}
#contact .s-title {
  color: var(--paper);
}
#contact .s-num {
  color: var(--spot);
}
#contact .s-sub {
  color: rgba(245, 242, 237, 0.28);
}
#contact .s-header {
  border-bottom-color: rgba(245, 242, 237, 0.08);
}
.contact-g {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.contact-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.65;
  color: rgba(245, 242, 237, 0.62);
  margin-bottom: 32px;
}
.crow {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(245, 242, 237, 0.06);
  align-items: baseline;
}
.ckey {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 242, 237, 0.35);
}
.cval {
  font-size: 0.92rem;
  color: rgba(245, 242, 237, 0.65);
  transition: color 0.18s;
}
a.cval:hover {
  color: var(--azure);
}
.cf {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fg label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 242, 237, 0.35);
}
.fg input,
.fg textarea {
  background: rgba(245, 242, 237, 0.05);
  border: 1px solid rgba(245, 242, 237, 0.09);
  padding: 11px 13px;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--paper);
  outline: none;
  width: 100%;
  resize: vertical;
  border-radius: 2px;
  transition:
    border-color 0.18s,
    background 0.18s;
  font-weight: 400;
}
.fg input::placeholder,
.fg textarea::placeholder {
  color: rgba(245, 242, 237, 0.18);
}
.fg input:focus,
.fg textarea:focus {
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.05);
}

/* FOOTER */
.footer {
  background: var(--ink);
  border-top: 1px solid rgba(245, 242, 237, 0.06);
  padding: 22px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-c {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(245, 242, 237, 0.2);
}
.footer-l {
  display: flex;
  gap: 18px;
}
.footer-l a {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(245, 242, 237, 0.3);
  transition: color 0.18s;
}
.footer-l a:hover {
  color: var(--azure);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: 2px;
  border: none;
  cursor: none;
  transition: all 0.18s;
}
.btn-fill {
  background: var(--ink);
  color: var(--paper);
}
.btn-fill:hover {
  background: var(--ink2);
}
.btn-grad {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 2px 16px rgba(37, 99, 235, 0.25);
}
.btn-grad:hover {
  opacity: 0.88;
  box-shadow: 0 4px 28px rgba(37, 99, 235, 0.4);
}
.btn-out {
  background: transparent;
  color: var(--ink2);
  border: 1px solid var(--rule);
}
.btn-out:hover {
  border-color: var(--spot3);
  color: var(--spot);
}
.btn-spot {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 2px 16px rgba(37, 99, 235, 0.25);
}
.btn-spot:hover {
  opacity: 0.88;
}
.btn-full {
  width: 100%;
  justify-content: center;
}
/* ── DARK — research hero text fix ─────────────────── */
[data-theme="dark"] .rtitle {
  color: #f0ece2;
}
[data-theme="dark"] .rauthors {
  color: rgba(240, 236, 226, 0.65);
}
[data-theme="dark"] .rauthors strong {
  color: rgba(240, 236, 226, 0.92);
}
[data-theme="dark"] .rvenue {
  color: rgba(240, 236, 226, 0.45);
}
[data-theme="dark"] .rbadge {
  color: var(--azure);
  background: rgba(125, 220, 252, 0.08);
  border-color: rgba(125, 220, 252, 0.2);
}
[data-theme="dark"] .research-hero {
  background: #111110;
}
[data-theme="dark"] .ryear {
  opacity: 0.6;
}
/* TO TOP */
#totop {
  position: fixed;
  bottom: 20px;
  right: 18px;
  z-index: 100;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.3s var(--ease);
  cursor: none;
}
#totop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#totop:hover {
  background: var(--spot);
}

/* ANIMATIONS */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}
.fade-up.vis {
  opacity: 1;
  transform: translateY(0);
}

/* DECORATIVE SHAPES */
.deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.deco-ring.blue {
  border-color: var(--spot3);
}
.deco-ring.pur {
  border-color: var(--pur3);
}
.deco-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--spot);
  pointer-events: none;
  opacity: 0.18;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .proj-masonry {
    grid-template-columns: 1fr 1fr;
  }
  .pc.c7,
  .pc.c5,
  .pc.c4,
  .pc.c8 {
    grid-column: span 2;
  }
}
@media (max-width: 900px) {
  .hero-in {
    grid-template-columns: 1fr;
    padding: 0 40px;
    padding-top: 96px;
  }
  .hero-r {
    grid-column: 1;
    padding-bottom: 56px;
  }
  .about-g,
  .contact-g {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .skills-layout {
    grid-template-columns: 1fr;
  }
  .sk-left {
    position: static;
  }
  .s-wrap {
    padding: 80px 40px;
  }
  .footer {
    padding: 18px 40px;
  }
  .hero-bg {
    display: none;
  }
  .exp-e {
    grid-template-columns: 1fr;
  }
  .exp-vline {
    display: none;
  }
  .exp-left {
    text-align: left;
    padding-bottom: 4px;
  }
  .edu-g {
    grid-template-columns: 1fr;
  }
  .edu-c.span2 {
    grid-column: 1;
  }
  .research-hero {
    grid-template-columns: 1fr;
  }
  .ryear {
    display: none;
  }
}
@media (max-width: 640px) {
  #nav {
    display: none;
  }
  #mob-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero-in {
    padding: 0 22px;
    padding-top: 76px;
  }
  .s-wrap {
    padding: 60px 22px;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  .sem-g {
    grid-template-columns: repeat(4, 1fr);
  }
  .cert-g {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer {
    padding: 16px 22px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .proj-masonry {
    grid-template-columns: 1fr;
  }
  .pc.c7,
  .pc.c5,
  .pc.c4,
  .pc.c8 {
    grid-column: 1;
  }
  html {
    cursor: auto;
  }
  #cursor,
  #cursor-ring {
    display: none;
  }
}

.nav-hire.active {
  background: var(--ink);
  color: var(--paper);
}

.pc.inv:hover .pdesc {
  color: var(--paper);
}

#education .s-header {
  border-bottom: none;
}

/* ── DARK — inv project card full fix ──────────────── */
[data-theme="dark"] .pc.inv .pname {
  color: #f0ece2;
}
[data-theme="dark"] .pc.inv .pdesc {
  color: rgba(240, 236, 226, 0.75);
}
[data-theme="dark"] .pc.inv .pcat,
[data-theme="dark"] .pc.inv .psub {
  color: rgba(240, 236, 226, 0.45);
}
[data-theme="dark"] .pc.inv .ppub-l {
  color: var(--pur);
}
[data-theme="dark"] .pc.inv .ppub-v {
  color: rgba(240, 236, 226, 0.6);
}
[data-theme="dark"] .pc.inv .ppub {
  background: rgba(240, 236, 226, 0.05);
  border-color: rgba(240, 236, 226, 0.1);
}
[data-theme="dark"] .pc.inv .ptag {
  background: rgba(240, 236, 226, 0.06);
  border-color: rgba(240, 236, 226, 0.12);
  color: rgba(240, 236, 226, 0.55);
}
[data-theme="dark"] .pc.inv .plink {
  color: var(--spot);
  background: var(--spot2);
  border-color: var(--spot3);
}

/* ── PROJECT MODAL ──────────────────────────────────── */
.proj-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(10, 10, 8, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}
.proj-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.proj-modal {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  width: 100%;
  max-width: 1200px;
  height: 78vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.28s var(--ease);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.18);
}
.proj-modal-overlay.open .proj-modal {
  transform: translateY(0) scale(1);
}
.proj-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
}
.proj-modal-close:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.proj-modal-left {
  padding: 48px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--rule);
}
.proj-modal-cat {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
}
.proj-modal-name {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.proj-modal-sub {
  font-size: 0.88rem;
  color: var(--ink3);
  margin-top: -8px;
}
.proj-modal-desc {
  font-size: 0.94rem;
  line-height: 1.9;
  color: var(--ink2);
}
.proj-modal-pub {
  background: var(--paper2);
  border: 1px solid var(--rule);
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.proj-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.proj-modal-link {
  align-self: flex-start;
  margin-top: 8px;
  cursor: none;
  text-decoration: none;
}
.proj-modal-right {
  position: relative;
  background: var(--paper2);
  min-height: 0;
  height: 100%;
}
.proj-modal-slides {
  position: absolute;
  inset: 0;
}
.proj-modal-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.proj-modal-slides img.active {
  opacity: 1;
}
.proj-modal-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.proj-modal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: none;
  transition:
    background 0.2s,
    transform 0.2s;
}
.proj-modal-dot.active {
  background: #fff;
  transform: scale(1.25);
}
.proj-modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  z-index: 3;
  transition: background 0.18s;
}
.proj-modal-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}
.proj-modal-arrow.left {
  left: 12px;
}
.proj-modal-arrow.right {
  right: 12px;
}
.proj-modal-no-images {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink4);
}

/* dark mode modal */
[data-theme="dark"] .proj-modal {
  background: var(--paper2);
  border-color: var(--rule);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .proj-modal-left {
  border-right-color: var(--rule);
}
[data-theme="dark"] .proj-modal-close {
  background: var(--paper2);
  border-color: var(--rule);
  color: var(--ink3);
}
[data-theme="dark"] .proj-modal-close:hover {
  background: var(--ink);
  color: var(--paper);
}
[data-theme="dark"] .proj-modal-right {
  background: var(--paper3);
}
[data-theme="dark"] .proj-modal-pub {
  background: var(--paper3);
  border-color: var(--rule);
}

/* responsive */
@media (max-width: 700px) {
  .proj-modal {
    grid-template-columns: 1fr;
    height: 92vh;
    overflow-y: auto;
  }
  .proj-modal-left {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 32px 24px;
  }
  .proj-modal-right {
    min-height: 260px;
    height: 260px;
  }
}

.ctile-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  text-decoration: none;
}

.ctile-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ctile-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--fg);
}

.ctile-sub {
  font-size: 0.72rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

.ctile-desc {
  font-size: 0.72rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

.ctile-cta {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.5rem;
}