:root {
  color-scheme: dark;
  --deep: #04080f;
  --dark: #070d18;
  --mid: #0c1a28;
  --card: #0e2033;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --text: #ddf0f5;
  --muted: #7ab4c0;
  --dim: #3d6e7c;
  --lake: #1ec8d8;
  --foam: #6de4f0;
  --sun: #f5c84a;
  --amber: #e8952a;
  --coral: #f07055;
  --pine: #3ec87a;
  --berry: #c958b0;
  --glow-lake: rgba(30, 200, 216, 0.3);
  --glow-sun: rgba(245, 200, 74, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--deep);
  color: var(--text);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.55;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse 90% 70% at 18% 8%, rgba(30, 200, 216, 0.12), transparent 56%),
    radial-gradient(ellipse 70% 60% at 82% 92%, rgba(240, 112, 85, 0.07), transparent 52%),
    radial-gradient(ellipse 80% 55% at 52% 48%, rgba(62, 200, 122, 0.07), transparent 62%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap,
.topline,
.hero-inner {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

.scroll-meter {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 50;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.scroll-meter span {
  display: block;
  width: calc(var(--scroll-progress, 0) * 100%);
  height: 100%;
  background: linear-gradient(90deg, var(--lake), var(--sun), var(--coral));
  box-shadow: 0 0 14px var(--glow-lake);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: min(820px, 82vh);
  overflow: hidden;
  grid-template-rows: auto 1fr;
  isolation: isolate;
}

.hero-image,
.hero-shimmer {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-image {
  background:
    linear-gradient(90deg, rgba(4, 8, 15, 0.94) 0%, rgba(4, 8, 15, 0.71) 48%, rgba(4, 8, 15, 0.3) 100%),
    linear-gradient(180deg, rgba(4, 8, 15, 0.12) 0%, rgba(4, 8, 15, 0.18) 62%, var(--deep) 100%),
    url("/assets/nflux-water-signal-hero.webp") center / cover no-repeat;
  transform: scale(1.035);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.hero-shimmer {
  z-index: -1;
  background:
    radial-gradient(ellipse 65% 50% at 76% 42%, rgba(30, 200, 216, 0.13), transparent 68%),
    linear-gradient(180deg, transparent 76%, var(--deep));
}

@keyframes hero-drift {
  from { transform: scale(1.035) translate3d(0, 0, 0); }
  to { transform: scale(1.075) translate3d(-0.8%, -0.5%, 0); }
}

.topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  font-size: 0.98rem;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--lake), var(--sun), var(--coral), var(--lake));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.13), 0 0 20px var(--glow-lake);
  animation: spin 18s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 650;
}

.nav-links > a,
.status {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.nav-links > a {
  color: var(--muted);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.nav-links > a:hover {
  color: var(--foam);
  border-color: rgba(30, 200, 216, 0.35);
  background: rgba(30, 200, 216, 0.08);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.status i,
.signal-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pine);
  box-shadow: 0 0 12px var(--pine);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(40px, 7vw, 90px);
  align-items: end;
  padding: clamp(70px, 14vh, 150px) 0 clamp(70px, 11vh, 110px);
}

.kicker {
  margin: 0 0 14px;
  color: var(--sun);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 760;
  letter-spacing: 0;
}

h1 {
  max-width: 850px;
  font-size: clamp(3.8rem, 8.5vw, 8rem);
  line-height: 0.84;
  text-shadow: 0 5px 42px rgba(0, 0, 0, 0.62);
}

h1 span,
h2 span {
  color: var(--lake);
  text-shadow: 0 0 34px rgba(30, 200, 216, 0.34);
}

.lead {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(221, 240, 245, 0.82);
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 760;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

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

.button.primary {
  border-color: var(--lake);
  background: var(--lake);
  color: #031116;
  box-shadow: 0 14px 34px rgba(30, 200, 216, 0.24);
}

.button.secondary {
  background: rgba(4, 8, 15, 0.52);
  backdrop-filter: blur(14px);
}

.button.secondary:hover {
  border-color: rgba(245, 200, 74, 0.45);
  box-shadow: 0 0 24px var(--glow-sun);
}

.signal-card {
  align-self: end;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(12, 28, 38, 0.74);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(30, 200, 216, 0.1);
  backdrop-filter: blur(20px);
}

.signal-label,
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signal-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-card > strong {
  display: block;
  margin-top: 24px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.signal-card p {
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.signal-card a,
.project-link {
  color: var(--foam);
  font-size: 0.84rem;
  font-weight: 760;
}

main,
footer {
  position: relative;
  z-index: 1;
}

section {
  position: relative;
  padding: 96px 0;
}

.launchpad {
  padding-top: 72px;
  background:
    radial-gradient(ellipse 75% 60% at 88% 18%, rgba(62, 200, 122, 0.07), transparent 65%),
    var(--deep);
}

.section-heading {
  max-width: 730px;
  margin-bottom: 42px;
}

h2 {
  font-size: clamp(2.6rem, 5.2vw, 5.1rem);
  line-height: 0.94;
}

.section-heading > p:last-child {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

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

.project-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  grid-template-rows: auto 1fr;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(30, 200, 216, 0.38);
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.48), 0 0 28px rgba(30, 200, 216, 0.12);
}

.project-visual {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.photo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.08);
  transition: transform 650ms ease, filter 350ms ease;
}

.project-card:hover .photo-visual img {
  transform: scale(1.045);
  filter: saturate(1.05) contrast(1.08);
}

.photo-visual::after {
  position: absolute;
  inset: 45% 0 0;
  content: "";
  background: linear-gradient(transparent, var(--card));
}

.route-visual {
  background:
    radial-gradient(circle at 21% 69%, rgba(245, 200, 74, 0.16), transparent 14%),
    radial-gradient(circle at 79% 31%, rgba(30, 200, 216, 0.18), transparent 16%),
    linear-gradient(145deg, #08131d, #0e2934);
}

.route-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(135deg, transparent, #000 35%, #000 70%, transparent);
}

.route-line {
  position: absolute;
  inset: 28% 20% 30%;
  border-top: 2px dashed rgba(109, 228, 240, 0.62);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.route-line i {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--lake);
  border-radius: 50%;
  background: var(--mid);
  box-shadow: 0 0 14px var(--glow-lake);
}

.route-line i:first-child { left: 0; top: -6px; }
.route-line i:nth-child(2) { left: 49%; top: -6px; }
.route-line i:last-child { right: 0; top: -6px; border-color: var(--sun); box-shadow: 0 0 14px var(--glow-sun); }

.route-code {
  position: absolute;
  z-index: 1;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  font-weight: 760;
  line-height: 1;
}

.route-code.start { left: 8%; bottom: 12%; color: var(--sun); }
.route-code.finish { right: 8%; top: 10%; color: var(--foam); }

.route-note {
  position: absolute;
  right: 8%;
  bottom: 13%;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.project-body {
  padding: 24px;
}

.project-meta {
  color: var(--dim);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.project-meta i {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pine);
  font-style: normal;
}

.project-meta i::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pine);
  content: "";
  box-shadow: 0 0 10px var(--pine);
}

h3 {
  margin: 18px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1;
}

.project-body p {
  max-width: 480px;
  margin: 14px 0 24px;
  color: var(--muted);
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.project-link b {
  font-size: 1.1rem;
}

.field-notes {
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(30, 200, 216, 0.08), transparent 58%),
    var(--dark);
}

.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr);
  gap: clamp(44px, 8vw, 110px);
  align-items: start;
}

.notes-layout .section-heading {
  margin-bottom: 0;
}

.note-list {
  display: grid;
}

.note-list p {
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.note-list p:first-child {
  padding-top: 0;
}

.note-list p:last-child {
  border-bottom: 0;
}

.note-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

footer {
  padding: 34px 0;
  border-top: 1px solid var(--border);
  background: #03070c;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 0;
  color: var(--dim);
  font-size: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.project-card.reveal:nth-child(2) {
  transition-delay: 100ms;
}

a:focus-visible {
  outline: 3px solid rgba(109, 228, 240, 0.7);
  outline-offset: 4px;
}

@media (max-width: 860px) {
  .hero {
    min-height: 760px;
  }

  .hero-inner,
  .project-grid,
  .notes-layout {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 34px;
    padding-top: 90px;
  }

  .signal-card {
    max-width: 480px;
  }

  .project-visual {
    min-height: 270px;
  }
}

@media (max-width: 560px) {
  .wrap,
  .topline,
  .hero-inner {
    width: min(100% - 28px, 1200px);
  }

  .hero {
    min-height: 720px;
  }

  .hero-image {
    background-position: 62% center;
  }

  .nav-links > a {
    display: none;
  }

  .status {
    padding-inline: 10px;
  }

  .hero-inner {
    align-content: end;
    padding: 52px 0 58px;
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 5rem);
  }

  .lead {
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .signal-card {
    display: none;
  }

  section {
    padding: 70px 0;
  }

  .launchpad {
    padding-top: 54px;
  }

  .project-visual {
    min-height: 220px;
  }

  .project-body {
    padding: 20px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@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;
  }
  .reveal { opacity: 1; transform: none; }
}
