/* src/styles.css */
@keyframes growLine {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}
.animate-growLine {
  animation: growLine 2s ease-out forwards;
}
@keyframes vertical-line {
  0% {
    height: 0;
  }
  100% {
    height: 100%;
  }
}
.animate-vertical-line {
  animation: vertical-line 2s ease-out forwards;
}

/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fdfaf6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-container {
  width: 600px;
  position: relative;
  margin-bottom: 2rem;
}

.loading-line {
  height: 4px;
  background-color: #134e4a;
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
}

.animate-loading-line {
  animation: growLine 1.5s ease-out forwards;
}

.loading-text {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #134e4a;
}

.fade-out {
  animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* Enhanced Mobile Menu Styles */
#mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: rgba(253, 250, 246, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease-in-out;
  z-index: 1000;
  padding: 6rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
}

#mobile-menu.active {
  right: 0;
  transform: translateX(0);
  animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

#mobile-menu a {
  padding: 1rem;
  font-size: 1.2rem;
  color: #333;
  border-bottom: 1px solid rgba(238, 238, 238, 0.3);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateX(20px);
}

#mobile-menu.active a {
  opacity: 1;
  transform: translateX(0);
}

#mobile-menu a:nth-child(1) {
  transition-delay: 0.1s;
}
#mobile-menu a:nth-child(2) {
  transition-delay: 0.2s;
}
#mobile-menu a:nth-child(3) {
  transition-delay: 0.3s;
}
#mobile-menu a:nth-child(4) {
  transition-delay: 0.4s;
}
#mobile-menu a:nth-child(5) {
  transition-delay: 0.5s;
}

#mobile-menu a:hover {
  color: #134e4a;
  transform: translateX(5px);
  background-color: rgba(19, 78, 74, 0.05);
  border-radius: 4px;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Enhanced Close Button */
.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #333;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  transform: rotate(90deg);
  color: #134e4a;
  background-color: rgba(19, 78, 74, 0.1);
}

/* Hamburger Menu Animation */
#menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.open span:nth-child(2) {
  opacity: 0;
}
#menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}
#menu-btn span {
  transition: all 0.3s ease;
  transform-origin: left center;
}

/* Experience Section without vertical line */
.experience-item {
  position: relative;
  padding-left: 0;
  margin-bottom: 3rem;
}

.experience-item:before {
  display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Typography */
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }

  h2 {
    font-size: 2rem !important;
  }

  /* Section padding */
  section {
    padding: 3rem 1rem !important;
  }

  /* About section */
  #about {
    flex-direction: column !important;
    text-align: center !important;
  }

  #about img {
    width: 80% !important;
    margin: 0 auto 2rem !important;
  }

  /* Experience timeline */
  .experience-item {
    padding-left: 1rem !important;
    margin-left: 0 !important;
  }

  .experience-item:before {
    left: 0 !important;
  }

  /* Skills grid */
  #skills .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  /* Navbar adjustments */
  nav#navbar {
    padding: 1rem !important;
  }

  .font-sans.text-2xl {
    font-size: 1.5rem !important;
  }

  /* Loading screen adjustments */
  .loading-container {
    width: 90% !important;
  }

  /* Intro section */
  section.h-screen {
    height: auto;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }
}

@media (max-width: 480px) {
  /* Even smaller screens */
  h1 {
    font-size: 2rem !important;
  }

  h2 {
    font-size: 1.8rem !important;
  }

  /* Experience items */
  .experience-item {
    padding-left: 0.5rem !important;
  }

  /* Timeline adjustments */
  .relative.ml-4 {
    margin-left: 1rem !important;
  }

  .space-y-20.pl-10 {
    padding-left: 1.5rem !important;
  }

  .absolute.-left-12 {
    left: -1rem !important;
  }

  /* Mobile menu width */
  #mobile-menu {
    width: 85% !important;
  }
}

/* Experience timeline adjustments for mobile */
@media (max-width: 640px) {
  .experience-item {
    margin-bottom: 2rem !important;
  }

  .experience-item h3 {
    font-size: 1.1rem !important;
  }

  .experience-item p {
    font-size: 0.9rem !important;
  }
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}
