:root {
    --primary-color-start: #667eea;
    --primary-color-end: #764ba2;
    --primary-gradient: linear-gradient(135deg, var(--primary-color-start) 0%, var(--primary-color-end) 100%);
    --primary-gradient-90: linear-gradient(90deg, var(--primary-color-start), var(--primary-color-end));

    --text-color-dark: #333;
    --text-color-medium: #555;
    --text-color-light: #777;
    --text-color-white: #fff;

    --bg-color: #f4f7f6;
    --bg-color-light: rgba(255, 255, 255, 0.95);
    --bg-color-light-transparent: rgba(255, 255, 255, 0.9);
    --bg-color-accent-light: rgba(102, 126, 234, 0.05);
    --bg-color-accent-medium: rgba(102, 126, 234, 0.1);

    --border-color: #ddd;
    --shadow-color-light: rgba(0, 0, 0, 0.1);
    --shadow-color-medium: rgba(0, 0, 0, 0.15);
}

body.dark-mode {
    --text-color-dark: #f0f0f0;
    --text-color-medium: #ccc;
    --text-color-light: #aaa;
    --text-color-white: #fff;

    --bg-color: #121212;
    --bg-color-light: rgba(29, 29, 31, 0.85);
    --bg-color-light-transparent: rgba(29, 29, 31, 0.75);
    --bg-color-accent-light: rgba(255, 255, 255, 0.05);
    --bg-color-accent-medium: rgba(255, 255, 255, 0.1);

    --border-color: #444;
    --shadow-color-light: rgba(255, 255, 255, 0.05);
    --shadow-color-medium: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: var(--bg-color);
}

/* Navigation Bar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-color-light);
    box-shadow: 0 2px 10px var(--shadow-color-light);
    padding: 0 2rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.lang-switcher a {
    text-decoration: none;
    color: var(--text-color-light);
    transition: color 0.3s ease;
}

.lang-switcher a:hover {
    color: var(--text-color-dark);
}

.lang-switcher a.active {
    color: var(--primary-color-start);
    font-weight: 700;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--primary-gradient-90);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: var(--text-color-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    margin: 0 1rem;
    background: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color-start);
    border-radius: 5px;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.nav-links a:hover {
    color: var(--primary-color-start);
    background: none;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-links a.active {
    color: var(--primary-color-start);
    background: none;
}

.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.menu-toggle span {
    background: var(--text-color-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.page-card {
    background: var(--bg-color-light);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow-color-light);
    padding: 3rem;
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient-90);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
    color: var(--primary-color-start);
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color-medium);
}

footer {
    margin-top: 2rem;
    padding: 1.5rem 0; /* Keep padding */
    text-align: center;
    /* color property moved to footer p */
    font-size: 1.1rem; /* Keep increased font size */
    /* Remove background-color and box-shadow for light mode */
}

footer p { /* New rule for paragraph inside footer */
    color: var(--text-color-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Added dark shadow for readability on gradient */
}

body.dark-mode footer {
    color: var(--text-color-dark); /* Keep dark mode text color */
    background-color: transparent; /* Remove background color in dark mode */
    box-shadow: none; /* Remove shadow in dark mode */
}

body.dark-mode footer p { /* Ensure no text-shadow in dark mode */
    text-shadow: none;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-dark);
    transition: background-color 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--bg-color-accent-medium);
}

.moon-icon {
    display: none;
}

.dark-mode .sun-icon {
    display: none;
}

.dark-mode .moon-icon {
    display: block;
}

.pill-nav {
    display: none; /* Hidden by default */
}

@media (max-width: 768px) {
    .navbar {
        display: none; /* Hide top navbar on mobile */
    }

    .pill-nav {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--bg-color-light-transparent);
        backdrop-filter: blur(12px);
        border-radius: 50px;
        box-shadow: 0 5px 20px var(--shadow-color-medium);
        z-index: 1100;
        padding: 5px;
        gap: 5px;
    }

    .pill-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        text-decoration: none;
        color: var(--text-color-dark);
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .pill-link.active {
        background-color: var(--primary-color-start);
        color: var(--text-color-white);
    }

    .pill-icon {
        transition: transform 0.2s ease-in-out;
    }

    .pill-link.active .pill-icon {
        transform: scale(1.25);
    }

    .pill-link svg {
        width: 24px;
        height: 24px;
    }

    body {
        padding-top: 2rem; /* Reduce top padding */
        padding-bottom: 90px; /* Add padding to bottom to avoid overlap */
    }
    
    .container {
        padding: 1rem; /* Reduce container padding */
    }

    .page-card {
        padding: 1.5rem; /* Adjust card padding */
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem; /* Adjust h2 font size */
    }
    
    p {
        font-size: 1rem; /* Adjust paragraph font size */
    }

    /* Hide original mobile menu */
    .menu-toggle,
    .nav-links {
        display: none !important;
    }
}