/* Custom CSS for Portfolio Website */

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

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

/* Navigation active state */
.nav-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Content transitions */
#content {
    transition: opacity 0.3s ease-in-out;
}

#content.loading {
    opacity: 0.6;
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading states */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* Card hover effects */
.card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

/* Skill bars */
.skill-bar {
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
    height: 8px;
}

.skill-progress {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    height: 100%;
    border-radius: 9999px;
    transition: width 1s ease-out;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid white;
    box-shadow: 0 0 0 4px #e2e8f0;
}

/* Project grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Contact form styles */
.form-input {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: white;
    color: #3b82f6;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid #3b82f6;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #3b82f6;
    color: white;
}

/* Mobile optimizations */
@media (max-width: 1024px) {
    .timeline {
        padding-left: 30px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item::before {
        left: -20px;
    }
}

/* Mobile responsive design */
@media (max-width: 768px) {
    /* Hide desktop sidebar */
    .lg\\:block {
        display: none !important;
    }
    
    /* Mobile content adjustments */
    main {
        margin-left: 0 !important;
    }
    
    footer {
        margin-left: 0 !important;
    }
    
    /* Mobile grid adjustments */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Mobile timeline */
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 5px;
    }
    
    .timeline-item::before {
        left: -15px;
        width: 10px;
        height: 10px;
    }
    
    /* Mobile cards */
    .card {
        margin-bottom: 16px;
    }
    
    /* Mobile form adjustments */
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Mobile header adjustments */
    header .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    header .flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    header .text-xl {
        font-size: 1.125rem;
    }
    
    header .text-sm {
        font-size: 0.75rem;
    }
    
    /* Mobile social links */
    header .space-x-4 > * {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    /* Mobile content padding */
    #content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile skill bars */
    .skill-bar {
        height: 6px;
    }
    
    /* Mobile buttons */
    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Mobile filter buttons */
    .filter-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Mobile project cards */
    .project-card h3 {
        font-size: 1.125rem;
    }
    
    .project-card p {
        font-size: 0.875rem;
    }
    
    /* Mobile contact form */
    #contact-form {
        padding: 1rem;
    }
    
    /* Mobile footer */
    footer .flex {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    footer .space-x-4 > * {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile adjustments */
    header .w-12, header .h-12 {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    header .text-lg {
        font-size: 1rem;
    }
    
    /* Mobile navigation adjustments */
    .fixed.bottom-0 .justify-around {
        padding: 0.5rem 0;
    }
    
    .fixed.bottom-0 .text-lg {
        font-size: 1rem;
    }
    
    .fixed.bottom-0 .text-xs {
        font-size: 0.625rem;
    }
    
    /* Mobile content spacing */
    #content {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Mobile cards */
    .bg-white.rounded-xl {
        padding: 1rem;
    }
    
    /* Mobile project images */
    .project-card .h-48 {
        height: 12rem;
    }
    
    /* Mobile timeline */
    .timeline-item .bg-white {
        padding: 1rem;
    }
    
    /* Mobile contact info */
    .flex.items-center.space-x-3 {
        flex-wrap: wrap;
    }
    
    /* Mobile social profile icons */
    .w-12.h-12 {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Footer fixes */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#mobile-menu {
    display: none;
}

#mobile-menu.show {
    display: block;
}

#mobile-menu-panel {
    transition: transform 0.3s ease-out;
}

/* Mobile navigation active state */
.mobile-nav-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Hamburger menu animation */
#mobile-menu-toggle i {
    transition: transform 0.3s ease;
}

#mobile-menu-toggle:active i {
    transform: scale(0.9);
}

/* Mobile footer navigation */
footer.lg\:hidden.fixed.bottom-0 {
    background: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Mobile footer navigation active state */
footer.lg\:hidden .nav-item.active {
    color: #2563eb !important;
}

/* Mobile footer navigation hover effects */
footer.lg\:hidden .nav-item:hover {
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* Mobile footer button spacing */
footer.lg\:hidden .flex.justify-around {
    gap: 0.5rem;
}

/* Mobile footer text alignment */
footer.lg\:hidden .flex.flex-col.items-center {
    text-align: center;
}

/* Print styles */
@media print {
    header, footer, nav {
        display: none;
    }
    
    main {
        margin-left: 0 !important;
    }
    
    .card {
        break-inside: avoid;
    }
}
