.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #f7fcfd;
  color: #330606;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #330606;
  color: #f7fcfd;
  text-align: center;
  letter-spacing: 1.2px;
  overflow: hidden;
  position: relative;
  padding-bottom: 100px;
  padding-top: 0;
}

h1::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(247, 252, 253, 0.04) 0px, rgba(247, 252, 253, 0.04) 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(90deg, rgba(247, 252, 253, 0.04) 0px, rgba(247, 252, 253, 0.04) 1px, transparent 1px, transparent 12px);
  background-size: 12px 12px;
  background-position: 0 0;
  opacity: 0;
  animation: gridFadeIn 0.7s ease forwards 0.5s, gridShift 18s linear infinite 1.2s;
}

@keyframes gridFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes gridShift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 12px 12px;
  }
}

@media (prefers-color-scheme: light) {
  body::after {
    background-image:
      repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0.05) 1px, transparent 1px, transparent 12px),
      repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0.05) 1px, transparent 1px, transparent 12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  h1::after {
    animation: gridFadeIn 0.7s ease forwards 0.5s;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 100px);
  margin: 0 auto 5rem auto;
}

#logoContainer {
  margin-bottom: 0.2em;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.7s ease forwards 0.5s;
  position: relative;
  display: inline-block;
}

#logoContainer img {
  display: block;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f7fcfd;
  box-sizing: border-box;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}


h1 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 0.25em;
  line-height: 1.1;
  font-family: monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#pixelText {
  font-size: 4.5rem;
  font-weight: 600;
  margin-top: 0.5em;
  margin-bottom: 0.25em;
  line-height: 1.1;
  font-family: monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #faf8f3;
  position: relative;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards 0.3s;
  width: 100%;
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
}

#pixelText canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 0;
  font-size: 0.85rem;
  font-weight: 300;
  background-color: #330606;
  color: #f7fcfd;
  letter-spacing: 1.2px;
  opacity: 0;
  animation: fadeInFooter 1.2s ease forwards 2.1s;
  z-index: 10;
}

footer nav {
  display: flex;
  justify-content: center;
  gap: 2em;
  flex-wrap: wrap;
}

footer a {
  text-decoration: none;
  color: #f7fcfd;
  border: 1px solid #f0a269;
  padding: 0.6em 1.2em;
  border-radius: 4px;
  transition: all 0.3s ease-out;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  outline: none;
}

footer a svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

footer a:focus-visible {
  outline: 3px solid #f0a269;
  outline-offset: 3px;
  background: rgba(240, 162, 105, 0.1);
}

footer a:focus:not(:focus-visible) {
  outline: none;
}

footer a:hover {
  background: #f0a269;
  color: #330606;
  transform: scale(1.05);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInFooter {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.4;
  }
}

@media (max-width: 768px) {
  body {
    letter-spacing: 1px;
    padding-bottom: 90px;
  }
  
  main {
    min-height: calc(100vh - 90px);
  }
  
  #logoContainer {
    margin-bottom: 0.2em;
  }
  
  #logoContainer img {
    width: 112px;
    height: 112px;
  }
  
  #pixelText {
    font-size: 2.5rem;
  }
  
  #pixelText canvas {
    max-width: 90%;
    height: auto;
    transform: scale(0.65);
    transform-origin: center;
  }
  
  footer {
    padding: 20px 0;
    font-size: 0.75rem;
  }
  
  footer nav {
    gap: 1em;
  }
  
  footer a {
    padding: 0.5em 1em;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-bottom: 120px;
  }
  
  main {
    min-height: calc(100vh - 120px);
    padding-bottom: 5rem;
  }
  
  #logoContainer {
    margin-bottom: 0.15em;
  }
  
  #logoContainer img {
    width: 88px;
    height: 88px;
  }
  
  #pixelText {
    font-size: 1.8rem;
  }
  
  #pixelText canvas {
    transform: scale(0.5);
    transform-origin: center;
  }
  
  footer {
    padding: 15px 0;
    font-size: 0.7rem;
  }
  
  footer nav {
    flex-direction: row;
    gap: 0.8em;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  footer a {
    padding: 0.5em 0.8em;
    font-size: 0.8rem;
    width: auto;
  }
}

