:root {
  color-scheme: dark;
  --bg: #070910;
  --panel: rgba(12, 17, 27, 0.84);
  --panel-strong: #0c111b;
  --line: rgba(148, 163, 184, 0.15);
  --line-bright: rgba(108, 232, 255, 0.28);
  --text: #e7edf5;
  --muted: #7d899b;
  --cyan: #6ce8ff;
  --violet: #a78bfa;
  --green: #67e8a5;
  --red: #fb7185;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.backdrop,
.grid,
.noise,
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(15, 23, 42, 0.86), transparent 42%),
    linear-gradient(145deg, #05070c 0%, #090c14 58%, #070911 100%);
}

.grid {
  opacity: 0.27;
  background-image:
    linear-gradient(rgba(108, 232, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 232, 255, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, black 10%, transparent 76%);
}

.noise {
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.glow {
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.1;
}

.glow-cyan {
  inset: -16rem auto auto -10rem;
  background: var(--cyan);
}

.glow-violet {
  inset: auto -14rem -18rem auto;
  background: var(--violet);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(940px, calc(100% - 40px));
  min-height: calc(100vh - 74px);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px 4px;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  place-items: center;
  color: var(--cyan);
  background: rgba(108, 232, 255, 0.07);
  box-shadow: inset 0 0 18px rgba(108, 232, 255, 0.06);
  font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.brand-mark img {
  width: 17px;
  height: 17px;
}

.brand-name {
  font-size: 15px;
  font-weight: 650;
}

.brand-tag {
  margin-left: auto;
  color: var(--muted);
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.terminal {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(120%);
}

.terminal::before {
  display: block;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line-bright), transparent);
}

.terminal-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 48px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.control.close { background: #ff6577; }
.control.minimize { background: #f4bd4f; }
.control.maximize { background: #57ca70; }

.terminal-title,
.terminal-signal,
.terminal-body,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.terminal-title {
  color: #a8b3c2;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.terminal-signal {
  justify-self: end;
  color: var(--muted);
  font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.terminal-signal span,
.about-meta i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(103, 232, 165, 0.8);
}

.terminal-body {
  width: 100%;
  min-width: 0;
  height: min(490px, 58vh);
  min-height: 350px;
  overflow-y: auto;
  padding: 30px 32px 36px;
  color: #cdd6e3;
  font-size: 14px;
  line-height: 1.72;
  scrollbar-color: rgba(108, 232, 255, 0.2) transparent;
  scrollbar-width: thin;
}

.boot-line {
  animation: rise 0.55s ease both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

.muted { color: var(--muted); }
.accent { color: var(--cyan); }
.error { color: var(--red); }
.success { color: var(--green); }
.prompt-user { color: var(--green); }
.prompt-at { color: var(--muted); }
.prompt-host { color: var(--cyan); }
.prompt-path { color: var(--violet); }

.output {
  display: grid;
  min-width: 0;
  gap: 10px;
  margin-top: 16px;
}

.history-line {
  color: #dce5f0;
  overflow-wrap: anywhere;
}

.command-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
}

.prompt {
  flex: none;
}

#command-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  caret-color: var(--cyan);
  background: transparent;
  font: inherit;
}

.inline-command {
  padding: 0 4px;
  border-bottom: 1px dashed rgba(108, 232, 255, 0.55);
  color: var(--cyan);
  background: transparent;
  font: inherit;
}

.help-block {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.help-block p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-list {
  overflow: hidden;
  border: 1px solid rgba(108, 232, 255, 0.1);
  border-radius: 9px;
  background: rgba(5, 9, 15, 0.22);
}

.command-row {
  display: grid;
  grid-template-columns: minmax(76px, 108px) minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding: 8px 12px;
}

.command-row + .command-row {
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.command-row code {
  color: var(--cyan);
  font: 600 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.command-row span {
  color: #8793a4;
  font-size: 11px;
  line-height: 1.55;
}

.mkmail-copy,
.mkmail-section {
  display: grid;
  gap: 6px;
}

.mkmail-copy {
  margin-bottom: 14px;
  color: #9aa6b7;
  font-size: 11px;
  line-height: 1.65;
}

.mkmail-copy strong {
  color: var(--text);
  font-weight: 600;
}

.mkmail-section + .mkmail-section {
  margin-top: 12px;
}

.mkmail-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mkmail-section code {
  display: block;
  overflow-wrap: anywhere;
  padding: 9px 11px;
  border: 1px solid rgba(108, 232, 255, 0.1);
  border-radius: 9px;
  color: var(--cyan);
  background: rgba(5, 9, 15, 0.28);
  font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.hint {
  margin: 14px 4px 0;
  color: #5f6b7c;
  font: 10px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
  text-transform: uppercase;
}

.hint span {
  margin: 0 4px;
}

kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #8895a8;
  background: rgba(255, 255, 255, 0.025);
  font-size: 9px;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px 18px;
  color: #586476;
  font-size: 11px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: #94a3b8;
}

.police-record img {
  width: 18px;
  height: 20px;
  margin-right: 5px;
  object-fit: contain;
}

.about-page,
.launch-page {
  display: grid;
  padding: 24px;
  place-items: center;
}

.about-card,
.launch-card {
  position: relative;
  z-index: 1;
  width: min(660px, 100%);
  padding: clamp(32px, 7vw, 68px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.back-link,
.fallback-link {
  color: var(--cyan);
  font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none;
}

.eyebrow {
  margin: 52px 0 14px;
  color: var(--cyan);
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
}

.launch-card h1 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.launch-card > p:not(.eyebrow) {
  margin: 22px 0 0;
  color: #9ba7b8;
  font-size: 16px;
  line-height: 1.8;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 42px;
}

.profile-avatar {
  flex: none;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(108, 232, 255, 0.24);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px rgba(108, 232, 255, 0.035), 0 16px 38px rgba(0, 0, 0, 0.3);
}

.profile-header .eyebrow {
  margin: 0 0 10px;
}

.about-card h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.about-copy {
  margin-top: 30px;
}

.about-copy p {
  margin: 0;
  color: #9ba7b8;
  font-size: 15px;
  line-height: 1.85;
}

.about-copy p + p {
  margin-top: 10px;
}

.about-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.launch-card {
  text-align: center;
}

.launch-card .eyebrow {
  margin-top: 28px;
}

.launch-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 1px solid var(--line-bright);
  border-radius: 13px;
  place-items: center;
  background: rgba(108, 232, 255, 0.045);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.launch-symbol img {
  width: 23px;
  height: 23px;
}

.launch-progress {
  overflow: hidden;
  width: min(280px, 100%);
  height: 2px;
  margin: 34px auto 22px;
  background: rgba(255, 255, 255, 0.06);
}

.launch-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform-origin: left;
  animation: load 1.1s cubic-bezier(0.5, 0, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes load {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 22px, 940px);
    min-height: calc(100vh - 94px);
    padding-top: 24px;
  }

  .brand-tag,
  .terminal-signal,
  .hint {
    display: none;
  }

  .terminal-bar {
    grid-template-columns: 1fr auto 1fr;
    padding: 0 13px;
  }

  .terminal-body {
    height: 58vh;
    min-height: 410px;
    padding: 24px 18px 30px;
    font-size: 12px;
  }

  .command-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .site-footer {
    flex-direction: column;
    gap: 5px;
  }

  .footer-divider {
    display: none;
  }

  .about-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .profile-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-top: 34px;
  }

  .profile-avatar {
    width: 82px;
    height: 82px;
  }
}

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