/* Custom Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

section {
    position: relative;
    z-index: 1;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Styles */
nav {
    z-index: 1000 !important;
    background-color: white;
}

.nav-link {
    color: #374151;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: white;
    color: #2563eb;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

/* Section Title */
.section-title {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 4rem;
    color: #1f2937;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    border-radius: 2px;
}

/* Stat Card */
.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Role Card */
.role-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.role-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Education Card */
.education-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Competency Card */
.competency-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.competency-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

/* Highlight Card */
.highlight-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #2563eb;
}

.highlight-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Gallery */
.gallery-item {
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    position: relative;
}

.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 99, 235, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #bbb;
}

/* Form Input */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Social Icons */
.social-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

.fade-in-delay {
    animation: fadeIn 0.8s ease-in 0.2s backwards;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-in 0.4s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .gallery-img {
        height: 200px;
    }

    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    /* Hero Section Mobile */
    #home h1 {
        font-size: 2.5rem !important;
    }

    #home h2 {
        font-size: 1.5rem !important;
    }

    #home p {
        font-size: 1rem !important;
    }

    /* Buttons Mobile */
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    /* Profile Image Mobile */
    #home img {
        max-width: 300px;
        margin-top: 2rem;
    }

    /* Stats Badge Mobile */
    #home .absolute {
        bottom: -20px !important;
        right: 10px !important;
        padding: 1rem !important;
    }

    /* Role Cards Mobile */
    .role-card {
        margin-bottom: 1.5rem;
    }

    /* Story Section Mobile */
    #story ul {
        padding-left: 0.5rem;
    }

    #story li {
        font-size: 0.95rem !important;
    }

    /* Contact Section Mobile */
    #contact .grid {
        grid-template-columns: 1fr !important;
    }

    /* Gallery Mobile */
    .gallery-item {
        margin-bottom: 0.5rem;
    }

    /* Modal Mobile */
    .modal-content {
        max-width: 95%;
        max-height: 80%;
    }

    .close-modal {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }

    /* Spacing Mobile */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Hero Section Padding Mobile */
    #home .container {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Education Cards Mobile */
    .education-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .education-card .flex {
        flex-direction: column;
        text-align: center;
    }

    .education-card .mr-4 {
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }

    /* Competency Cards Mobile */
    .competency-card {
        padding: 1.5rem;
    }

    /* Highlight Cards Mobile */
    .highlight-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Stat Cards Mobile */
    .stat-card {
        padding: 1.5rem;
    }

    /* Form Mobile */
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Social Icons Mobile */
    .social-icon {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 640px) {
    #home h1 {
        font-size: 2rem !important;
    }

    #home h2 {
        font-size: 1.25rem !important;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Gallery Grid Mobile */
    #gallery .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .gallery-img {
        height: 150px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Fix for section overlap */
section:not(#home) {
    scroll-margin-top: 80px;
}

#home {
    scroll-margin-top: 0;
}

/* Experience Badge */
.experience-badge {
    z-index: 10;
}

/* Prevent parallax on mobile */
@media (max-width: 768px) {
    #home {
        transform: none !important;
    }
    
    .experience-badge {
        bottom: 10px !important;
        right: 10px !important;
        padding: 1rem !important;
    }
    
    .experience-badge p:first-child {
        font-size: 1.5rem !important;
    }
    
    .experience-badge p:last-child {
        font-size: 0.75rem !important;
    }
}
