/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* ===== Body ===== */
body {
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

/* ===== Navbar ===== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 60px;
    background-color: #050a11;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .logo {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

/* underline effect */
nav ul li a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: #ffd43b;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: #ffd43b;
}

/* ===== Home Section ===== */
.home {
    position: relative;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background: linear-gradient(to right, #57418b, #4dabf7);
}

/* 🇮🇳 Indian Flag – Slow Wave Animation */
.home::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("assets/india-flag.png");
    background-size: 120%;
    background-position: center;
    opacity: 0.12;
    z-index: 0;

    animation: flagWave 18s ease-in-out infinite;
}

/* content above flag */
.home > * {
    position: relative;
    z-index: 1;
}

.home h1 {
    font-size: 40px;
    margin-bottom: 10px;
}

.home h1 span {
    color: #ffd43b;
}

.home p {
    font-size: 20px;
    margin-bottom: 20px;
}

/* ===== Buttons ===== */
button {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    background-color: #ffd43b;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    background-color: #ffca2c;
}

/* ===== Profile Image ===== */
.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffd43b;
    margin-bottom: 20px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-img:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255,212,59,0.8);
}

/* ===== Section Common ===== */
section {
    padding: 60px 80px;
    scroll-margin-top: 80px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #201b52;
}

/* ===== About Section ===== */
#about p {
    max-width: 800px;
    margin: auto;
    text-align: center;
    font-size: 18px;
}

/* ===== Projects Section ===== */
#projects ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: auto;
}

#projects li {
    list-style: none;
    padding: 20px;
    background: white;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#projects li:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* ===== Contact Section ===== */
#contact form {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contact input,
#contact textarea {
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#contact textarea {
    resize: none;
    height: 120px;
}

#contact button {
    background-color: #0d6efd;
    color: white;
}

#contact button:hover {
    background-color: #80ff00;
    color: black;
}

#formMsg {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

/* ===== Social Icons ===== */
.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: white;
    font-size: 28px;
    transition: 0.3s;
}

.social-icons a:hover {
    color: #ffd43b;
    transform: scale(1.2);
}

/* ===== Footer ===== */
footer {
    background-color: #0e1012;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
}

footer p {
    font-size: 14px;
}

/* ===== Dark Mode Button ===== */
.theme-btn {
    background: transparent;
    border: 2px solid #ffd43b;
    color: #ffd43b;
    padding: 6px 10px;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
}

/* ===== Dark Mode Styles ===== */
body.dark {
    background-color: #0d1117;
    color: #e6edf3;
}

body.dark nav {
    background-color: #010409;
}

body.dark section h2 {
    color: #58a6ff;
}

body.dark #projects li {
    background-color: #161b22;
    color: white;
}

body.dark footer {
    background-color: #010409;
}

body.dark input,
body.dark textarea {
    background-color: #161b22;
    color: white;
    border: 1px solid #30363d;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 10px;
    }

    section {
        padding: 40px 20px;
    }

    .home h1 {
        font-size: 32px;
    }
}
@keyframes flagWave {
    0% {
        background-position: 50% 50%;
    }
    25% {
        background-position: 52% 48%;
    }
    50% {
        background-position: 48% 52%;
    }
    75% {
        background-position: 51% 49%;
    }
    100% {
        background-position: 50% 50%;
    }
}
@keyframes flagWaveMobile {
    0% {
        background-position: 50% 50%;
    }
    50% {
        background-position: 51% 49%;
    }
    100% {
        background-position: 50% 50%;
    }
}
/* ===== Mobile-specific Animation Tuning ===== */
@media (max-width: 768px) {

    /* Indian flag animation lighter on mobile */
    .home::before {
        opacity: 0.07;              /* more subtle */
        background-size: 140%;      /* smoother wave */
        animation: flagWaveMobile 28s ease-in-out infinite;
    }

    /* Reduce section animation distance */
    section {
        transform: translateY(20px);
        transition: all 0.6s ease;
    }

    .profile-img:hover {
        transform: scale(1.03);    /* less aggressive zoom */
    }
}
