

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

/* Custom styling for elements */
body {
  background-color: #000F15;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
}

/* Touch-friendly hover states for mobile */
@media (hover: none) and (pointer: coarse) {
  .skill-item:hover,
  .project-card:hover,
  .social-icon:hover,
  #home a:hover img,
  footer a:hover img,
  footer a:hover i.fab {
    transform: none;
    filter: none;
  }
  
  /* Make interactive elements more touch-friendly */
  button,
  a,
  input,
  textarea {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Improve tap targets on mobile */
@media (max-width: 768px) {
  header a,
  header button {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #mobile-menu a {
    padding: 12px 0;
    display: block;
  }
  #hire-me-btn{
    visibility: hidden !important;
  }
}

/* Gradient overlays */
.bg-gradient-overlay {
  background: linear-gradient(to bottom, transparent, #000F15);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  z-index: 1;
}

/* Hero section animations */
.hero-image-container,
#home .relative.w-80 {
  animation: float 6s ease-in-out infinite;
}

/* Social media icons hover effect */
.social-icon,
#home a img,
footer a img,
footer a i.fab {
  transition: all 0.3s ease;
}

.social-icon:hover,
#home a:hover img,
footer a:hover img,
footer a:hover i.fab {
  transform: translateY(-5px);
  filter: brightness(1.2);
}

/* Project card hover effects */
.project-card, 
div[class*="mb-"] > div[class*="mb-"] {
  transition: all 0.3s ease;
  overflow: hidden;
}

.project-card:hover,
div[class*="mb-"] > div[class*="mb-"]:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.project-card img,
div[class*="mb-"] > div[class*="mb-"] img {
  transition: all 0.5s ease;
}

.project-card:hover img,
div[class*="mb-"] > div[class*="mb-"]:hover img {
  transform: scale(1.05);
}

/* Input focus effects */
input:focus, textarea:focus {
  border-bottom: 2px solid #47C8A1;
}

/* Button hover effects */
.btn-primary,
button[type="submit"],
a[href="#contact"].bg-\[\#D9D9D9\] {
  transition: all 0.3s ease;
}

.btn-primary:hover,
button[type="submit"]:hover,
a[href="#contact"].bg-\[\#D9D9D9\]:hover {
  background-color: #47C8A1;
  color: #000F15;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(71, 200, 161, 0.3);
}

/* Animation for scroll-to-top button */
.scroll-top,
footer a[href="#home"] {
  transition: all 0.3s ease;
}

.scroll-top:hover,
footer a[href="#home"]:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #home{
    padding-top: 7rem;
  }
  .hero-content {
    text-align: center;
  }
  
  .social-icons-mobile {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
  }
  
  /* Mobile navigation improvements */
  #mobile-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
  
  #mobile-menu.hidden {
    display: none !important;
  }
  
  #mobile-menu.show {
    display: block !important;
    animation: slideDown 0.3s ease-out forwards;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Mobile menu button animation */
  #mobile-menu-button {
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
  }
  
  #mobile-menu-button:hover {
    background: rgba(71, 200, 161, 0.1);
    transform: scale(1.05);
  }
  
  #mobile-menu-button:active {
    transform: scale(0.95);
  }
  
  /* Mobile menu item animations */
  #mobile-menu a {
    transform: translateX(-20px);
    opacity: 0;
    animation: slideInMenu 0.3s ease forwards;
  }
  
  #mobile-menu a:nth-child(1) { animation-delay: 0.1s; }
  #mobile-menu a:nth-child(2) { animation-delay: 0.2s; }
  #mobile-menu a:nth-child(3) { animation-delay: 0.3s; }
  
  @keyframes slideInMenu {
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  /* Mobile menu item hover effects */
  #mobile-menu a:hover {
    background: rgba(71, 200, 161, 0.15) !important;
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(71, 200, 161, 0.2);
  }
  
  #mobile-menu a:active {
    transform: translateX(2px) scale(0.98);
  }
  
  /* Hero section mobile adjustments */
  #home {
    min-height: 100vh;
    padding-top: 100px;
  }
  
  /* Skills section mobile improvements */
  .skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  min-height: 100px;
  min-width: 140px;
  gap: 0.5rem;
}

.skill-item h3 {
  margin: 0;
  font-size: 1.125rem; /* or adjust as per breakpoint */
  line-height: 1.4;
  color: #EAEAEA;
}

.skill-item img {
  max-height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 1px #fff); /* optional for visibility on dark bg */
}

  
  /* About section mobile improvements */
  #about .flex {
    gap: 2rem;
  }
  
  /* Contact form mobile improvements */
  #contact-form input,
  #contact-form textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Footer mobile improvements */
  footer h3 {
    font-size: 2.5rem !important;
    line-height: 1.1;
  }
  
  /* Header adjustments for mobile */
  header .max-w-7xl {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
  
  /* Better mobile menu positioning */
  #mobile-menu {
    top: calc(100% + 0.25rem);
    border-radius: 0.75rem;
    margin: 0;
  }
}

/* Additional mobile optimizations */
@media (max-width: 768px) {
  /* Improve spacing for mobile */
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Hero section mobile text adjustments */
  #home h1 {
    word-break: break-word;
    hyphens: auto;
  }
  
  /* Projects grid improvements */
  #projects-container {
    gap: 1.5rem;
  }
  
  /* Better button sizing for mobile */
  .bg-\[\#D9D9D9\],
  .bg-\[\#47C8A1\] {
    min-height: 48px;
    padding: 0.75rem 1.5rem;
  }
  
  /* Form improvements */
  #contact-form input,
  #contact-form textarea {
    padding: 1rem 0.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  #contact-form input:focus,
  #contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #47C8A1;
    box-shadow: 0 0 0 2px rgba(71, 200, 161, 0.2);
  }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Hero section tablet adjustments */
  #home .w-full.max-w-7xl {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  /* Skills section tablet improvements */
  .skill-item h3 {
    font-size: 1.75rem;
  }
  
  /* About section tablet improvements */
  #about img {
    max-width: 300px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  /* Header adjustments */
  header .max-w-7xl {
    margin-top: 1rem;
    border-radius: 1rem;
  }
  /* #mobile-menu{
    margin-top:3rem;
  } */
  /* Hero section extra small mobile */
  #home h1 {
    font-size: 2rem !important;
    line-height: 1.2;
  }
  
  #home p {
    font-size: 0.875rem !important;
  }
  
  /* Skills section extra small mobile */
  .skill-item {
    min-width: 100px;
    padding: 0.75rem;
  }
  
  .skill-item h3 {
    font-size: 1rem !important;
  }
  
  .skill-item img {
    height: 1rem !important;
  }
  
  /* About section extra small mobile */
  #about p {
    font-size: 1rem !important;
    line-height: 1.5;
  }
  
  /* Contact section extra small mobile */
  #contact h2 {
    font-size: 2rem !important;
  }
  
  /* Footer extra small mobile */
  footer h3 {
    font-size: 2rem !important;
  }
  
  footer h2 {
    font-size: 1.5rem !important;
  }
}

/* Text shadow for headings */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Animation for colored blobs */
.blob {
  animation: blob-move 15s infinite alternate ease-in-out;
}

@keyframes blob-move {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* Animation for blog image placeholders */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Fade-in animation for sections */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Line clamp utility for project descriptions */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* GitHub project cards styling */
.project-github-card {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.project-github-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(71, 200, 161, 0.2);
}

/* Loading spinner for projects */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Glider.js Skills Slider Styles */
.glider-contain {
  position: relative;
  overflow: hidden;
}

.skills-slider.glider {
  margin: 0;
  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
}

.skills-slider .glider-track {
  transform: translate3d(0, 0, 0);
  transition: transform 0.5s ease;
  width: 100%;
}

.skill-item {
  min-height: 80px;
  flex: 0 0 auto;
  transition: all 0.3s ease;
  background: transparent;
  backdrop-filter: blur(10px);
  margin: 0 8px;
}

.skill-item:hover {
  transform: translateY(-2px);
}

.skill-item h3 {
  transition: color 0.3s ease;
}

.skill-item:hover h3 {
  color: #47C8A1;
}

.skill-item img {
  transition: all 0.3s ease;
  filter: brightness(0.8);
}

.skill-item:hover img {
  filter: brightness(1.2) drop-shadow(0 0 10px rgba(71, 200, 161, 0.5));
  transform: scale(1.1);
}

/* Responsive adjustments for skill items */
@media (max-width: 640px) {
  .skill-item {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    min-height: 100px;
    min-width: 120px;
  }
  
  .skill-item h3 {
    margin-bottom: 0.5rem;
    margin-right: 0 !important;
    font-size: 1.25rem !important;
    line-height: 1.2;
  }
  
  .skill-item img {
    margin-top: 0.25rem;
  }
}

/* Mobile-first responsive design improvements */
@media (max-width: 640px) {
  /* Glider adjustments for mobile */
  .glider-contain {
    padding: 0 1rem;
  }
  
  .skills-slider .glider-track {
    transform: translateX(0) !important;
  }
  
  .skill-item {
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    backdrop-filter: blur(5px);
  }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  #home {
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 2rem;
  }
  
  #home .relative.w-60 {
    width: 12rem !important;
    height: 12rem !important;
  }
  
  footer .relative.w-48 {
    width: 8rem !important;
    height: 8rem !important;
  }
}

/* Performance optimizations */
.skill-item,
.project-card,
footer a {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Prevent zoom on form inputs on iOS */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  font-size: 16px;
}

@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"], 
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Custom scrollbar for glider track */
.glider-track::-webkit-scrollbar {
  display: none;
}

.glider-track {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-spin,
  .hero-image-container,
  .blob {
    animation: none !important;
  }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
  /* Already optimized for dark theme */
}

/* Print styles */
@media print {
  .hidden\:print {
    display: none !important;
  }
  
  header,
  footer,
  #mobile-menu {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Utility classes for responsive design */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
  
  .mobile-flex {
    display: flex;
  }
  
  .mobile-hidden {
    display: none;
  }
  
  .mobile-text-center {
    text-align: center;
  }
  
  .mobile-text-sm {
    font-size: 0.875rem;
  }
  
  .mobile-px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .mobile-py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .mobile-mb-4 {
    margin-bottom: 1rem;
  }
  
  .mobile-mt-4 {
    margin-top: 1rem;
  }
}

/* Safe area handling for devices with notches */
@supports (padding: max(0px)) {
  .safe-area-inset-top {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
  
  .safe-area-inset-bottom {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  
  .safe-area-inset-left {
    padding-left: max(1rem, env(safe-area-inset-left));
  }
  
  .safe-area-inset-right {
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* Improved focus styles for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid #47C8A1;
  outline-offset: 2px;
}

/* Better focus styles for mobile */
@media (max-width: 768px) {
  button:focus,
  a:focus,
  input:focus,
  textarea:focus {
    outline: 3px solid #47C8A1;
    outline-offset: 3px;
  }
}

/* Smooth transitions for mobile interactions */
.mobile-device * {
  -webkit-tap-highlight-color: rgba(71, 200, 161, 0.2);
}

/* Improve image loading on mobile */
img {
  max-width: 100%;
  height: auto;
}

/* Better scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(71, 200, 161, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 200, 161, 0.7);
}

/* Hide scrollbar on mobile */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    display: none;
  }
  
  body {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

/* Extra responsive improvements for mobile navbar */
@media (max-width: 480px) {
  /* Header adjustments for very small screens */
  header .max-w-7xl {
    margin-top: 0.25rem;
    padding: 0.375rem 0.5rem;
    border-radius: 1rem;
  }
  
  /* Mobile menu button smaller screens */
  #mobile-menu-button {
    padding: 0.5rem;
    font-size: 1rem;
  }
  
  /* Mobile menu adjustments */
  #mobile-menu {
    left: 0.125rem;
    right: 0.125rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
  }
  
  #mobile-menu a {
    padding: 0.625rem 0.5rem;
    font-size: 0.875rem;
  }
  
  #mobile-menu a i {
    font-size: 0.875rem;
    margin-right: 0.5rem;
  }
  
  /* Logo text size for small screens */
  header a.text-lg {
    font-size: 1rem;
  }
  
  /* Hide hire me button completely on very small screens */
  .hidden.sm\:flex {
    display: none !important;
  }
}

/* Landscape orientation fixes for mobile */
@media (max-height: 500px) and (orientation: landscape) {
  #mobile-menu {
    max-height: 200px;
    overflow-y: auto;
  }
  
  #mobile-menu a {
    padding: 0.5rem;
  }
  
  header .max-w-7xl {
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  #mobile-menu-button {
    min-height: 48px;
    min-width: 48px;
  }
  
  #mobile-menu a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  /* Remove hover effects on touch devices */
  #mobile-menu a:hover {
    background: rgba(71, 200, 161, 0.1) !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Better animation performance */
#mobile-menu,
#mobile-menu a,
#mobile-menu-button {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  #mobile-menu {
    transition: none !important;
  }
  
  #mobile-menu a {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  
  #mobile-menu-button i {
    transition: none !important;
  }
}
