:root {
  --bg: #000;
  --panel: #0a0a0a;
  --panel-2: #111;
  --line: #1f1f1f;
  --line-2: #2e2e2e;
  --text: #ededed;
  --muted: #a1a1a1;
  --dim: #6b6b6b;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Geist, Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.grad { background: linear-gradient(180deg, #fff 30%, #8a8a8a); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Background: faint grid fading out, plus one soft white halo */
.glow { display: none; }
body::after {
  content: ""; position: fixed; top: -260px; left: 50%; width: 900px; height: 520px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255,255,255,.08), transparent); z-index: -1; pointer-events: none;
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(24px, calc((100vw - 1120px) / 2));
  background: rgba(0,0,0,.65); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo span {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: #fff; color: #000; font-weight: 700; font-size: 13px; letter-spacing: -.02em;
}
.nav nav { display: flex; gap: 6px; align-items: center; }
.nav nav a { color: var(--muted); font-size: 14px; padding: 6px 12px; border-radius: 8px; transition: color .15s, background .15s; }
.nav nav a:hover { color: var(--text); background: var(--panel-2); }
.btn-sm { background: #fff; color: #000 !important; font-weight: 500; margin-left: 6px; }
.nav nav a.btn-sm:hover { background: #d4d4d4; }
.menu { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; width: 36px; height: 36px; font-size: 16px; cursor: pointer; }

main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* HERO */
.hero { padding: 120px 0 96px; text-align: center; display: flex; flex-direction: column; align-items: center; }
/* Full-page dot field, fixed behind all content */
.dots {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, #000 55%, transparent 100%);
}
.eyebrow {
  display: inline-block; color: var(--muted); font-size: 12.5px; margin-bottom: 26px;
  padding: 5px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel);
}
h1 { font-size: clamp(46px, 8.5vw, 88px); line-height: 1; letter-spacing: -0.055em; font-weight: 700; }
.role { font-size: clamp(18px, 2.4vw, 22px); color: var(--text); margin-top: 22px; font-weight: 500; letter-spacing: -0.01em; }
.role b { color: var(--text); font-weight: 600; }
.lead { color: var(--muted); max-width: 600px; margin: 14px auto 0; font-size: 18px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; justify-content: center; }
.btn {
  height: 46px; display: inline-flex; align-items: center; padding: 0 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px; background: #fff; color: #000; transition: background .15s;
}
.btn:hover { background: #d4d4d4; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--panel-2); border-color: #444; }
.highlights {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 72px; width: 100%; max-width: 760px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; text-align: left;
}
.highlights li { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.highlights li + li { border-left: 1px solid var(--line); }
.highlights span { font-size: 20px; filter: grayscale(1); }
.highlights b { display: block; font-size: 14.5px; font-weight: 600; }
.highlights small { color: var(--muted); font-size: 13px; }

/* SECTIONS */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.04em; font-weight: 700; margin-bottom: 36px; display: flex; align-items: baseline; gap: 14px; }
.num { font-size: 13px; color: var(--dim); font-weight: 400; letter-spacing: 0; }
h3 { font-size: 19px; letter-spacing: -0.02em; line-height: 1.35; font-weight: 600; }
h3 small { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 999px; vertical-align: middle; }
.about { display: grid; gap: 16px; max-width: 760px; color: var(--muted); font-size: 18px; }
.about b { color: var(--text); font-weight: 500; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: border-color .2s, background .2s; }
.card p { color: var(--muted); margin-top: 8px; }
.link { display: inline-flex; margin-top: 14px; color: var(--text); font-weight: 500; font-size: 14.5px; border-bottom: 1px solid var(--line-2); padding-bottom: 1px; transition: border-color .15s; }
.link:hover { border-color: var(--text); }

/* PAPER */
.paper { padding: 36px; border-radius: 16px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line-2); }
.paper h3 { font-size: clamp(21px, 2.6vw, 27px); margin-top: 20px; letter-spacing: -0.03em; }
.paper > p { color: var(--muted); margin-top: 20px; }
.paper b { color: var(--text); font-weight: 500; }
.authors { color: var(--muted); margin-top: 10px; font-size: 15px; }
.paper-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12.5px; padding: 4px 12px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line-2); }
.tag.ieee { background: #fff; color: #000; border-color: #fff; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { padding: 18px 16px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -0.04em; color: #fff; }
.stats small { color: var(--muted); font-size: 13px; }
.dataset { display: flex; gap: 20px; align-items: flex-start; }
.emoji { font-size: 26px; line-height: 1; padding: 12px; border: 1px solid var(--line-2); border-radius: 10px; }

/* PROJECTS */
.feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; margin-bottom: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.shot { border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); }
.shot img { transition: transform .4s; }
.shot:hover img { transform: scale(1.015); }
.feature-body h3 { font-size: 30px; letter-spacing: -0.04em; }
.feature-body p:not(.eyebrow) { color: var(--muted); margin-top: 10px; }
.feature-body .eyebrow { margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.proj { display: flex; flex-direction: column; padding: 14px; }
a.proj:hover, .proj:hover { border-color: #3a3a3a; background: #0e0e0e; }
.thumb { height: 170px; border-radius: 8px; overflow: hidden; margin-bottom: 16px; display: grid; place-items: center; border: 1px solid var(--line); }
.thumb.light { background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) contrast(1.05); transition: filter .3s; }
.proj:hover .thumb img { filter: none; }
.proj h3 { font-size: 17px; padding: 0 6px; }
.proj p { padding: 0 6px; font-size: 14.5px; flex: 1; }
.proj .chips, .proj .links { padding: 0 6px; }
.links { display: flex; gap: 18px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chips li { font-size: 12px; padding: 3px 10px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line-2); font-family: "Geist Mono", ui-monospace, monospace; }

/* SKILLS */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* CONTACT */
.contact { text-align: center; padding-bottom: 120px; }
.contact h2 { justify-content: center; }
.contact .lead { margin: 0 auto; }

footer { text-align: center; color: var(--dim); font-size: 13.5px; padding: 28px 24px; border-top: 1px solid var(--line); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .grid, .skills { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats div:nth-child(4) { border-left: 0; }
  .stats div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  main { padding-left: 16px; padding-right: 16px; }
  .nav { padding: 12px 16px; }
  .menu { display: block; }
  .nav nav {
    display: none; position: absolute; top: 62px; left: 16px; right: 16px;
    flex-direction: column; gap: 2px; padding: 8px;
    background: #0a0a0a; border: 1px solid var(--line-2); border-radius: 12px;
  }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 10px; width: 100%; text-align: center; margin: 0; }
  .hero { padding: 72px 0 64px; }
  .highlights { grid-template-columns: 1fr; }
  .highlights li + li { border-left: 0; border-top: 1px solid var(--line); }
  .grid, .skills { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .stats div:nth-child(-n+2) { border-top: 0; }
  .stats div:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .paper { padding: 22px; }
  .dataset { flex-direction: column; }
  .section { padding: 64px 0; }
}
