:root {
  --bg: #070b10;
  --bg2: #0d1117;
  --bg3: #161b22;
  --bg4: #1c2333;
  --accent: #00d4ff;
  --accent-glow: rgba(0,212,255,0.12);
  --accent-border: rgba(0,212,255,0.25);
  --accent2: #ff7b35;
  --text: #e6edf3;
  --text2: #8b949e;
  --text3: #4a5568;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.1);
  --radius: 8px;
  --radius-lg: 14px;
  --f-display: 'Space Grotesk', sans-serif;
  --f-body: 'Inter', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 68px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  line-height: 1.2;
}
.mono {
  font-family: var(--f-mono);
}
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}
section {
  padding: 96px 0;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
nav.scrolled {
  background: rgba(7, 11, 16, 0.92);
  border-color: var(--border);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-cta {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 6px 14px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover {
  background: var(--accent-glow);
}

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}
h1.hero-name {
  font-size: clamp(52px, 7vw, 80px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.hero-title-line {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 400;
  color: var(--text2);
  letter-spacing: -0.3px;
  margin-bottom: 1.5rem;
}
.hero-title-line strong {
  color: var(--accent);
  font-weight: 600;
}
.hero-desc {
  font-size: 16px;
  color: var(--text2);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 12px 24px;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
}
.btn-ghost {
  border: 1px solid var(--border2);
  color: var(--text2);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent-border);
  color: var(--text);
  background: var(--accent-glow);
}
.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-num {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-canvas-wrap {
  position: relative;
}
#lidar {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
}
.canvas-label {
  position: absolute;
  bottom: -24px;
  left: 0;
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 0.1em;
}

/* ABOUT */
#about {
  background: var(--bg);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}
.about-text h2 {
  font-size: 36px;
  margin: 1rem 0 1.5rem;
  color: var(--text);
  letter-spacing: -0.5px;
}
.about-text p {
  color: var(--text2);
  margin-bottom: 1.2rem;
  font-size: 16px;
}
.about-text strong {
  color: var(--text);
  font-weight: 600;
}
.about-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: 88px;
}
.profile-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.profile-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.pi-label {
  display: block;
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pi-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.pi-value.seeking {
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pi-value.seeking::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* SECTION TAGS */
.section-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}
section h2 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.5px;
  margin-bottom: 3rem;
  color: var(--text);
}

/* SKILLS */
#skills {
  background: var(--bg2);
}
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.skill-group {}
.sg-label {
  display: block;
  font-size: 10px;
  color: var(--accent2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-tags span {
  font-size: 13px;
  color: var(--text2);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.skill-tags span:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-glow);
  cursor: default;
}

/* PROJECTS */
#projects {
  background: var(--bg);
}
.project-featured {
  margin-bottom: 1.5rem;
}
.project-terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.project-terminal:hover {
  border-color: var(--accent-border);
}
.terminal-bar {
  background: var(--bg3);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border2);
}
.terminal-dots span:nth-child(1) {
  background: #ff5f57;
}
.terminal-dots span:nth-child(2) {
  background: #ffbd2e;
}
.terminal-dots span:nth-child(3) {
  background: #28c840;
}
.terminal-path {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--text2);
}
.terminal-status {
  font-family: var(--f-mono);
  font-size: 11px;
  margin-left: auto;
}
.terminal-status.active {
  color: var(--accent2);
}
.terminal-status.deployed {
  color: #28c840;
}
.project-body {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0;
}
.project-left {
  padding: 2rem;
}
.project-body h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 1rem;
}
.project-body p {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 1.5rem;
  line-height: 1.75;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.5rem;
}
.project-tags span {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.status-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
}
.status-badge.in-progress {
  color: var(--accent2);
  background: rgba(255, 123, 53, 0.1);
  border: 1px solid rgba(255, 123, 53, 0.2);
}
.status-badge.deployed {
  color: #28c840;
  background: rgba(40, 200, 64, 0.08);
  border: 1px solid rgba(40, 200, 64, 0.2);
}
.project-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.2s;
}
.project-link:hover {
  opacity: 0.75;
}
.project-diagram {
  background: var(--bg3);
  border-left: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.arch-diagram {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.arch-diagram>div {
  text-align: center;
}
.arch-node {
  background: var(--bg4);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--accent);
  line-height: 1.4;
}
.arch-node.sensor {
  border-color: rgba(255, 123, 53, 0.3);
  color: var(--accent2);
}
.arch-node.act {
  border-color: rgba(40, 200, 64, 0.3);
  color: #28c840;
}
.arch-arrow {
  font-size: 16px;
  color: var(--text3);
  transform: rotate(90deg);
}
.arch-cloud {
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--text3);
  border: 1px dashed var(--border2);
  border-radius: 6px;
  padding: 8px 12px;
  line-height: 1.5;
  text-align: center;
}
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.pc-body {
  padding: 1.5rem;
}
.pc-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.pc-body p {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

/* RESEARCH */
#research {
  background: var(--bg2);
}
.paper-card {
  background: var(--bg3);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  position: relative;
}
.paper-badge {
  position: absolute;
  top: -11px;
  left: 2rem;
  background: var(--bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.paper-content h3 {
  font-size: 20px;
  margin-bottom: 0.5rem;
}
.paper-authors {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 1.25rem;
  display: block;
}
.paper-abstract {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.paper-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}
.paper-tags span {
  font-size: 12px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: 4px;
  padding: 3px 10px;
}
.paper-venue {
  font-size: 12px;
  color: var(--text3);
  display: block;
}
.research-areas {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}
.ra-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.ra-icon {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.ra-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.ra-item p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

/* EDUCATION */
#education {
  background: var(--bg);
}
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border2);
}
.tl-item {
  position: relative;
  padding: 0 0 2.5rem 2rem;
}
.tl-item:last-child {
  padding-bottom: 0;
}
.tl-dot {
  position: absolute;
  left: -6px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
}
.tl-date {
  font-size: 11px;
  color: var(--accent2);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.4rem;
}
.tl-content h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.tl-content>p:first-of-type {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 0.5rem;
}
.tl-content>p {
  font-size: 14px;
  color: var(--text2);
}

/* CONTACT */
#contact {
  background: var(--bg2);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: center;
}
.contact-text h2 {
  font-size: 36px;
  letter-spacing: -0.5px;
  margin-bottom: 1.25rem;
}
.contact-text>p {
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 2rem;
}
.contact-text strong {
  color: var(--text);
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.c-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 15px;
  color: var(--text2);
  transition: color 0.2s;
}
.c-link:hover {
  color: var(--accent);
}
.c-link span {
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 0.06em;
  min-width: 20px;
}
.coords-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: left;
}
.coords-name {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0.5rem 0 0.4rem;
  color: var(--text);
}
.coords-ll {
  font-size: 12px;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}
.coords-seeking {
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* FOOTER */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer .mono {
  font-size: 12px;
  color: var(--text3);
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-canvas-wrap {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-card {
    position: static;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .project-body {
    grid-template-columns: 1fr;
  }
  .project-diagram {
    display: none;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .research-areas {
    grid-template-columns: 1fr;
  }
  .contact-inner {
    grid-template-columns: 1fr;
  }
  .coords-box {
    display: none;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  section {
    padding: 64px 0;
  }
  .hero-stats {
    gap: 1.5rem;
  }
  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}