:root {
  --void: #111111;
  --panel: #1b1b1b;
  --line: #555555;
  --muted: #a3a3a3;
  --text: #f5f5f5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #090909;
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
}

a { color: inherit; }

.terminal {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--void);
  box-shadow: 0 0 40px #000;
}

.system-header { border-bottom: 1px solid var(--line); }

.boot-line, .system-title, nav, .feed-entry > header, footer {
  padding-right: clamp(16px, 4vw, 44px);
  padding-left: clamp(16px, 4vw, 44px);
}

.boot-line {
  margin: 0;
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .69rem;
  letter-spacing: .04em;
}

.system-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-top: 27px;
  padding-bottom: 25px;
}

.system-title a {
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.1em;
  text-decoration: none;
}

.system-title p { margin: 0; color: var(--muted); font-size: .72rem; }
.system-title span { color: var(--text); }

nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

nav a {
  flex: 1 0 max-content;
  padding: 12px 18px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  text-decoration: none;
}

nav a:first-child { border-left: 1px solid var(--line); }
nav a:hover, nav a:focus-visible { background: var(--text); color: var(--void); outline: 0; }

.terminal-intro { padding: clamp(42px, 8vw, 88px) clamp(16px, 8vw, 88px) 55px; border-bottom: 1px solid var(--line); }
.terminal-intro > p:first-child, .tag, .command { color: var(--muted); font-size: .74rem; letter-spacing: .03em; }

h1, h2 { margin: 0; font: inherit; font-weight: 700; }

h1 { max-width: 22ch; margin: 20px 0 26px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1.08; letter-spacing: -.08em; }
h1 span { animation: blink 1s steps(1) infinite; }

.intro-copy { max-width: 64ch; margin-bottom: 32px; color: var(--text); font-size: .96rem; line-height: 1.7; }
.command { margin: 0; }

.feed-entry { border-bottom: 1px solid var(--line); }

.feed-entry > header {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: .66rem;
  letter-spacing: .02em;
}

.feed-entry > header span:last-child { text-align: right; }

.entry-content {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding: clamp(28px, 5vw, 60px) clamp(16px, 8vw, 88px);
}

.entry-content.reverse { grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr); }

.tag { margin: 0 0 16px; }
.entry-content h2 { margin-bottom: 18px; font-size: clamp(1.35rem, 2.7vw, 2.3rem); line-height: 1.25; letter-spacing: -.07em; }
.entry-content p:not(.tag) { max-width: 54ch; margin-bottom: 24px; color: #dedede; font-size: .9rem; line-height: 1.65; }
.entry-content a, footer a { border-bottom: 1px solid var(--text); font-size: .72rem; text-decoration: none; }
.entry-content a:hover, footer a:hover { color: var(--muted); border-color: var(--muted); }

.signal {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: #292929;
  background-image: repeating-linear-gradient(0deg, transparent 0 5px, rgba(255,255,255,.04) 5px 6px);
}

.signal::before, .signal::after { content: ""; position: absolute; }
.signal b { position: absolute; z-index: 1; color: var(--text); font-size: clamp(1.6rem, 4vw, 3rem); line-height: .8; letter-spacing: -.13em; }

.signal-one::before { width: 45%; height: 130%; top: -15%; left: 38%; background: #090909; transform: rotate(24deg); }
.signal-one::after { width: 15%; height: 70%; right: 15%; bottom: -9%; border: 1px solid var(--muted); transform: rotate(-17deg); }
.signal-one b { top: 22px; left: 21px; }

.signal-map::before { inset: -30px 32%; border-right: 1px solid var(--text); border-left: 1px solid var(--text); transform: rotate(39deg); box-shadow: 60px 0 0 #777, -60px 0 0 #777; }
.signal-map::after { width: 9px; height: 9px; top: 43%; left: 49%; border-radius: 50%; background: var(--text); box-shadow: 53px -55px 0 #777, -70px 54px 0 #777; }
.signal-map b { bottom: 20px; left: 19px; }

.signal-sound::before { inset: 28px 16px; background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 10px); clip-path: polygon(0 50%, 8% 41%, 16% 60%, 27% 17%, 38% 80%, 49% 32%, 60% 65%, 70% 24%, 80% 89%, 91% 40%, 100% 54%, 100% 100%, 0 100%); }
.signal-sound b { top: 21px; right: 18px; text-align: right; }

.signal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; padding: 14px; }
.signal-grid i { display: block; min-height: 88px; border: 1px solid #777; background: linear-gradient(135deg, #555 0 36%, #111 36% 67%, #777 67%); }
.signal-grid i:nth-child(2) { background: linear-gradient(45deg, #111 0 42%, #777 42% 58%, #292929 58%); }
.signal-grid i:nth-child(3) { background: linear-gradient(140deg, #777 0 23%, #111 23% 70%, #555 70%); }
.signal-grid i:nth-child(4) { background: linear-gradient(70deg, #292929 0 35%, #777 35% 45%, #111 45%); }

.signal-error { background: #161616; }
.signal-error::before { inset: 20px; border: 1px solid #777; transform: rotate(-4deg); }
.signal-error::after { top: 47%; right: -10%; left: -10%; height: 8px; background: #888; transform: rotate(-8deg); box-shadow: 0 34px 0 #333, 0 -34px 0 #333; }
.signal-error b { top: 22px; left: 22px; }

.load-more { margin: 0; padding: 33px 16px 48px; color: var(--muted); font-size: .74rem; text-align: center; }
.load-more span { color: var(--text); animation: blink .8s steps(1) infinite; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 15px; padding-bottom: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .66rem; }
footer p { margin: 0; }

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 670px) {
  .system-title { align-items: flex-start; flex-direction: column; gap: 10px; }
  .feed-entry > header { grid-template-columns: 1fr; gap: 5px; }
  .feed-entry > header span:last-child { text-align: left; }
  .entry-content, .entry-content.reverse { grid-template-columns: 1fr; gap: 25px; }
  .entry-content.reverse > :first-child { order: 2; }
  .entry-content.reverse > :last-child { order: 1; }
  .signal { min-height: 190px; }
  footer { align-items: flex-start; flex-direction: column; }
}
