:root {
  --bg: #0a0c0f;
  --bg-elevated: #12151a;
  --bg-card: #14181e;
  --line: #232830;
  --text: #e7eaee;
  --text-dim: #8b93a1;
  --lidar: #48d1e0;
  --radar: #ff9e4a;
  --radius: 3px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  z-index: 1;
}

.topbar, .footer, .section {
  position: relative;
  background: rgba(10,12,15,0.94);
}

.hero {
  position: relative;
  background: transparent;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* faint scanline texture */
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.012) 0px,
    rgba(255,255,255,0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* fixed 3D point-cloud, sits behind the whole page — fully visible through
   the transparent hero, and glimpsed at the edges of solid sections */
#pointCloudBg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  display: block;
  background: var(--bg);
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(10,12,15,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}
.brand-dot { color: var(--lidar); }
.topnav { display: flex; gap: 28px; }
.topnav a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.88rem;
  transition: color 0.2s;
}
.topnav a:hover { color: var(--text); }

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  padding: 6px 12px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-btn[aria-pressed="true"] {
  background: var(--lidar);
  color: #05181c;
}
.lang-btn:focus-visible, a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--lidar);
  outline-offset: 2px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
#scanCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 60px 0;
}
.eyebrow {
  color: var(--lidar);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 24px;
}
.hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-bottom: 34px;
}
.hero-meta .dot { color: var(--line); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--lidar);
  color: #05181c;
}
.btn-primary:hover { transform: translateY(-1px); background: #63dced; }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--radar); color: var(--radar); }

/* ---------- sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.section-head { margin-bottom: 44px; }
.tag {
  display: block;
  color: var(--radar);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }

/* about */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
}
.about-text { color: var(--text-dim); font-size: 1.02rem; max-width: 60ch; }
.about-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.about-facts li { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; border-left: 2px solid var(--lidar); padding-left: 12px; }
.about-facts li span:first-child { color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.7rem; }
.about-facts li span:last-child { color: var(--text); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* experience */
.job { padding: 28px 0; border-top: 1px solid var(--line); }
.job:first-of-type { border-top: none; }
.job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.job-head h3 { font-size: 1.15rem; }
.job-org { color: var(--lidar); font-size: 0.88rem; margin: 4px 0 0; }
.job-date { color: var(--text-dim); font-size: 0.78rem; white-space: nowrap; }
.job-list { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 0.94rem; display: flex; flex-direction: column; gap: 8px; }
.job-list li::marker { color: var(--radar); }

/* projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}
.project-card:hover { border-color: var(--lidar); }
.project-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.project-top h3 { font-size: 1.05rem; }
.chip {
  font-size: 0.68rem;
  color: var(--radar);
  border: 1px solid var(--radar);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.project-card > p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }
.project-stats { list-style: none; padding: 0; margin: 4px 0; display: flex; gap: 18px; flex-wrap: wrap; }
.project-stats li { display: flex; flex-direction: column; font-size: 0.68rem; color: var(--text-dim); }
.project-stats b { color: var(--lidar); font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; }
.project-note { font-size: 0.83rem; color: var(--text-dim); border-top: 1px solid var(--line); padding-top: 12px; }
.project-meta { color: var(--text-dim); font-size: 0.72rem; }
.project-link { font-size: 0.82rem; color: var(--lidar); text-decoration: none; margin-top: auto; }
.project-link:hover { text-decoration: underline; }

/* skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.skill-col h4 { font-size: 0.95rem; margin-bottom: 10px; color: var(--radar); }
.skill-col p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

/* education */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.edu-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg-card); }
.edu-detail { font-size: 0.85rem; color: var(--text-dim); margin: 6px 0 0; }

/* contact */
.section-contact { text-align: left; border-bottom: none; }
.contact-sub { color: var(--text-dim); max-width: 50ch; margin-bottom: 24px; }
.contact-links { display: flex; gap: 26px; flex-wrap: wrap; font-size: 0.9rem; }
.contact-links a { text-decoration: none; color: var(--lidar); }
.contact-links a:hover { color: var(--radar); }

.footer {
  text-align: center;
  padding: 28px;
  color: var(--text-dim);
  font-size: 0.72rem;
}
