:root {
  --bg-dark: #05070d;
  --bg-panel: rgba(11, 16, 32, 0.65);
  --bg-panel-strong: rgba(12, 22, 42, 0.86);
  --cyan-glow: #00e5ff;
  --blue-muted: #4ba3e3;
  --red-alert: #ff3b3b;
  --text-main: #e8f7ff;
  --text-muted: #8aa8b8;
  --line: rgba(120, 218, 255, 0.22);
  --line-strong: rgba(0, 229, 255, 0.48);
  --shadow-cyan: 0 0 26px rgba(0, 229, 255, 0.16);
  --shadow-blue: 0 16px 50px rgba(0, 0, 0, 0.36);
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-hud: Orbitron, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background:
    radial-gradient(circle at 82% 10%, rgba(0, 229, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 10% 28%, rgba(75, 163, 227, 0.11), transparent 30rem),
    var(--bg-dark);
  font-family: var(--font-body);
  line-height: 1.6;
  min-width: 320px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.055) 1px, transparent 1px),
    linear-gradient(130deg, rgba(75, 163, 227, 0.05), transparent 35%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.52));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 7px
  );
  opacity: 0.35;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--cyan-glow);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--text-main);
}

p,
ul,
dl,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(3.2rem, 9vw, 7.8rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 4.35rem);
  letter-spacing: 0;
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
}

ul {
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 50;
  transform: translateY(-160%);
  background: var(--cyan-glow);
  color: #001018;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-main);
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 15px;
  height: 15px;
  border: 1px solid var(--cyan-glow);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--cyan-glow), inset 0 0 8px rgba(0, 229, 255, 0.45);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 0.62rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--text-main);
  border-color: var(--cyan-glow);
}

.section {
  scroll-margin-top: 92px;
  padding: clamp(4.4rem, 7vw, 7.5rem) 0;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding-top: 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero-copy {
  display: grid;
  gap: 1.35rem;
}

.eyebrow {
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-headline {
  color: var(--text-main);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 800;
  max-width: 760px;
}

.hero-summary,
.section-heading p,
.body-copy,
.resume-panel p,
.contact-grid p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 780px;
}

.body-copy {
  display: grid;
  gap: 1rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.74rem 1rem;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 6px;
  background: rgba(10, 24, 42, 0.62);
  color: var(--text-main);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  font-weight: 800;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--cyan-glow);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(75, 163, 227, 0.16));
  border-color: rgba(0, 229, 255, 0.65);
}

.command-panel,
.insight-card,
.project-card,
.skill-cluster,
.credential-card,
.timeline-item,
.resume-panel,
.contact-card {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow-blue);
  backdrop-filter: blur(20px);
}

.command-panel {
  padding: clamp(1rem, 2vw, 1.25rem);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.command-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid rgba(0, 229, 255, 0.5);
  pointer-events: none;
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.status-dot {
  color: var(--cyan-glow);
}

.hero-model {
  width: min(500px, 96%);
  aspect-ratio: 1 / 0.82;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 26px rgba(0, 229, 255, 0.18));
}

.stl-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 48%, rgba(0, 229, 255, 0.2), transparent 34%),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(145deg, rgba(4, 13, 24, 0.95), rgba(3, 8, 16, 0.92));
}

.stl-stage::before {
  content: "";
  position: absolute;
  inset: 9%;
  z-index: 1;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 50%;
  transform: rotateX(68deg) rotateZ(-12deg);
  box-shadow:
    0 0 38px rgba(0, 229, 255, 0.12),
    inset 0 0 22px rgba(0, 229, 255, 0.08);
  pointer-events: none;
}

.stl-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, rgba(0, 229, 255, 0.16) 50%, transparent 100%),
    linear-gradient(transparent, rgba(255, 255, 255, 0.035), transparent);
  opacity: 0.18;
  mix-blend-mode: screen;
  transform: translateX(-72%);
  animation: hud-sweep 7s ease-in-out infinite;
}

.stl-canvas,
.stl-fallback,
.stl-vignette,
.stl-scanline {
  position: absolute;
  inset: 0;
}

.stl-canvas {
  z-index: 2;
  width: 100%;
  height: 100%;
}

.stl-fallback {
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4%;
  opacity: 1;
  transition: opacity 260ms ease;
}

.stl-stage.is-loaded .stl-fallback {
  opacity: 0;
}

.stl-vignette {
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.36) 100%),
    linear-gradient(180deg, rgba(0, 229, 255, 0.06), transparent 24%, rgba(0, 229, 255, 0.04));
}

.stl-scanline {
  z-index: 3;
  pointer-events: none;
  opacity: 0.26;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 6px,
    rgba(0, 229, 255, 0.13) 7px,
    transparent 8px
  );
}

.stl-readout {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 5;
  display: grid;
  gap: 0.2rem;
  pointer-events: none;
}

.stl-readout span,
.stl-chip-row span {
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stl-readout strong {
  color: var(--text-main);
  font-size: 0.92rem;
}

.stl-chip-row {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.42rem;
  pointer-events: none;
  max-width: min(54%, 260px);
}

.stl-chip-row span {
  border: 1px solid rgba(0, 229, 255, 0.26);
  border-radius: 999px;
  background: rgba(3, 11, 22, 0.68);
  padding: 0.28rem 0.46rem;
  color: var(--text-muted);
}

.stl-media-frame .stl-stage {
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: 0;
}

.dossier-model {
  min-height: 360px;
}

@keyframes hud-sweep {
  0%,
  18% {
    transform: translateX(-72%);
  }

  48%,
  100% {
    transform: translateX(72%);
  }
}

.telemetry-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.telemetry-card,
.metric {
  min-height: 84px;
  border: 1px solid rgba(120, 218, 255, 0.18);
  border-radius: 6px;
  padding: 0.85rem;
  background: rgba(3, 11, 22, 0.64);
}

.telemetry-card span,
.metric span {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.telemetry-card strong,
.metric strong {
  color: var(--text-main);
  font-size: 0.98rem;
}

.metric-alert {
  border-color: rgba(255, 59, 59, 0.42);
  box-shadow: inset 3px 0 0 rgba(255, 59, 59, 0.72);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.section-heading {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 2.4rem;
}

.section-heading.compact {
  margin-bottom: 1.2rem;
}

.dossier-status,
.project-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dossier-status span,
.project-status span {
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  background: rgba(3, 11, 22, 0.68);
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 0.32rem 0.52rem;
  text-transform: uppercase;
}

.dossier-status span:first-child,
.project-status span:first-child {
  border-color: rgba(0, 229, 255, 0.46);
  color: var(--cyan-glow);
}

.featured {
  border-block: 1px solid rgba(120, 218, 255, 0.16);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.035), rgba(255, 255, 255, 0));
}

.dossier-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.64fr);
  gap: clamp(1.2rem, 4vw, 2.5rem);
  align-items: stretch;
  margin-bottom: 1.25rem;
}

.dossier-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  color: var(--text-muted);
  border-left: 2px solid var(--line-strong);
  padding-left: clamp(1rem, 2vw, 1.4rem);
}

.media-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(3, 11, 22, 0.75);
}

.media-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #07101c;
}

.media-frame figcaption {
  color: var(--text-muted);
  border-top: 1px solid rgba(120, 218, 255, 0.18);
  padding: 0.75rem 0.9rem;
  font-size: 0.86rem;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1.25rem 0;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2.25rem;
}

.insight-card {
  border-radius: 8px;
  padding: clamp(1.1rem, 2.5vw, 1.35rem);
}

.insight-card h3 {
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.insight-card p {
  color: var(--text-muted);
}

.thermal-results {
  padding-top: 1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-card:hover {
  border-color: rgba(0, 229, 255, 0.56);
  box-shadow: var(--shadow-blue), var(--shadow-cyan);
  transform: translateY(-2px);
}

.project-card img,
.project-visual {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #07101c;
  border-bottom: 1px solid rgba(120, 218, 255, 0.18);
}

.project-card img {
  object-fit: cover;
}

.project-visual {
  position: relative;
  display: grid;
  align-content: center;
  gap: 0.45rem;
  padding: 1rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(255, 59, 59, 0.04)),
    repeating-linear-gradient(90deg, rgba(120, 218, 255, 0.08) 0, rgba(120, 218, 255, 0.08) 1px, transparent 1px, transparent 18px),
    #07101c;
}

.project-visual::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 6px;
  pointer-events: none;
}

.project-visual::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 72px;
  height: 30px;
  border-top: 1px solid rgba(0, 229, 255, 0.42);
  border-right: 1px solid rgba(0, 229, 255, 0.42);
  pointer-events: none;
}

.project-visual span {
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.project-visual strong {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  position: relative;
  z-index: 1;
}

.project-visual em {
  color: var(--text-muted);
  font-style: normal;
  max-width: 28ch;
  position: relative;
  z-index: 1;
}

.project-content {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  padding: 1rem;
}

.tag {
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.star-list {
  display: grid;
  gap: 0.55rem;
}

.star-list div {
  display: grid;
  gap: 0.15rem;
}

.star-list dt {
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.star-list dd {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.92rem;
}

.drawing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.drawing-strip a {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--text-muted);
}

.project-card .drawing-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(120, 218, 255, 0.16);
  border-radius: 6px;
  background: #f6f8fb;
  object-fit: cover;
}

.drawing-strip span {
  overflow: hidden;
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.skill-cluster {
  border-radius: 8px;
  padding: 1rem;
}

.skill-cluster h3 {
  color: var(--text-main);
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
}

.skill-cluster ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-cluster li {
  color: var(--text-muted);
  border: 1px solid rgba(120, 218, 255, 0.16);
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  background: rgba(3, 11, 22, 0.48);
  font-size: 0.86rem;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.credential-card {
  border-radius: 8px;
  overflow: hidden;
}

.credential-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f5f8fb;
}

.credential-card div {
  padding: 1rem;
}

.credential-card h3 {
  margin-bottom: 0.65rem;
}

.credential-card p {
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.timeline {
  display: grid;
  gap: 0.85rem;
}

.timeline-item {
  border-radius: 8px;
  padding: 1rem;
  display: grid;
  gap: 0.45rem;
  border-left: 3px solid rgba(0, 229, 255, 0.7);
}

.timeline-item span {
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-item p {
  color: var(--text-muted);
}

.resume-panel,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
}

.resume-panel {
  border-radius: 8px;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.contact-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.6fr);
}

.contact-card {
  display: grid;
  gap: 0.75rem;
  border-radius: 8px;
  padding: 1.1rem;
}

.contact-card span {
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.8);
  color: var(--text-muted);
  padding: 1.5rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .hero-grid,
  .two-column,
  .dossier-hero {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .result-grid,
  .credential-grid,
  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-panel {
    max-width: 760px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .nav {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 0.75rem 0;
  }

  .nav-links {
    justify-content: flex-start;
    margin-inline: -0.25rem;
    padding-bottom: 0.2rem;
  }

  .section {
    scroll-margin-top: 116px;
    padding: 4rem 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    gap: 1.45rem;
  }

  .hero-copy {
    gap: 1rem;
  }

  .hero-actions .button,
  .button-row .button {
    flex: 1 1 190px;
  }

  .telemetry-grid,
  .metric-grid,
  .insight-grid,
  .project-grid,
  .result-grid,
  .skill-grid,
  .credential-grid,
  .resume-panel,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .resume-panel {
    align-items: start;
  }

  .resume-panel .button {
    width: 100%;
  }

  .media-frame img,
  .stl-media-frame .stl-stage,
  .project-card img,
  .project-visual,
  .credential-card img {
    aspect-ratio: 4 / 3;
  }

  .dossier-model {
    min-height: 300px;
  }

  .stl-chip-row {
    display: none;
  }
}

@media (max-width: 420px) {
  .telemetry-card,
  .metric {
    min-height: 76px;
  }

  .button {
    width: 100%;
  }

  .hero-actions {
    gap: 0.6rem;
  }

  .hero-actions .button {
    flex-basis: calc(50% - 0.3rem);
    width: auto;
    padding-inline: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
