@font-face {
  font-family: "Monaspace Neon";
  src: url("/fonts/monaspace-neon-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Monaspace Neon";
  src: url("/fonts/monaspace-neon-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Monaspace Neon";
  src: url("/fonts/monaspace-neon-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg-start: #eff6ff;
  --bg-mid: #f1f5f9;
  --bg-end: #dbeafe;
  --grid: rgba(100, 116, 139, 0.18);
  --card: rgba(255, 255, 255, 0.82);
  --card-border: rgba(148, 163, 184, 0.45);
  --terminal: rgba(15, 23, 42, 0.95);
  --terminal-bar: rgba(30, 41, 59, 0.94);
  --text: #0f172a;
  --muted: #475569;
  --soft: #64748b;
  --blue: #2563eb;
  --blue-bright: #60a5fa;
  --green: #22c55e;
  --link-bg: rgba(15, 23, 42, 0.76);
  --link-hover: rgba(30, 41, 59, 0.9);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-start: #020617;
    --bg-mid: #111827;
    --bg-end: #172554;
    --grid: rgba(148, 163, 184, 0.08);
    --card: rgba(15, 23, 42, 0.74);
    --card-border: rgba(71, 85, 105, 0.7);
    --terminal: rgba(2, 6, 23, 0.92);
    --terminal-bar: rgba(30, 41, 59, 0.82);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --blue: #60a5fa;
    --link-bg: rgba(255, 255, 255, 0.045);
    --link-hover: rgba(96, 165, 250, 0.15);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: clamp(16px, 14px + 0.5vw, 20px);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  overflow-x: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(135deg, var(--bg-start), var(--bg-mid) 46%, var(--bg-end));
}

body::selection {
  color: inherit;
  background: rgba(59, 130, 246, 0.3);
}

a {
  color: inherit;
}

svg {
  display: block;
}

.page-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(0.7rem, env(safe-area-inset-top)) max(0.7rem, env(safe-area-inset-right)) max(0.7rem, env(safe-area-inset-bottom)) max(0.7rem, env(safe-area-inset-left));
}

.terminal-card {
  width: min(100%, 35rem);
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  font-family: "Monaspace Neon", ui-monospace, "SF Mono", "Cascadia Code", monospace;
}

.terminal-bar {
  min-height: 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, 0.62rem) 1fr;
  align-items: center;
  gap: 0.38rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--terminal-bar);
}

.terminal-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: #64748b;
}

.terminal-dot:nth-child(1) {
  background: #ef4444;
}

.terminal-dot:nth-child(2) {
  background: #f59e0b;
}

.terminal-dot:nth-child(3) {
  background: #22c55e;
}

.terminal-title {
  justify-self: center;
  margin-left: -2.5rem;
  color: #94a3b8;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.card-body {
  padding: clamp(0.9rem, 3vw, 1.45rem);
  background:
    linear-gradient(180deg, var(--terminal), rgba(15, 23, 42, 0.9)),
    var(--terminal);
  color: #e2e8f0;
}

.terminal-session {
  display: grid;
  gap: 0.44rem;
}

.prompt {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  color: #94a3b8;
  font-size: clamp(0.72rem, 1.5vw, 0.84rem);
  line-height: 1.2;
}

.prompt span {
  color: var(--green);
}

h1 {
  margin: 0;
  color: var(--blue-bright);
  font-size: clamp(1.85rem, 8vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.cursor-blink {
  margin-left: 0.08em;
  color: var(--blue);
  animation: cursor-blink 1s step-end infinite;
}

.terminal-output {
  max-width: 33rem;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(0.76rem, 1.7vw, 0.9rem);
  line-height: 1.48;
}

.links-prompt {
  margin-top: 0.28rem;
}

.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
  margin-top: 0.52rem;
}

.link-card {
  display: flex;
  gap: 0.58rem;
  align-items: center;
  min-height: 3.15rem;
  padding: 0.58rem 0.68rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.58rem;
  background: var(--link-bg);
  color: #f8fafc;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.link-card.primary {
  grid-column: 1 / -1;
  border-color: rgba(34, 197, 94, 0.36);
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(96, 165, 250, 0.62);
  background: var(--link-hover);
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.link-card:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.55);
  outline-offset: 3px;
}

.link-card svg {
  width: 1.08rem;
  height: 1.08rem;
  flex: 0 0 auto;
  fill: currentColor;
  color: var(--blue-bright);
}

.link-card.primary svg {
  color: var(--green);
}

.link-card span {
  min-width: 0;
}

.link-card strong,
.link-card small {
  display: block;
}

.link-card strong {
  font-size: 0.76rem;
  line-height: 1.2;
  letter-spacing: 0.015em;
}

.link-card small {
  margin-top: 0.12rem;
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.58rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes cursor-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@media (max-width: 34rem) {
  .page-shell {
    place-items: center;
    padding: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
  }

  .terminal-title {
    font-size: 0.64rem;
  }

  .card-body {
    padding: clamp(0.72rem, 3vw, 1rem);
  }

  .terminal-session {
    gap: 0.34rem;
  }

  h1 {
    font-size: clamp(1.7rem, 8vw, 2.65rem);
  }

  .terminal-output {
    font-size: clamp(0.7rem, 2.7vw, 0.8rem);
    line-height: 1.38;
  }

  .links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.38rem;
  }

  .link-card.primary {
    grid-column: 1 / -1;
  }

  .link-card {
    min-height: 2.65rem;
    padding: 0.48rem;
  }

  .link-card svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .link-card strong {
    font-size: 0.68rem;
  }

  .link-card small {
    display: none;
  }
}

@media (max-height: 31rem) and (orientation: landscape) {
  .page-shell {
    align-items: center;
  }

  .card-body {
    padding: 0.72rem;
  }

  h1 {
    font-size: clamp(1.55rem, 6vw, 2.45rem);
  }

  .terminal-session {
    gap: 0.32rem;
  }

  .terminal-output {
    font-size: 0.7rem;
    line-height: 1.35;
  }

  .links {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .link-card,
  .link-card.primary {
    grid-column: auto;
    min-height: 2.75rem;
    padding: 0.48rem;
  }

  .link-card svg {
    display: none;
  }

  .link-card small {
    display: none;
  }
}

@media (max-height: 42rem) and (min-width: 48rem) {
  .terminal-card {
    width: min(100%, 52rem);
  }

  .card-body {
    padding: 0.9rem;
  }

  .terminal-session {
    gap: 0.34rem;
  }

  h1 {
    font-size: clamp(1.9rem, 5vw, 2.9rem);
  }

  .terminal-output {
    max-width: 46rem;
    font-size: 0.74rem;
    line-height: 1.38;
  }

  .links {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .link-card,
  .link-card.primary {
    grid-column: auto;
    min-height: 2.85rem;
    padding: 0.5rem;
  }

  .link-card svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .link-card strong {
    font-size: 0.68rem;
  }

  .link-card small {
    display: none;
  }
}

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

.full-terminal-page {
  color-scheme: dark;
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 197, 94, 0.14), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(96, 165, 250, 0.14), transparent 26rem),
    #020617;
  color: #e2e8f0;
  font-family: "Monaspace Neon", ui-monospace, "SF Mono", "Cascadia Code", monospace;
}

.full-terminal-shell {
  height: 100svh;
  padding: max(0.55rem, env(safe-area-inset-top)) max(0.55rem, env(safe-area-inset-right)) max(0.55rem, env(safe-area-inset-bottom)) max(0.55rem, env(safe-area-inset-left));
}

.full-terminal {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden auto;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 1rem;
  background:
    linear-gradient(rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.76)),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.035) 0 1px, transparent 1px 4px);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
}

.full-terminal-bar {
  min-height: 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, 0.62rem) 1fr;
  align-items: center;
  gap: 0.38rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.74);
  background: rgba(15, 23, 42, 0.92);
}

.full-terminal-screen {
  min-height: 0;
  display: grid;
  align-content: center;
  overflow: hidden auto;
  gap: clamp(0.42rem, 1.4vh, 0.78rem);
  width: min(100%, 58rem);
  margin: 0 auto;
  padding: clamp(0.75rem, 3.8vw, 2.7rem);
}

.terminal-line,
.terminal-copy,
.terminal-ready {
  margin: 0;
}

.terminal-line {
  display: flex;
  gap: 0.48rem;
  align-items: center;
  color: #94a3b8;
  font-size: clamp(0.72rem, 1.7vw, 0.92rem);
  line-height: 1.2;
}

.terminal-caret {
  color: #22c55e;
}

.terminal-name {
  margin: 0;
  color: #60a5fa;
  font-size: clamp(2rem, 8.4vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.terminal-name::after {
  content: none;
}

.terminal-copy {
  max-width: 48rem;
  color: #dbeafe;
  font-size: clamp(0.78rem, 1.8vw, 1.06rem);
  line-height: 1.55;
}

.terminal-links {
  display: grid;
  gap: 0.1rem;
}

.terminal-links a {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(5rem, 8rem) auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.22rem 0.35rem;
  border-radius: 0.28rem;
  color: #cbd5e1;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.terminal-links a:hover,
.terminal-links a:focus-visible {
  background: rgba(96, 165, 250, 0.12);
  color: #f8fafc;
}

.terminal-links a:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.55);
  outline-offset: 3px;
}

.terminal-perms,
.terminal-command,
.terminal-arrow,
.terminal-target {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-perms {
  color: #64748b;
  font-size: clamp(0.58rem, 1.25vw, 0.72rem);
}

.terminal-command {
  color: #22c55e;
  font-size: clamp(0.68rem, 1.45vw, 0.86rem);
  font-weight: 700;
}

.terminal-arrow {
  color: #64748b;
}

.terminal-target {
  color: #94a3b8;
  font-size: clamp(0.58rem, 1.25vw, 0.76rem);
}

.terminal-ready {
  color: #94a3b8;
}

.terminal-cursor {
  width: 0.62em;
  height: 1em;
  background: #60a5fa;
  animation: cursor-blink 1s step-end infinite;
}

@media (max-width: 44rem) {
  .terminal-links {
    gap: 0.08rem;
  }
}

@media (max-height: 34rem) {
  .full-terminal-screen {
    gap: 0.34rem;
    padding: 0.62rem;
  }

  .terminal-name {
    font-size: clamp(1.55rem, 6vw, 3.2rem);
  }

  .terminal-copy {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .terminal-links a {
    grid-template-columns: minmax(4.25rem, 5.8rem) auto minmax(0, 1fr);
    gap: 0.42rem;
    padding: 0.16rem 0.25rem;
  }

  .terminal-perms {
    display: none;
  }
}
