:root {
  color-scheme: dark;
  --lab-black: #02040a;
  --deep-navy: #06111f;
  --portal-navy: #001a2f;
  --cyan: #62e8f5;
  --neon-cyan: #25d7ff;
  --signal-blue: #0b77c5;
  --soft-ice: #d9fbff;
  --text: rgba(232, 252, 255, 0.9);
  --muted: rgba(177, 222, 234, 0.7);
  --border: rgba(98, 232, 245, 0.24);
  --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--lab-black);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-main);
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(98, 232, 245, 0.035) 8% calc(8% + 1px), transparent calc(8% + 1px) 92%, rgba(98, 232, 245, 0.035) 92% calc(92% + 1px), transparent calc(92% + 1px)),
    radial-gradient(circle at 76% 32%, rgba(37, 215, 255, 0.13), transparent 23rem),
    radial-gradient(circle at 12% 82%, rgba(11, 119, 197, 0.13), transparent 28rem),
    linear-gradient(145deg, var(--lab-black), var(--deep-navy) 55%, #010208);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(98, 232, 245, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 232, 245, 0.022) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
  color: inherit;
}

a:focus-visible {
  border-radius: 0.4rem;
  outline: 2px solid var(--cyan);
  outline-offset: 0.3rem;
  box-shadow: 0 0 1.4rem rgba(37, 215, 255, 0.32);
}

.lab-header {
  display: flex;
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
  padding-block: clamp(1rem, 4vw, 2rem);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link,
.back-link {
  font-family: var(--font-mono);
  text-decoration: none;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--soft-ice);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-link img {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  filter: drop-shadow(0 0 0.8rem rgba(37, 215, 255, 0.32));
}

.back-link {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  transition: color 160ms ease;
}

.back-link:hover {
  color: var(--soft-ice);
}

.projects-main {
  width: min(100% - 2rem, 68rem);
  margin-inline: auto;
  padding: clamp(2.5rem, 8vw, 6.5rem) 0 clamp(3rem, 8vw, 6rem);
}

.lab-intro {
  max-width: 47rem;
}

.section-label,
.project-label {
  margin: 0 0 0.75rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.2rem;
  color: var(--soft-ice);
  font-size: clamp(3rem, 10vw, 7.25rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
  text-shadow: 0 0 2.6rem rgba(37, 215, 255, 0.2);
}

.intro-copy {
  max-width: 39rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.3vw, 1.22rem);
  line-height: 1.65;
}

.featured-project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  overflow: hidden;
  align-items: end;
  gap: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  background:
    linear-gradient(115deg, rgba(2, 4, 10, 0.92), rgba(0, 26, 47, 0.66)),
    radial-gradient(circle at 100% 0%, rgba(98, 232, 245, 0.16), transparent 42%);
  box-shadow:
    0 1.8rem 5rem rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(217, 251, 255, 0.1),
    0 0 3rem rgba(37, 215, 255, 0.07);
}

.featured-project::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: linear-gradient(var(--cyan), var(--signal-blue), transparent 92%);
  box-shadow: 0 0 1.3rem rgba(37, 215, 255, 0.52);
}

.project-copy {
  position: relative;
  z-index: 1;
}

h2 {
  margin-bottom: 0.7rem;
  color: var(--soft-ice);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.project-copy > p:not(.project-label) {
  max-width: 43rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}

.tech-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.tech-list li {
  padding: 0.35rem 0.58rem;
  border: 1px solid rgba(98, 232, 245, 0.16);
  border-radius: 999px;
  color: rgba(217, 251, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(2, 4, 10, 0.42);
}

.launch-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border: 1px solid rgba(98, 232, 245, 0.44);
  border-radius: 0.8rem;
  color: var(--soft-ice);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.025em;
  text-decoration: none;
  background: rgba(0, 26, 47, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(217, 251, 255, 0.12),
    0 0 1.5rem rgba(37, 215, 255, 0.1);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.launch-link:hover {
  border-color: rgba(217, 251, 255, 0.72);
  background: rgba(0, 38, 66, 0.86);
  transform: translateY(-2px);
}

.future-note {
  margin: 1.25rem 0 0;
  color: rgba(177, 222, 234, 0.5);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .lab-header,
  .projects-main {
    width: min(100% - 1.5rem, 68rem);
  }

  .lab-header {
    align-items: flex-start;
  }

  .brand-link span {
    display: none;
  }

  .projects-main {
    padding-top: 3rem;
  }

  .featured-project {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .launch-link {
    width: 100%;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: clamp(3rem, 18vw, 4.7rem);
  }

  .back-link {
    max-width: 10rem;
    text-align: right;
  }
}

@media (pointer: coarse) {
  .back-link,
  .brand-link,
  .launch-link {
    min-height: 44px;
    touch-action: manipulation;
  }

  .featured-project {
    backdrop-filter: none;
  }
}

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

  .launch-link:hover {
    transform: none;
  }
}
