html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: 90px;
    font-family: sans-serif;
    background: linear-gradient(-45deg, #0f172a, #1e293b, #0ea5e9);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: white;
    text-align: center;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

.profile-pic {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid #38bdf8;
    box-shadow: 0 0 25px rgba(56,189,248,0.6);
    transition: 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}


section {
    padding: 40px 20px;
}

h1 {
    margin-bottom: 10px;
}

h2 {
    color: #38bdf8;
}

img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}
a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #38bdf8;
    color: black;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

a:hover {
    background-color: #0ea5e9;
}

.project-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    width: 300px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(40px);
    transition: 
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.card.show {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px rgba(56,189,248,0.3);
}

.card h3 {
    margin-bottom: 10px;
    color: #38bdf8;
}

.card p {
    opacity: 0.8;
    font-size: 14px;
}

section {
    padding: 60px 20px;
    max-width: 1000px;
    margin: auto;
}

nav {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
}

.nav-container {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.logo span {
    color: #38bdf8;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #38bdf8;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 10001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: white;
    transition: 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 9998;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: #0f172a;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: 0.4s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }
}



@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}


.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
}

@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        right: 0;
        background-color: #0f172a;
        width: 200px;
        flex-direction: column;
        align-items: center;
        display: none;
        padding: 20px 0;
        border-radius: 8px;
    }

    .nav-links.active {
        display: flex;
    }

}

body.light-mode {
    background-color: #f1f5f9;
    color: black;
}

body.light-mode header,
body.light-mode .card {
    background-color: white;
    color: black;
}

#theme-toggle {
    margin-left: 15px;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.hero {
    padding-top: 120px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(56,189,248,0.15), transparent 60%);
    z-index: -1;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.highlight {
    color: #38bdf8;
}

.hero h2 {
    font-size: 28px;
    height: 40px;
    margin-bottom: 15px;
}
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}


.hero-buttons a {
    margin: 10px;
}

#typing::after {
    content: '|';
    animation: blink 0.8s infinite;
}

@keyframes blink {
    50% { opacity: 0;}
}

@keyframes gradientBG {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, #38bdf8, #9333ea);
    z-index: 10000;
}

.blob {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0,4;
    z-index: -1;
    animation: moveBlob 20s infinite alternate ease-in-out;
}

.blob1 {
    background: #38bdf8;
    top: -100px;
    left: -100px;
}

.blob2 {
    background: #9333ea;
    bottom: -100px;
    right: -100px;
    animation-duration: 25s;
}

@keyframes moveBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(100px, -50px) scale(1.2);
    }
    100% {
        transform: translate(-50px, 80px) scale(1);
    }
}

#peogress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, #38bdf8, #8b5cf6);
    z-index: 10000;
    transition: width 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

nav.hidden {
    transform: translateY(-100%);
    transition: 0.3s ease;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

#loader {
    position: fixed;
    inset: 0;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255,255,255,0.1);
    border-top: 5px solid #38bdf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

#loader h2 {
    color: white;
    font-weight: 500;
    letter-spacing: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

section {
    padding: 80px 20px;
}

@media (max-width: 768px) {
    section {
        padding: 60px 20px;
    }
}
