/* Theme definitions */
:root[data-theme="gruvbox-light"] {
    --black: #fbf1c7;
    --text: #3c3836;
    --text-secondary: #504945;
    --blue: #076678;
    --light-blue: #427b58;
    --red: #cc241d;
}

:root[data-theme="gruvbox-dark"] {
    --black: #1d2021;
    --text: #ebdbb2;
    --text-secondary: #d5c4a1;
    --blue: #83a598;
    --light-blue: #8ec07c;
    --red: #fb4934;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--black);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--text-secondary);
    margin-bottom: 1rem;
    width: 75%;
    margin: 0 auto;
}

header h1 {
    font-size: 3rem;
    color: var(--red);
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    color: var(--red);
}

main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
}

section:not(:last-child) {
    border-bottom: 1px solid var(--text-secondary);
}

h2 {
    color: var(--light-blue);
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 1rem;
}

h3 {
    color: var(--red);
    font-size: 1.1rem;
    font-weight: 550;
    margin: 1rem 0;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 18px;
}

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

.social-links a {
    color: var(--text);
    font-size: 1.2rem;
}

.social-links a:hover {
    color: var(--red);
}

a {
    color: var(--light-blue);
    text-decoration: none;
}

a:hover {
    color: var(--red);
}

footer {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

code {
    color: var(--light-blue);
    font-size: 0.9em;
}

.theme-switcher {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.theme-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.theme-btn:hover {
    color: var(--red);
}

.theme-btn.active {
    color: var(--red);
    font-weight: bold;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.3rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    main {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    p {
        font-size: 14px;
    }

    .theme-switcher {
        top: auto;
        bottom: 1rem;
        right: 1rem;
    }

    .theme-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.1rem;
    }

    nav ul {
        gap: 0.3rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 0.9rem;
    }

    p {
        font-size: 14px;
    }
}

/* Back button styles */
.back-to-blog {
    margin: 1rem 0;
    padding: 0 1rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--text-secondary);
    color: var(--black);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.back-button:hover {
    background: var(--red);
    color: var(--black);
    transform: translateX(-4px);
    border-color: var(--red);
}

.back-button i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .back-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
