/* Custom styles for portfolio - Tailwind handles most styling */

/* Prevent horizontal scroll - everything centered */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
  overflow-anchor: none;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (min-width: 640px) {
  html {
    scroll-padding-top: 6rem;
  }
}

/* Timeline gradient line */
.timeline-line {
  background: linear-gradient(to bottom, #F05138 0%, #232f48 100%);
}

/* Animated background - floating gradient orbs */
.animated-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.animated-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: floatBg 18s ease-in-out infinite;
}

.animated-bg-orb.orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(240, 81, 56, 0.5) 0%, rgba(240, 81, 56, 0.1) 50%, transparent 70%);
  top: -20%;
  left: -10%;
  animation-delay: 0s;
}

.animated-bg-orb.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 70%);
  bottom: -20%;
  right: -10%;
  animation-delay: -6s;
}

.animated-bg-orb.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  top: 50%;
  left: 50%;
  animation: floatBgCenter 15s ease-in-out infinite;
  animation-delay: -12s;
}

@keyframes floatBg {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(80px, -60px) scale(1.1);
  }

  50% {
    transform: translate(-60px, 80px) scale(0.9);
  }

  75% {
    transform: translate(60px, 60px) scale(1.05);
  }
}

@keyframes floatBgCenter {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  33% {
    transform: translate(calc(-50% + 80px), calc(-50% - 60px)) scale(1.15);
  }

  66% {
    transform: translate(calc(-50% - 50px), calc(-50% + 70px)) scale(0.95);
  }
}

/* Section reveal - slide from left/right */
.section-reveal {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateX(0);
}

.section-reveal.reveal-from-right {
  transform: translateX(60px);
}

.section-reveal.reveal-from-right.revealed {
  transform: translateX(0);
}

/* Contact section - full viewport width, perfectly centered */
.contact-section {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
}

/* Contact section background - radial gradient, smooth fade, no visible edges */
.contact-section-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 100% at 50% 50%,
      rgba(240, 81, 56, 0.06) 0%,
      rgba(240, 81, 56, 0.02) 35%,
      transparent 60%);
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 640px) {
  .contact-section-bg::before {
    background: radial-gradient(ellipse 80% 80% at 50% 50%,
        rgba(240, 81, 56, 0.06) 0%,
        rgba(240, 81, 56, 0.02) 45%,
        transparent 70%);
  }
}

/* Navbar - always fixed, enhanced animations */
#navbar {
  transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.4s ease;
}

#navbar.navbar-scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* Nav link underline animation */
#navbar .nav-link {
  position: relative;
}

#navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #F05138, #ff6b4a);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar .nav-link:hover::after {
  width: 100%;
}

/* Logo hover - subtle glow */
#navbar a[href="#"] .group:hover .flex.size-8 {
  box-shadow: 0 0 20px rgba(240, 81, 56, 0.4);
}

/* Resume button - gradient shift on hover */
#navbar .bg-primary {
  background: linear-gradient(135deg, #F05138 0%, #c94a2e 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar .bg-primary:hover {
  background: linear-gradient(135deg, #ff6b4a 0%, #F05138 100%);
  box-shadow: 0 4px 20px rgba(240, 81, 56, 0.5);
}

/* Mobile menu button */
#navbar #mobile-menu-btn {
  transition: all 0.3s ease;
}

#navbar #mobile-menu-btn:hover {
  background: rgba(240, 81, 56, 0.15);
  border-color: rgba(240, 81, 56, 0.3);
}

/* Mobile menu slide down animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slideDown {
  animation: slideDown 0.3s ease-out;
}

/* Reveal items - scroll-triggered animations */
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Tech cards - entrance + hover animations */
.tech-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.tech-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.3s,
    box-shadow 0.3s;
}

.tech-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px -15px rgba(240, 81, 56, 0.15),
    0 0 0 1px rgba(240, 81, 56, 0.1);
}

.tech-card .tech-icon-wrap {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tech-card:hover .tech-icon-wrap {
  transform: scale(1.1) rotate(-5deg);
}

.tech-card .tech-blur-orb {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tech-card:hover .tech-blur-orb {
  opacity: 0.8;
  transform: scale(1.2);
}

/* Project cards */
.project-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline items */
.timeline-item {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Custom scrollbar for projects */
.overflow-x-auto::-webkit-scrollbar {
  height: 6px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: rgba(35, 47, 72, 0.5);
  border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: rgba(240, 81, 56, 0.5);
  border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 81, 56, 0.7);
}

/* Prevent text overflow on small screens */
h1,
h2,
h3,
p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Project card line clamp fallback */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Typewriter Animation Classes */
.typewriter {
  /* Prevent height collapsing when empty */
  min-height: 1em;
}

.typewriter-cursor {
  border-right: 0.15em solid currentColor;
  padding-right: 2px;
  animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: currentColor;
  }
}