@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #090d12;
  --bg2: #0e151c;
  --line: #22323d;
  --ink: #e8f2f3;
  --mute: #9cabb0;
  --cy: #65e5dc;
  --am: #bc91ff;
  --head: "Space Grotesk", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --lab-bg: #090d12;
  --lab-panel: #10181e;
  --lab-panel-raised: #152027;
  --lab-border: #273840;
  --lab-border-soft: #1b2a31;
  --lab-text: #e8f2f3;
  --lab-muted: #9cabb0;
  --lab-cyan: #65e5dc;
  --lab-purple: #bc91ff;
  --lab-success: #76d6a6;
  --lab-danger: #ff8585;
  --lab-warning: #f2c779;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f5f3;
  --bg2: #e7eeeb;
  --line: #c5d3d1;
  --ink: #17262c;
  --mute: #53666b;
  --cy: #087d7c;
  --am: #7953ad;
  --lab-bg: #f1f5f3;
  --lab-panel: #fbfdfc;
  --lab-panel-raised: #edf3f0;
  --lab-border: #c5d3d1;
  --lab-border-soft: #d7e1de;
  --lab-text: #17262c;
  --lab-muted: #53666b;
  --lab-cyan: #087d7c;
  --lab-purple: #7953ad;
  --lab-success: #287b53;
  --lab-danger: #a43b45;
  --lab-warning: #8a641a;
}

* {
  scrollbar-color: var(--line) transparent;
}

html {
  scroll-padding-top: 96px;
  background: var(--bg);
}

body {
  position: relative;
  background:
    radial-gradient(ellipse at 72% 10%, color-mix(in srgb, var(--cy) 5%, transparent), transparent 40%),
    var(--bg);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body::after {
  position: fixed;
  z-index: 1500;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

::selection {
  color: #061110;
  background: var(--cy);
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 2px solid var(--cy);
  outline-offset: 4px;
}

.skip-link {
  background: var(--cy);
  color: #071112;
  font: 600 13px "IBM Plex Mono", monospace;
}

.site-header {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.navbar {
  width: min(1320px, 90%);
  height: 78px;
}

.logo {
  font-size: 19px;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.logo img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--cy) 45%, transparent));
}

.nav-links {
  gap: clamp(18px, 2.6vw, 38px);
}

.nav-links a {
  color: var(--mute);
  font: 500 11px "IBM Plex Mono", monospace;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.nav-links a::after {
  bottom: -10px;
  height: 2px;
  background: var(--cy);
  box-shadow: 0 0 12px color-mix(in srgb, var(--cy) 50%, transparent);
}

.nav-links a:hover,
.nav-links a.current {
  color: var(--ink);
}

.nav-cta,
.hero-primary,
.hero-secondary,
.view-all-projects,
.contact-submit,
.retry-btn {
  border-radius: 2px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.015em;
}

.nav-cta {
  padding: 11px 16px;
  border-color: var(--cy);
  color: var(--cy);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cy) 10%, transparent);
}

.nav-cta:hover {
  color: var(--bg);
  background: var(--cy);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--mute);
  background: color-mix(in srgb, var(--bg2) 82%, transparent);
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.theme-toggle:hover {
  color: var(--cy);
  border-color: var(--cy);
}

.theme-toggle-mark {
  position: relative;
  width: 13px;
  height: 13px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.theme-toggle-mark::after {
  position: absolute;
  inset: 2px 2px 2px 6px;
  content: "";
  background: currentColor;
  border-radius: 0 9px 9px 0;
}

.menu-toggle span {
  background: var(--ink);
}

#progress {
  height: 2px;
  background: var(--cy);
  box-shadow: 0 0 12px color-mix(in srgb, var(--cy) 55%, transparent);
}

.hero {
  width: min(1320px, 90%);
  min-height: min(830px, 100svh);
  padding: 132px 0 82px;
  overflow: clip;
}

.hero::before {
  position: absolute;
  z-index: 0;
  top: 12%;
  right: 0;
  width: 44%;
  height: 70%;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--cy) 8%, transparent), transparent 66%);
}

.hero-grid {
  inset: 5% 0 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--cy) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--cy) 8%, transparent) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000 5%, transparent 90%);
  -webkit-mask-image: linear-gradient(90deg, #000 5%, transparent 90%);
  opacity: 0.62;
}

.hero-content {
  width: min(750px, 57%);
  max-width: none;
  z-index: 3;
}

.hero-eyebrow,
.section-eyebrow,
.signal-label {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 25px;
  color: var(--cy);
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-eyebrow::before,
.section-eyebrow::before {
  width: 24px;
  height: 1px;
  content: "";
  background: var(--cy);
  box-shadow: 0 0 9px color-mix(in srgb, var(--cy) 55%, transparent);
}

.eyebrow-divider {
  color: var(--am);
}

.hero-title {
  max-width: 780px;
  font-size: clamp(48px, 6.7vw, 92px);
  line-height: 0.99;
  letter-spacing: -0.068em;
  font-weight: 500;
  text-wrap: balance;
}

.hero-title span {
  position: relative;
  color: var(--cy);
  text-shadow: 0 0 28px color-mix(in srgb, var(--cy) 17%, transparent);
}

.hero-description {
  max-width: 570px;
  margin-top: 29px;
  color: var(--mute);
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions {
  gap: 12px;
  margin-top: 34px;
}

.hero-primary,
.hero-secondary {
  min-height: 48px;
  padding: 0 19px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-primary {
  color: #071110;
  background: var(--cy);
  border-color: var(--cy);
  box-shadow: 0 0 25px color-mix(in srgb, var(--cy) 15%, transparent);
}

.hero-primary:hover {
  background: transparent;
  color: var(--cy);
}

.hero-secondary {
  border-color: var(--line);
  color: var(--ink);
}

.hero-secondary:hover {
  border-color: var(--am);
  color: var(--am);
}

.chain {
  position: relative;
  gap: 0;
  margin-top: 47px;
  padding-top: 17px;
}

.chain::before {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--mute);
  content: "SIGNAL PATH";
  font: 10px "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
}

.chain li {
  padding: 8px 13px;
  margin-right: -1px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg2) 50%, transparent);
  color: var(--mute);
  font: 500 11px "IBM Plex Mono", monospace;
  animation-duration: 7.5s;
}

.cyber-scene {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 0;
  width: min(40%, 580px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.scene-frame {
  position: absolute;
  inset: 2%;
  overflow: visible;
  background: radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--cy) 7%, transparent), transparent 67%);
}

.scene-readout {
  position: absolute;
  z-index: 2;
  color: var(--mute);
  font: 9px "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
}

.readout-top {
  top: 8%;
  left: 8%;
  color: var(--cy);
}

.readout-bottom {
  right: 8%;
  bottom: 8%;
}

.scene-readout::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border: 1px solid currentColor;
  content: "";
  vertical-align: 1px;
  transform: rotate(45deg);
}

.scene-fallback {
  position: absolute;
  inset: 7%;
  width: 86%;
  height: 86%;
  overflow: visible;
  color: var(--cy);
  opacity: .9;
  transition: opacity 220ms ease;
}

.scene-fallback .cube,
.scene-fallback .trace,
.scene-fallback .orbit,
.scene-fallback .marker {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.scene-fallback .cube {
  stroke: color-mix(in srgb, var(--cy) 70%, transparent);
  stroke-width: 1.1;
}

.scene-fallback .cube-back {
  stroke: color-mix(in srgb, var(--am) 58%, transparent);
}

.scene-fallback .cube-inner {
  stroke: color-mix(in srgb, var(--cy) 48%, transparent);
}

.scene-fallback .trace {
  stroke: color-mix(in srgb, var(--cy) 49%, transparent);
  stroke-width: .85;
}

.scene-fallback .orbit {
  stroke: color-mix(in srgb, var(--am) 40%, transparent);
  stroke-width: .8;
  stroke-dasharray: 2 5;
}

.scene-fallback .marker {
  stroke: color-mix(in srgb, var(--mute) 52%, transparent);
  stroke-width: .8;
}

.scene-fallback .node {
  fill: var(--bg);
  stroke: var(--cy);
  stroke-width: 1.2;
}

.scene-fallback .core-point {
  fill: var(--cy);
  animation: coreSignal 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes coreSignal {
  50% { opacity: .45; transform: scale(1.6); }
}

@media (prefers-reduced-motion: reduce) {
  .scene-fallback .core-point { animation: none; }
}

.scene-fallback .node-extra {
  transition: opacity 180ms ease;
}

#heroScene.scene-ready + .scene-fallback {
  opacity: 0;
}

#heroScene,
#heroScene canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

#heroScene canvas {
  display: block;
}

.signal-strip {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(1320px, 90%);
  min-height: 72px;
  margin: -1px auto 38px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg2) 74%, transparent), transparent);
}

.signal-label {
  margin: 0;
  font-size: 9px;
  white-space: nowrap;
}

.signal-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  font: 500 11px "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.signal-items i {
  width: 4px;
  height: 4px;
  background: var(--am);
  transform: rotate(45deg);
}

.signal-index {
  color: var(--mute);
  font: 10px "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
}

.about-section,
.skills-section,
.projects-preview,
.contact-section {
  width: min(1120px, 84%);
  padding: clamp(85px, 11vw, 150px) 0;
}

.section-heading {
  max-width: 820px;
}

.section-eyebrow {
  margin-bottom: 20px;
}

.section-heading h2,
.contact-content h2 {
  color: var(--ink);
  font-size: clamp(38px, 5.6vw, 68px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.section-heading h2 span,
.contact-content h2 span {
  color: var(--cy);
}

.about-content {
  gap: clamp(38px, 8vw, 110px);
  margin-top: 57px;
}

.about-intro p {
  max-width: 500px;
  font: 500 clamp(25px, 3vw, 36px)/1.3 var(--head);
  letter-spacing: -0.04em;
}

.about-details {
  padding-top: 3px;
}

.about-details p,
.flow-note,
.contact-description {
  color: var(--mute);
  font-size: 14px;
  line-height: 1.9;
}

.rm-title {
  margin-top: 85px;
  color: var(--ink);
  font: 500 15px "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.roadmap {
  gap: 48px;
  margin-top: 32px;
  padding: 8px 0 8px 58px;
}

.rm-track {
  stroke: var(--line);
}

.rm-draw {
  stroke: var(--cy);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--cy) 55%, transparent));
}

.rm-node,
.rm-dot {
  background: var(--bg);
  border-color: var(--line);
}

.rm-step.on > .rm-node,
.rm-path.on > .rm-dot {
  background: var(--cy);
  border-color: var(--cy);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--cy) 14%, transparent), 0 0 15px color-mix(in srgb, var(--cy) 32%, transparent);
}

.rm-body {
  opacity: 1;
  transform: none;
}

.rm-stage,
.rm-tag {
  color: var(--cy);
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rm-stage em {
  color: var(--mute);
  text-transform: none;
  letter-spacing: 0;
}

.rm-body h4,
.rm-path h4 {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.rm-path {
  border-left: 1px solid var(--line);
}

.rm-path > *:not(.rm-dot) {
  opacity: 1;
  transform: none;
}

.rm-path p:not(.rm-tag) {
  color: var(--mute);
}

.flow-note {
  margin-top: 25px;
}

.flow {
  margin-top: 48px;
}

.flow li {
  color: var(--mute);
  font: 500 11px "IBM Plex Mono", monospace;
}

.flow li::before {
  background: var(--bg);
  border-color: var(--line);
}

.flow li.on {
  color: var(--cy);
}

.flow li.on::before {
  background: var(--cy);
  border-color: var(--cy);
  box-shadow: 0 0 12px color-mix(in srgb, var(--cy) 35%, transparent);
}

.clusters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.cluster {
  position: relative;
  min-height: 200px;
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--bg2) 82%, transparent), color-mix(in srgb, var(--bg) 68%, transparent));
  transition: border-color 240ms ease, transform 240ms ease;
}

.cluster::before,
.featured-project::after,
.project-card::after {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 26px;
  height: 1px;
  content: "";
  background: var(--cy);
  opacity: 0.9;
}

.cluster:hover {
  border-color: color-mix(in srgb, var(--cy) 55%, var(--line));
  transform: translateY(-3px);
}

.cluster h3 {
  margin-bottom: 15px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.cluster h3 b {
  color: var(--cy);
  font: 500 10px "IBM Plex Mono", monospace;
}

.cluster ul {
  gap: 0;
  padding-left: 15px;
}

.cluster ul::before {
  transform: scaleY(1);
  background: color-mix(in srgb, var(--cy) 43%, var(--line));
}

.cluster li {
  padding: 4px 0;
  color: var(--mute);
  font-size: 12px;
}

.cluster li::before {
  left: -14px;
  top: 11px;
  width: 4px;
  height: 4px;
  border: 0;
  border-radius: 0;
  background: var(--cy);
}

.rm-reveal,
.reveal {
  opacity: 1;
  transform: none;
}

.projects-preview {
  position: relative;
}

.featured-projects {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 49px;
}

.featured-project,
.project-card {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg2);
  box-shadow: 0 16px 38px color-mix(in srgb, var(--bg) 28%, transparent);
  transition: transform 260ms var(--ease), border-color 260ms ease, box-shadow 260ms ease;
}

.featured-project::after,
.project-card::after {
  z-index: 4;
  pointer-events: none;
}

.featured-project:hover,
.project-card:hover {
  transform: translateY(-5px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  border-color: var(--cy);
  box-shadow: 0 20px 44px color-mix(in srgb, var(--bg) 45%, transparent), 0 0 25px color-mix(in srgb, var(--cy) 6%, transparent);
}

.featured-project-image,
.project-thumbnail {
  background: color-mix(in srgb, var(--bg2) 65%, var(--cy) 4%);
}

.featured-project-image {
  object-fit: cover;
}

.project-thumbnail {
  aspect-ratio: 16 / 10;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.project-card:hover .project-thumbnail img,
.featured-project:hover .featured-project-image {
  transform: scale(1.035);
}

.featured-project-content,
.project-content {
  padding: 23px 24px 25px;
  background: var(--bg2);
}

.featured-project-category,
.project-category,
.project-detail-category {
  color: var(--cy);
  font: 500 9px "IBM Plex Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.featured-project-content h3,
.project-title {
  color: var(--ink);
  font: 500 clamp(20px, 2vw, 26px)/1.2 var(--head);
  letter-spacing: -0.035em;
}

.featured-project-content p:not(.featured-project-category),
.project-description {
  color: var(--mute);
  font-size: 12px;
  line-height: 1.8;
}

.card-cta,
.project-link,
.view-all-projects {
  color: var(--cy);
  font: 500 11px "IBM Plex Mono", monospace;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.projects-preview-action {
  margin-top: 34px;
}

.view-all-projects {
  display: inline-flex;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--cy) 52%, var(--line));
}

.projects-page {
  width: min(1320px, 90%);
  margin: 0 auto;
  padding: 158px 0 120px;
}

.projects-heading {
  position: relative;
  max-width: 810px;
  margin-bottom: 56px;
  padding: 0 0 38px;
  border-bottom: 1px solid var(--line);
}

.projects-heading::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 74px;
  height: 2px;
  content: "";
  background: var(--cy);
}

.projects-heading h1 {
  color: var(--ink);
  font: 500 clamp(58px, 10vw, 112px)/0.95 var(--head);
  letter-spacing: -0.075em;
}

.projects-intro {
  max-width: 610px;
  margin-top: 23px;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.85;
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
}

.project-technologies,
.project-detail-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-technologies span,
.project-detail-technologies span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 1px;
  color: var(--mute);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  font: 10px "IBM Plex Mono", monospace;
}

.project-link {
  border-bottom: 1px solid color-mix(in srgb, var(--cy) 55%, var(--line));
  padding-bottom: 6px;
}

#projectDetails {
  max-width: 100%;
}

.project-detail-title {
  max-width: 1000px;
  margin-bottom: 25px;
  color: var(--ink);
  font: 500 clamp(48px, 8vw, 94px)/0.98 var(--head);
  letter-spacing: -0.07em;
}

.project-detail-description {
  max-width: 780px;
  margin-bottom: 45px;
  color: var(--mute);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.project-detail-section {
  margin-top: 65px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.project-detail-section h2 {
  margin-bottom: 20px;
  color: var(--ink);
  font: 500 12px "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-detail-section p,
.project-detail-features li {
  color: var(--mute);
  font-size: 14px;
  line-height: 1.9;
}

.project-detail-features li::marker {
  color: var(--cy);
}

.project-detail-links a {
  padding: 11px 14px;
  border: 1px solid var(--line);
  color: var(--cy);
  font: 500 11px "IBM Plex Mono", monospace;
  text-transform: uppercase;
}

.project-detail-links a:hover {
  background: color-mix(in srgb, var(--cy) 8%, transparent);
}

.project-hero-image,
.gallery-image {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg2);
}

.project-gallery {
  gap: 14px;
}

.contact-section {
  position: relative;
  width: min(1120px, 84%);
  border-top: 1px solid var(--line);
}

.contact-content {
  max-width: 840px;
}

.contact-content h2 {
  margin-bottom: 21px;
}

.contact-form {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
  margin-top: 34px;
}

.form-group:last-of-type {
  grid-column: 1 / -1;
}

.form-group label {
  color: var(--mute);
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 1px;
  color: var(--ink);
  background: var(--bg2);
  font-size: 14px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--cy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cy) 12%, transparent);
}

.contact-submit {
  min-height: 46px;
  padding: 0 20px;
  color: #071110;
  background: var(--cy);
}

.contact-submit:hover {
  transform: translateY(-2px);
}

.contact-status {
  grid-column: 1 / -1;
  color: var(--mute);
  font: 12px "IBM Plex Mono", monospace;
}

.site-footer {
  width: min(1320px, 90%);
  padding: 40px 0 26px;
  border-color: var(--line);
}

.footer-brand a {
  color: var(--ink);
  font-size: 17px;
  letter-spacing: 0.13em;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: var(--mute);
}

.footer-links a {
  font: 10px "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--cy);
}

.footer-bottom {
  border-color: var(--line);
  font: 10px "IBM Plex Mono", monospace;
}

.state-msg {
  color: var(--mute);
}

.retry-btn {
  padding: 7px 11px;
  border-radius: 1px;
}

/* ============================================================
   SOPDEV — Signature Startup Identity Experience
   ============================================================ */
.sop-startup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.45s;
  will-change: opacity, transform;
  user-select: none;
  overflow: hidden;
  cursor: default;
}

.sop-startup.is-leaving {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.025);
  pointer-events: none;
}

/* Background subtle engineering grid */
.sop-startup-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(101, 229, 220, 0.08) 0%, transparent 65%),
    linear-gradient(rgba(101, 229, 220, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 229, 220, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  background-position: center, center, center;
}

:root[data-theme="light"] .sop-startup-bg {
  opacity: 0.25;
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(8, 125, 124, 0.08) 0%, transparent 65%),
    linear-gradient(rgba(8, 125, 124, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 125, 124, 0.04) 1px, transparent 1px);
}

/* Stage container */
.sop-startup-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
}

/* SVG Signature sizing & glow */
.sop-signature-svg {
  width: min(300px, 80vw);
  height: auto;
  max-width: 100%;
  overflow: visible;
  display: block;
  filter: drop-shadow(0 0 10px rgba(101, 229, 220, 0.35));
  transition: filter 0.4s ease;
}

:root[data-theme="light"] .sop-signature-svg {
  filter: drop-shadow(0 0 6px rgba(8, 125, 124, 0.25));
}

@media (min-width: 768px) {
  .sop-signature-svg {
    width: 330px;
  }
}

/* SVG stroke styling */
.sop-sig-stroke {
  fill: none;
  stroke: var(--cy);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.42s cubic-bezier(0.35, 0, 0.2, 1);
}

.sop-sig-stroke.is-drawn {
  stroke-dashoffset: 0;
}

/* Completed identity shimmer */
.sop-signature-svg.is-complete {
  filter: drop-shadow(0 0 14px rgba(101, 229, 220, 0.7))
          drop-shadow(0 0 2px rgba(101, 229, 220, 0.9));
}

:root[data-theme="light"] .sop-signature-svg.is-complete {
  filter: drop-shadow(0 0 10px rgba(8, 125, 124, 0.5));
}

/* SOPDEV Wordmark */
.sop-startup-wordmark {
  margin-top: 24px;
  font-family: var(--head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.38em;
  color: var(--ink);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              letter-spacing 0.5s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.sop-startup-wordmark::before,
.sop-startup-wordmark::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--cy);
  opacity: 0.4;
  transition: width 0.4s ease;
}

.sop-startup-wordmark.is-revealed {
  opacity: 0.95;
  transform: translateY(0);
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .sop-sig-stroke {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
  .sop-startup-wordmark {
    opacity: 0.95 !important;
    transform: none !important;
    transition: none !important;
  }
}

.skeleton-card,
.project-card.is-skeleton {
  border-color: var(--line);
  border-radius: 2px;
  background: var(--bg2);
}

.skeleton,
.is-skeleton .skeleton {
  background-color: color-mix(in srgb, var(--bg2) 70%, var(--cy) 5%);
}

.skeleton::after {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--cy) 9%, transparent), transparent);
}

#apiLoader::before {
  background: linear-gradient(90deg, transparent, var(--cy), transparent);
}

.cursor-light {
  position: fixed;
  z-index: 1;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  top: -170px;
  left: -170px;
  opacity: 0;
  background: radial-gradient(circle, var(--cy), transparent 68%);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

.cursor-light.is-active {
  opacity: 0.09;
}

.hero-primary,
.hero-secondary,
.nav-cta {
  translate: var(--mag-x, 0px) var(--mag-y, 0px);
}

.hero-grid {
  translate: var(--pointer-x, 0px) var(--pointer-y, 0px);
}

.hero-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, color-mix(in srgb, var(--cy) 12%, transparent) 50%, transparent 52%);
  background-size: 100% 220px;
  opacity: 0.18;
  animation: labScan 18s linear infinite;
}

@keyframes labScan {
  to { background-position: 0 440px; }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-light { display: none; }
  .hero-grid::after { animation: none; }
  .hero-grid, .hero-primary, .hero-secondary, .nav-cta { translate: none; }
  .featured-project:hover, .project-card:hover { transform: none; }
}

[data-scramble] {
  display: inline-block;
}

@media (max-width: 1000px) {
  .clusters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .cyber-scene {
    right: 0;
    width: 38%;
    opacity: .76;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .hero-content {
    width: 59%;
  }

  .hero-title {
    font-size: clamp(46px, 6.2vw, 66px);
  }

  .scene-fallback .node-extra,
  .scene-fallback .orbit-secondary {
    display: none;
  }
}

@media (max-width: 700px) {
  .navbar {
    width: 92%;
    height: 68px;
    gap: 12px;
  }

  .logo {
    font-size: 16px;
    margin-right: auto;
  }

  .nav-cta {
    display: none;
  }

  .menu-toggle {
    order: 3;
    width: 25px;
  }

  .theme-toggle {
    order: 2;
    min-height: 34px;
    padding: 0 8px;
  }

  .theme-toggle-label {
    font-size: 9px;
  }

  .nav-links {
    top: 68px;
    padding: 10px 4% 18px;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    border-bottom-color: var(--line);
    backdrop-filter: blur(16px);
  }

  .nav-links a {
    padding: 13px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  }

  .hero {
    width: 90%;
    min-height: auto;
    padding: 140px 0 58px;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-content {
    width: 100%;
  }

  .hero-title {
    max-width: 690px;
    font-size: clamp(48px, 12vw, 76px);
  }

  .hero-description {
    max-width: 540px;
    font-size: 14px;
  }

  .cyber-scene {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 360px);
    margin: 18px auto 0;
    aspect-ratio: 1.42;
    transform: none;
    opacity: .88;
    flex: none;
  }

  .scene-frame {
    inset: 0;
  }

  .scene-fallback {
    inset: 5% 12%;
    width: 76%;
    height: 90%;
  }

  #heroScene {
    display: none;
  }

  .scene-readout {
    font-size: 8px;
  }

  .scene-fallback .node-extra,
  .scene-fallback .node-mobile-hide,
  .scene-fallback .orbit-secondary {
    display: none;
  }

  .readout-top {
    top: 2%;
    left: 2%;
  }

  .readout-bottom {
    right: 2%;
    bottom: 2%;
  }

  .hero-eyebrow {
    position: relative;
    z-index: 2;
    gap: 7px;
    font-size: 9px;
  }

  .chain {
    margin-top: 39px;
  }

  .chain li {
    padding: 8px 10px;
    font-size: 10px;
  }

  .signal-strip {
    grid-template-columns: 1fr auto;
    gap: 12px;
    width: 90%;
    margin: 4px auto 16px;
    padding: 15px 0;
  }

  .signal-label {
    grid-column: 1 / -1;
  }

  .signal-items {
    gap: 8px;
    font-size: 9px;
  }

  .signal-index {
    font-size: 9px;
  }

  .about-section,
  .skills-section,
  .projects-preview,
  .contact-section {
    width: 90%;
    padding: 78px 0;
  }

  .about-content {
    gap: 26px;
    margin-top: 35px;
  }

  .rm-title {
    margin-top: 64px;
  }

  .roadmap {
    padding-left: 42px;
    gap: 39px;
  }

  .rm-node {
    left: -38px;
  }

  .rm-spine {
    left: 4px;
  }

  .rm-fork {
    grid-template-columns: 1fr;
    margin-left: -30px;
  }

  .rm-fork > svg {
    display: none;
  }

  .rm-path {
    padding: 17px 0 0 25px;
  }

  .rm-dot {
    top: 20px;
  }

  .flow {
    flex-direction: column;
    gap: 14px;
    padding: 0 0 0 26px;
  }

  .flow > svg {
    display: none;
  }

  .flow li::before {
    top: 4px;
    left: -26px;
  }

  .clusters {
    grid-template-columns: 1fr;
    gap: 11px;
    margin-top: 34px;
  }

  .cluster {
    min-height: 0;
    padding: 18px;
  }

  .featured-projects,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 32px;
  }

  .projects-page {
    width: 90%;
    padding: 126px 0 78px;
  }

  .projects-heading {
    margin-bottom: 35px;
  }

  .project-content,
  .featured-project-content {
    padding: 20px;
  }

  #projectDetails {
    width: 100%;
  }

  .project-detail-title {
    font-size: clamp(46px, 12vw, 68px);
  }

  .project-detail-section {
    margin-top: 45px;
    padding-top: 22px;
  }

  .project-detail-links {
    align-items: flex-start;
    gap: 10px;
    margin-top: 38px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .form-group:last-of-type,
  .contact-status {
    grid-column: auto;
  }

  .contact-section {
    padding: 78px 0;
  }

  .footer-content,
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
  }

  .footer-links {
    gap: 15px;
  }
}

@media (max-width: 380px) {
  .theme-toggle {
    gap: 6px;
    padding: 0 6px;
  }

  .theme-toggle-label {
    font-size: 8px;
  }

  .hero-actions {
    gap: 9px;
  }

  .hero-primary,
  .hero-secondary {
    padding: 0 12px;
    font-size: 10px;
  }

  .signal-items {
    gap: 6px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #preloader {
    display: none !important;
  }

  .reveal,
  .rm-reveal,
  .rm-body,
  .rm-path > * {
    opacity: 1 !important;
    transform: none !important;
  }
}