/* VARIABLES */
:root {
  --font-ui: "JetBrainsMono", monospace;
  --font-title: "EB Garamond", serif;
  --font-body: "IBM Plex Mono", monospace;
  --font-alt-ui: "Space Mono", monospace;
  --font-legible: "Rajdhani", sans-serif;
  --zoom-equivalent: 4;
  --frame-inner-inset: calc(48px * var(--zoom-equivalent));
  --accent-electric: #35E0FF;
  --accent-electric-rgb: 53, 224, 255;
  --keystone-magenta: #881798;
  --keystone-cyan: #3A96DD;
  --taskdock-amber: #FF9F1C;
  --carnage-crimson: #C50F1F;
  --docs-brown: #8B5E34;
  --contact-grey: #8D949B;
}

/* FONTS */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/IBM_Plex_Mono/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/IBM_Plex_Mono/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/IBM_Plex_Mono/IBMPlexMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "EB Garamond";
  src: url("./fonts/EB_Garamond/EBGaramond-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
}

@font-face {
  font-family: "EB Garamond";
  src: url("./fonts/EB_Garamond/EBGaramond-Italic-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
}

@font-face {
  font-family: "Space Mono";
  src: url("./fonts/Space_Mono/SpaceMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Space Mono";
  src: url("./fonts/Space_Mono/SpaceMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Space Mono";
  src: url("./fonts/Space_Mono/SpaceMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "JetBrainsMono";
  src: url("./fonts/JetBrainsMono-1.0.3/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "JetBrainsMono";
  src: url("./fonts/JetBrainsMono-1.0.3/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "JetBrainsMono";
  src: url("./fonts/JetBrainsMono-1.0.3/JetBrainsMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
}

@font-face {
    font-family: "Rajdhani";
    src: url("./fonts/Rajdhani/Rajdhani-Regular.woff2") format("woff2");
    font-weight: 400;
}

@font-face {
    font-family: "Rajdhani";
    src: url("./fonts/Rajdhani/Rajdhani-Bold.woff2") format("woff2");
    font-weight: 700;
}


/* STYLES */
body {
  background: #050505;
  color: #f2f2f2;
  font-family: var(--font-ui);
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

html {
  overflow: hidden;
}

html.desktop-mode,
body.desktop-mode {
  overflow: hidden;
}

html.compact-mode,
body.compact-mode {
  overflow-x: hidden;
  overflow-y: auto;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.34;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(
    to bottom,
    rgba(232, 238, 242, 0.09) 0,
    rgba(232, 238, 242, 0.09) 1px,
    transparent 1px,
    transparent 3px
  );
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.12;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(245, 245, 245, 0.26) 0 0.45px, transparent 0.75px),
    radial-gradient(circle at 64% 72%, rgba(245, 245, 245, 0.21) 0 0.4px, transparent 0.7px),
    radial-gradient(circle at 82% 12%, rgba(245, 245, 245, 0.22) 0 0.5px, transparent 0.8px),
    radial-gradient(circle at 33% 61%, rgba(245, 245, 245, 0.2) 0 0.45px, transparent 0.75px);
  background-size: 180px 180px, 220px 220px, 260px 260px, 200px 200px;
}

.main-shell {
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease;
}

.main-shell.ready {
  opacity: 1;
  visibility: visible;
}

.compact-shell {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.compact-main {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 34rem);
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.compact-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(3.8rem, 9.6vw, 5rem);
  box-sizing: border-box;
  padding: 0 clamp(0.75rem, 4vw, 1.25rem);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 2;
  background:
    linear-gradient(to bottom, rgba(3, 4, 6, 0.96), rgba(3, 4, 6, 0.88));
  border-bottom: 1px solid rgba(214, 222, 228, 0.08);
  pointer-events: none;
}

.compact-title {
  margin: 0 auto;
  font-family: var(--font-title);
  font-weight: 400;
  font-variation-settings: "wght" 400;
  letter-spacing: 0.115em;
  text-transform: uppercase;
  font-size: clamp(1.42rem, 6.6vw, 2.22rem);
  line-height: 1;
  text-align: center;
  width: max-content;
  max-width: 100%;
  color: #e6edf1;
  text-shadow: 0 0 12px rgba(216, 225, 232, 0.08);
}

.compact-product-bar {
  justify-content: center;
  gap: clamp(0.34rem, 1.8vw, 0.56rem);
  padding: 0;
  font-size: clamp(1.04rem, 4.8vw, 1.24rem);
  text-shadow: 0 0 7px rgba(213, 223, 230, 0.1);
}

.compact-mode .compact-product-bar .product-link {
  padding: 0.08em 0.2em 0.13em;
}

.compact-mode .compact-product-bar .product-link-sep {
  font-size: 0.96em;
}

@media (max-width: 390px) {
  .compact-title {
    font-size: clamp(1.3rem, 8vw, 1.74rem);
    letter-spacing: 0.11em;
  }

  .compact-main {
    width: min(95vw, 20.5rem);
  }

  .compact-product-bar {
    font-size: clamp(0.98rem, 5.2vw, 1.14rem);
    gap: 0.28rem;
  }
}

@media (max-width: 340px) {
  .compact-title {
    font-size: clamp(1.18rem, 7.8vw, 1.52rem);
    letter-spacing: 0.095em;
  }

  .compact-product-bar {
    font-size: clamp(0.92rem, 5.6vw, 1.04rem);
  }
}

.post-screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2vh, 2rem);
  background: rgba(0, 0, 0, 0.72);
  transition: opacity 320ms ease, visibility 320ms ease;
}

.post-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.post-badge {
  position: static;
  margin: 0;
  white-space: pre;
  font-family: var(--font-ui);
  font-size: clamp(calc(0.48rem * var(--zoom-equivalent)), 0.95vw, calc(0.72rem * var(--zoom-equivalent)));
  line-height: 1.02;
  color: rgba(194, 207, 216, 0.34);
  text-shadow: 0 0 8px rgba(194, 207, 216, 0.08);
  pointer-events: none;
  overflow: hidden;
  display: inline-block;
  margin-bottom: 0;
}

.post-wrap {
  width: min(94vw, calc(860px * var(--zoom-equivalent)));
  height: min(84vh, calc(560px * var(--zoom-equivalent)));
  color: rgba(210, 220, 226, 0.9);
  font-family: var(--font-ui);
  font-size: calc(0.88rem * var(--zoom-equivalent));
  line-height: 1.3;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.post-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: calc(0.8rem * var(--zoom-equivalent));
  align-items: start;
  margin-bottom: 0.35rem;
}

.post-head-copy {
  padding-top: 0.02rem;
}

.post-title {
  margin: 0 0 0.42rem;
  letter-spacing: 0.08em;
}

.post-meta {
  margin: 0 0 0.3rem;
  opacity: 0.85;
}

.post-log {
  margin: 0.7rem 0 0;
  white-space: pre-wrap;
  min-height: 0;
  color: rgba(218, 228, 233, 0.9);
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 100%);
}

.post-log::-webkit-scrollbar {
  display: none;
}

.post-ok {
  color: #9BFF44;
  text-shadow: 0 0 8px rgba(155, 255, 68, 0.2);
}

.post-status {
  margin: 0.7rem 0 0;
  opacity: 0.92;
}

/* BACKDROP CORNER MARKERS */
html::before,
html::after,
body::before,
body::after {
  content: "+";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  font-family: var(--font-ui);
  font-size: calc(40px * var(--zoom-equivalent));
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
}

html::before {
  top: calc(32px * var(--zoom-equivalent));
  left: calc(32px * var(--zoom-equivalent));
}

html::after {
  top: calc(32px * var(--zoom-equivalent));
  right: calc(32px * var(--zoom-equivalent));
}

body::before {
  bottom: calc(32px * var(--zoom-equivalent));
  left: calc(32px * var(--zoom-equivalent));
}

body::after {
  bottom: calc(32px * var(--zoom-equivalent));
  right: calc(32px * var(--zoom-equivalent));
}

html.booting::before,
html.booting::after,
body.booting::before,
body.booting::after {
  opacity: 0;
}

p {
  margin-top: 0;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

section {
  width: 100%;
  min-height: 100vh;
}

.panel {
  text-align: center;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.center-stack {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(82vw, calc(900px * var(--zoom-equivalent)));
  height: min(56vh, calc(420px * var(--zoom-equivalent)));
  pointer-events: none;
  z-index: 0;
  perspective: 1000px;
  --title-electric: 0;
  --flashlight-accent: 0;
}

.hex-sphere {
  position: absolute;
  inset: calc(var(--frame-inner-inset) + 4px);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.4;
  z-index: 0;
  --flashlight-x: 50%;
  --flashlight-y: 50%;
  --flashlight-alpha: 0;
  --flashlight-size: 112px;
  background:
    linear-gradient(to bottom, rgba(210, 219, 226, 0.04) 0%, rgba(210, 219, 226, 0.01) 48%, rgba(210, 219, 226, 0.05) 100%),
    radial-gradient(ellipse 86% 132% at 50% 50%, rgba(215, 224, 230, 0.13) 0%, rgba(215, 224, 230, 0.04) 54%, rgba(215, 224, 230, 0.01) 74%, transparent 100%);
  box-shadow:
    inset 0 0 46px rgba(205, 215, 222, 0.1),
    inset 0 0 130px rgba(205, 215, 222, 0.06);
}

.sphere-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(
      circle var(--flashlight-size) at var(--flashlight-x) var(--flashlight-y),
      rgba(210, 220, 228, calc(var(--flashlight-alpha) * (1 - var(--flashlight-accent)) * 0.82)) 0%,
      rgba(210, 220, 228, calc(var(--flashlight-alpha) * (1 - var(--flashlight-accent)) * 0.26)) 32%,
      rgba(210, 220, 228, 0) 68%
    ),
    radial-gradient(
      circle calc(var(--flashlight-size) * 1.42) at var(--flashlight-x) var(--flashlight-y),
      rgba(var(--accent-electric-rgb), calc(var(--flashlight-alpha) * var(--flashlight-accent) * 0.76)) 0%,
      rgba(var(--accent-electric-rgb), calc(var(--flashlight-alpha) * var(--flashlight-accent) * 0.23)) 34%,
      rgba(var(--accent-electric-rgb), 0) 72%
    ),
    radial-gradient(
      circle calc(var(--flashlight-size) * 2.05) at var(--flashlight-x) var(--flashlight-y),
      rgba(var(--accent-electric-rgb), calc(var(--flashlight-alpha) * var(--flashlight-accent) * 0.12)) 0%,
      rgba(var(--accent-electric-rgb), 0) 70%
    );
  transition: background 90ms linear;
}

.hex-sphere::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 84% 140% at 50% 50%, transparent 0 48%, rgba(210, 220, 228, 0.08) 70%, rgba(210, 220, 228, 0.14) 92%, rgba(210, 220, 228, 0.2) 100%),
    linear-gradient(to bottom, rgba(210, 220, 228, 0.06), transparent 18%, transparent 82%, rgba(210, 220, 228, 0.06));
}

.sphere-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  z-index: 0;
}

.frame {
  position: absolute;
  border: calc(2px * var(--zoom-equivalent)) solid rgba(214, 222, 228, 0.22);
  pointer-events: none;
  z-index: 1;
}

.frame-outer {
  inset: 0;
}

.frame-mid {
  inset: calc(24px * var(--zoom-equivalent));
}

.frame-inner {
  inset: var(--frame-inner-inset);
  border-color: rgba(214, 222, 228, calc(0.21 + (var(--title-electric) * 0.08)));
  box-shadow:
    0 0 12px rgba(var(--accent-electric-rgb), calc(0.03 + (var(--title-electric) * 0.12))),
    inset 0 0 9px rgba(var(--accent-electric-rgb), calc(0.025 + (var(--title-electric) * 0.08)));
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.frame-outer {
  border-color: rgba(214, 222, 228, 0.17);
}

.frame-mid {
  border-color: rgba(214, 222, 228, 0.24);
}

.center-content {
  position: static;
  z-index: auto;
  width: auto;
  padding: 0;
  pointer-events: auto;
}

section::before,
section::after,
.panel::before,
.panel::after {
  position: fixed;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.12);
  font-family: var(--font-ui);
  font-size: calc(40px * var(--zoom-equivalent));
  line-height: 1;
  z-index: 0;
}

.panel::before {
  content: "|";
  left: calc(32px * var(--zoom-equivalent));
  top: 50%;
  transform: translateY(-50%);
}

.panel::after {
  content: "|";
  right: calc(32px * var(--zoom-equivalent));
  top: 50%;
  transform: translateY(-50%);
}

section::before {
  content: "-";
  top: calc(32px * var(--zoom-equivalent));
  left: 50%;
  transform: translateX(-50%);
}

section::after {
  content: "-";
  bottom: calc(24px * var(--zoom-equivalent));
  left: 50%;
  transform: translateX(-50%);
}

body.booting section::before,
body.booting section::after,
body.booting .panel::before,
body.booting .panel::after {
  opacity: 0;
}

.title {
  font-family: var(--font-title);
  font-weight: 400;
  font-variation-settings: "wght" 400;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  margin: 0;
  text-align: center;
  font-size: clamp(calc(2rem * var(--zoom-equivalent)), 5vw, calc(3.8rem * var(--zoom-equivalent)));
  line-height: 1;
  color: rgb(
    calc(230 - (var(--title-electric) * 12)),
    calc(237 + (var(--title-electric) * 3)),
    calc(241 + (var(--title-electric) * 14))
  );
  text-shadow:
    0 0 calc(8px + (var(--title-electric) * 16px)) rgba(var(--accent-electric-rgb), calc(var(--title-electric) * 0.22));
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.title.typing::after {
  content: "_";
  color: var(--accent-electric);
  text-shadow: 0 0 8px rgba(var(--accent-electric-rgb), 0.3);
  margin-left: 0.08em;
  animation: cursor-blink 1s steps(1, end) infinite;
}

#metatext {
  font-size: calc(0.78rem * var(--zoom-equivalent));
  line-height: 1.25;
  position: fixed;
  top: calc(50% + (3.4rem * var(--zoom-equivalent)));
  left: 50%;
  transform: translate(-50%, 0);
  width: min(92vw, calc(740px * var(--zoom-equivalent)));
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0;
  color: rgb(
    calc(207 - (var(--title-electric) * 8)),
    calc(216 + (var(--title-electric) * 5)),
    calc(221 + (var(--title-electric) * 8))
  );
  opacity: 0;
  text-shadow:
    0 0 4px rgba(207, 216, 221, 0.22),
    0 0 10px rgba(207, 216, 221, 0.08),
    0 0 calc(8px + (var(--title-electric) * 10px)) rgba(var(--accent-electric-rgb), calc(var(--title-electric) * 0.14));
  transition: opacity 220ms ease;
  z-index: 2;
  pointer-events: auto;
}

body.subtext-visible #metatext {
  opacity: 1;
}

#metatext p {
  margin: calc(0.18rem * var(--zoom-equivalent)) 0;
}

.description {
  font-family: var(--font-body);
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 auto 0.25rem;
  color: #c8d0d5;
  font-size: calc(0.68rem * var(--zoom-equivalent));
  text-wrap: balance;
}

.alt-tech {
  font-family: var(--font-alt-ui);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d8e0e5;
  font-size: calc(0.62rem * var(--zoom-equivalent));
}

.product-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(0.3rem * var(--zoom-equivalent));
  flex-wrap: wrap;
  padding: calc(0.4rem * var(--zoom-equivalent)) calc(0.5rem * var(--zoom-equivalent)) calc(0.4rem * var(--zoom-equivalent));
  margin-bottom: calc(0.32rem * var(--zoom-equivalent));
}

.product-link-sep {
  color: rgba(216, 224, 229, 0.4);
  font-size: calc(0.68rem * var(--zoom-equivalent));
  letter-spacing: 0.02em;
}

.product-link {
  --link-accent: #8f9aa1;
  --link-hover: #e6edf1;
  display: inline-block;
  padding: calc(0.04rem * var(--zoom-equivalent)) calc(0.14rem * var(--zoom-equivalent)) calc(0.08rem * var(--zoom-equivalent));
  border: 0;
  text-decoration: none;
  color: rgba(230, 237, 241, 0.58);
  background:
    repeating-linear-gradient(
      -55deg,
      color-mix(in srgb, var(--link-accent) 18.5%, transparent) 0 4px,
      color-mix(in srgb, var(--link-accent) 8.5%, transparent) 4px 8px
    );
  background-size: 100% 52%;
  background-position: 0 100%;
  background-repeat: no-repeat;
  box-shadow: none;
  transition:
    color 180ms ease,
    background 200ms ease,
    background-size 220ms ease,
    text-shadow 180ms ease;
}

.product-link:hover {
  color: var(--link-hover);
  background:
    repeating-linear-gradient(
      -55deg,
      color-mix(in srgb, var(--link-hover) 24%, transparent) 0 4px,
      color-mix(in srgb, var(--link-hover) 12%, transparent) 4px 8px
    );
  background-size: 100% 100%;
  background-position: 0 100%;
  background-repeat: no-repeat;
  text-shadow: 0 0 6px color-mix(in srgb, var(--link-hover) 24%, transparent);
}

.product-link:focus-visible {
  color: var(--link-hover);
  background:
    repeating-linear-gradient(
      -55deg,
      color-mix(in srgb, var(--link-hover) 24%, transparent) 0 4px,
      color-mix(in srgb, var(--link-hover) 12%, transparent) 4px 8px
    );
  background-size: 100% 100%;
  background-position: 0 100%;
  background-repeat: no-repeat;
  text-shadow: 0 0 6px color-mix(in srgb, var(--link-hover) 24%, transparent);
  outline: 1px solid color-mix(in srgb, var(--link-hover) 74%, #ffffff);
  outline-offset: 2px;
}

.product-link-taskdock {
  --link-accent: var(--taskdock-amber);
  --link-hover: var(--taskdock-amber);
}

.product-link-keystone {
  --link-accent: var(--keystone-magenta);
  --link-hover: var(--keystone-cyan);
}

.product-link-carnage {
  --link-accent: var(--carnage-crimson);
  --link-hover: var(--carnage-crimson);
}

.product-link-documentation {
  --link-accent: var(--docs-brown);
  --link-hover: var(--docs-brown);
}

.product-link-contact {
  --link-accent: var(--contact-grey);
  --link-hover: #fffb19;
}

.legible {
  font-family: var(--font-legible);
  letter-spacing: 0.02em;
  font-size: calc(0.65rem * var(--zoom-equivalent));
}

.compact-mode .compact-shell {
  display: block;
}

.compact-mode .post-screen,
.compact-mode section::before,
.compact-mode section::after,
.compact-mode .panel::before,
.compact-mode .panel::after {
  display: none !important;
}

.compact-mode .main-shell {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.compact-mode .center-stack {
  width: 145vw;
  height: 90vh;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.compact-mode .hex-sphere {
  inset: 0;
  border-radius: 0;
  opacity: 0.56;
}

.compact-mode .frame,
.compact-mode .center-content {
  display: none !important;
}

html.compact-mode::before,
html.compact-mode::after,
body.compact-mode::before,
body.compact-mode::after {
  display: none !important;
}

@keyframes scanline-drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(6px);
  }
}

@keyframes contact-marker-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes contact-beam {
  from {
    transform: translateY(-105%);
  }
  to {
    transform: translateY(105%);
  }
}

body.contact-modal-open .scanlines {
  opacity: 0.62;
  animation: scanline-drift 140ms linear infinite;
}

body.contact-modal-open .grain {
  opacity: 0.18;
}

body.contact-modal-open .main-shell,
body.contact-modal-open .compact-shell,
body.contact-modal-open .post-screen {
  opacity: 0.08 !important;
  filter: blur(2px);
  transition: opacity 240ms ease, filter 240ms ease;
}

.contact-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2.2vw, 2rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
  background:
    radial-gradient(circle at 16% 18%, rgba(208, 217, 223, 0.08), transparent 42%),
    radial-gradient(circle at 78% 28%, rgba(208, 217, 223, 0.06), transparent 36%),
    linear-gradient(to bottom, rgba(3, 4, 5, 0.94), rgba(4, 6, 7, 0.88));
}

body.contact-modal-open .contact-modal-layer {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-modal-tracking {
  position: absolute;
  inset: clamp(0.4rem, 1.6vw, 1.25rem);
  pointer-events: none;
  border: 1px solid rgba(216, 224, 230, 0.14);
}

.contact-modal-tracking::before,
.contact-modal-tracking::after {
  content: "";
  position: absolute;
  inset: clamp(0.3rem, 1.2vw, 0.85rem);
  border: 1px dashed rgba(216, 224, 230, 0.11);
  animation: contact-marker-pulse 1.7s linear infinite;
}

.contact-modal-tracking::after {
  inset: clamp(0.9rem, 2.8vw, 1.75rem);
  border-style: solid;
  border-color: rgba(216, 224, 230, 0.06);
  animation-duration: 2.4s;
}

.contact-modal-shell {
  position: relative;
  width: min(95vw, 62rem);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto auto;
  gap: clamp(0.75rem, 1.8vw, 1.2rem);
  padding: clamp(0.9rem, 2vw, 1.5rem);
  border: 1px solid rgba(210, 220, 226, 0.24);
  background:
    linear-gradient(to bottom, rgba(7, 9, 10, 0.95), rgba(5, 7, 8, 0.93));
  box-shadow:
    0 0 26px rgba(210, 220, 226, 0.12),
    inset 0 0 38px rgba(210, 220, 226, 0.05);
  overflow: hidden;
  transform: translateY(16px) scale(0.99);
  transition: transform 220ms ease;
}

body.contact-modal-open .contact-modal-shell {
  transform: translateY(0) scale(1);
}

.contact-modal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(200, 208, 214, 0.12) 0%,
      rgba(200, 208, 214, 0) 7%,
      rgba(200, 208, 214, 0) 93%,
      rgba(200, 208, 214, 0.08) 100%
    );
}

.contact-modal-shell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(221, 233, 238, 0.24), rgba(221, 233, 238, 0));
  mix-blend-mode: screen;
  pointer-events: none;
  animation: contact-beam 1.4s linear infinite;
  opacity: 0.12;
}

.contact-close {
  position: absolute;
  top: clamp(0.45rem, 1.2vw, 0.8rem);
  right: clamp(0.45rem, 1.2vw, 0.8rem);
  z-index: 2;
  border: 1px solid rgba(210, 220, 226, 0.34);
  background: rgba(8, 10, 11, 0.85);
  color: rgba(219, 228, 234, 0.9);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.3rem 0.48rem;
  cursor: pointer;
}

.contact-close:hover {
  border-color: rgba(210, 220, 226, 0.74);
  color: #edf4f8;
}

.contact-close:focus-visible {
  border-color: rgba(210, 220, 226, 0.84);
  color: #edf4f8;
  outline: 1px solid rgba(226, 235, 241, 0.88);
  outline-offset: 2px;
}

.contact-terminal {
  position: relative;
  z-index: 1;
  min-height: clamp(10.5rem, 28vh, 16rem);
  border: 1px solid rgba(210, 220, 226, 0.19);
  background: rgba(4, 5, 6, 0.7);
  padding: clamp(0.68rem, 1.6vw, 0.95rem);
  overflow: auto;
  transition: transform 260ms ease;
}

.contact-modal-layer.form-ready .contact-terminal {
  transform: translateY(-0.25rem);
}

.contact-terminal-title {
  margin: 0 0 0.54rem;
  font-family: var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(213, 222, 228, 0.86);
  font-size: 0.78rem;
}

.contact-brand-highlight {
  display: inline-block;
  color: #f5faff;
  background: rgba(54, 126, 255, 0.72);
  border: 1px solid rgba(152, 195, 255, 0.62);
  padding: 0.02em 0.2em 0.04em;
  box-shadow: 0 0 10px rgba(61, 136, 255, 0.35);
}

.contact-terminal-feed {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-ui);
  font-size: clamp(0.78rem, 1.5vw, 0.94rem);
  line-height: 1.35;
  color: rgba(198, 246, 216, 0.88);
  min-height: 8.7em;
}

.contact-form {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(210, 220, 226, 0.2);
  background: rgba(5, 7, 8, 0.78);
  padding: clamp(0.75rem, 1.8vw, 1rem);
  display: grid;
  gap: 0.64rem;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translateY(12px);
  transition: max-height 320ms ease, opacity 240ms ease, transform 240ms ease, padding 240ms ease;
}

.contact-modal-layer.form-ready .contact-form {
  max-height: 62vh;
  opacity: 1;
  pointer-events: auto;
  overflow: auto;
  transform: translateY(0);
}

.contact-modal-layer.submitting .contact-form {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
}

.contact-form::before {
  content:
    "+       +       +       +       +       +       +\A"
    "  +       +       +       +       +       +       \A"
    "+       +       +       +       +       +       +\A"
    "  +       +       +       +       +       +       \A"
    "+       +       +       +       +       +       +\A"
    "  +       +       +       +       +       +       ";
  position: absolute;
  inset: 0.65rem 0.85rem;
  font-family: var(--font-ui);
  color: rgba(224, 233, 238, 0.05);
  letter-spacing: 0.12em;
  line-height: 1.9;
  white-space: pre;
  pointer-events: none;
  user-select: none;
}

.contact-form > * {
  position: relative;
  z-index: 1;
}

.contact-form-label {
  margin: 0 0 0.08rem;
  font-family: var(--font-alt-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: rgba(218, 228, 233, 0.85);
}

.contact-field {
  display: grid;
  gap: 0.28rem;
}

.contact-field span,
.contact-preview-label {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(210, 220, 226, 0.72);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgba(210, 220, 226, 0.28);
  background: rgba(3, 4, 5, 0.76);
  color: rgba(229, 236, 241, 0.95);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  line-height: 1.4;
  padding: 0.42rem 0.52rem;
  box-sizing: border-box;
}

.contact-field textarea {
  resize: vertical;
  min-height: 8.5rem;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: rgba(210, 220, 226, 0.72);
  box-shadow: 0 0 0 1px rgba(210, 220, 226, 0.22);
}

.contact-format-help {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(194, 205, 212, 0.7);
}

.contact-preview-wrap {
  display: grid;
  gap: 0.3rem;
}

.contact-preview {
  min-height: 2.4rem;
  border: 1px solid rgba(210, 220, 226, 0.18);
  background: rgba(2, 3, 4, 0.62);
  padding: 0.42rem 0.52rem;
  font-size: 0.82rem;
  line-height: 1.44;
  color: #fffb19;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.18);
  -webkit-text-stroke: 0.2px #ffffff;
  paint-order: stroke fill;
  overflow-wrap: anywhere;
}

.contact-preview:empty::before {
  content: "Message preview appears here.";
  color: rgba(210, 220, 226, 0.38);
}

.contact-preview a {
  color: #9fd7ff;
  text-decoration: underline;
}

.contact-form-error {
  margin: 0;
  min-height: 1em;
  color: #ff9ca7;
  font-size: 0.74rem;
}

.contact-submit {
  justify-self: start;
  border: 1px solid rgba(210, 220, 226, 0.38);
  background: rgba(7, 9, 11, 0.86);
  color: rgba(224, 233, 238, 0.92);
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.76rem;
  padding: 0.4rem 0.62rem;
  cursor: pointer;
}

.contact-submit:hover {
  border-color: rgba(227, 236, 242, 0.82);
  color: #f2f8fb;
}

.contact-submit:focus-visible {
  border-color: rgba(227, 236, 242, 0.88);
  color: #f2f8fb;
  outline: 1px solid rgba(235, 242, 247, 0.92);
  outline-offset: 2px;
}

.contact-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 760px) {
  .contact-modal-shell {
    width: min(96vw, 42rem);
    max-height: 96vh;
    padding: 0.7rem;
  }

  .contact-terminal {
    min-height: 9.8rem;
  }

  .contact-modal-layer.form-ready .contact-form {
    max-height: 68vh;
  }

  .contact-form::before {
    letter-spacing: 0.05em;
  }
}
