:root {
    /* Light Mode Watercolor Palette */
    --bg-gradient: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
    /* Fallback */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    --text-color: #2D3436;
    --accent-color: #6C5CE7;
    --accent-secondary: #00CEC9;
    --secondary-text: #636E72;

    --nav-bg: rgba(255, 255, 255, 0.8);
    --border-radius: 16px;

    /* Typography */
    --font-heading: 'Merriweather', serif;
    /* Softer serif */
    --font-body: 'Quicksand', sans-serif;
    /* Rounded sans-serif */
}

body.dark-mode {
    /* Dark Mode Watercolor Palette (Deep Dream) */
    --glass-bg: rgba(30, 30, 40, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    --text-color: #E2E8F0;
    --secondary-text: #B2BEC3;
    --nav-bg: rgba(30, 30, 40, 0.8);
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.7;

    /* Animated Watercolor Background */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;

    display: flex;
    flex-direction: column;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glassmorphism Container Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;

    /* Apply Glass Effect to Nav */
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

.nav-link {
    font-weight: 600;
    color: var(--secondary-text);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

/* Buttons */
button {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    /* Fully rounded pills */
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(4px);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

/* Main Content Area */
.content {
    flex: 1;
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    width: 95%;
    box-sizing: border-box;

    /* Content works best in a glass panel */
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hero h1 {
    font-size: 3.5rem;
    background: -webkit-linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.4rem;
    color: var(--secondary-text);
    max-width: 650px;
    margin: 0 auto;
    font-weight: 500;
}

/* Typography Overrides */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-color);
}

h1 {
    margin-top: 0;
}

h2 {
    font-size: 2.2rem;
    margin-top: 2.5rem;
    border-bottom: 2px solid var(--accent-secondary);
    display: inline-block;
    padding-bottom: 0.5rem;
}

p {
    font-size: 1.15rem;
    color: var(--secondary-text);
    margin-bottom: 1.8rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px dotted var(--accent-secondary);
    transition: all 0.2s;
}

a:hover {
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
    background-clip: text;
    -webkit-background-clip: text;
    border-bottom-style: solid;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    /* Make footer text blend with gradient if valid, or just standard */
    background: transparent;
    /* Let gradient show through */
    margin-top: auto;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Markdown Content Styling */
blockquote {
    border-left: none;
    background: rgba(108, 92, 231, 0.1);
    /* Soft purple tint */
    padding: 1.5rem;
    border-radius: 12px;
    font-style: italic;
    color: var(--text-color);
    position: relative;
}

blockquote::before {
    content: "“";
    font-family: serif;
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: 10px;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}