:root {
  color-scheme: dark;
  --terminal-line-height: 1.14;
  --bg: #0b0f14;
  --panel: #111827;
  --panel-strong: #172033;
  --line: #334155;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #7dd3fc;
  --warning: #ffd166;
  --shadow: rgba(148, 163, 184, 0.18);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(125, 211, 252, 0.08), transparent 28rem),
    radial-gradient(circle at 80% 80%, rgba(148, 163, 184, 0.1), transparent 30rem),
    linear-gradient(135deg, #070a0f 0%, #101722 48%, #070a0f 100%);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0;
}

a {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.55);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: #c3f4ff;
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0.22rem;
}

.terminal-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.terminal-window {
  width: min(100%, 66rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.95);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.08), 0 2rem 6rem rgba(0, 0, 0, 0.55), 0 0 4rem var(--shadow);
}

.terminal-bar {
  position: relative;
  min-height: 2.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-strong), #101827);
}

.terminal-controls {
  position: absolute;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
}

.control {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  display: inline-block;
}

.control-close {
  background: #ff6b6b;
}

.control-minimize {
  background: var(--warning);
}

.control-maximize {
  background: #38d39f;
}

.terminal-bar h1 {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.terminal-body {
  --terminal-body-padding: clamp(1rem, 2.6vw, 2rem);
  position: relative;
  padding: var(--terminal-body-padding);
}

.terminal-body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
}

.prompt {
  position: relative;
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: var(--terminal-line-height);
}

.ps1-blue {
  color: #268bd2;
}

.ps1-user {
  color: #33d17a;
}

.ps1-host {
  color: #d33682;
}

.ps1-arrow {
  color: #dc322f;
}

.profile-output {
  position: relative;
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 0.75rem;
  align-items: center;
  justify-content: start;
  overflow-x: auto;
}

.arch-logo {
  margin: 0;
  padding: 0;
  color: #1793d1;
  font: inherit;
  line-height: var(--terminal-line-height);
  text-shadow: 0 0 1.1rem rgba(23, 147, 209, 0.32);
  white-space: pre;
}

.profile-facts {
  width: max-content;
  margin: 0;
  line-height: var(--terminal-line-height);
}

.fact-row {
  display: block;
  padding: 0;
  line-height: var(--terminal-line-height);
  white-space: nowrap;
}

.fact-row dt {
  display: inline;
  color: var(--warning);
}

.fact-row dd {
  display: inline;
  margin: 0;
}

.live-stat[data-status="live"] {
  color: var(--accent);
}

.prompt-bottom {
  margin: 1.4rem 0 0;
}

.cursor {
  display: inline-block;
  width: 0.12em;
  height: 1em;
  transform: translateY(0.16em);
  background: var(--text);
  box-shadow: 0 0 0.8rem var(--shadow);
  animation: blink 1.2s steps(1, end) infinite;
}

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

@media (max-width: 760px) {
  .terminal-shell {
    place-items: stretch;
    padding: 0.75rem;
  }

  .terminal-window {
    width: 100%;
  }

  .terminal-bar {
    justify-content: center;
  }

  .profile-output {
    grid-template-columns: max-content;
    justify-content: start;
  }

  .arch-logo {
    max-width: 100%;
    overflow-x: auto;
    padding: 0;
  }

  .fact-row {
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}
