

:root {
    --color-1: #DED9F6;
    --color-2: #C3B4E5;
    --color-3: #A083C9;
    --color-4: #8058AC;
    --color-5: #592986;
    --color-accent: #6400FF;
    --glass-bg: rgba(222, 217, 246, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-color: rgba(0, 0, 0, 0.25);
    --code-bg: rgba(40, 44, 52, 0.8);

    /* Theme Variables */
    --navbar-bg: rgba(89, 41, 134, 0.1);
    --navbar-scrolled: linear-gradient(135deg, var(--color-5) 0%, var(--color-accent) 100%);
    --text-color: white;
    --body-bg: #121212;
    --content-bg: #1e1e1e;
    --theme-transition: all 0.4s ease;
}

a {
    color: inherit;
    text-decoration: none;
  }
  
  a:hover,
  a:focus,
  a:active {
    color: inherit;
    text-decoration: none;
  }
  

/* Light Theme Variables */
html[data-theme="light"] {
    --navbar-bg: rgba(255, 255, 255, 0.8);
    --navbar-scrolled: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    --text-color: #333;
    --body-bg: #ffffff;
    --content-bg: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--theme-transition);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    transition: var(--theme-transition);
}

.content-area {
    background-color: var(--content-bg);
    min-height: 100vh;
    padding-top: 100px;
    transition: var(--theme-transition);
}

/* Glassmorphism Navbar Styling */
#mainNavbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 8px 32px var(--shadow-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

#mainNavbar.scrolled {
    background: var(--navbar-scrolled);
    padding: 12px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.brand-text {
    color: var(--text-color);
    opacity: 0.9;
}

.brand-accent {
    color: var(--color-accent);
    font-size: 1.1rem;
    position: relative;
    margin-left: 2px;
}

.brand-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    bottom: -3px;
    right: -12px;
    box-shadow: 0 0 15px var(--color-accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(100, 0, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(100, 0, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(100, 0, 255, 0);
    }
}

.navbar-brand:hover {
    transform: translateY(-3px);
}

.navbar-brand:hover .brand-text {
    color: var(--text-color);
    opacity: 1;
}

/* Custom Hamburger Menu */
.menu-toggler-bars {
    width: 30px;
    height: 25px;
    position: relative;
    cursor: pointer;
}

.menu-toggler-bars span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text-color);
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.menu-toggler-bars span:nth-child(1) {
    top: 0px;
}

.menu-toggler-bars span:nth-child(2) {
    top: 10px;
    width: 80%;
    right: 0;
    left: auto;
}

.menu-toggler-bars span:nth-child(3) {
    top: 20px;
}

.navbar-toggler[aria-expanded="true"] .menu-toggler-bars span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.navbar-toggler[aria-expanded="true"] .menu-toggler-bars span:nth-child(2) {
    opacity: 0;
    right: -30px;
}

.navbar-toggler[aria-expanded="true"] .menu-toggler-bars span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

.navbar-toggler {
    border: none;
    padding: 10px;
    background: transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

/* Navigation Links */
.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 18px;
    margin: 0 2px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.nav-icon {
    margin-right: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-text {
    position: relative;
}

.nav-text::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover .nav-text::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    border-radius: 12px;
    top: 0;
    left: -100%;
    transition: all 0.3s ease;
    z-index: -1;
}

.nav-link:hover {
    color: var(--text-color);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    left: 0;
}

.nav-link:hover .nav-icon {
    transform: rotateY(180deg);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
}

.nav-link.active .nav-text::before {
    transform: scaleX(1);
}

/* Button Styling */
.menu-btn {
    background: linear-gradient(135deg, var(--color-1), var(--color-2));
    color: var(--color-5);
    border: none;
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-5));
    transition: all 0.4s ease;
    z-index: -1;
    border-radius: 30px;
}

.btn-text {
    z-index: 2;
    transition: all 0.3s ease;
}

.btn-icon {
    margin-left: 8px;
    z-index: 2;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.menu-btn:hover::before {
    width: 100%;
}

.menu-btn:hover .btn-icon {
    transform: translateX(5px);
}

.menu-btn:active {
    transform: translateY(-1px);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-5) 0%, var(--color-accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--color-1);
    border-radius: 50%;
    border-top-color: var(--color-accent);
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Theme Toggle Styles */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    margin-left: 15px;
    background: rgba(100, 0, 255, 0.2);
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    border: 1px solid var(--glass-border);
}

.theme-toggle .toggle-icon {
    font-size: 14px;
    color: var(--text-color);
    z-index: 1;
    transition: all 0.3s ease;
}

.theme-toggle .toggle-icon.moon {
    margin-left: 5px;
}

.theme-toggle .toggle-icon.sun {
    margin-right: 5px;
    color: #ffd700;
}

html[data-theme="light"] .theme-toggle .toggle-icon.sun {
    color: #ff8c00;
}

html[data-theme="dark"] .theme-toggle .toggle-icon.moon {
    color: #c0c0c0;
}

.theme-toggle .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 25px;
    height: 25px;
    background: var(--color-accent);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .theme-toggle .toggle-slider {
    left: 33px;
    background: #ffc107;
}

.theme-toggle:hover .toggle-slider {
    transform: scale(1.1);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* Card styling for content */
.content-card {
    background-color: var(--content-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px var(--shadow-color);
    border: 1px solid var(--glass-border);
    transition: var(--theme-transition);
}

.content-card h2 {
    color: var(--text-color);
    margin-bottom: 15px;
    transition: var(--theme-transition);
}

.content-card p {
    color: var(--text-color);
    opacity: 0.8;
    transition: var(--theme-transition);
}

@media (max-width: 767px) {
    .theme-toggle {
        margin: 15px 0;
    }

    .content-area {
        padding-top: 90px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    background-color: var(--content-bg);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-4);
}

::-webkit-scrollbar-track {
    background-color: var(--body-bg);
    border-radius: 10px;
}

/* Theme Transition Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-item:nth-child(2) {
    animation-delay: 0.2s;
}

.nav-item:nth-child(3) {
    animation-delay: 0.3s;
}

.nav-item:nth-child(4) {
    animation-delay: 0.4s;
}

.nav-item:nth-child(5) {
    animation-delay: 0.5s;
}

.nav-item:nth-child(6) {
    animation-delay: 0.6s;
}

.d-flex {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

/* Theme change animation */
.theme-transition {
    animation: themeChange 0.5s ease;
}

@keyframes themeChange {
    0% {
        filter: blur(0);
    }

    50% {
        filter: blur(2px);
    }

    100% {
        filter: blur(0);
    }
}
