/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light mode colors - Blue palette */
    --bg-primary: #E0E0E0;
    --bg-secondary: #ffffff;
    --text-primary: #0F1F47;
    --text-secondary: #1E3A8A;
    --text-muted: #3B82F6;
    --border-color: #93C5FD;
    --shadow-light: rgba(59, 130, 246, 0.1);
    --shadow-medium: rgba(59, 130, 246, 0.2);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
    --navbar-text: #0F1F47;
    --navbar-text-hover: #1E3A8A;
    --hero-gradient: linear-gradient(135deg, #93C5FD 0%, #3B82F6 50%, #1E3A8A 100%);
    --particle-colors: ["#93C5FD", "#3B82F6", "#1E3A8A", "#0F1F47"];
}

[data-theme="dark"] {
    /* Dark mode colors - Dark gray palette */
    --bg-primary: #202225;
    --bg-secondary: #292b2f;
    --text-primary: #E0E0E0;
    --text-secondary: #93C5FD;
    --text-muted: #3B82F6;
    --border-color: #313338;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --navbar-bg: rgba(59, 130, 246, 0.95);
    --navbar-bg-scrolled: rgba(59, 130, 246, 0.98);
    --navbar-text: #ffffff;
    --navbar-text-hover: #E0E0E0;
    --hero-gradient: linear-gradient(135deg, #24252a 0%, #202225 50%, #292b2f 100%);
    --particle-colors: ["#24252a", "#313338", "#292b2f", "#202225"];
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navbar-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--navbar-text-hover);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--navbar-text);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--navbar-text-hover);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--navbar-text);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dark mode toggle - positioned at navbar level */
.nav-controls {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.toggle-slider {
    width: 60px;
    height: 30px;
    background: #8b5cf6; /* Purple background for light mode */
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

[data-theme="dark"] .toggle-slider {
    background: #fbbf24; /* Yellow background for dark mode */
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.toggle-thumb {
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toggle-thumb {
    transform: translateX(30px);
}

.dark-mode-icon,
.light-mode-icon {
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: absolute;
}

.dark-mode-icon {
    opacity: 1;
    transform: scale(1);
}

.light-mode-icon {
    opacity: 0;
    transform: scale(0);
}

[data-theme="dark"] .dark-mode-icon {
    opacity: 0;
    transform: scale(0);
}

[data-theme="dark"] .light-mode-icon {
    opacity: 1;
    transform: scale(1);
}

.dark-mode-toggle:hover .toggle-slider {
    transform: scale(1.05);
}

.dark-mode-toggle:active .toggle-slider {
    transform: scale(0.95);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1002;
}

.hamburger:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

.hamburger.active {
    background-color: rgba(0, 0, 0, 0.1);
}

.hamburger:focus {
    outline: 2px solid var(--navbar-text);
    outline-offset: 2px;
}

/* Subtle pulse animation for hamburger */
@keyframes hamburger-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hamburger:not(.active):hover {
    animation: hamburger-pulse 2s infinite;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--navbar-text);
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    border-radius: 2px;
}

/* Hamburger to X animation */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Main content */
.main-content {
    margin-top: 70px;
}

/* Hero section */
.hero {
    background: var(--hero-gradient);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#tsparticles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    min-height: 400px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.typing-cursor {
    animation: blink 1s infinite;
    color: #fff;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: white;
    color: #4682B4;
}

.btn-primary:hover {
    background-color: #4682B4;
    color: white;
    border-color: #4682B4;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: #4682B4;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
}

.about {
    background-color: var(--bg-secondary);
}

.about p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.about-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Interests grid */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.interest-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid var(--border-color);
}

.interest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.interest-card h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.interest-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
        margin-right: 80px; /* Add space for dark mode toggle */
    }

    .nav-controls {
        right: 15px;
    }

    /* Mobile menu backdrop */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }

    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-secondary);
        width: 100%;
        max-width: 400px;
        height: calc(100vh - 70px);
        text-align: center;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 40px var(--shadow-medium);
        padding: 3rem 0 2rem 0;
        border-top: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
        transform: translateX(0);
    }

    .nav-menu li {
        margin: 0.5rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        font-weight: 500;
        border-radius: 8px;
        margin: 0 1rem;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        background-color: var(--border-color);
        transform: translateX(5px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-links {
        flex-direction: column;
        align-items: center;
    }

    .interests-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hamburger {
        margin-right: 70px; /* Adjust spacing for smaller screens */
        padding: 6px;
    }

    .bar {
        width: 22px;
        height: 2.5px;
    }

    .nav-menu {
        max-width: 100%;
        padding: 2rem 0 1.5rem 0;
    }

    .nav-link {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        margin: 0 0.5rem;
    }

    .nav-controls {
        right: 5px;
    }

    .toggle-slider {
        width: 50px;
        height: 25px;
    }

    .toggle-thumb {
        width: 21px;
        height: 21px;
    }

    [data-theme="dark"] .toggle-thumb {
        transform: translateX(25px);
    }
}
