/* ==========================================================================
   CSS Variables for easy theming and clean code
   ========================================================================== */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333333;
    
    /* Gradient background to give a premium, modern feel */
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    
    /* Variables for glassmorphism effect */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* Dark Mode Support (Optional enhancement that looks amazing) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f5f5f5;
        --bg-gradient: linear-gradient(135deg, #1f1c2c 0%, #928DAB 100%);
        --glass-bg: rgba(20, 20, 20, 0.4);
        --glass-border: rgba(255, 255, 255, 0.1);
        --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    }
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Ensures padding doesn't break layout widths */
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background: var(--bg-gradient);
    
    /* Ensure the body takes up at least full height to keep footer at bottom */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    background-attachment: fixed;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    font-weight: 300;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px); /* Creates the blurred glass effect */
    border-bottom: 1px solid var(--glass-border);
    position: sticky; /* Keeps navbar at the top while scrolling */
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

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

.nav-links a {
    color: var(--text-color);
    font-weight: 600;
    position: relative;
}

/* Elegant underline animation on hover for links */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Hidden by default on desktop */
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Container (Centered Layout) */
.container {
    flex: 1; /* Expands to fill available space, pushing footer down */
    width: 100%;
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Modern Glassmorphism Card Style */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    width: 100%;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

/* Micro-animation when hovering over cards */
.glass-card:hover {
    transform: translateY(-5px);
}

/* Home Page */
.home-hero {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    margin-top: 1rem;
    background: var(--accent-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background: #2980b9;
    color: white;
    transform: scale(1.05); /* Slight pop effect */
}

/* Blog Page */
.page-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.post-title {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.post-date {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    margin-top: auto; /* Ensures it stays at bottom */
}

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

.social-icons a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px); /* Jump effect on hover */
}

/* ==========================================================================
   Responsive Design (Mobile View)
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show hamburger icon on small screens */
    }

    .nav-links {
        display: none; /* Hide links initially on mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        padding: 1rem 0;
        border-bottom: 1px solid var(--glass-border);
    }

    /* Toggled by JavaScript */
    .nav-links.show {
        display: flex; 
    }

    .nav-links li {
        text-align: center;
        margin: 1rem 0;
    }
}
