/* ============================
ABOUT PAGE
============================ */

html {
  -webkit-text-size-adjust: 100%;
}

body.about-page {
  background: black;
  color: white;
  overflow-x: hidden;
}

/* ============================
LAYOUT
============================ */

main {
  width: 100%;
  padding: 2rem;
  box-sizing: border-box;
}

/* ============================
ABOUT GRID
============================ */

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 4rem;
  margin-top: 5rem;
  align-items: start;
}

/* ============================
CONTENT BLOCKS
============================ */

.about-block {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 1rem;
}

.about-block.contact {
  margin-top: 3rem;
}

/* ============================
HEADINGS
============================ */

.about-block h2 {
  font-weight: 500;
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 0.8rem;
}

/* ============================
PARAGRAPHS
============================ */

.about-block p {
  line-height: 1.7;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
  font-size: clamp(0.95rem, 1vw, 1.05rem);
}

/* ============================
LINKS
============================ */

.about-block a {
  color: white;
  text-decoration: underline;
}

.about-block a:hover {
  opacity: 0.7;
}

/* ============================
NAVIGATION
============================ */

nav {
  margin-top: 4rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  opacity: 0.7;
  color: white;
}

nav a:hover {
  opacity: 1;
}

/* ============================
LAYERING
============================ */

main,
.about-block,
nav,
h1,
h2,
p {
  position: relative;
  z-index: 2;
}

/* ============================
CONTACT LINKS
============================ */

.about-block.contact a {
  color: #ff66cc;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  font-weight: 500;
}

.about-block.contact a:hover {
  color: #00ffff;
  text-shadow:
    0 0 5px #00ffff,
    0 0 12px #00ffff;
}

.about-block.contact a:active {
  color: #ffff00;
  text-shadow:
    0 0 6px #ffff00,
    0 0 14px #ffff00;
  transform: scale(0.97);
}

.about-block.contact a:focus {
  outline: 2px solid #ff00ff;
  outline-offset: 4px;
}

/* =========================
HAMSTER LAYER
========================= */

#hamsterCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  image-rendering: pixelated;
}

#hamsterHUD {
  position: fixed;
  top: 20px;
  right: 20px;

  width: 240px;
  padding: 14px 16px;

  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.5;

  color: white;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid #ff66cc;
  border-radius: 10px;

  backdrop-filter: blur(8px);

  z-index: 10000;

  box-shadow:
    0 0 12px rgba(255, 102, 204, 0.35),
    inset 0 0 18px rgba(255, 102, 204, 0.08);

  transition: all 0.25s ease;
}

#hamsterHUD:hover {
  box-shadow:
    0 0 18px #ff66cc,
    0 0 30px rgba(255, 102, 204, 0.3),
    inset 0 0 18px rgba(255, 102, 204, 0.1);
}

.hamster-title {
  color: #ff66cc;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13px;
  text-shadow: 0 0 8px #ff66cc;
}

#hamsterStatus {
  color: #00ffff;
  font-weight: 500;
}

.hamster-controls {
  margin-top: 8px;
  color: #aaa;
  opacity: 0.75;
  font-size: 11px;
}

.hamster-instructions {
  display: none;
}

/* ============================
RESPONSIVE
============================ */

@media (max-width: 1200px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  main {
    padding: 1.5rem;
  }

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

  .about-block {
    margin-top: 0.5rem;
  }
}

@media (max-width: 768px) {
  main {
    padding-bottom: 150px;
  }

  nav {
    margin-bottom: 110px;
  }

  #hamsterHUD {
    top: auto;
    bottom: calc(15px + env(safe-area-inset-bottom));
    left: 15px;
    right: 15px;
    width: auto;
    font-size: 10px;
    padding: 10px 12px;
  }

  .hamster-controls {
    font-size: 10px;
  }

  #scrollTopBtn {
    display: none;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1rem;
    padding-bottom: 150px;
  }

  .about-block p {
    font-size: 0.92rem;
    line-height: 1.65;
  }

  nav {
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 110px;
  }
}

/* ============================
HAMSTER GAME MODE
============================ */

body.hamster-game-mode {
  overflow: hidden;
}

.hamster-exit-glitch {
  animation: hamsterScreenGlitch 0.18s infinite;
}

@keyframes hamsterScreenGlitch {
  0% {
    filter: none;
  }
  50% {
    filter: hue-rotate(40deg) contrast(1.15);
  }
  100% {
    filter: none;
  }
}