*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #060709;
  color: #f3f3f0;
}

body {
  margin: 0;
  padding: 0;
  background-color: #060709;
  color: #f3f3f0;
  font-family: "SF Pro Display", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: "JetBrains Mono", "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-variant-ligatures: none;
}

/* Fixed 3D LiDAR Perception Canvas */
#lidar-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.canvas-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 65% at 50% 42%, transparent 32%, rgba(6, 7, 9, 0.82) 100%),
    linear-gradient(to bottom, rgba(6, 7, 9, 0.35) 0%, transparent 18%, transparent 66%, rgba(6, 7, 9, 0.96) 98%);
}

/* Navigation Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(6, 7, 9, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 200ms ease, border-color 200ms ease;
}

.top-bar.scrolled {
  background: rgba(6, 7, 9, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.brand {
  color: #f3f3f0;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: #9ba1b0;
  text-decoration: none;
  font-size: 14px;
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: #f3f3f0;
}

/* Full-Viewport Hero Stage */
.hero-stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  max-width: 1320px;
  margin: 0 auto;
  padding: 120px 48px 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-name {
  margin: 0;
  font-size: clamp(54px, 8.2vw, 118px);
  font-weight: 600;
  letter-spacing: -0.048em;
  line-height: 0.92;
  color: #f6f6f3;
}

.hero-sub {
  margin: 22px 0 0;
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 400;
  color: #a6acb9;
  max-width: 44ch;
  line-height: 1.42;
  letter-spacing: -0.015em;
}

.hero-sub strong {
  color: #f3f3f0;
  font-weight: 500;
}

/* Subtle Sensor Controls on Bottom-Right */
.sensor-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  text-align: right;
}

.sensor-coords {
  font-size: 12px;
  color: #828998;
  letter-spacing: 0.05em;
}

.mode-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 12, 16, 0.65);
  backdrop-filter: blur(8px);
}

.mode-btn {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: #8d94a3;
  padding: 8px 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.mode-btn:last-child {
  border-right: none;
}

.mode-btn:hover {
  color: #f3f3f0;
}

.mode-btn[data-active="true"] {
  background: #f3f3f0;
  color: #060709;
  font-weight: 600;
}

.scroll-cue {
  font-size: 12px;
  color: #9ba1b0;
  text-decoration: none;
}

.scroll-cue:hover {
  color: #f3f3f0;
}

/* Resume Content Layer */
.content-layer {
  position: relative;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(6, 7, 9, 0) 0%, rgba(6, 7, 9, 0.94) 90px, #07080b 200px);
  padding-top: 96px;
  padding-bottom: 72px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.chapter {
  padding-top: 104px;
}

.chapter-head {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 32px;
  align-items: baseline;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.chapter-num {
  font-size: 12px;
  color: #7c8392;
  letter-spacing: 0.08em;
}

.chapter-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1.05;
  color: #f6f6f3;
}

/* Editorial Hairline Rows */
.entry-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease;
}

.entry-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.entry-row:hover {
  border-bottom-color: rgba(255, 255, 255, 0.24);
}

.entry-meta {
  font-size: 13px;
  color: #828998;
  line-height: 1.65;
}

.entry-date {
  color: #f3f3f0;
  font-weight: 600;
  display: block;
}

.entry-stack {
  margin-top: 10px;
  color: #c7cdd8;
  font-size: 12px;
}

.entry-company {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #f6f6f3;
}

.company-note {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: #828998;
  margin-left: 6px;
}

.entry-role {
  font-size: 16px;
  color: #c7cdd8;
  margin-top: 4px;
}

.role-progression {
  margin-top: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.role-primary {
  color: #f3f3f0;
  font-weight: 500;
}

.role-secondary {
  font-size: 14px;
  color: #8c93a3;
}

.role-dates {
  font-size: 12px;
  color: #828998;
  font-weight: 400;
}

/* Footer */
.site-footer {
  margin-top: 104px;
  padding: 48px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.email-trigger {
  background: none;
  border: none;
  padding: 0;
  color: #f6f6f3;
  font-family: inherit;
  font-size: clamp(22px, 3.6vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  flex-wrap: wrap;
}

.copy-hint {
  font-size: 12px;
  color: #9ba1b0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 12px;
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #9ba1b0;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: #f3f3f0;
}

@media (prefers-reduced-motion: reduce) {
  .entry-row {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .top-bar {
    padding: 14px 18px;
  }
  .hero-stage {
    padding: 96px 18px 32px;
  }
  .sensor-panel {
    align-items: flex-start;
    text-align: left;
  }
  .container {
    padding: 0 18px;
  }
  .chapter-head,
  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .chapter {
    padding-top: 72px;
  }
}
