/*===========================================
  ABOUT SECTION - CINEMATIC ANIMATION
  Version 3: Sequential storytelling through motion
  Author: Blog Agent (Cascade)
  Date: October 22, 2025 - FINAL ANIMATION
===========================================*/

.bio-title {
  margin-bottom: 3rem;
  text-align: center;
  opacity: 0;
  animation: titleFadeIn 0.8s ease-out forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bio-title h3 {
  color: #18d26e;
  font-size: 4.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-shadow: 0 0 25px rgba(24, 210, 110, 0.4);
  letter-spacing: 2px;
  opacity: 0;
  animation: titleScaleGlow 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0s forwards,
             titleGlow 3s ease-in-out 1.2s infinite;
}

/* Initial scale and glow for Software Engineer */
@keyframes titleScaleGlow {
  0% {
    opacity: 0;
    transform: scale(0.8);
    text-shadow: 0 0 5px rgba(24, 210, 110, 0.2);
  }
  40% {
    text-shadow: 0 0 60px rgba(24, 210, 110, 0.9),
                 0 0 80px rgba(24, 210, 110, 0.7),
                 0 0 100px rgba(24, 210, 110, 0.5),
                 0 0 120px rgba(24, 210, 110, 0.3);
  }
  70% {
    text-shadow: 0 0 30px rgba(24, 210, 110, 0.6),
                 0 0 40px rgba(24, 210, 110, 0.4);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 25px rgba(24, 210, 110, 0.4);
  }
}

/* Continuous glow pulse after initial animation */
@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(24, 210, 110, 0.3),
                 0 0 30px rgba(24, 210, 110, 0.2);
  }
  50% {
    text-shadow: 0 0 50px rgba(24, 210, 110, 0.8),
                 0 0 70px rgba(24, 210, 110, 0.6),
                 0 0 90px rgba(24, 210, 110, 0.4);
  }
}

.title-separator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.68rem 0;
  width: 100%;
  opacity: 1;
}

.equals-sign {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.3);
  opacity: 0;
  animation: symbolBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1.2s forwards,
             symbolGlow 0.8s ease-in-out 1.2s forwards;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
}

/* Bounce effect for equals sign */
@keyframes symbolBounce {
  0% {
    opacity: 0;
    transform: translateY(-20px) rotate(0deg) scale(0.5);
  }
  60% {
    opacity: 1;
    transform: translateY(5px) rotate(180deg) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(360deg) scale(1);
  }
}

/* Intense glow and white flash for equals sign */
@keyframes symbolGlow {
  0% {
    color: rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
  }
  50% {
    color: rgba(255, 255, 255, 1);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 1))
            drop-shadow(0 0 50px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 70px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 90px rgba(24, 210, 110, 0.4));
  }
  100% {
    color: rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
  }
}

.tech-subtitle {
  color: #a8a8a8;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  margin-bottom: 0;
  margin-top: 0.43rem;
  font-style: normal;
  width: 100%;
  text-align: center;
  /* text-transform: uppercase; */
}

/* Formula elements - all start hidden */
.tech-subtitle span {
  opacity: 0;
  display: inline-block;
}

/* Parentheses slide in from sides */
.formula-paren {
  animation: fadeSlideIn 0.3s ease-out forwards;
}

.formula-open {
  animation-delay: 2.0s;
}

.formula-close {
  animation-delay: 3.3s;
}

/* Words appear with typewriter effect */
.formula-word {
  animation: typewriterFade 0.4s ease-out forwards;
}

.passion {
  animation-delay: 2.3s;
}

.google {
  animation-delay: 2.9s;
}

.common-sense {
  animation-delay: 3.9s;
  animation-duration: 0.5s;
}

/* Operators pop in */
.formula-operator {
  animation: popIn 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.plus {
  animation-delay: 2.7s;
}

.times {
  animation-delay: 3.6s;
}

/* Parentheses slide animation */
@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Typewriter fade effect */
@keyframes typewriterFade {
  0% {
    opacity: 0;
    transform: translateY(-5px);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Pop in animation for operators */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  70% {
    transform: scale(1.2) rotate(180deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(360deg);
  }
}

/* Title fade-in with gentle glow */
@keyframes titleFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/*===========================================
  SEALS OF APPROVAL - MIDDLE SECTION
  Appears between title and foundation
===========================================*/

/* Seals of Approval Container - Two stamps only */
.seals-of-approval {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 2.5rem auto 4rem;
  padding: 0 2rem;
  min-height: 120px;
}

/* Seal Stamps (Left & Right) - Rectangular Rubber Stamps */
.seal-stamp {
  opacity: 0;
  position: relative;
  padding: 1.2rem 3.5rem;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  color: #e0e0e0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  transform: rotate(0deg);
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 80px;
  text-transform: uppercase;
  font-family: 'Arial Black', sans-serif;
  overflow: hidden;
}

/* Traveling shimmer effect around stamp edges */
.seal-stamp::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
  animation: stampShimmer 4s linear infinite;
  pointer-events: none;
}

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

.stamp-outline {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  color: rgba(255, 255, 255, 0.525);
  transition: all 0.3s;
  pointer-events: none;
  filter: blur(0.4px);
  animation: stampBorderPulse 3s ease-in-out infinite;
}

@keyframes stampBorderPulse {
  0%, 100% {
    color: rgba(255, 255, 255, 0.525);
    filter: blur(0.4px) drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
  }
  50% {
    color: rgba(255, 255, 255, 0.75);
    filter: blur(0.3px) drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
  }
}

.stamp-rect .stamp-outline {
  opacity: 1;
}

.stamp-rect .stamp-text {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.stamp-text {
  position: relative;
  z-index: 1;
  text-align: center;
}

.seal-stamp:hover {
  color: #18d26e;
  background: rgba(24, 210, 110, 0.08);
  transform: scale(1.05);
}

.stamp-left:hover {
  transform: scale(1.05) rotate(-4deg);
}

.stamp-right:hover {
  transform: scale(1.05) rotate(6deg);
}

.seal-stamp:hover .stamp-outline {
  color: rgba(24, 210, 110, 0.6);
  filter: blur(0.3px) drop-shadow(0 0 10px rgba(24, 210, 110, 0.4));
}

/* Left stamp animation - stamp from left with slight rotation */
.stamp-left {
  animation: stampLeft 0.78s cubic-bezier(0.34, 1.56, 0.64, 1) 9.1s forwards;
}

@keyframes stampLeft {
  0% {
    opacity: 0;
    transform: translateX(-30px) translateY(-50px) scale(1.3) rotate(-12deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1) rotate(-4deg);
  }
}

/* Right stamp animation - stamp from right with rotation */
.stamp-right {
  animation: stampRight 0.78s cubic-bezier(0.34, 1.56, 0.64, 1) 9.9s forwards;
}

@keyframes stampRight {
  0% {
    opacity: 0;
    transform: translateX(30px) translateY(-50px) scale(1.3) rotate(15deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1) rotate(6deg);
  }
}

/*===========================================
  CENTER SEAL - REMOVED
  Now using only two angled stamps
===========================================*/

/* CENTER SEAL CODE COMMENTED OUT - NO LONGER NEEDED
.seal-center { ... }
.seal-center:hover { ... }
@keyframes sealAppear { ... }
.seal-content { ... }
.seal-number { ... }
.seal-text { ... }
.seal-dots { ... }
.dot { ... }
.dot-12, .dot-2, .dot-5, .dot-7, .dot-10 { ... }
@keyframes dotAppear { ... }
*/

/*===========================================
  TECH FOUNDATION - BOTTOM SECTION
  Cards come from different directions
===========================================*/

.tech-foundation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 3rem 0 0;
}

.foundation-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;

  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-radius: 12px;
  padding: 2rem 2.5rem;
  min-width: 180px;
  min-height: 140px;
  opacity: 0;
  position: relative;
  overflow: visible;

  transition: all 0.4s;
  cursor: pointer;
  text-decoration: none;
}

/* Solid border with dynamic glow effect */
.foundation-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 15px;
  border: 1px solid var(--gradient-color-1);
  opacity: 0.8;
  z-index: -1;
  box-shadow: 0 0 8px var(--gradient-color-1), 0 0 15px var(--gradient-color-1);
  animation: borderGlow 5s ease-in-out infinite;
}

.foundation-card::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 17px;
  border: 1px solid var(--gradient-color-1);
  opacity: 0.4;
  z-index: -2;
  box-shadow: 0 0 12px var(--gradient-color-1);
  animation: borderGlowOuter 6s ease-in-out infinite 0.8s;
}

@keyframes borderGlow {
  0%, 70% {
    opacity: 0.6;
    box-shadow: 0 0 8px var(--gradient-color-1), 0 0 15px var(--gradient-color-1);
  }
  85% {
    opacity: 1;
    box-shadow: 0 0 15px var(--gradient-color-1), 0 0 25px var(--gradient-color-1), 0 0 35px var(--gradient-color-1);
  }
  100% {
    opacity: 0.6;
    box-shadow: 0 0 8px var(--gradient-color-1), 0 0 15px var(--gradient-color-1);
  }
}

@keyframes borderGlowOuter {
  0%, 70% {
    opacity: 0.3;
    box-shadow: 0 0 10px var(--gradient-color-1);
  }
  85% {
    opacity: 0.6;
    box-shadow: 0 0 20px var(--gradient-color-1), 0 0 30px var(--gradient-color-1);
  }
  100% {
    opacity: 0.3;
    box-shadow: 0 0 10px var(--gradient-color-1);
  }
}

.foundation-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 30px var(--glow-color);
}

.foundation-card:hover::before {
  opacity: 0.6;
  border-width: 3px;
}

.foundation-card:hover::after {
  opacity: 0.3;
}

.card-label {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 1;
  position: relative;
  padding-bottom: 1rem;
}

/* Separator line between title and tech words */
.card-label::after {
  content: '';
  position: absolute;
  bottom: 0.3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 120, 120, 0.6), transparent);
}

.card-tech {
  color: #333;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.2;
  text-align: center;
  z-index: 1;
  animation: techPulse 4s ease-in-out 10s infinite;
}

@keyframes techPulse {
  0%, 100% {
    color: #333;
    opacity: 0.2;
  }
  50% {
    color: #ffffff;
    opacity: 1;
  }
}

.card-frontend {
  --gradient-color-1: rgba(24, 210, 110, 0.6);
  --gradient-color-2: rgba(20, 156, 82, 0.3);
  --glow-color: rgba(24, 210, 110, 0.3);
  animation: slideFromLeft 0.78s cubic-bezier(0.34, 1.56, 0.64, 1) 4.9s forwards,
             settleDown 0.65s ease-out 8.2s forwards;
}

.card-frontend:hover {
  box-shadow: 0 8px 30px rgba(24, 210, 110, 0.4);
}

.card-frontend:hover .card-label {
  color: #18d26e;
}

.card-backend {
  --gradient-color-1: rgb(13, 110, 253);
  --gradient-color-2: rgba(13, 110, 253, 0.3);
  --glow-color: rgba(13, 110, 253, 0.3);
  animation: slideFromRight 0.78s cubic-bezier(0.34, 1.56, 0.64, 1) 6.0s forwards,
             settleDown 0.65s ease-out 8.2s forwards;
}

.card-backend:hover {
  box-shadow: 0 8px 30px rgba(13, 110, 253, 0.4);
}

.card-backend:hover .card-label {
  color: rgb(13, 110, 253);
}

.card-infrastructure {
  --gradient-color-1: rgba(255, 140, 66, 0.6);
  --gradient-color-2: rgba(255, 87, 34, 0.3);
  --glow-color: rgba(255, 140, 66, 0.3);
  animation: fadeFromCenter 0.78s cubic-bezier(0.34, 1.56, 0.64, 1) 7.1s forwards,
             settleDown 0.65s ease-out 8.2s forwards;
}

.card-infrastructure:hover {
  box-shadow: 0 8px 30px rgba(255, 140, 66, 0.4);
}

.card-infrastructure:hover .card-label {
  color: rgba(255, 140, 66, 1);
}

/* Slide animations from different directions */
@keyframes slideFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideFromRight {
  0% {
    opacity: 0;
    transform: translateX(60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideFromTop {
  0% {
    opacity: 0;
    transform: translateY(-40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeFromCenter {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Settle down animation (all cards together) */
@keyframes settleDown {
  0% {
    transform: translateY(-8px) scale(1);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* Tech names start animation after everything settles */
.card-frontend .card-tech,
.card-backend .card-tech,
.card-infrastructure .card-tech {
  animation-delay: 10s;
}

/*===========================================
  IDLE STATE - Continuous subtle animations
===========================================*/

/* Removed conflicting animation rules that were overriding card timing */

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

@media (max-width: 768px) {
  .bio-title h3 {
    font-size: 3rem;
  }

  .bio-title h3 {
    margin-bottom: 0.25rem;
  }

  .title-separator {
    margin: 0.68rem 0;
  }

  .tech-subtitle {
    margin-top: 0.43rem;
  }

  .seals-of-approval {
    flex-direction: column;
    gap: 1rem;
  }

  .seal-stamp {
    min-width: 180px;
    min-height: 70px;
    font-size: 0.95rem;
    padding: 1rem 2.5rem;
    letter-spacing: 2px;
  }

  .tech-foundation {
    flex-direction: column;
    align-items: stretch;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
  }

  .foundation-card {
    min-width: 100%;
  }

  /* Simplify animations on mobile */
  .card-frontend,
  .card-backend,
  .card-infrastructure {
    animation: slideFromTop 0.78s ease-out 2s forwards,
               settleDown 0.65s ease-out 5s forwards;
  }
}

@media (max-width: 480px) {
  .bio-title h3 {
    font-size: 2rem;
  }

  .seal-stamp {
    min-width: 160px;
    min-height: 60px;
    font-size: 0.85rem;
    padding: 0.8rem 2rem;
    letter-spacing: 1.5px;
  }
}

/*===========================================
  ACCESSIBILITY
===========================================*/

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bio-title,
  .foundation-card,
  .seal-stamp {
    opacity: 1 !important;
    transform: none !important;
  }
}

/*===========================================
  PRINT STYLES
===========================================*/

@media print {
  .tech-foundation {
    border: 1px solid #000;
    page-break-inside: avoid;
  }

  .foundation-card {
    border-color: #000 !important;
    box-shadow: none !important;
  }

  .seal-dots {
    display: none;
  }
}
