/* ==========================================================================
   HERO SECTION - Phase 1 Enhancement
   ========================================================================== */

/* Hero Container */
.hero-container {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 20px 60px;
}

/* Animated Gradient Background */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(-45deg, #0a3b68, #10b981, #059669, #0c4a6e);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  opacity: 0.08;
  z-index: 0;
}

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

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
}

/* Hero Photo */
.hero-photo-container {
  margin: 0 auto 32px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-accent);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
  animation: photoFadeIn 0.8s ease-out;
}

@keyframes photoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero Title */
.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--color-primary);
  animation: titleSlideUp 0.6s ease-out 0.2s both;
}

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

.hero-accent {
  color: var(--color-accent);
  display: inline-block;
  position: relative;
}

.hero-accent::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  animation: underlineGrow 1s ease-out 0.8s both;
}

@keyframes underlineGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Hero Subtitle & Description */
.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 12px;
  animation: titleSlideUp 0.6s ease-out 0.3s both;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-text);
  max-width: 700px;
  margin: 0 auto 32px;
  animation: titleSlideUp 0.6s ease-out 0.4s both;
}

/* CTA Buttons */
.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation: titleSlideUp 0.6s ease-out 0.5s both;
}

.hero-cta-primary,
.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-family: var(--font-body);
}

.hero-cta-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.hero-cta-primary:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.hero-cta-primary:active {
  transform: translateY(0);
}

.hero-cta-secondary {
  background: var(--color-card-bg);
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.hero-cta-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta-icon {
  width: 18px;
  height: 18px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  animation: titleSlideUp 0.6s ease-out 0.6s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 6px;
  font-family: var(--font-heading);
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--color-text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   DATA VISUALIZATIONS SECTION
   ========================================================================== */

.viz-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.viz-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 32px;
}

.viz-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px var(--color-card-shadow);
  transition: all 0.3s ease;
}

.viz-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--color-card-shadow);
  border-color: var(--color-accent);
}

.viz-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 24px;
  text-align: center;
}

#citationChart,
#skillsRadar {
  max-height: 300px;
}

/* ==========================================================================
   MICROINTERACTIONS & ENHANCEMENTS
   ========================================================================== */

/* Card Tilt Effect on Hover */
.project-card:hover,
.about-project-card:hover {
  transform: perspective(1000px) rotateX(2deg) translateY(-4px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Button Ripple Effect Base */
button,
.tag-btn,
.hero-cta-primary,
.hero-cta-secondary {
  position: relative;
  overflow: hidden;
}

button::before,
.tag-btn::before,
.hero-cta-primary::before,
.hero-cta-secondary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::before,
.tag-btn:active::before,
.hero-cta-primary:active::before,
.hero-cta-secondary:active::before {
  width: 300px;
  height: 300px;
}

/* Enhanced Tag Hover (already partially implemented) */
.project-tag {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Loading State for Images */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0.7;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Focus States for Accessibility */
button:focus-visible,
a:focus-visible,
.tag-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Intersection Observer Fade-In Animation */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-stat-number {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 32px;
  }

  .viz-container {
    grid-template-columns: 1fr;
  }

  .viz-card {
    padding: 24px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-container {
    padding: 60px 16px 40px;
    min-height: 500px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-photo-container {
    width: 120px;
    height: 120px;
  }

  .hero-stats {
    gap: 24px;
  }
}
