html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: #111;
    transition: .3s;
}

.dark {
    background: #000;
    color: #fff;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 8%;
    position: sticky;
    top: 0;
    backdrop-filter: blur(15px);
}

ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 2rem;
    font-weight: 400;
    color: #0071e3;
    margin-bottom: 20px;
    cursor: pointer;
}

h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
}

#about p {
    max-width: 1450px;
    margin: auto;
    text-align: center;
    line-height: 1.9;
    font-size: 1.1rem;
}

.hero p {
    max-width: 700px;
    line-height: 1.7;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    background: #0071e3;
    color: white;
    border-radius: 30px;
    margin: 10px;
    padding: 15px 30px;
    border-radius: 30px;
    transition: .3s;
    cursor: pointer;
}

.github-btn {
    background: #4621ac;
    color: white;
}

.github-btn:hover {
    background: #000;
    transform: translateY(-3px);
}

.project-github-btn {
    background: #4621ac;
    color: white;
}

.project-github-btn:hover {
    background: #31157d;
    transform: translateY(-3px);
}

.linkedin-btn {
    background: #0A66C2;
    color: white;
}

.linkedin-btn:hover {
    background: #004182;
    transform: translateY(-3px);
}

.btn i {
    margin-right: 10px;
}



.secondary {
    background: #222;
}

section {
    padding: 50px 10px;
    max-width: 1200px;
    margin: auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    padding: 30px;
    border-radius: 20px;
    background: #f4f4f4;
    transition: .3s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
}

.dark .card {
    background: #333232;
}

.dark .project {
    background: #1d1b1b;
}

.dark nav {
    background: rgba(63, 62, 62, 0.8);
}

video {

    width: 100%;

    border-radius: 15px;

    margin-top: 25px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .15);

}

.links {
    justify-content: center;
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

@media(max-width:768px) {

    .hero h1 {
        font-size: 2.5rem;
    }

    nav {
        background: rgba(255, 255, 255, 0.8);
        z-index: 1000;
        flex-direction: column;
        gap: 15px;
    }

    footer {
        text-align: center;
        padding: 30px;
        margin-top: 50px;
        background: #f4f4f4;
    }

    .dark footer {
        background: #1f1f1f;
    }

    nav {
        background: rgba(255, 255, 255, 0.8);
        z-index: 1000;
    }

    nav a:hover {
        color: #0071e3;
    }

    .btn:hover {
        transform: translateY(-3px);
    }

    #contact {
        text-align: center;
    }

    #contact .links {

        justify-content: center;

    }

    #contact p {

        margin: 15px 0;

    }

    .hero,
    .card,
    .project {
        animation: fadeIn 1s ease;
    }

    @keyframes fadeIn {

        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }

    }

}


nav a {
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: #0071e3;
    transition: .3s;
}

nav a:hover::after {
    width: 100%;
}

.card,
.project {
    transition: all .4s ease;
}

.card:hover,
.project:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
}

.email-box {

    display: flex;

    justify-content: center;
    align-items: center;

    gap: 15px;

    flex-wrap: wrap;

    margin: 20px 0;

}

#topBtn {
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
    display: block;

    position: fixed !important;

    right: 25px !important;
    bottom: 25px !important;

    left: auto !important;
    top: auto !important;

    width: 55px;
    height: 55px;

    border: none;
    border-radius: 50%;

    background: #0071e3;
    color: #fff;

    font-size: 22px;
    font-weight: bold;

    cursor: pointer;

    z-index: 9999;

    box-shadow: 0 5px 20px rgba(0, 0, 0, .2);
    transition: all .3s ease;
}

#topBtn:hover {

    transform: translateY(-5px) scale(1.05);
}

#topBtn.show-btn {
    opacity: 1;
    visibility: visible;
}

.hire-btn {
    background: linear-gradient(135deg, #0071e3, #00bfff);
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.stats {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-card {
    background: #f4f4f4;
    padding: 20px 30px;
    border-radius: 20px;
    min-width: 140px;
    transition: .3s;
}

.stat-card:hover {
    transform: translateY(-8px);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* =========================
   HERO STATS
========================= */

.stats {

    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
    margin: 50px 0;

}

.stats div {

    background: #f5f5f5;

    padding: 30px 40px;

    border-radius: 25px;

    min-width: 180px;

    text-align: center;

    transition: .3s ease;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, .08);

}

.stats div h3 {

    font-size: 2rem;

    color: #0071e3;

    margin-bottom: 10px;

}

.stats div p {

    color: #555;

    font-size: 1rem;

}

/* Hover Effect */

.stats div:hover {

    transform: translateY(-8px);

    box-shadow:
        0 15px 30px rgba(0, 0, 0, .15);


}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;

    width: 0;
    height: 5px;

    background: #0071e3;

    z-index: 9999;

    transition: width .1s linear;
}

/* =========================
   DARK MODE FIX
========================= */

.dark .stats div {

    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);

    box-shadow:
        0 5px 15px rgba(255, 255, 255, .05);

}

.dark .stats div h3 {

    color: #4da3ff;

}

.dark .stats div p {

    color: #ddd;

}

@media(max-width:768px) {

    .stats {

        flex-direction: column;
        align-items: center;

    }

    .stats div {

        width: 250px;

    }

}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, .3);
}

#role-text {
    color: #0071e3;
    font-size: 2rem;
    font-weight: 500;
    height: 60px;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: opacity .5s ease;
}

.tech-badges {

    margin-top: 25px;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 12px;

}

.tech-badges span {

    background: #0071e3;

    color: white;

    padding: 8px 16px;

    border-radius: 25px;

    font-size: .9rem;

}

.dark .tech-badges span {

    background: #1d4ed8;

}

nav a.active {

    color: #0071e3;

    font-weight: 600;

}

#resumeModal {

    display: none;

    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background:
        rgba(0, 0, 0, .8);

    z-index: 9999;

}

.modal-content {

    width: 85%;
    height: 85%;

    background: white;

    margin: 40px auto;

    position: relative;

    border-radius: 15px;

}

.modal-content iframe {

    width: 100%;
    height: 100%;

    border: none;

}

#closeResume {

    position: absolute;

    top: 10px;
    right: 20px;

    font-size: 35px;

    cursor: pointer;

}

/* =========================
   LOADING SCREEN
========================= */

#loader {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100vh;

    background: #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 99999;

    transition: opacity .4s ease;
}

.loader-content {
    text-align: center;
}

.loader-content h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.loader-content p {
    margin-bottom: 20px;
    color: #666;
}

.spinner {
    width: 50px;
    height: 50px;

    border: 5px solid #ddd;
    border-top: 5px solid #0071e3;

    border-radius: 50%;

    animation: spin 1s linear infinite;

    margin: auto;
}

@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}

/* Dark Mode */

.dark #loader {
    background: #000;
}

.dark .loader-content {
    color: white;
}

.dark .loader-content p {
    color: #ccc;
}

/* =========================
   PROJECT SECTION
========================= */

.featured-project {
    border: 2px solid #0071e3;
}

.featured-tag {

    display: inline-block;

    background: #0071e3;
    color: white;

    padding: 8px 15px;

    border-radius: 20px;

    margin-bottom: 15px;

    font-size: .85rem;

}

.project-status {

    display: inline-block;

    background: #22c55e;
    color: white;

    padding: 6px 12px;

    border-radius: 20px;

    font-size: .8rem;

    margin-bottom: 10px;

}

.project-date {

    color: #888;

    margin-top: 10px;

    font-size: .95rem;

}

.project {

    background: #f5f5f5;

    padding: 40px;

    border-radius: 25px;

    margin-top: 40px;
    margin-bottom: 100px;

    transition: .4s ease;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, .08);

}

.dark .project {

    background: #111;

}

.project-content {

    flex: 1;
    width: 100%;

}

.project-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.project-metrics div {
    background: white;
    padding: 20px;
    border-radius: 15px;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
}

.dark .project-metrics div {
    background: #1a1a1a;
}

.dark .project-metrics div {
    background: #1a1a1a;
}

.project-metrics h4 {

    color: #0071e3;

}

.project-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.project-buttons .btn {

    margin-right: 10px;

}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0 25px;
}

.tech-stack span {
    background: #0071e3;
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: .85rem;
}

.project-highlights {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 20px;
    margin: 30px 0;
}

.project-highlights div {
    background: #f8f8f8;
    padding: 18px;
    border-radius: 15px;
    text-align: center;
    font-weight: 500;
}

.dark .project-highlights div {
    background: #1a1a1a;
}

.project-highlights li {

    margin: 12px 0;
    font-weight: 500;
    color: #333;

}

.dark .project-highlights li {

    color: #ddd;

}

.project-top {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 20px;

}

.project-header-right {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;

}

.project-description {

    margin: 25px 0;

    line-height: 1.8;

    font-size: 1.05rem;

    color: #555;

}

.dark .project-description {

    color: #ccc;

}

.project-description {
    margin: 25px 0;
    line-height: 2;
    font-size: 1.05rem;
    color: #444;
}

.dark .project-description {
    color: #d1d5db;
}

.card{
    color:#111 !important;
}

.dark .card{
    color:#fff !important;
}


    /* .hidden {

        opacity: 0;
        transform: translateY(80px);
        transition: all .8s ease;

    }

    .show {

        opacity: 1;
        transform: translateY(0);
        transition:
            opacity 1s ease,
            transform 1s ease;

    } */

/* Project text visibility fix */

.project,
.project p,
.project li,
.project h3,
.project h4,
.project span {
    color: #111;
}

.dark .project,
.dark .project p,
.dark .project li,
.dark .project h3,
.dark .project h4,
.dark .project span {
    color: #fff;
}

/* Highlight cards */

.project-highlights div {
    color: #111;
}

.dark .project-highlights div {
    color: #fff;
}

/* Metrics cards */

.project-metrics div {
    color: #111;
}

.dark .project-metrics div {
    color: #fff;
}

/* =========================
   MOBILE OPTIMIZATION
========================= */

@media screen and (max-width: 768px) {

    nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    nav ul li {
        font-size: 0.9rem;
    }


    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero h2,
    #role-text {
        font-size: 1.3rem;
    }

    .hero p,
    #about p {
        font-size: 1rem;
        padding: 0 15px;
    }

    .buttons,
    .project-buttons,
    .links {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 90%;
        max-width: 300px;
    }

    .project {
        padding: 20px;
    }

    .project-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .project-metrics {
        flex-direction: column;
    }

    .project-metrics div {
        width: 100%;
    }

    .stats {
        flex-direction: column;
        align-items: center;
    }

    .stats div {
        width: 90%;
        max-width: 280px;
    }

    .tech-stack,
    .tech-badges {
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        height: 90%;
    }

    section {
        padding: 40px 15px;
    }

    #topBtn {
        width: 50px;
        height: 50px;
        right: 15px !important;
        bottom: 15px !important;
    }
}

html,
body {
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}
