body {
  font-family: "Lato", sans-serif;
}

.profile-shadow {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hero-btn {
  width: 160px !important; /* Force fixed width */
  min-width: 160px !important; /* Prevent shrinking */
  max-width: 160px !important; /* Prevent growing */
  padding: 0.75rem 0 !important; /* Remove horizontal padding, keep vertical */
  font-size: 1rem !important;
  font-family: "Lato", sans-serif;
  border-radius: 9999px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border 0.2s;
  display: inline-flex !important; /* Use inline-flex for better control */
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
  flex-shrink: 0 !important; /* Prevent shrinking */
  white-space: nowrap !important; /* Prevent text wrapping */
  overflow: hidden !important; /* Hide overflow */
  text-overflow: ellipsis !important; /* Handle long text */
  box-sizing: border-box !important; /* Include padding in width calculation */
}

/* Mobile hero button adjustments */
@media (max-width: 640px) {
  .hero-btn {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    padding: 0.625rem 0 !important;
    font-size: 0.9rem !important;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .hero-btn {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    padding: 0.5rem 0 !important;
    font-size: 0.85rem !important;
  }
}

/* Landscape phone optimizations - specific button sizing */
@media (max-width: 896px) and (orientation: landscape) and (max-height: 500px) {
  .hero-btn {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    padding: 0.5rem 0 !important;
    font-size: 0.8rem !important;
  }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
  .hero-btn {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    padding: 0.75rem 0 !important;
    font-size: 0.95rem !important;
  }
}

/* Large tablet and small desktop */
@media (min-width: 1025px) and (max-width: 1280px) {
  .hero-btn {
    width: 170px !important;
    min-width: 170px !important;
    max-width: 170px !important;
    padding: 0.75rem 0 !important;
    font-size: 1.05rem !important;
  }
}

/* Desktop and larger screens */
@media (min-width: 1281px) {
  .hero-btn {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    padding: 0.875rem 0 !important;
    font-size: 1.125rem !important;
  }
}

/* Button container fixes */
.flex.flex-col.sm\:flex-row {
  align-items: center !important;
  justify-content: center !important;
}

/* Ensure buttons don't grow in flex container */
@media (min-width: 640px) {
  .flex.flex-col.sm\:flex-row .hero-btn {
    flex: none !important; /* Don't grow or shrink in flex container */
  }
}

.social-btn-linkedin:hover svg {
  color: #0a66c2 !important;
  /* LinkedIn blue */
}

.social-btn-github:hover svg {
  color: #2563eb !important;
  /* Tailwind blue-600 */
}

/* Modal backdrop styling */
.modal-backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Contact item hover effects */
.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-item:hover .w-10,
.contact-item:hover .w-12 {
  transform: scale(1.05);
  background-color: #374151;
}

/* Dark gradient typing effect for h1 */
.gradient-typing {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  background: linear-gradient(
    270deg,
    #000000,
    #1a1a1a,
    #404040,
    #666666,
    #808080,
    #404040,
    #1a1a1a,
    #000000
  );
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  white-space: nowrap;
  animation: modernGradientFlow 6s ease-in-out infinite,
    typing 2.2s steps(18, end) 1s 1 normal both;
  overflow: hidden;
  max-width: 100%;
  position: relative;
}

/* Modern gradient animation with smoother flow */
@keyframes modernGradientFlow {
  0% {
    background-position: 0% 50%;
    transform: scale(1);
  }
  25% {
    background-position: 100% 30%;
    transform: scale(1.02);
  }
  50% {
    background-position: 200% 50%;
    transform: scale(1);
  }
  75% {
    background-position: 300% 70%;
    transform: scale(1.01);
  }
  100% {
    background-position: 400% 50%;
    transform: scale(1);
  }
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 18ch;
  }
}

/* Additional modern effects */
.gradient-typing::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shine 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0%,
  20% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Mobile optimizations for modal */
@media (max-width: 640px) {
  .modal-content {
    width: calc(100vw - 2rem);
    margin: 0 1rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    /* Add these fixes */
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    position: fixed;
  }
  
  .modal-content .bg-white {
    border-radius: 1rem;
    /* Improve padding and spacing */
    padding: 1rem;
    max-width: none;
    width: 100%;
  }
  
  /* Fix contact items on mobile */
  .contact-item {
    padding: 0.75rem;
    border-radius: 0.75rem;
  }
  
  .contact-item .w-10 {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
  }
  
  .contact-item svg {
    width: 1.125rem;
    height: 1.125rem;
  }
  
  /* Improve text sizing on mobile */
  .contact-item p {
    font-size: 0.75rem;
    line-height: 1.2;
  }
  
  .contact-item a,
  .contact-item p:last-child {
    font-size: 0.875rem;
    line-height: 1.3;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .modal-content {
    width: calc(100vw - 1rem);
    margin: 0 0.5rem;
    max-height: calc(100vh - 2rem);
  }
  
  .modal-content .bg-white {
    padding: 0.75rem;
  }
  
  .contact-item {
    padding: 0.5rem 0.75rem;
    space-x: 0.75rem;
  }
  
  /* Reduce spacing between items */
  .space-y-4 > * + * {
    margin-top: 0.75rem;
  }
  
  /* Make modal header more compact */
  .modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
}

/* Touch improvements for mobile */
@media (max-width: 768px) {
  .hero-btn:active {
    transform: scale(0.98);
  }
  
  .social-btn-linkedin:active,
  .social-btn-github:active {
    transform: scale(0.95);
  }
  
  .contact-item:active {
    transform: translateY(0) scale(0.98);
  }
}

/* Improve modal backdrop touch handling */
.modal-backdrop {
  touch-action: none;
  -webkit-overflow-scrolling: touch;
}

/* Prevent text selection issues */
.contact-item a {
  -webkit-user-select: all;
  -moz-user-select: all;
  -ms-user-select: all;
  user-select: all;
}

/* Better tap targets */
.contact-item {
  min-height: 3.5rem;
}

#closeModalBtn {
  min-height: 2.75rem;
  font-size: 0.9rem;
}