/* MISChaufen v4 — raw.ag inspired dark network aesthetic */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark:  #000510;
  --bg-panel: rgba(0, 20, 60, 0.6);
  --border:   #1a4a8a;
  --blue:     #4080ff;
  --cyan:     #00d4ff;
  --red:      #ff4060;
  --text:     #c8d4e8;
  --bright:   #ffffff;
  --dim:      #6080a0;
  --grid:     #0a2040;
}

html {
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
}

/* grid background */
body::before {
  content: '';
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
  opacity: .5;
  position: fixed;
  inset: 0;
}

/* scanlines */
body::after {
  content: '';
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 20, 50, .08) 2px 4px
  );
  position: fixed;
  inset: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

a { color: var(--cyan); text-decoration: none; font-weight: 500; }
a:hover, a:focus { color: var(--bright); text-decoration: underline; }

/* ── HEADER ─────────────────────────────────────────── */

header {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px 0;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .875rem;
}

.logo {
  width: 3rem;
  height: 3rem;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

header h1 {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bright);
  text-shadow: 0 0 18px rgba(0, 212, 255, .35);
  margin: 0;
  line-height: 1.1;
}
header h1 a { color: inherit; text-decoration: none; }

.tagline {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .68rem;
  color: var(--dim);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .15rem;
}

.cursor {
  color: var(--cyan);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink  { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: .5rem;
}
nav a {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  padding: .2rem .75rem;
  border-right: 1px solid var(--border);
  text-decoration: none;
  transition: color .2s;
}
nav a:first-of-type { padding-left: 0; }
nav a:last-of-type  { border-right: none; }
nav a:hover { color: var(--cyan); text-decoration: none; }

.glow-line {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .5rem;
  color: var(--dim);
  letter-spacing: .1em;
  border-top: 1px solid rgba(0, 212, 255, .15);
  padding-top: .35rem;
  overflow: hidden;
  white-space: nowrap;
  height: 1.1rem;
  margin-top: .5rem;
}
.glow-line::before {
  content: 'UART 115200 8N1 ◈ JTAG UNLOCKED ◈ READ 0xDEADBEEF=0xFF3A1C00 ◈ SPI CLK 24MHz ◈ FLASH 0x00000000-0x00FFFFFF ◈ GPIO17 HIGH ◈ GPIO22 LOW ◈ VCC 3.312V ◈ I2C 0x68 ACK ◈ REG[0x2C]=0xFF3A ◈ BOOTLOADER INTERRUPTED ◈ DUMPING FIRMWARE ◈ CRC32:0xA3F71B2E MISMATCH EXPECTED:0xDECAFBAD ◈ RETRY 3/5 ◈ EEPROM WRITE 0x1000 ◈ SP=0xBFFFF4A8 ◈ IRQ PENDING ◈ DMA CH3 OVERFLOW ◈ OSC 16.000MHz ◈ FUSE:0xFF 0xD9 0xFD ◈ HEAP 0x20001A40 ◈ WATCHDOG RESET ◈ PC=0x08003F2C ◈ NOP SLED ◈ STACK SMASH ◈ UART 115200 8N1 ◈ JTAG UNLOCKED ◈ READ 0xDEADBEEF=0xFF3A1C00 ◈ SPI CLK 24MHz ◈ FLASH 0x00000000-0x00FFFFFF ◈ GPIO17 HIGH ◈ GPIO22 LOW ◈ VCC 3.312V ◈ I2C 0x68 ACK ◈ REG[0x2C]=0xFF3A ◈ BOOTLOADER INTERRUPTED ◈ DUMPING FIRMWARE ◈ CRC32:0xA3F71B2E MISMATCH EXPECTED:0xDECAFBAD ◈ RETRY 3/5 ◈ EEPROM WRITE 0x1000 ◈ SP=0xBFFFF4A8 ◈ IRQ PENDING ◈ DMA CH3 OVERFLOW ◈ OSC 16.000MHz ◈ FUSE:0xFF 0xD9 0xFD ◈ HEAP 0x20001A40 ◈ WATCHDOG RESET ◈ PC=0x08003F2C ◈ NOP SLED ◈ STACK SMASH ◈';
  display: inline-block;
  animation: ticker 60s linear infinite;
}

/* ── SECTIONS ───────────────────────────────────────── */

section { margin-bottom: 30px; }

.hero {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color .3s;
}
.hero:hover { border-color: var(--blue); }

h2 {
  background: linear-gradient(90deg, var(--bg-panel), transparent);
  border-left: 2px solid var(--blue);
  border-radius: 0 4px 4px 0;
  margin: 0 0 14px;
  padding: 8px 15px;
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--cyan);
}

section p {
  font-size: .95rem;
  margin-bottom: .75rem;
  color: var(--text);
}

ul { list-style: none; padding: 0; }
li {
  margin: .4rem 0;
  padding-left: 1.25rem;
  text-indent: -1.25rem;
  font-size: .95rem;
  color: var(--text);
}
li::before { content: "→ "; color: var(--cyan); font-weight: 700; }

.muted {
  color: var(--dim);
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .82rem;
}

/* ── CARD GRID (available for future use) ───────────── */

.card-grid {
  column-count: 3;
  column-gap: 14px;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  break-inside: avoid;
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color .3s;
}
.card:hover { border-color: var(--blue); }
.card h3 {
  background: linear-gradient(rgba(30, 60, 100, .5), transparent);
  border-bottom: 1px solid var(--border);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 10px 14px;
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .78rem;
  font-weight: 400;
}
.card p { padding: 10px 14px; }
.card ul { padding: 8px; }
.card li { text-indent: 0; padding-left: 0; }
.card li::before { display: none; }
.card li a {
  color: var(--text);
  display: block;
  padding: 5px 10px;
  border-radius: 2px;
  font-size: .92rem;
  font-weight: 400;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.card li a:hover { color: var(--bright); background: rgba(64, 128, 255, .2); }
.card-wide {
  column-span: all;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 14px;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.75;
}

/* ── FOOTER ─────────────────────────────────────────── */

footer {
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 30px;
  padding: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: .75rem;
}
.footer-links a {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color .3s;
}
.footer-links a:hover { color: var(--cyan); text-decoration: none; }
.footer-links span {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── LEGAL ──────────────────────────────────────────── */

details {
  text-align: left;
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: .875rem;
}
summary {
  cursor: pointer;
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  user-select: none;
  list-style: none;
  transition: color .2s;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: "[+] "; color: var(--cyan); }
details[open] summary::before { content: "[-] "; }
summary:hover { color: var(--text); }

.legal {
  font-size: .8rem;
  line-height: 1.7;
  margin-top: 1rem;
  color: var(--text);
  opacity: .7;
}
.legal h3 {
  background: none;
  border-left: none;
  padding: 0;
  font-family: ui-monospace, 'Courier New', monospace;
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 1.25rem 0 .25rem;
  border-radius: 0;
}
.legal p { margin: .4rem 0; }
.legal ul { margin: .4rem 0; padding-left: 1rem; }
.legal li { text-indent: 0; padding-left: 0; font-size: .8rem; }
.legal li::before { content: "– "; color: var(--dim); }
.legal a { color: var(--cyan); font-size: inherit; }
.legal table { border-collapse: collapse; }
.legal table td, .legal table th {
  border: 1px solid var(--border);
  padding: .3rem .6rem;
  font-size: .75rem;
}

/* ── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 600px) {
  .container { padding: 15px; }
  header { padding: 14px 15px 0; }
  header h1 { font-size: 1.2rem; }
  .card-grid { column-count: 2; }
}
@media (max-width: 380px) {
  .card-grid { column-count: 1; }
}

/* scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }
