:root {
    --primary-color: #0d6efd;
    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', sans-serif;
    padding-top: 56px;
    transition: var(--transition);
}

.transition-all {
    transition: var(--transition);
}

/* --- Navbar --- */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: var(--transition);
}

.nav-link {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.navbar .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: bold;
}

/* --- Hero Section (Homepage) --- */
#homepage {
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #f3f7fa, #eaeff2, #e6ebef, #f3f7fa);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-image-container {
    position: relative;
    z-index: 5;
}

.hero-image-container img {
    animation: float 6s ease-in-out infinite;
    transition: var(--transition);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

#typewriter {
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary-color);
    }
}

/* --- Background Shapes --- */
.bg-shape {
    position: absolute;
    opacity: 0.12;
    z-index: 1;
    animation: floatShape 25s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: -150px;
    left: -150px;
    animation-duration: 30s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background-color: #198754;
    border-radius: 40px;
    transform: rotate(45deg);
    bottom: -100px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background-color: #ffc107;
    border-radius: 20px;
    top: 40%;
    right: 15%;
    animation-duration: 20s;
    animation-delay: -2s;
}

@keyframes floatShape {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-40px) rotate(15deg);
    }
}

/* --- Global Elements --- */
.btn-lg {
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.3);
}

/* --- About & Skills --- */
.skills-container {
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
}

.skills-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.progress,
.progress-bar {
    border-radius: 20px;
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s ease-out;
}

.reveal.show {
    opacity: 1;
    transform: scale(1);
}

/* --- Projects --- */
.project-card {
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.project-card img {
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

/* --- Contact --- */
.form-control {
    padding: 12px 15px;
    border: 2px solid #eee;
    transition: var(--transition);
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* --- Dark Mode Styles --- */
body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

.dark-mode .navbar {
    background-color: rgba(30, 30, 30, 0.95) !important;
    border-bottom: 1px solid #333;
}

.dark-mode .nav-link,
.dark-mode .navbar-brand,
.dark-mode #themeToggle {
    color: white !important;
}

.dark-mode .navbar-toggler {
    filter: invert(1);
}

.dark-mode #homepage {
    background: linear-gradient(-45deg, #161616, #1a1a1a, #1e1e1e, #161616);
}

.dark-mode .bg-shape {
    opacity: 0.05;
}

.dark-mode .card,
.dark-mode section,
.dark-mode .bg-light,
.dark-mode .bg-white,
.dark-mode .skills-container {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}
.dark-mode .btn-outline-dark {
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

.dark-mode .text-dark,
.dark-mode .text-muted,
.dark-mode .lead {
    color: #b0b0b0 !important;
}

.dark-mode .form-control {
    background-color: #2d2d2d;
    border-color: #444;
    color: white;
}
.interests-container .badge {
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.interests-container .badge:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
}

body.dark-mode .interests-container .badge {
    background-color: #2b2b2b !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

#backToTop{
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
}