/* Slightly larger About Me button text */

.typewriter span.cursor:last-of-type {
  margin-right: 0.18em;
}
/* Fade-in animation for each typewriter letter */
/* Fade-in animation for each typewriter letter */
.typewriter span {
  opacity: 0;
  transition: opacity 0.12s cubic-bezier(.4,0,.2,1);
}
.typewriter span.visible {
  opacity: 1;
}
.typewriter span.cursor {
  border-right: 2.5px solid #fff;
  animation: blink-cursor 0.8s steps(1) infinite;
  opacity: 1 !important;
}
/* Typewriter effect for intro heading */
.typewriter {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  font-family: inherit;
  letter-spacing: 0.02em;
  vertical-align: bottom;
  min-width: 1ch;
}

@keyframes blink-cursor {
  0%, 100% { border-color: #fff; }
  50% { border-color: transparent; }
}
.about-content h2 {
  margin-bottom: 1.2em;
}
/* About section styles: image sizing, layout, fade-in, and face underglow */
.about-me {
  max-width: 900px;
  margin: 0 auto;
}

.about-content .button {
  position: relative;
  overflow: hidden;
}

.about-image {
  float: left;
  margin: 0 1.75rem 1rem 0;
  width: 160px;
  height: 160px;
  position: relative;
  z-index: 1;
}

/* Squarish animated underglow always behind image */
/* Animated border-tracing underglow effect */
/* Feathered, seamless animated border-tracing underglow effect */
.about-image::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  z-index: -1;
  pointer-events: none;
  box-sizing: border-box;
  border: 4px solid transparent;
  background: linear-gradient(90deg, var(--light-blue) 0%, var(--paynes-gray) 25%, var(--charcoal) 50%, var(--light-blue) 75%, var(--light-blue) 100%) 0 0/200% 100% repeat;
  filter: blur(13px) brightness(1.18) opacity(0.65);
  animation: border-glow-loop 2.5s linear infinite;
}

@keyframes border-glow-loop {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

@keyframes rotate-glow {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px; /* keep square but soften corners */
  box-shadow: 0 10px 30px rgba(88,111,124,0.18), /* paynes-gray */
              0 0 40px rgba(184,219,217,0.20); /* light-blue */
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.about-content::after {
  content: "";
  display: table;
  clear: both;
}

.about-content p {
  font-size: 1.05rem; /* slightly larger to improve readability */
  line-height: 1.9;
}

/* Fade-in effect uses the existing "inactive" class toggled by scrollex/main.js */
#one.inactive .about-image,
#one.inactive .about-content {
  opacity: 0;
  transform: translateY(20px);
}

#one .about-image,
#one .about-content {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Slight hover lift on the face for a subtle interactive effect */
.about-image img:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(88,111,124,0.22), /* paynes-gray */
              0 0 60px rgba(184,219,217,0.26); /* light-blue */
}

/* Responsive: stack on small screens */
@media screen and (max-width: 736px) {
  .about-image {
    float: none;
    display: block;
    margin: 0 auto 1.5rem auto;
  }
  .about-content h2 {
    text-align: center;
  }
  .about-image {
    width: 140px;
    height: 140px;
  }
  .about-image::before {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    filter: blur(10px) brightness(1.12) opacity(0.55);
  }

  .about-content {
    text-align: center;
  }
}
