:root {
  --red: #FF0000;
  --black: #000000;
  --white: #FFFFFF;
  --muted: #B7B7B7;
  --panel: #050505;
  --container: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font-family: "JetBrains Mono", monospace;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

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

.page-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 0, 0, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.11) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.025;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.3) 4px
  );
}

.topbar {
  position: relative;
  z-index: 10;
  min-height: 58px;
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--red);
  background: rgba(0, 0, 0, 0.94);
}

.terminal-id,
.main-nav a {
  display: flex;
  align-items: center;
  min-height: 58px;
  text-decoration: none;
}

.terminal-id {
  padding: 0 28px;
  color: var(--red);
  font-weight: 700;
}

.main-nav {
  display: flex;
}

.main-nav a {
  gap: 10px;
  padding: 0 28px;
  border-left: 1px solid var(--red);
  color: var(--white);
}

.main-nav a span {
  color: var(--red);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--red);
  color: var(--black);
  outline: none;
}

.main-nav a:hover span,
.main-nav a:focus-visible span {
  color: var(--black);
}

.menu-toggle {
  display: none;
  width: 56px;
  border: 0;
  border-left: 1px solid var(--red);
  background: transparent;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--red);
}

.window {
  position: relative;
  border: 1px solid var(--red);
  background: rgba(0, 0, 0, 0.94);
  box-shadow: 0 0 0 1px rgba(255, 0, 0, 0.04) inset;
}

.window::before,
.window::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.window::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--red);
  border-left: 2px solid var(--red);
}

.window::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
}

.window-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--red);
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.window-controls {
  display: flex;
  gap: 18px;
  color: var(--red);
}

.hero {
  margin-top: 28px;
}

.hero-body {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1.3fr) minmax(300px, 0.7fr);
  min-height: 500px;
  overflow: hidden;
}

.line-numbers {
  padding: 42px 0 28px 10px;
  display: grid;
  align-content: start;
  gap: 12px;
  color: var(--red);
  font-size: 0.76rem;
}

.hero-copy {
  padding: 72px 30px 64px 12px;
}

.eyebrow {
  margin: 0 0 32px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  color: var(--red);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.cursor {
  display: inline-block;
  width: 18px;
  height: 1em;
  margin-left: 12px;
  vertical-align: -0.1em;
  background: var(--red);
  animation: blink 1s steps(1) infinite;
}

.cursor.small {
  width: 10px;
  height: 1.1em;
  margin-left: 6px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.role {
  margin-bottom: 38px;
  color: var(--white);
  font-size: clamp(1rem, 2vw, 1.45rem);
}

.intro {
  max-width: 700px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: 1rem;
}

.intro span {
  color: var(--red);
}

.terminal-button {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid var(--red);
  background: transparent;
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
}

.terminal-button:hover,
.terminal-button:focus-visible {
  background: var(--red);
  color: var(--black);
  outline: none;
}

.terminal-button.compact {
  min-height: 48px;
  margin-top: auto;
}

.hero-visual {
  position: relative;
  min-height: 100%;
}

.shape {
  position: absolute;
  border: 1px solid var(--red);
  background: var(--black);
}

.shape-a {
  width: 180px;
  height: 180px;
  top: 60px;
  left: 38px;
}

.shape-b {
  width: 128px;
  height: 128px;
  top: 150px;
  left: 150px;
}

.shape-c {
  width: 62px;
  height: 62px;
  top: 295px;
  left: 275px;
}

.dot-matrix {
  position: absolute;
  width: 320px;
  height: 260px;
  right: 20px;
  bottom: 30px;
  opacity: 0.62;
  background-image: radial-gradient(var(--red) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.panel {
  min-height: 540px;
}

.panel-content {
  min-height: 488px;
  display: flex;
  flex-direction: column;
  padding: 30px;
}

.panel-content p {
  color: var(--muted);
}

.post-list {
  display: grid;
}

.post {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px dashed var(--red);
  text-decoration: none;
}

.post:first-child {
  padding-top: 0;
}

.post h2 {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 1rem;
  line-height: 1.45;
}

.post time {
  color: var(--muted);
  font-size: 0.82rem;
}

.post > span {
  color: var(--red);
  font-size: 2rem;
}

.post:hover h2,
.post:focus-visible h2 {
  color: var(--white);
}

.contact-list {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 22px 0 30px;
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
}

.contact-list a {
  color: var(--muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--red);
  outline: none;
}

.icon {
  color: var(--red);
  font-weight: 700;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 30px 0 38px;
}

.prompt {
  display: flex;
  align-items: center;
  color: var(--red);
  font-weight: 700;
}

.system-status {
  display: flex;
  border: 1px solid var(--red);
}

.system-status > span {
  padding: 12px 18px;
}

.system-status > span + span {
  border-left: 1px solid var(--red);
}

.system-status b {
  color: var(--red);
}

@media (max-width: 1020px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: 0;
  }

  .panel-content {
    min-height: 0;
  }

  .hero-body {
    grid-template-columns: 52px 1fr;
  }

  .hero-visual {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr 56px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 58px;
    left: -1px;
    right: -1px;
    display: none;
    flex-direction: column;
    border: 1px solid var(--red);
    background: var(--black);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    border-left: 0;
    border-top: 1px solid var(--red);
  }

  .hero-body {
    grid-template-columns: 1fr;
  }

  .line-numbers {
    display: none;
  }

  .hero-copy {
    padding: 56px 24px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .system-status {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(calc(100% - 20px), var(--container));
  }

  .terminal-id {
    padding: 0 16px;
    font-size: 0.82rem;
  }

  .window-header {
    padding: 0 16px;
    font-size: 0.78rem;
  }

  .window-controls {
    gap: 10px;
  }

  .panel-content {
    padding: 22px;
  }

  .system-status > span {
    padding: 10px 12px;
    font-size: 0.74rem;
  }
}
