/* MR IT — mrit.info */

@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/press-start-2p.woff2') format('woff2');
}

:root {
  --bg: #0a0e14;
  --bg-card: #111823;
  --bg-header: rgba(10, 14, 20, 0.92);
  --primary: #3dff88;
  --accent: #3dd6ff;
  --danger: #ff5555;
  --text: #e8f0e9;
  --text-muted: #8b9bab;
  --border: #1f2a3a;
  --scanline: rgba(255, 255, 255, 0.03);
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Consolas, 'Courier New', monospace;
}

[data-theme='light'] {
  --bg: #f4f6f4;
  --bg-card: #ffffff;
  --bg-header: rgba(244, 246, 244, 0.92);
  --primary: #0a7a3d;
  --accent: #0a6e8a;
  --danger: #c22f2f;
  --text: #1a2330;
  --text-muted: #5a6878;
  --border: #d5dcd5;
  --scanline: transparent;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  transition: background 0.25s, color 0.25s;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.5;
  color: var(--primary);
}

h2 {
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  margin: 0 0 2.5rem;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5.5rem 0;
}

.section:nth-child(even) {
  background: var(--bg-card);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: var(--bg);
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.logo svg {
  width: 28px;
  height: 28px;
  fill: var(--primary);
}

.logo svg .invader-eye {
  fill: var(--bg);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0;
}

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

.theme-toggle {
  background: none;
  border: 2px solid var(--border);
  color: var(--text);
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  line-height: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.nav-burger {
  display: none;
  background: none;
  border: 2px solid var(--border);
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.5rem 0.7rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 6rem 0 4.5rem;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    var(--scanline) 0px,
    var(--scanline) 1px,
    transparent 1px,
    transparent 4px
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.5rem, 4.5vw, 2.6rem);
  margin: 0 0 1.5rem;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: 2.2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  text-decoration: none;
  padding: 1rem 1.4rem;
  border: 2px solid var(--primary);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Invader parade */

.invader-parade {
  margin-top: 4rem;
  display: flex;
  gap: 2.5rem;
  justify-content: center;
}

.invader-parade svg {
  width: 34px;
  height: 26px;
  fill: var(--primary);
  animation: parade 14s linear infinite alternate;
}

.invader-parade svg:nth-child(2) {
  animation-delay: -2s;
}
.invader-parade svg:nth-child(3) {
  fill: var(--accent);
  animation-delay: -4s;
}
.invader-parade svg:nth-child(4) {
  animation-delay: -6s;
}
.invader-parade svg:nth-child(5) {
  fill: var(--accent);
  animation-delay: -8s;
}

@keyframes parade {
  from {
    transform: translateX(-12px);
  }
  to {
    transform: translateX(12px);
  }
}

/* ---------- Game ---------- */

.game-box {
  background: var(--bg);
  border: 3px solid var(--border);
  box-shadow: 6px 6px 0 color-mix(in srgb, var(--primary) 35%, transparent);
  padding: 0.6rem;
}

.game-screen {
  position: relative;
}

.game-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
  touch-action: none;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  text-align: center;
}

.game-overlay[hidden] {
  display: none;
}

.game-overlay .overlay-title {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--primary);
  margin: 0;
}

.game-overlay .overlay-score {
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin: 0;
}

.game-start-btn {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  padding: 0.9rem 1.3rem;
  cursor: pointer;
  animation: blink 1.4s steps(2, start) infinite;
}

.game-start-btn:hover {
  background: var(--primary);
  color: var(--bg);
  animation: none;
}

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

.game-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
}

.game-hud .lives {
  color: var(--danger);
  letter-spacing: 2px;
}

.touch-controls {
  display: none;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.touch-controls button {
  flex: 1;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  padding: 0.9rem 0;
  cursor: pointer;
}

.touch-controls button:active {
  border-color: var(--primary);
  color: var(--primary);
}

@media (pointer: coarse) {
  .touch-controls {
    display: flex;
  }
}

/* ---------- Leistungen ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border: 2px solid var(--border);
  padding: 2rem 1.7rem;
  transition: border-color 0.2s, transform 0.2s;
}

[data-theme='light'] .card {
  border-color: var(--border);
}

.section:nth-child(even) .card {
  background: var(--bg);
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1.4rem;
  fill: var(--accent);
}

.card h3 {
  font-size: 0.88rem;
  margin: 0 0 1rem;
}

.card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.98rem;
}

.card--wide {
  grid-column: 1 / -1;
  border-color: var(--primary);
}

.card p.price-badge {
  display: block;
  width: fit-content;
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  line-height: 1;
  color: var(--primary);
  white-space: nowrap;
  margin: 1.4rem 0 0;
  padding-top: 1.2rem;
  border-top: 2px dashed var(--border);
}

/* ---------- Seminare ---------- */

.section-intro {
  color: var(--text-muted);
  max-width: 46rem;
  margin: -1.5rem 0 2.5rem;
}

.seminar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
  max-width: 46rem;
}

.seminar-list li {
  background: var(--bg-card);
  border: 2px solid var(--border);
  padding: 1.1rem 1.4rem;
  transition: border-color 0.2s;
}

.seminar-list li:hover {
  border-color: var(--primary);
}

.seminar-list h3 {
  font-size: 0.78rem;
  line-height: 1.7;
  margin: 0 0 0.4rem;
}

.seminar-list h3::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--primary);
  box-shadow: 0 0 6px color-mix(in srgb, var(--primary) 60%, transparent);
  margin-right: 0.7rem;
}

.seminar-list p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Über mich ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
}

.pixel-avatar {
  width: 200px;
  height: 200px;
  border: 3px solid var(--primary);
  background: var(--bg);
  padding: 1rem;
}

.pixel-avatar .face {
  fill: var(--primary);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 2.5rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.about-stats .stat-value {
  display: block;
  font-family: var(--font-pixel);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.about-stats .stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Kontakt ---------- */

.contact-inner {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}

.contact-mail-btn {
  font-size: 0.85rem;
  margin: 1.8rem 0 2.2rem;
}

.contact-address {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.8;
}

.contact-note {
  margin-top: 2rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 2px solid var(--border);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-invader {
  width: 26px;
  height: 20px;
  fill: var(--primary);
}

/* ---------- Rechtsseiten ---------- */

.legal {
  max-width: 46rem;
}

.legal h2 {
  font-size: 1.05rem;
  margin: 2.5rem 0 1rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal address {
  font-style: normal;
  line-height: 1.9;
}

.todo-marker {
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

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

  .pixel-avatar {
    width: 150px;
    height: 150px;
  }

  .about-stats {
    gap: 1.5rem;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-header);
    border-bottom: 2px solid var(--border);
    display: none;
    padding: 1rem 1.25rem 1.4rem;
  }

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

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .nav-burger {
    display: block;
  }

  .nav-burger[aria-expanded='true'] {
    border-color: var(--primary);
    color: var(--primary);
  }
}
