:root {
  --bg: #0b0f18;
  --bg-alt: #0e1420;
  --surface: #121a2b;
  --surface-alt: #182235;
  --edge: #223047;
  --edge-strong: #30405a;
  --text: #e8eef5;
  --muted: #b2bccd;
  --accent: #8bd6ff;
  --accent-strong: #b3e7ff;
  --haze: #6c7ea3;
  --haze-strong: #90a4c7;
  --warning: #f3d89c;
  --parallax-x: 0px;
  --parallax-y: 0px;
  --aberration-x: 0px;
  --aberration-y: 0px;
  --scroll-shift: 0;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  --radius: 10px;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Mono", "Work Sans", ui-monospace, SFMono-Regular, monospace;
  background: radial-gradient(circle at 22% 20%, rgba(108, 126, 163, 0.06), transparent 40%),
    radial-gradient(circle at 78% 8%, rgba(144, 164, 199, 0.07), transparent 36%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
  background-position: calc(20% + var(--scroll-shift) * 12px) 20%,
    calc(80% - var(--scroll-shift) * 10px) 0%,
    50% 0;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: -40px;
  background-image: var(--noise);
  opacity: 0.18;
  mix-blend-mode: soft-light;
  pointer-events: none;
  transform: translate3d(
      calc(var(--parallax-x) + (var(--scroll-shift) * -12px)),
      calc(var(--parallax-y) + (var(--scroll-shift) * 9px)),
      0
    );
  filter: saturate(0.75) blur(0.25px);
  will-change: transform;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
      to bottom,
      rgba(144, 164, 199, 0.06) 0,
      rgba(144, 164, 199, 0.06) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(90deg, rgba(108, 126, 163, 0.08), transparent 35%, rgba(108, 126, 163, 0.08));
  mix-blend-mode: screen;
  opacity: 0.48;
  transform: translate3d(
      calc(var(--parallax-x) + (var(--scroll-shift) * 10px)),
      calc(var(--parallax-y) + (var(--scroll-shift) * -6px)),
      0
    );
  filter: saturate(0.8) blur(0.35px);
  will-change: transform;
}

a {
  color: var(--accent);
  text-decoration-color: rgba(139, 214, 255, 0.55);
}

a:hover {
  color: var(--accent-strong);
  text-decoration-color: rgba(179, 231, 255, 0.8);
}

a:focus-visible,
.button:focus-visible,
.icon-link:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(179, 231, 255, 0.28);
}

::selection {
  background: rgba(139, 214, 255, 0.35);
  color: var(--bg);
}

.motion-ready [data-animate] {
  --reveal-index: 0;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  filter: blur(6px);
  transition: opacity 0.65s ease, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.55s ease;
  will-change: transform, opacity, filter;
}

.motion-ready [data-animate].is-visible,
.motion-ready [data-animate].motion-static {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: none;
}

.motion-ready [data-animate].is-visible {
  transition-delay: calc((var(--reveal-index) - 1) * 80ms);
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.25rem;
  position: relative;
  z-index: 1;
}

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}

h1 {
  font-family: "Work Sans", "DM Mono", ui-monospace, monospace;
  font-size: clamp(2.2rem, 3vw + 1rem, 2.95rem);
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

.window {
  position: relative;
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius);
  background: radial-gradient(circle at 18% 10%, rgba(108, 126, 163, 0.08), transparent 34%),
    radial-gradient(circle at 78% 6%, rgba(144, 164, 199, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(16, 24, 36, 0.96), rgba(12, 20, 32, 0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.window::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  opacity: 0.1;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(calc(var(--parallax-x) * 0.6), calc(var(--parallax-y) * 0.6), 0);
  filter: saturate(0.8);
  will-change: transform;
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(90deg, rgba(108, 126, 163, 0.18), rgba(18, 28, 41, 0.94));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35), 0 1px 0 rgba(144, 164, 199, 0.18);
  position: relative;
  z-index: 2;
}

.window-dots {
  display: flex;
  gap: 0.4rem;
}

.window-dots span {
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(108, 126, 163, 0.8), rgba(108, 126, 163, 0.55));
  box-shadow: 0 2px 8px rgba(108, 126, 163, 0.35);
}

.window-dots span:nth-child(1) {
  background: linear-gradient(180deg, rgba(108, 126, 163, 0.85), rgba(108, 126, 163, 0.6));
}

.window-dots span:nth-child(2) {
  background: linear-gradient(180deg, rgba(144, 164, 199, 0.7), rgba(108, 126, 163, 0.52));
}

.window-dots span:nth-child(3) {
  background: linear-gradient(180deg, rgba(108, 126, 163, 0.55), rgba(108, 126, 163, 0.4));
}

.window-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 700;
}

.blink-caret {
  color: var(--accent-strong);
  font-size: 1.15rem;
}

.window-body {
  position: relative;
  z-index: 2;
  padding: 1.35rem 1.2rem 1.5rem;
  background: linear-gradient(180deg, rgba(18, 32, 45, 0.96), rgba(14, 26, 38, 0.9));
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(108, 126, 163, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
}

.portrait img {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--edge-strong);
  box-shadow: 0 0 0 2px #0f1823, 0 12px 22px rgba(0, 0, 0, 0.5);
  image-rendering: pixelated;
}

.hero-content h1 {
  margin: 0.15rem 0 0.5rem;
  text-shadow: 0 0 14px rgba(144, 164, 199, 0.25);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.6rem;
  margin: 0 0 0.1rem;
  border-radius: 999px;
  background: rgba(108, 126, 163, 0.18);
  color: var(--text);
  border: 1px solid rgba(108, 126, 163, 0.45);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.eyebrow::before {
  content: "◉";
  font-size: 0.9rem;
}

.lede {
  margin: 0 0 0.9rem;
  color: var(--muted);
  max-width: 62ch;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.label-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  color: var(--warning);
  filter: drop-shadow(0 0 6px rgba(144, 164, 199, 0.35));
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(17, 29, 43, 0.96), rgba(15, 28, 41, 0.86), rgba(23, 38, 56, 0.94));
  background-size: 180% 180%;
  border: 1px solid rgba(108, 126, 163, 0.5);
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease,
    border-color 0.25s ease, background-position 0.6s ease;
}

.status-pill::after {
  content: "";
  position: absolute;
  inset: -120% -40%;
  background: conic-gradient(from 90deg, rgba(144, 164, 199, 0.35), rgba(144, 164, 199, 0), rgba(144, 164, 199, 0.25), rgba(108, 126, 163, 0));
  opacity: 0;
  transform: rotate(-8deg);
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.status-pill:hover,
.status-pill:focus-visible {
  transform: translateY(-1px) scale(1.01);
  background-position: 80% 50%;
  border-color: rgba(144, 164, 199, 0.8);
  box-shadow: 0 0 0 1px rgba(108, 126, 163, 0.18), 0 12px 22px rgba(0, 0, 0, 0.5);
  filter: url("#ripple-glow");
}

.status-pill:hover::after,
.status-pill:focus-visible::after {
  opacity: 0.9;
}

.cta-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.05rem;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--edge-strong);
  background: linear-gradient(120deg, #162438, #111a29, #15273a);
  background-size: 200% 200%;
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.65), 0 12px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease,
    border-color 0.25s ease, background-position 0.55s ease;
}

.button.primary {
  color: var(--text);
  background: linear-gradient(140deg, #223550, #1b2b42, #294166);
  border-color: rgba(108, 126, 163, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 24px rgba(144, 164, 199, 0.28);
}

.button.ghost {
  color: var(--muted);
  border-style: dashed;
}

.button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 16px 28px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(108, 126, 163, 0.22);
  border-color: rgba(144, 164, 199, 0.7);
  background-position: 80% 50%;
  filter: url("#optic-glow");
}

.button:focus-visible {
  transform: translateY(-2px) scale(1.01);
  background-position: 80% 50%;
  filter: url("#optic-glow");
}

.button::after {
  content: "";
  position: absolute;
  inset: -10% -30%;
  background: radial-gradient(circle at 30% 30%, rgba(108, 126, 163, 0.2), transparent 45%),
    linear-gradient(90deg, rgba(108, 126, 163, 0), rgba(108, 126, 163, 0.38), rgba(108, 126, 163, 0));
  opacity: 0;
  transform: translate3d(-12%, 0, 0) skewX(-12deg);
  transition: opacity 0.28s ease, transform 0.35s ease;
  z-index: -1;
}

.button:hover::after,
.button:focus-visible::after {
  opacity: 1;
  transform: translate3d(8%, 0, 0) skewX(-10deg);
}

.content {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.hint {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.metric {
  padding: 1rem 1.1rem;
  border-radius: 8px;
  position: relative;
  background: linear-gradient(145deg, rgba(18, 30, 44, 0.94), rgba(13, 25, 36, 0.9));
  border: 1px solid rgba(108, 126, 163, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 14px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease,
    box-shadow 0.32s ease;
}

.metric::after {
  content: "";
  position: absolute;
  inset: -35% -25%;
  background: radial-gradient(circle at 80% 20%, rgba(144, 164, 199, 0.22), transparent 55%);
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.metric:hover,
.metric:focus-within {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(144, 164, 199, 0.58);
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.5), 0 0 20px rgba(108, 126, 163, 0.18);
  filter: url("#grain-soften");
}

.metric:hover::after,
.metric:focus-within::after {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.metric-label {
  margin: 0 0 0.2rem;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
}

.metric-desc {
  margin: 0;
  color: var(--muted);
}

.highlight .window-body {
  background: linear-gradient(180deg, #152332, #101c28);
  box-shadow: inset 0 1px 0 rgba(144, 164, 199, 0.14);
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 32, 42, 0.9), rgba(20, 42, 55, 0.8));
  border: 1px solid rgba(108, 126, 163, 0.35);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease,
    box-shadow 0.3s ease, background-position 0.5s ease;
}

.pill::after {
  content: "";
  position: absolute;
  inset: -120% -40%;
  background: linear-gradient(120deg, rgba(108, 126, 163, 0), rgba(108, 126, 163, 0.28), rgba(108, 126, 163, 0));
  opacity: 0;
  transform: translate3d(-10%, 0, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.pill:hover,
.pill:focus-visible {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(144, 164, 199, 0.7);
  box-shadow: 0 0 0 1px rgba(108, 126, 163, 0.16), 0 14px 22px rgba(0, 0, 0, 0.45);
  filter: url("#ripple-glow");
}

.pill:hover::after,
.pill:focus-visible::after {
  opacity: 0.9;
  transform: translate3d(8%, 0, 0);
  animation: shimmer 3s ease-in-out infinite;
}

.split .window-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  color: var(--muted);
}

.list li {
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  background: rgba(14, 28, 38, 0.9);
  border: 1px solid rgba(108, 126, 163, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease,
    box-shadow 0.3s ease, background 0.35s ease;
}

.list li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(108, 126, 163, 0.08), rgba(108, 126, 163, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.list li:hover,
.list li:focus-within {
  transform: translateY(-2px);
  border-color: rgba(144, 164, 199, 0.55);
  background: rgba(15, 32, 42, 0.96);
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.45);
}

.list li:hover::after,
.list li:focus-within::after {
  opacity: 1;
}

.optimism .window-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.principles article {
  padding: 1rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(108, 126, 163, 0.25);
  background: rgba(16, 32, 42, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.principles p {
  margin: 0;
  color: var(--muted);
}

.connect-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
}

.social {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  padding: 0;
  margin: 1rem 0 0;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: 8px;
  border: 1px solid rgba(108, 126, 163, 0.3);
  background: rgba(13, 25, 34, 0.9);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 18px rgba(0, 0, 0, 0.4);
}

.icon-link i {
  font-size: 1.15rem;
  color: var(--accent);
  width: 22px;
  text-align: center;
}

.icon-link:hover {
  background: rgba(16, 32, 42, 0.95);
  border-color: rgba(144, 164, 199, 0.7);
  transform: translateY(-1px);
  filter: url("#optic-glow");
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer {
  from {
    transform: translate3d(-18%, 0, 0) skewX(-12deg);
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
  to {
    transform: translate3d(18%, 0, 0) skewX(-12deg);
    opacity: 0.85;
  }
}

@keyframes glowPulse {
  from {
    box-shadow: 0 0 0 1px rgba(108, 126, 163, 0.12), 0 0 18px rgba(108, 126, 163, 0.18);
  }
  to {
    box-shadow: 0 0 0 1px rgba(144, 164, 199, 0.22), 0 0 28px rgba(144, 164, 199, 0.3);
  }
}

@keyframes floaty {
  from {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-20px, -35px, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body::before,
  body::after {
    animation: drift 18s linear infinite;
  }

  .blink-caret {
    animation: blink 1.4s steps(2, jump-none) infinite;
  }

  .status-pill {
    animation: glowPulse 7s ease-in-out infinite alternate;
  }

  .status-pill:hover::after,
  .status-pill:focus-visible::after {
    animation: shimmer 2.6s ease-in-out infinite;
  }

  .button.primary {
    animation: glowPulse 5s ease-in-out infinite alternate;
  }

  .button:hover::after,
  .button:focus-visible::after {
    animation: shimmer 3.4s ease-in-out infinite;
  }

  .metric {
    animation: floaty 9s ease-in-out infinite;
  }

  .pill {
    animation: floaty 11s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none !important;
    transform: none !important;
  }

  .button,
  .status-pill,
  .metric,
  .pill,
  .list li,
  [data-animate] {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  [data-animate] {
    opacity: 1 !important;
    filter: none !important;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding-top: 2.5rem;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .portrait {
    display: flex;
    justify-content: center;
  }

  .portrait img {
    width: 120px;
    height: 120px;
  }

  .status-row {
    flex-direction: column;
  }
}
