/* Custom Styles for Dritan Mulla Portfolio */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
  /* Improve mobile text rendering */
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

.font-inter {
  font-family: 'Inter', sans-serif;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Navigation animations */
nav a {
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #2563eb;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Section fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeInUp 0.8s ease-out;
}

/* Card hover effects */
.hover\:shadow-xl {
  transition: all 0.3s ease;
}

/* Button hover effects */
button, a[class*="bg-"] {
  transition: all 0.2s ease;
}

/* Form input focus glow */
input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Timeline responsive adjustments */
@media (max-width: 768px) {
  .timeline-item {
    padding-left: 2rem;
  }
}

/* List icons consistency */
ul li i {
  flex-shrink: 0;
}

/* Text in lists should wrap properly */
ul li span {
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.6;
}

/* Cards and boxes text formatting */
.rounded-lg p, .rounded-lg li {
  line-height: 1.7;
}

/* Button text centering */
button, a[class*="bg-"] {
  text-align: center;
  white-space: nowrap;
}

/* Ensure icons in headers don't break */
h1 i, h2 i, h3 i, h4 i {
  flex-shrink: 0;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  /* Prevent text overflow on mobile */
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Allow button text to wrap on very small screens */
  button, a[class*="bg-"] {
    white-space: normal;
  }
  
  /* Better spacing on small screens */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Ensure links are easily tappable */
  a, button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Prevent zoom on input focus (iOS) */
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  button, a, input, select, textarea {
    touch-action: manipulation;
  }
  
  /* Remove hover effects on touch devices */
  button:hover, a:hover {
    transform: none;
  }
  
  /* Better active states for touch */
  button:active, a:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }
}

/* Prevent horizontal scroll */
* {
  max-width: 100%;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Print styles */
@media print {
  nav, #contact-form, footer {
    display: none;
  }
  
  section {
    page-break-inside: avoid;
  }
}
