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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #0d6efd !important;
}

.nav-link {
    font-weight: 500;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 60px 20px;
}

.profile-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInDown 0.8s ease-out;
}

.profile-image img:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-section h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-section p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-section .btn {
    animation: fadeInUp 0.8s ease-out 0.6s both;
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    background-color: #f8f9fa;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Smooth Scroll Link */
.smooth-scroll {
    cursor: pointer;
}

/* Skills Section */
#skills {
    padding: 100px 20px;
}

#skills h2 {
    animation: fadeIn 0.8s ease-out;
    margin-bottom: 50px;
    color: #333;
}

.skill-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 5px solid #667eea;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border-left-color: #764ba2;
}

.skill-card i {
    transition: transform 0.3s ease;
}

.skill-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

.skill-card h4 {
    color: #333;
    font-weight: 600;
}

/* Projects Section */
#projects {
    padding: 100px 20px;
    background: #f8f9fa;
}

#projects h2 {
    animation: fadeIn 0.8s ease-out;
    margin-bottom: 50px;
    color: #333;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.project-image {
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-content {
    background: white;
}

.project-content h5 {
    color: #333;
    margin-bottom: 1rem;
}

.project-content h5 i {
    font-size: 1.1rem;
    vertical-align: middle;
}

.project-content p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-content .btn {
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.project-content .btn:hover {
    transform: translateX(5px);
}

/* Contact Section */
#contact {
    padding: 100px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#contact h2 {
    animation: fadeIn 0.8s ease-out;
    margin-bottom: 50px;
}

.contact-form .form-control {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    color: white;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-label {
    color: white;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-form .btn {
    background: white;
    color: #667eea;
    border: 2px solid white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-form .btn:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.contact-info h5 {
    font-weight: 600;
    color: white;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.social-links .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.social-links .btn:hover {
    background: white;
    color: #667eea;
    border-color: white;
    transform: translateY(-3px);
}

/* Footer */
footer {
    background: #1a1a1a;
    padding: 30px 20px;
    text-align: center;
}

footer p {
    margin: 0;
    color: #999;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 40px 20px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    #skills,
    #projects,
    #contact {
        padding: 60px 20px;
    }

    #skills h2,
    #projects h2,
    #contact h2 {
        font-size: 2rem;
    }

    .skill-card,
    .project-card {
        margin-bottom: 1rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .contact-form,
    .contact-info {
        margin-bottom: 2rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 30px 15px;
        min-height: auto;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section p {
        font-size: 0.9rem;
    }

    .profile-image img {
        width: 120px;
        height: 120px;
    }

    #skills,
    #projects,
    #contact {
        padding: 50px 15px;
    }


    /* Dark mode styles (applied when `dark-mode` class is on <html>) */
    .dark-mode {
        background-color: #0b1220;
        color: #e6eef8;
    }

    .dark-mode .navbar {
        background-color: #0b1220 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }

    .dark-mode .skill-card,
    .dark-mode .project-card,
    .dark-mode .project-content {
        background: #0f1724;
        color: #dbe8fb;
        border-color: rgba(255, 255, 255, 0.04);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    }

    .dark-mode .contact-form .form-control {
        background: rgba(255, 255, 255, 0.03);
        color: #e6eef8;
        border-color: rgba(255, 255, 255, 0.06);
    }

    .dark-mode footer {
        background: #07090b;
    }

    #skills h2,
    #projects h2,
    #contact h2 {
        font-size: 1.5rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .navbar-nav {
        text-align: center;
    }

    .social-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .social-links .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        flex: 1;
        min-width: 80px;
    }
}

/* Tablet Adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-section {
        padding: 50px 20px;
    }

    #skills,
    #projects,
    #contact {
        padding: 80px 20px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {

    .navbar,
    footer,
    .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}