* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base body — mobile-safe height, allow vertical scroll */
body {
  min-height: 100dvh;
  min-height: 100vh;
  height: auto;

  display: flex;
  justify-content: center;
  align-items: center;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  overflow-x: hidden;
  overflow-y: auto;

  color: #fff;
  background: linear-gradient(-45deg, #020202, #0a0a0a, #1b0d0d, #2a0000, #0a0a0a);
  background-size: 400% 400%;
  animation: gradientMove 20s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Home page — centered, no scroll */
body.home-body {
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}

.name-wrapper {
  display: flex;
  gap: 0.6rem;
  position: relative;
}

.letter-link {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  text-decoration: none;
  color: #d84b4b;
  letter-spacing: 0.1em;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out, text-shadow 0.3s ease;
  position: relative;
  z-index: 2;
  animation: glowWave 6s ease-in-out infinite;
}

@keyframes glowWave {
  0% { text-shadow: 0 0 10px rgba(216,75,75,0.2), 0 0 30px rgba(216,75,75,0.1); }
  50% { text-shadow: 0 0 30px rgba(216,75,75,0.8), 0 0 60px rgba(255,120,120,0.6); }
  100% { text-shadow: 0 0 10px rgba(216,75,75,0.2), 0 0 30px rgba(216,75,75,0.1); }
}

.letter-link:nth-child(1) { animation-delay: 0s; }
.letter-link:nth-child(2) { animation-delay: 0.3s; }
.letter-link:nth-child(3) { animation-delay: 0.6s; }
.letter-link:nth-child(4) { animation-delay: 0.9s; }
.letter-link:nth-child(5) { animation-delay: 1.2s; }
.letter-link:nth-child(6) { animation-delay: 1.5s; }

.letter-link:hover,
.letter-link:focus-visible {
  transform: translateY(-4px);
  opacity: 0.9;
}

.letter-link::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,120,120,0.25), transparent 80%);
  filter: blur(25px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  pointer-events: none;
}

.letter-link.active::after {
  opacity: 1;
}

.letter-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

/* About me page — centered layout, same format */
body.about-body {
  min-height: 100dvh;
  min-height: 100vh;
  height: auto;

  align-items: center;
  justify-content: center;

  overflow-x: hidden;
  overflow-y: auto;

  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.about-page {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  max-width: 900px;
  padding: 2.5rem 2rem;
  margin: 0 auto;
}

.about-page__image-wrap {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  overflow: hidden;
  border: 2px solid rgba(216, 75, 75, 0.5);
  box-shadow: 0 0 24px rgba(216, 75, 75, 0.15);
  display: block;
  text-decoration: none;
  color: inherit;
}

.about-page__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-page__right {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.about-page__text {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.95);
}

.about-page__text p {
  margin: 0;
}

.about-page__text p + p {
  margin-top: 0.75em;
}

/* About me — mobile: keep desktop layout feel, scale for small screens */
@media (max-width: 640px) {
  body.about-body {
    align-items: flex-start;
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  }

  .about-page {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1rem 2.5rem;
    margin-top: 0;
    max-width: 100%;
  }

  .about-page__image-wrap {
    width: 140px;
    height: 140px;
  }

  .about-page__right {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    gap: 1rem;
    padding: 0 0.25rem;
  }

  .about-page__text {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}