body {
  background: #FF3300;
  margin: 0;
  overflow: hidden;
  color: #FDFBDE;
  font-family: "Sometype Mono", monospace;
  cursor: none !important;
  height: 100vh;
  width: 100vw;
  position: relative;
  overscroll-behavior: none;
}

/* Accessibility: Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #FDFBDE;
  color: #000;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-weight: bold;
  border: 2px solid #000;
  cursor: pointer !important;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #FDFBDE;
  outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


@font-face {
  font-family: "Brett";
  src: url("Brett.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

* {
  cursor: none !important;
  box-sizing: border-box;
}

/* page baseline */
:root {
  --spot-x: 50vw;
  --spot-y: 50vh;
  --spot-r: 550px; /* Increased to cover more of the text column width */
}

/* Gradient background canvas */
#gradient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* Canvas that covers the content and gets erased */
#eraser-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  pointer-events: auto;
}

/* Content page underneath */
#content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 48px;
  padding-top: 0;
  overflow: visible;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100vh;
  will-change: transform;
}

/* Title link styling */
.title-link {
  text-decoration: none;
  color: #FDFBDE;
  display: block;
  cursor: pointer !important;
}

/* Keyboard focus indicators for links */
.title-link:focus,
.eye-link:focus {
  outline: 3px solid #FDFBDE;
  outline-offset: 4px;
}

.title-link:focus-visible,
.eye-link:focus-visible {
  outline: 3px solid #FDFBDE;
  outline-offset: 4px;
}

#content h1 {
  font-size: 5rem;
  margin: 0 0 0.5rem 0;
  text-align: center;
  transition: transform 0.1s ease, text-shadow 0.3s ease;
}

#content h1.in-focus,
#content h2.in-focus {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
               0 0 30px rgba(255, 255, 255, 0.6),
               0 0 40px rgba(255, 255, 255, 0.4);
}

#content h1.in-focus {
  animation: titleTremble 0.2s ease-in-out infinite alternate;
}

/* Changed from h3 to h2 for proper heading hierarchy */
#content h2 {
  font-size: 2rem;
  margin: 0 0 2rem 0;
  font-weight: normal;
  text-align: center;
  transition: transform 0.1s ease, text-shadow 0.3s ease;
}

#content h2.in-focus {
  animation: titleTremble 0.2s ease-in-out infinite alternate;
}

@keyframes titleTremble {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-0.5px, 0.5px) rotate(-0.2deg);
  }
  50% {
    transform: translate(0.5px, -0.3px) rotate(0.15deg);
  }
  75% {
    transform: translate(-0.3px, -0.5px) rotate(0.2deg);
  }
  100% {
    transform: translate(0.4px, 0.4px) rotate(-0.15deg);
  }
}

#text-container {
  columns: 1;
  font-size: 1.5rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  word-spacing: 0.15em;
  margin: 0 auto;
  max-width: 800px;
  width: 60%;
}

#text-container p {
  margin: 0 0 1rem 0;
  break-inside: avoid;
}

/* Magnify effect */
.word {
  display: inline-block;
  white-space: nowrap;
  margin-right: 0.5em; /* Add space after each word instead of using ::before */
}

.char {
  display: inline-block;
  letter-spacing: 0.25em;
  transform-origin: center center;
  position: relative;
  z-index: 1;
}

.tremble {
  animation: tremble 0.15s ease-in-out infinite alternate;
}

@keyframes tremble {
  0% {
    transform: scale(var(--char-scale, 1)) translate(0, 0) rotate(0deg);
  }
  25% {
    transform: scale(var(--char-scale, 1)) translate(-0.2px, 0.2px) rotate(-0.3deg);
  }
  50% {
    transform: scale(var(--char-scale, 1)) translate(0.2px, -0.12px) rotate(0.2deg);
  }
  75% {
    transform: scale(var(--char-scale, 1)) translate(-0.12px, -0.2px) rotate(0.3deg);
  }
  100% {
    transform: scale(var(--char-scale, 1)) translate(0.16px, 0.16px) rotate(-0.2deg);
  }
}
/* Blur overlay for content beneath canvas */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;

  /* blur everything behind the overlay - reduced for better performance */
  backdrop-filter: blur(8px) saturate(1.02);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);

  /* mask: eye-shaped transparent area with fuzzy edges */
  mask-image: radial-gradient(ellipse calc(var(--spot-r) * 2.2) calc(var(--spot-r) * 0.7) at var(--spot-x) var(--spot-y),
    transparent 0%,
    transparent 30%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.7) 70%,
    black 100%);
  -webkit-mask-image: radial-gradient(ellipse calc(var(--spot-r) * 2.2) calc(var(--spot-r) * 0.7) at var(--spot-x) var(--spot-y),
    transparent 0%,
    transparent 30%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.7) 70%,
    black 100%);

  /* smoothness */
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* custom eye cursor */
/* Clickable eye link at bottom of content */
.eye-link {
  display: block;
  text-align: center;
  margin-top: 2rem;
  cursor: pointer !important;
}

.clickable-eye {
  height: 8rem;
  width: auto;
  transition: filter 0.3s ease, transform 0.5s ease;
  filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
  transform: scale(1);
}

.clickable-eye.in-focus {
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8))
          drop-shadow(0 0 25px rgba(255, 255, 255, 0.6))
          drop-shadow(0 0 35px rgba(255, 255, 255, 0.4));
  transform: scale(1.3);
}

.clickable-eye.tremble {
  animation: eyeTremble 0.2s ease-in-out infinite alternate;
}

@keyframes eyeTremble {
  0% {
    transform: scale(1.3) translate(0, 0) rotate(0deg);
  }
  25% {
    transform: scale(1.3) translate(-0.5px, 0.5px) rotate(-0.2deg);
  }
  50% {
    transform: scale(1.3) translate(0.5px, -0.3px) rotate(0.15deg);
  }
  75% {
    transform: scale(1.3) translate(-0.3px, -0.5px) rotate(0.2deg);
  }
  100% {
    transform: scale(1.3) translate(0.4px, 0.4px) rotate(-0.15deg);
  }
}

/* Cursor eye that follows mouse */
#eye-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2000;
  height: 200px;  /* Smaller size to fit on screen */
  width: auto;    /* Auto width to preserve aspect ratio */
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform;
  opacity: 1;
}

/* Tablet styles (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100vw;
    max-width: 100vw;
  }

  #text-container {
    columns: 1;
    font-size: 1.1rem;
    max-height: none;
    overflow: visible;
    width: 50%;
    max-width: 600px;
  }

  #content h1 {
    font-size: 3.5rem;
    max-width: 100vw;
    word-wrap: break-word;
  }

  #content h2 {
    font-size: 1.8rem;
    max-width: 100vw;
    word-wrap: break-word;
  }

  :root {
    --spot-r: 400px; /* Larger focus area for tablets */
  }

  /* Hide eye cursor on tablets */
  #eye-cursor {
    display: none;
  }

  /* Tablet-specific content adjustments */
  #content {
    max-width: 100vw;
    box-sizing: border-box;
  }

  .clickable-eye {
    max-width: 50%;
  }
}

/* Phone styles (max 768px) */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100vw;
    max-width: 100vw;
  }

  #text-container {
    columns: 1;
    font-size: 0.8rem;
    max-height: none;
    overflow: visible;
    width: calc(100vw - 96px);
    max-width: calc(100vw - 96px);
  }

  #content h1 {
    font-size: 2.5rem;
    max-width: 100vw;
    word-wrap: break-word;
  }

  #content h2 {
    font-size: 1.5rem;
    max-width: 100vw;
    word-wrap: break-word;
  }

  :root {
    --spot-r: 180px;
  }

  /* Hide eye cursor on phones */
  #eye-cursor {
    display: none;
  }

  /* Phone-specific content adjustments */
  #content {
    max-width: 100vw;
    box-sizing: border-box;
  }

  .clickable-eye {
    max-width: calc(100vw - 96px);
  }
}
