:root {
  --bg: #050304;
  --panel: #0d0809;
  --text: #fff1f1;
  --muted: #8f7777;
  --soft: #d2b8b8;
  --line: rgba(255, 241, 241, 0.12);
  --line-strong: rgba(255, 241, 241, 0.22);
  --accent: #ff2b2b;
  --accent-soft: #ff6b6b;
  --accent-dim: rgba(255, 43, 43, 0.14);
  --max: 1120px;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family:
    ui-monospace,
    "SFMono-Regular",
    Menlo,
    Consolas,
    "Liberation Mono",
    monospace;
  overflow-x: hidden;
}

img,
a {
  -webkit-user-drag: none;
}

a {
  color: inherit;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 43, 43, 0.18), transparent 36rem),
    radial-gradient(circle at 10% 90%, rgba(255, 43, 43, 0.055), transparent 26rem),
    linear-gradient(180deg, #0b0506, #070304 48%, var(--bg));
}

.terminal-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 241, 241, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 241, 241, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 45%, black, transparent 78%);
}

.terminal-glow {
  position: absolute;
  width: 42rem;
  height: 42rem;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 43, 43, 0.14), transparent 62%);
  animation: pulse 7s ease-in-out infinite alternate;
}

.screen {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.nav a,
.button {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--soft);
  font-size: 13px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 43, 43, 0.42);
  border-radius: 9px;
  background: rgba(255, 43, 43, 0.065);
  box-shadow:
    0 0 22px rgba(255, 43, 43, 0.22),
    0 0 54px rgba(255, 43, 43, 0.08);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

.nav a {
  transition: color 150ms ease;
}

.nav a:hover {
  color: var(--text);
}

.terminal-window {
  align-self: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18, 9, 10, 0.92), rgba(8, 4, 5, 0.92));
  backdrop-filter: blur(18px);
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 241, 241, 0.045);
}

.window-head {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.024);
}

.dots {
  display: flex;
  gap: 7px;
}

.dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 241, 241, 0.16);
}

.window-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.window-body {
  padding: clamp(24px, 5vw, 54px);
}

.cmd {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.cmd span {
  color: var(--accent-soft);
}

.identity {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 34px;
}

.identity h1 {
  margin: 0;
  color: var(--text);
  font-family:
    ui-monospace,
    "SFMono-Regular",
    Menlo,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: clamp(56px, 11.5vw, 148px);
  line-height: 0.82;
  letter-spacing: -0.085em;
  font-weight: 760;
  text-transform: lowercase;
  text-shadow:
    0 0 28px rgba(255, 43, 43, 0.16),
    0 0 1px rgba(255, 241, 241, 0.16);
}

.cursor {
  color: var(--accent-soft);
  margin-left: 0.02em;
  letter-spacing: -0.12em;
  animation: cursorBlink 950ms steps(1) infinite;
}

.identity p {
  width: fit-content;
  margin: 18px 0 0;
  padding: 8px 11px;
  border: 1px solid rgba(255, 43, 43, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 241, 241, 0.018);
  font-size: 12px;
}

.output {
  margin: 0 0 30px;
  color: var(--soft);
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.6;
}

.output.strong {
  color: var(--text);
}

.type-line::after {
  content: "_";
  color: var(--accent-soft);
  animation: blink 850ms steps(1) infinite;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--soft);
  background: rgba(255, 241, 241, 0.025);
  font-size: 14px;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 43, 43, 0.06);
}

.button.primary {
  color: #fff1f1;
  background: linear-gradient(135deg, #ff2b2b, #8d0d0d);
  border-color: rgba(255, 43, 43, 0.74);
  box-shadow: 0 0 28px rgba(255, 43, 43, 0.16);
}

.modules {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: 24px 0 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--line);
}

.modules article {
  min-height: 170px;
  padding: 18px;
  background: rgba(13, 8, 9, 0.82);
  transition: background 150ms ease;
}

.modules article:hover {
  background: rgba(24, 10, 11, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 43, 43, 0.08);
}

.modules span {
  display: block;
  margin-bottom: 30px;
  color: var(--accent-soft);
  font-size: 12px;
}

.modules h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.modules p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.footer {
  min-height: 74px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #765f5f;
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 5;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(13, 8, 9, 0.9);
  backdrop-filter: blur(14px);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

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

@keyframes pulse {
  from {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.96);
  }

  to {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@media (max-width: 960px) {
  .modules {
    grid-template-columns: repeat(2, 1fr);
  }

  .modules article:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .screen {
    width: min(var(--max), calc(100% - 28px));
  }

  .topbar {
    height: 76px;
  }

  .brand-text {
    display: none;
  }

  .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav {
    gap: 13px;
    font-size: 12px;
  }

  .terminal-window {
    border-radius: 18px;
  }

  .window-head {
    gap: 12px;
  }

  .window-head p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .identity {
    width: 100%;
  }

  .identity h1 {
    font-size: clamp(44px, 14vw, 92px);
    letter-spacing: -0.075em;
  }

  .modules {
    grid-template-columns: 1fr;
  }

  .modules article,
  .modules article:last-child {
    min-height: auto;
    grid-column: span 1;
  }

  .modules span {
    margin-bottom: 20px;
  }

  .footer {
    padding: 22px 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .type-line::after {
    display: none;
  }

  .cursor {
    animation: none !important;
  }
}
