/* Custom styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

/* Base transitions */
* {
  transition: all 0.3s ease;
}

a, button {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.4;
  }
}

/* Apply animations */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-delay-100 {
  animation-delay: 0.1s;
}

.animate-delay-200 {
  animation-delay: 0.2s;
}

.animate-delay-300 {
  animation-delay: 0.3s;
}

/* Hover effects */
.hover-scale {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

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

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

/* Base styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body { 
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Mobile-first approach */
@media (max-width: 767px) {
    body {
        font-size: 14px;
        line-height: 1.6;
    }

    /* Navigation */
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff;
        z-index: 1000;
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 2rem 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-menu.active {
        display: flex;
    }

    .mobile-menu ul {
        width: 100%;
        text-align: center;
    }

    .mobile-menu li {
        margin: 1rem 0;
    }

    /* Sections */
    .section-padding {
        padding: 3rem 1rem;
    }

    /* Cards */
    .card-hover {
        margin: 1rem;
        padding: 1.5rem;
    }

    /* Buttons */
    .launch-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Typography */
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    p {
        margin-bottom: 1rem;
    }
}

/* Tablet optimization */
@media (min-width: 768px) and (max-width: 1024px) {
    body {
        font-size: 15px;
    }

    .section-padding {
        padding: 4rem 2rem;
    }

    .card-hover {
        margin: 1rem;
        padding: 1.25rem;
    }
}

/* Desktop optimization */
@media (min-width: 1025px) {
    body {
        font-size: 16px;
    }

    .section-padding {
        padding: 5rem 0;
    }

    .card-hover {
        margin: 1.5rem;
        padding: 1.5rem;
    }
}

/* Touch optimization */
@media (hover: none) {
    .card-hover:hover {
        transform: none;
        box-shadow: none;
    }

    .nav-link::after {
        display: none;
    }

    .launch-button {
        padding: 0.75rem 1.5rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .glassmorphism {
        backdrop-filter: blur(15px);
    }
}

/* Gradient styles */
.gradient-bg {
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Component styles */
.hero-glow {
    box-shadow: 0 0 40px rgba(72, 202, 228, 0.3);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(72, 202, 228, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
    transition: width 0.3s ease;
}

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

/* Layout */
.section-padding {
    padding: 5rem 0;
}

/* Animations */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.animate-pulse-custom {
    animation: pulse-custom 4s ease-in-out infinite;
}

@keyframes pulse-custom {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Cards and containers */
.metric-card {
    background: linear-gradient(135deg, rgba(72, 202, 228, 0.1) 0%, rgba(2, 62, 138, 0.1) 100%);
}

.launch-button {
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%) !important;
}

.launch-button:hover {
    background: linear-gradient(135deg, #90e0ef 0%, #0077b6 100%) !important;
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.active {
        display: block;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hamburger Menu */
.hamburger {
  cursor: pointer;
  width: 24px;
  height: 24px;
  transition: all 0.25s;
  position: relative;
  z-index: 60;
}

.hamburger-top,
.hamburger-middle,
.hamburger-bottom {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: #000;
  transform: rotate(0);
  transition: all 0.5s;
}

.hamburger-middle {
  transform: translateY(7px);
}

.hamburger-bottom {
  transform: translateY(14px);
}

.open {
  transform: rotate(90deg);
  transform: translateY(0px);
}

.open .hamburger-top {
  transform: rotate(45deg) translateY(6px) translate(6px);
  background: #fff;
}

.open .hamburger-middle {
  display: none;
}

.open .hamburger-bottom {
  transform: rotate(-45deg) translateY(6px) translate(-6px);
  background: #fff;
}

/* Menu overlay */
#menu-overlay {
  z-index: 50;
}

/* Prevent body scroll when menu is open */
body.overflow-hidden {
  overflow: hidden;
}

/* Project Modal Styles */
#projectModal {
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

#projectModal.hidden {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Carousel Styles */
#carouselContainer {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#carouselSlides {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#carouselSlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Navigation Buttons */
#prevBtn, #nextBtn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

#prevBtn:hover, #nextBtn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Slide Indicators */
#slideIndicators button {
    cursor: pointer;
    transition: all 0.3s ease;
}

#slideIndicators button:hover {
    background-color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.2);
}

/* Project Details */
#projectDetails {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Technology Tags */
#projectDetails .technology-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #48cae4, #023e8a);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

#projectDetails .technology-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 202, 228, 0.4);
}

/* Modal Responsive */
@media (max-width: 768px) {
    #projectModal .bg-white {
        margin: 1rem;
        max-height: 95vh;
    }
    
    #carouselContainer {
        height: 250px;
    }
    
    #projectDetails {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    #prevBtn, #nextBtn {
        width: 35px;
        height: 35px;
    }
}

/* Project Card Images */
.project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
}

.project-card-image:hover {
    transform: scale(1.05);
}

/* Project Card Alignment */
.project-card {
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Ensure consistent image container heights */
.project-image-container {
    position: relative;
    height: 12rem;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 0.5rem 0.5rem 0 0;
    flex-shrink: 0;
}

/* Ensure consistent content area */
.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    position: relative;
    padding-bottom: 4rem; /* Space for absolute button */
}

/* Ensure project screenshots display well */
.project-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: all 0.3s ease;
}

.project-screenshot:hover {
    transform: scale(1.02);
}

/* Project titles alignment */
.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1f2937;
    line-height: 1.3;
    min-height: 2.5rem;
    display: flex;
    align-items: flex-start;
}

/* Project descriptions alignment */
.project-description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    font-size: 0.95rem;
    min-height: 4rem;
}

/* Absolute positioned View More button */
.project-view-more {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
}

/* Technology Tags */
.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    margin: 0.125rem;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Project Modal Image Display */
#carouselSlides img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #f9fafb;
    border-radius: 0.5rem;
}

/* Project Title Overlay */
.project-title-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    z-index: 10;
}

.project-title-overlay h4 {
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.project-card:hover .project-title-overlay {
    background: rgba(72, 202, 228, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Enhanced Project Image Container */
.project-image-container {
    position: relative;
    height: 12rem;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 0.5rem 0.5rem 0 0;
}

.project-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(72, 202, 228, 0.1) 0%, rgba(2, 62, 138, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project-card:hover .project-image-container::before {
    opacity: 1;
}

/* Responsive Image Handling */
@media (max-width: 768px) {
    .project-image-container {
        height: 10rem; /* Smaller on mobile */
    }
    
    .project-title-overlay {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .project-title-overlay h4 {
        font-size: 1rem;
    }
    
    .project-title {
        font-size: 1.125rem;
    }
    
    .project-description {
        font-size: 0.875rem;
    }
    
    #carouselContainer {
        height: 200px;
    }
}

/* Smooth Modal Transitions */
.modal-enter {
    opacity: 0;
    transform: scale(0.9);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.modal-exit {
    opacity: 1;
    transform: scale(1);
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

/* Timeline vertical lines */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 0;
    height: 100%;
    width: 3px;
    background: #48cae4;
}

@media (min-width: 768px) {
    .desktop-timeline::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(to bottom, #48cae4, #023e8a);
        transform: translateX(-50%);
    }
}