:root {
  --dark: #191818;
  --light: #ffffff;
  --border-color: #0e131f;  /* Solid border color */
  --border-width: 12px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  text-decoration: none;
  font-family: Roboto, sans-serif;
  list-style: none;
  color: var(--light);
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--border-color); /* This will be your solid border color */
  overflow: hidden;
}

/* The page frame inset by border width, letting the background show as border */
.page-frame {
  position: relative;
  width: calc(100vw - (2 * var(--border-width)));
  height: calc(100vh - (2 * var(--border-width)));
  margin: var(--border-width);
  background-color: var(--dark); /* inside background */
  overflow: hidden;
  box-sizing: border-box;
  z-index: 10;
}

/* Noise background fills entire frame behind content */
.grain {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

/* Content container inside the frame, centered horizontally */
.main-area {
  position: relative;
  max-width: 320px;
  margin: 3rem auto;
  z-index: 1;
}

/* Text box left aligned */
.text-box {
  position: relative;
  z-index: 2;
  text-align: left;
  color: var(--light);
  margin-bottom: 1em;
}

/* Header styling */
.header {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  font-size: 36pt;
  letter-spacing: 3px;
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: var(--light);
}

.header img {
  height: 1.6em;
}

/* Body text */
.body-text {
  font-weight: 300;
  font-size: 1rem;
  margin-bottom: 1.2em;
  color: var(--light);
}

.body-text a {
  text-decoration: underline;
  color: var(--light);
}

/* Landing box centered below text */
.landingbox {
  animation: landingbox 620ms ease-out;
  border: var(--border-color) 1px solid;
  width: 320px;
  max-width: 100%;
  height: 240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.landingbox img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  display: block;
}

/* Navigation */
.lowerarea {
  position: relative;
  z-index: 1;
  margin: auto;
  margin-top: 6px;
  margin-bottom: 12px;
  width: 320px;
  max-width: 100%;
  height: 180px;
}

.navbox {
  display: inline-block;
  position: relative;
  transition: all 240ms ease;
  width: 100%;
  height: 100%;
}

.navigation {
  position: relative;
  margin-top: 10%;
  text-align: center;
}

.navigation a {
  display: inline-block;
  position: relative;
  transition: color 240ms ease-out;
  margin: 4px;
  color: var(--light);
  font-weight: oblique;
  font-size: 16px;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 2px;
  text-decoration: none;
}

.navigation a:hover {
  color: #f1f2da;
}

.navigation .visited {
  background-color: var(--border-color);
  color: #f1f2da;
}

.navigation a::before {
  position: absolute;
  transform: scaleX(0);
  transform-origin: right;
  z-index: -1;
  transition: transform 240ms ease-out;
  inset: 0;
  background: #38405f;
  content: "";
}

.navigation a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

@keyframes landingbox {
  0% {
    opacity: 0%;
    width: 420px;
    height: 320px;
  }
  100% {
    opacity: 100%;
    width: 320px;
    height: 240px;
  }
}
.back-button {
  position: fixed;
  bottom: 3em;
  left: 2em;
  color: white;
  text-decoration: none;
  font-size: 0.9em;
  opacity: 0.6;
  z-index: 1000;
  transition: opacity 0.2s ease;
  font-family: monospace;
  user-select: none;
}

.back-button:hover {
  opacity: 1;
}