:root {
    --accent: #6c63ff;
    --bg: #f7f8fc;
    --text: #333;
    --muted: #777;
    --card: #fff;
    }

body.dark {
    --accent: #8b7bff;
    --bg: #1e1e2a;
    --text: #eee;
    --muted: #aaa;
    --card: #2b2b3b;
    }

* {
    box-sizing: border-box;
    transition: background 0.4s ease, color 0.4s ease;
    }

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    }

/* ===== HEADER ===== */
header {
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo h2 {
    color: var(--accent);
    margin: 0;
    font-size: 1.3rem;
}

.theme-toggle {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    opacity: 0.85;
}

body.dark .theme-toggle {
    color: #ffd700;
}

/* ===== MAIN CONTENT ===== */
.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.blog-container {
    background: var(--card);
    max-width: 850px;
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hero {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.content {
    padding: 30px;
}

h1 {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 10px;
    }

.meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

p {
    color: var(--text);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 20px;
}

h2 {
    color: var(--text);
    font-size: 1.3rem;
    border-left: 5px solid var(--accent);
    padding-left: 10px;
    margin-top: 30px;
    margin-bottom: 15px;
}

blockquote {
    background: rgba(108, 99, 255, 0.1);
    border-left: 4px solid var(--accent);
    padding: 15px 20px;
    border-radius: 18px;
    font-style: italic;
    color: var(--text);
    margin: 25px 0;
}

img.inline-img {
    width: 45%;
    border-radius: 10px;
    margin: 10px;
    float: right;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.clear {
    clear: both;
}

/* ===== FOOTER ===== */
footer {
    background: var(--card);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: var(--text);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

footer span {
    color: var(--accent);
    font-weight: 600;
}

.social-icons {
    margin-top: 10px;
}

.social-icons a {
    color: var(--accent);
    margin: 0 8px;
    font-size: 1.2rem;
    transition: 0.3s;
}

.social-icons a:hover {
    opacity: 0.7;
}

/* ===== BACK TO TOP ===== */
#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    animation: fadeIn 0.4s ease;
}

#backToTop:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

@keyframes fadeIn {
    from {
    opacity: 0;
    transform: translateY(10px);
    }
    to {
    opacity: 1;
    transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .content {
    padding: 20px;
    }

    img.inline-img {
    width: 100%;
    float: none;
    margin: 0 0 15px 0;
    }

    h1 {
    font-size: 1.6rem;
    }

    h2 {
    font-size: 1.1rem;
    }
}
