/* Synergy Blog Master Premium Stylesheet - Scholarly Academic UI */
:root {
    --bg: #FAF9F5; /* Elegant Warm Paper Off-White */
    --surface: #FFFFFF; /* High-contrast clean white surface */
    --border: #E2E8F0; /* Clean thin slate borders */
    --border-glow: rgba(30, 41, 59, 0.08);
    --text: #1F2937; /* Dark elegant charcoal for legibility */
    --muted: #4B5563; /* Slate grey for metadata and secondary content */
    --purple: #1E3A8A; /* Academic deep blue accent */
    --cyan: #B91C1C; /* prestigious cardinal crimson for highlighting */
    --accent-glow: rgba(30, 41, 59, 0.02);
    --card-bg: #FFFFFF;
    --input-bg: #FCFBFA;
    --btn-text: #FFFFFF;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #0B0E17; /* Deep academic ink-black */
    --surface: #131724; /* Polished dark marble card surface */
    --border: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(34, 211, 238, 0.08);
    --text: #E5E7EB; /* High legibility silver */
    --muted: #9CA3AF;
    --purple: #A78BFA; /* Elegant soft amethyst */
    --cyan: #38BDF8; /* Soft blue sky */
    --accent-glow: rgba(167, 139, 250, 0.03);
    --card-bg: #131724;
    --input-bg: #0C0F1A;
    --btn-text: #0B0E17;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text);
}

body {
    background-color: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.4s ease;
}

/* Ambient Backdrops - Academic Warm Grain */
.ambient-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    filter: blur(80px);
    pointer-events: none;
}
.ambient-1 { top: -200px; left: -100px; }
.ambient-2 { bottom: -200px; right: -100px; }

/* Navigation Bar - Scholarly Sleek Layout */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    backdrop-filter: blur(16px);
    border-bottom: 2px double var(--border);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.nav-brand {
    text-decoration: none;
    font-size: 24px;
    transition: var(--transition);
}

.nav-brand span {
    color: var(--purple);
    font-weight: 800;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--purple);
    border-bottom: 1px solid var(--purple);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Base Buttons - Prestige Accent */
.btn-primary {
    background: var(--purple);
    color: var(--btn-text) !important;
    border: 1px solid var(--purple);
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-primary * {
    color: var(--btn-text) !important;
}

.btn-primary:hover {
    background: transparent;
    color: var(--purple) !important;
}

.btn-primary:hover * {
    color: var(--purple) !important;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--purple);
    background: rgba(30, 41, 59, 0.02);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--border);
}

/* Layout Containers */
.wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px;
}

/* Page Hero */
.hero {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.hero p {
    color: var(--muted);
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 18px;
    max-width: 650px;
    margin: 0 auto;
}

/* Tags and Categories Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.tag-badge {
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    transition: var(--transition);
}

.tag-badge:hover, .tag-badge.active {
    border-color: var(--purple);
    color: var(--purple);
    background: rgba(30, 41, 59, 0.03);
}

/* Search Box */
.search-container {
    max-width: 550px;
    margin: 0 auto 50px auto;
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 20px;
    font-size: 14px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 10px var(--border-glow);
}

/* Grids and Cards - Clean Structured Double-Border Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-3px);
    border-color: var(--purple);
    box-shadow: 0 10px 25px rgba(30, 41, 59, 0.05);
}

.card-banner {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.card-title:hover {
    color: var(--purple);
}

.card-excerpt {
    color: var(--muted);
    font-family: 'Lora', serif;
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px dashed var(--border);
    padding-top: 16px;
    margin-top: auto;
}

.author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 13px;
    font-weight: 700;
}

.card-stats {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

/* User Menu & Dropdowns */
.user-menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu-trigger img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.user-menu-trigger:hover img {
    border-color: var(--purple);
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 8px var(--border-glow);
}

/* Footer Section */
.footer {
    border-top: 2px double var(--border);
    padding: 40px 20px;
    background: var(--surface);
    margin-top: 80px;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }
    .hero h1 {
        font-size: 34px;
    }
    .nav-menu {
        gap: 15px;
    }
}
