:root {
  --bg: #0f0a0a;
  --ink: #f9f2f2;
  --muted: rgba(249, 242, 242, 0.7);
  --accent: #ff0000;
  --accent-soft: rgba(237, 0, 0, 0.709);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #1b0a0a 0%, #0b0606 60%, #070404 100%);
  color: var(--ink);
  font-family: monospace;
  overflow-x: hidden;
}

body * {
  font-family: monospace;
}

main {
  position: relative;
  z-index: 2;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 6vw;
}

.title {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3rem);
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: lowercase;
  z-index: 2;
  pointer-events: none;
  opacity: 0.85;
}

.windows {
  position: relative;
  width: min(80vw, 920px);
  height: min(70vh, 620px);
  z-index: 4;
}

.window {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(220px, 38vw, 520px);
  background: rgba(8, 4, 4, 1);
  
  border-radius: 18px;
  transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px));
  cursor: grab;
  user-select: none;
}

.window:active {
  cursor: grabbing;
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.window-dots {
  display: inline-flex;
  gap: 0.35rem;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.window img {
  display: block;
  width: 100%;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 65vmax;
  height: 65vmax;
  background: radial-gradient(circle, rgba(255, 35, 35, 0.9) 0%, rgba(255, 35, 35, 0) 65%);
  opacity: 0.7;
  filter: blur(120px);
  mix-blend-mode: screen;
  will-change: transform;
}

.blob:nth-child(1) {
  top: -15vmax;
  left: -10vmax;
}

.blob:nth-child(2) {
  bottom: -10vmax;
  right: -5vmax;
  animation-delay: -20s;
  animation-duration: 95s;
}

.blob:nth-child(3) {
  top: 25%;
  right: 10%;
  width: 35vmax;
  height: 35vmax;
  animation-delay: -40s;
  animation-duration: 110s;
  opacity: 0.5;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(8vmax, -6vmax, 0) scale(1.1);
  }
  66% {
    transform: translate3d(-10vmax, 8vmax, 0) scale(0.95);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.ascii-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.25;
  mix-blend-mode: screen;
}

@media (max-width: 900px) {
  .page {
    padding: 12vw 6vw;
  }

  .windows {
    width: min(88vw, 520px);
    height: min(60vh, 520px);
  }
}
