:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f8fafc;
    --bg-dark: #1a202c;
    --text-dark-mode: #e2e8f0;
    --bg-dark-mode: #121212;
    --card-dark-mode: #2d3748;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.dark-theme {
    --text-dark: #e2e8f0;
    --text-light: #a0aec0;
    --bg-light: #1a202c;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background-color: var(--bg-dark-mode);
    color: var(--text-dark-mode);
}
.navbar {
    background: var(--bg-dark);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem 0;
    border-radius: 50px;
    width: calc(100% - 60px);
    margin: 20px auto 0 auto;
    left: 0;
    right: 0;
    top: 0;
    position: fixed;
    z-index: 1030;
}
.navbar.scrolled {
    background: var(--bg-dark-mode);
    box-shadow: var(--shadow-medium);
    padding: 0.5rem 0;
    border-radius: 40px;
    width: calc(100% - 80px);
    margin: 10px auto 0 auto;
}
.navbar-brand {
    position: relative;
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    transition: all 0.3s ease;
}
.navbar-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.5);
}
.navbar-brand::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background: var(--primary-color);
    transition: width 0.3s ease;
}
.navbar-brand:hover::after {
    width: 100%;
}
.navbar-nav .nav-link {
    position: relative;
    color: var(--text-dark-mode) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 50px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}
.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    opacity: 0.15;
    transform: scale(1);
}
.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}
.navbar::before,
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.3) 3px, transparent 3px),
                      radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.25) 2.5px, transparent 2.5px),
                      radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.35) 3.5px, transparent 3.5px),
                      radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
                      radial-gradient(circle at 20% 90%, rgba(255, 255, 255, 0.4) 4px, transparent 4px);
    background-size: 100px 100px, 80px 80px, 120px 120px, 150px 150px, 70px 70px;
    animation: moveStars 150s linear infinite;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
}
@keyframes moveStars {
    from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 4000px 4000px, -3000px 3000px, 2000px -2000px, -1000px -4000px, 5000px 1000px; }
}
.navbar-toggler {
    border: none;
    padding: 0;
    z-index: 1050;
}
.navbar-toggler:focus {
    box-shadow: none;
}
.hamburger {
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
}
.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}
.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2), .hamburger span:nth-child(3) { top: 10px; }
.hamburger span:nth-child(4) { top: 20px; }
.hamburger.open span:nth-child(1) {
    top: 10px;
    width: 0%;
    left: 50%;
}
.hamburger.open span:nth-child(2) { transform: rotate(45deg); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg); }
.hamburger.open span:nth-child(4) {
    top: 10px;
    width: 0%;
    left: 50%;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body.menu-open {
    overflow: hidden;
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-2);
}
.hero {
    min-height: 100vh;
    background: var(--gradient-1);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: moveGrid 20s linear infinite;
}
@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 10px); }
}
.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}
.profile-container {
    position: relative;
    display: inline-block;
}
.profile-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-heavy);
}
.profile-img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}
.profile-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--gradient-2);
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s ease;
    z-index: -1;
}
.profile-container:hover .profile-glow {
    opacity: 0.7;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease-out;
}
.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
    color: white;
}
.hero-description {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    animation: fadeInUp 1s ease-out 0.4s both;
    color: white;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Adjustments for button alignment */
.d-flex.flex-wrap.align-items-center.gap-3.mt-3 {
    margin-top: 1rem; /* Adjust this value as needed. Default Bootstrap mt-3 is 1rem.
                         You can reduce it (e.g., 0.5rem or 0) or even use a negative margin
                         (e.g., -0.5rem) to move the buttons higher. */
    /* Example to move it up slightly more than default mt-3: */
    /* margin-top: 0.5rem !important; */
    /* Example to move it up significantly: */
    /* margin-top: -1rem !important; */
}

.btn-enhanced {
    position: relative;
    overflow: hidden;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0; /* Ensure no extra bottom margin for buttons themselves */
}
.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}
.btn-enhanced:hover::before {
    left: 100%;
}
.btn-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}
.btn-primary.btn-enhanced {
    background: var(--gradient-2);
    color: white;
}
.btn-outline-light.btn-enhanced {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
}
.btn-outline-light.btn-enhanced:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}
.section {
    padding: 100px 0;
    position: relative;
    background-color: var(--bg-dark-mode);
    color: var(--text-dark-mode);
    overflow: hidden;
}
.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-dark-mode);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    position: relative;
    z-index: 2;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}
.education-card {
    background: var(--card-dark-mode);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    color: var(--text-dark-mode);
}
.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.education-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}
.education-card:hover::before {
    opacity: 0.1;
}
.skill-card {
    background: var(--card-dark-mode);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    position: relative;
    overflow: hidden;
    color: var(--text-dark-mode);
}
.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}
.skill-card:hover::before {
    opacity: 0.1;
}
.skill-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}
.skill-icon i {
    font-size: 2rem;
    color: white;
}
.skill-card:hover .skill-icon {
    transform: rotate(360deg) scale(1.1);
}
.progress-enhanced {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
}
.progress-bar-enhanced {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    width: 0;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.progress-bar-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.cert-card {
    background: var(--card-dark-mode);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    color: var(--text-dark-mode);
}
.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.cert-card:hover::before {
    transform: translateX(0);
}
.cert-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-heavy);
}
.cert-body {
    padding: 2rem;
}
.cert-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}
.cert-card:hover .cert-logo {
    transform: scale(1.1) rotate(5deg);
}
.contact-info {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--card-dark-mode);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    color: var(--text-dark-mode);
}
.contact-info:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-medium);
    border-left-color: var(--primary-color);
}
.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}
.contact-info:hover .contact-icon {
    transform: rotate(360deg) scale(1.1);
}
.contact-form {
    background: var(--card-dark-mode);
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    color: var(--text-dark-mode);
}
.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-3);
    opacity: 0.02;
    z-index: -1;
}
.form-control {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    background: rgba(45, 55, 72, 0.8);
    color: var(--text-dark-mode);
}
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}
.form-control::placeholder {
    color: var(--text-light);
}
.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-2);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}
.social-link:hover::before {
    transform: scale(1);
}
.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-medium);
    color: white;
}
.social-link i {
    position: relative;
    z-index: 2;
}
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    color: white;
}
footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}
@media (max-width: 991.98px) {
    .hero {
        padding-top: 120px;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.4rem;
    }
    .profile-img {
        width: 200px;
        height: 200px;
    }
    .section-title {
        font-size: 2.5rem;
    }
    .navbar-collapse {
        transition: transform 0.4s ease-in-out;
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background: var(--bg-dark) !important;
        z-index: 1040;
        padding: 2rem;
        overflow-y: auto;
        box-shadow: var(--shadow-heavy);
        display: block;
    }
    .navbar-collapse.show {
        transform: translateX(0);
    }
    .navbar-nav {
        margin-top: 2rem;
    }
    .navbar-nav .nav-link {
        margin: 0.5rem 0;
        padding: 0.75rem 1rem !important;
    }
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1035;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }
    .menu-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    .navbar-close {
        display: none;
    }
}
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.dark-theme .loading {
    background: var(--bg-dark);
}
.loading.fade-out {
    opacity: 0;
    pointer-events: none;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-100px) rotate(180deg); opacity: 0.5; }
}
.skill-item {
    margin-bottom: 1.5rem;
}