* {
  box-sizing: border-box;
}

:root {
  --terminal-bg: rgba(5, 10, 15, 0.94);
  --terminal-border: rgba(150, 180, 195, 0.34);
  --terminal-text: #aebdc5;
  --terminal-dim: #62737c;
  --prompt: #8fd18f;
  --accent: #b9e8c0;
  --shadow: rgba(0, 0, 0, 0.55);
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--terminal-text);
  background:
    linear-gradient(rgba(3, 8, 13, 0.12), rgba(3, 8, 13, 0.12)),
    url("../assets/achtergrond.png") center center / cover no-repeat fixed;
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", "DejaVu Sans Mono", monospace;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  padding: clamp(1rem, 4vw, 3rem);
}

.terminal {
  width: min(1100px, 92vw);
  height: min(650px, 72vh);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--terminal-border);
  border-radius: 12px;
  background: var(--terminal-bg);
  box-shadow:
    0 28px 70px var(--shadow),
    0 0 55px rgba(100, 150, 120, 0.08);
  backdrop-filter: blur(6px);
}

.terminal__bar {
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(160, 180, 190, 0.14);
  background: rgba(255, 255, 255, 0.025);
}

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

.terminal__button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  opacity: 0.8;
}

.terminal__button--close { background: #b65d5d; }
.terminal__button--min { background: #b2a15d; }
.terminal__button--max { background: #65a56e; }

.terminal__title {
  color: #819199;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.terminal__spacer {
  flex: 1;
}

.terminal__screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.terminal__output {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 24px 28px 80px;
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  line-height: 1.75;
  white-space: pre-wrap;
  color: var(--terminal-text);
  opacity: 0.92;
}

.line {
  display: block;
}

.prompt {
  color: var(--prompt);
}

.dim {
  color: var(--terminal-dim);
}

.cursor {
  display: inline-block;
  width: 0.58em;
  height: 1em;
  margin-left: 0.15em;
  vertical-align: -0.15em;
  background: var(--prompt);
  animation: blink 1s steps(1, end) infinite;
}

.wip {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(3, 8, 12, 0.94);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.035);
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    visibility 0s linear 260ms;
}

.wip::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-top: 1px solid rgba(185, 232, 192, 0.15);
  border-bottom: 1px solid rgba(185, 232, 192, 0.15);
}

.wip span {
  position: relative;
  color: var(--accent);
  font-size: clamp(2.2rem, 6vw, 6.5rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: clamp(0.03em, 0.12vw, 0.12em);
  text-align: center;
  text-shadow: 0 0 30px rgba(185, 232, 192, 0.18);
}

.wip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.site-mark {
  position: absolute;
  bottom: 20px;
  margin: 0;
  color: rgba(220, 230, 232, 0.42);
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  letter-spacing: 0.28em;
}

.site-mark span {
  color: rgba(185, 232, 192, 0.48);
}

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

/* =========================================================
   GNU + Linux kernel
   ========================================================= */

.terminal-wrapper {
  position: relative;
  width: min(1100px, 92vw);
  padding-top: 225px;
}

.terminal-wrapper .terminal {
  width: 100%;
}

/* Userspace-terminal links naast GNU */
.userspace-terminal {
  position: absolute;
  top: 0;
  left: 0;
  width: 205px;
  height: 205px;
  object-fit: contain;
  object-position: center;
  z-index: 20;
}

/* Linux-kernel-terminal rechts naast de kernel-chip */
.kernel-terminal {
  position: absolute;
  top: 0;
  right: -4px;
  width: 205px;
  height: 205px;
  object-fit: contain;
  object-position: center;
  z-index: 20;
}

.linux-equation {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;

  height: 205px;
  z-index: 20;
}

.equation-gnu {
  width: 205px;
  height: auto;
  display: block;
}

.equation-plus {
  width: 62px;
  height: auto;
  display: block;
}

.equation-kernel {
  width: 135px;
  height: auto;
  display: block;
}

/* Kleine lsblk-terminal */
.small-terminal {
  position: absolute;
  width: 300px;
  height: auto;
  right: 25px;
  bottom: 25px;
  z-index: 20;
}

@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  .page {
    padding: 1rem;
  }

  .terminal {
    width: 96vw;
    height: 72vh;
    min-height: 330px;
    border-radius: 9px;
  }

  .terminal__output {
    padding: 18px 17px 60px;
    font-size: 0.7rem;
    line-height: 1.65;
  }

  .terminal__title {
    font-size: 0.68rem;
  }

  .wip span {
    font-size: clamp(1.8rem, 10vw, 3.5rem);
  }

  .site-mark {
    bottom: 7px;
  }

  /* Responsive top composition */
  .terminal-wrapper {
    padding-top: 105px;
  }

  .userspace-terminal,
  .kernel-terminal {
    width: clamp(64px, 20vw, 80px);
    height: clamp(64px, 20vw, 80px);
  }

  .linux-equation {
    gap: clamp(6px, 2vw, 8px);
    height: clamp(64px, 20vw, 80px);
  }

  .equation-gnu {
    width: clamp(64px, 20vw, 80px);
  }

  .equation-plus {
    width: clamp(22px, 7vw, 26px);
  }

  .equation-kernel {
    width: clamp(48px, 15vw, 56px);
  }

  /* Small lsblk-terminal also scales on mobile */
  .small-terminal {
    width: clamp(95px, 29vw, 110px);
    right: 10px;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }

  .wip,
  .wip.is-visible {
    transition: none;
  }
}
