* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: 'Times New Roman', Times, serif;
}

:root {
    --bg-gradient: linear-gradient(135deg, #f8fafc, #e9edf3);
    --text-color: #2c2c2c;
    --text-muted: #555;
    --nav-bg: rgba(255, 255, 255, 0.72);
    --nav-border: rgba(255, 255, 255, 0.4);
    --primary-color: #1e3a5f;
    --secondary-color: #3b4f6b;
    --link-color: #444;
    --link-hover: #1e3a5f;
    --icon-color: #1b2a41;
    --icon-hover: #0a66c2;
    --btn-primary-bg: #1e3a5f;
    --btn-primary-text: #ffffff;
    --btn-outline-border: #1e3a5f;
    --btn-outline-text: #1e3a5f;
    --alt-bg: transparent;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.34);
    --badge-bg: #e8f1ff;
    --badge-text: #1e3a5f;
    --badge-border: #d4d8ff;
    --footer-bg: #f8f9fa;
    --input-border: #d0d5dc;
    --input-bg: #ffffff;
}

body.dark-theme {
    --bg-gradient: linear-gradient(135deg, #0f172a, #1e293b);
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --nav-bg: rgba(15, 23, 42, 0.72);
    --nav-border: rgba(255, 255, 255, 0.1);
    --primary-color: #60a5fa;
    --secondary-color: #cbd5e1;
    --link-color: #cbd5e1;
    --link-hover: #60a5fa;
    --icon-color: #e2e8f0;
    --icon-hover: #60a5fa;
    --btn-primary-bg: #60a5fa;
    --btn-primary-text: #0f172a;
    --btn-outline-border: #60a5fa;
    --btn-outline-text: #60a5fa;
    --alt-bg: transparent;
    --card-bg: #1e293b;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --badge-bg: rgba(96, 165, 250, 0.1);
    --badge-text: #60a5fa;
    --badge-border: #334155;
    --footer-bg: #0f172a;
    --input-border: #334155;
    --input-bg: #0f172a;
}

body {
    background: var(--bg-gradient);
    color: var(--text-color);
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 18px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    border-bottom: 1px solid var(--nav-border);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo {
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    font-size: x-large;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: var(--link-color);
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 1.05rem;
    position: relative;
    padding-bottom: 4px;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--link-hover);
    transition: width 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--link-hover);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.theme-btn {
    background: none;
    border: none;
    margin-left: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--icon-color);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
}

.theme-btn:hover {
    color: var(--icon-hover);
    transform: rotate(15deg);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    transition: 0.4s;
}

/* HERO */
.hero {
    align-items: center;
    justify-content: space-between;
    font-size: large;
}

.hero-left h1 {
    font-size: 46px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.hero-left h3 {
    margin: 8px 0 10px;
    color: var(--secondary-color);
    min-height: 28px;
    margin-bottom: 3px;
}

.hero-right img {
    width: 450px;
    border-radius: 20px;
    box-shadow: 10px 10px 5px var(--shadow-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease;

}

.hero-right img:hover {
    transform: scale(1.02);
    box-shadow: 15px 15px 20px var(--shadow-color);
}

.hero-left p {
    margin: 12px auto 15px;
    line-height: 1.6;
    max-width: 550px;
    color: var(--text-muted);
    margin-top: 3px;
    margin-bottom: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hero-left {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* BUTTONS */
.btn {
    padding: 12px 26px;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 2px solid var(--btn-primary-bg);
}

.outline {
    border: 2px solid var(--btn-outline-border);
    color: var(--btn-outline-text);
    background: transparent;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(30, 58, 95, 0.25);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

body.dark-theme .btn:hover {
    box-shadow: 0 12px 30px rgba(96, 165, 250, 0.25);
}

.primary:hover {
    background: transparent;
    color: var(--btn-primary-bg);
}

.outline:hover {
    background: var(--btn-outline-border);
    color: var(--btn-primary-text);
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.social-icons a {
    text-decoration: none;
    color: var(--icon-color);
    font-size: 35px;
    transition: 0.3s ease;
}

.social-icons a:hover {
    color: var(--icon-hover);
    transform: translateY(-4px);
}

/* SPA SECTIONS */
.section {
    padding: 140px 10% 80px;
    text-align: center;
    font-size: large;
    display: none;
    opacity: 0;
    min-height: 100vh;
}

.section.active {
    display: block;
    animation: fadeInSlide 0.5s ease forwards;
}

.hero.section.active {
    display: flex;
}

@keyframes fadeInSlide {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.alt {
    background: var(--alt-bg);
    border-radius: 20px;
    margin: 20px 5%;
    min-height: calc(100vh - 40px);
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 5px 0px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    margin-top: 19px;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 15px var(--shadow-color);
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.skill-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 0px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
    font-weight: bold;
    color: var(--primary-color);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 35px 5px var(--shadow-color);
}

/* PROJECTS */
.badge {
    display: inline-block;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50px;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.badge.ongoing {
    background: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--badge-border);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--badge-border);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.project-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.project-header .badge {
    position: absolute;
    right: 0;
    margin: 0;
}

.project-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 5px 0px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--shadow-color);
}

.project-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.project-card:hover .project-title {
    transform: scale(1.03);
}

.project-desc {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* View Badge for Certifications */
.certification-header {
    position: relative;
    text-align: center;
}

.certification-header p {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.badge.view {
    position: absolute;
    right: 250px;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    background: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--badge-border);
}

/* CONTACT */
.contact-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    margin-top: 50px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-left {
    flex: 1;
    padding-top: 20px;
    text-decoration: none;
    margin-left: 90px;
}

.contact-info a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.contact-info a i {
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--icon-color);
}

.contact-info a:hover {
    color: var(--link-hover);
    transform: translateX(6px);
}

.contact-info a:hover i {
    transform: scale(1.2);
    color: var(--icon-hover);
}

.contact-right {
    flex: 1;
}

.contact-right form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 420px;
}

input,
textarea {
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    transition: border 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}

.form-status {
    min-height: 1.4rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    background: var(--footer-bg);
    color: var(--text-muted);
    transition: background 0.4s ease, color 0.4s ease;
    margin-top: 20px;
}

.dot {
    margin: 0 5px;
    color: var(--text-muted);
    opacity: 0.6;
}

/* Typography elements */
h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

h3,
h4 {
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* MOBILE */
@media(max-width:768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 220px;
        background: var(--nav-bg);
        display: flex;
        flex-direction: column;
        padding-top: 100px;
        transition: 0.4s;
        box-shadow: -5px 0 15px var(--shadow-color);
    }

    nav.active {
        right: 0;
    }

    nav a {
        margin: 15px;
        align-self: center;
    }

    .theme-btn {
        margin: 20px auto;
        font-size: 1.5rem;
    }

    .contact-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin-left: 0;
    }

    .contact-left {
        margin-left: 0;
        text-align: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .badge.ongoing {
        position: static;
        width: fit-content;
        margin: auto auto auto;
    }

    .badge.view {
        position: static;
        display: block;
        width: fit-content;
        margin: 10px auto 0;
        transform: none;
    }

    .alt {
        margin: 20px 2%;
    }
}
