/* article_style.css */
:root {
    --primary-dark: #0a0e17;
    --secondary-dark: #111827;
    --darker: #0a0f1a;
    --accent-neon: #00f0ff;
    --accent-purple: #8a2be2;
    --accent-pink: #ff00c8;
    --accent-green: #00ff8c;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --border-radius: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
    --sidebar-width: 280px;
    --nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effect (Subtle) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.05) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-neon);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 35px;
    /* Slightly smaller for articles page if needed, or keep 40px */
    width: auto;
    margin-right: 10px;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.home-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-link:hover {
    color: var(--accent-neon);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Layout Container */
.main-wrapper {
    display: flex;
    padding-top: var(--nav-height);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(17, 24, 39, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    height: calc(100vh - var(--nav-height));
    position: fixed;
    top: var(--nav-height);
    left: 0;
    overflow-y: auto;
    padding: 2rem 1rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    z-index: 900;
}

.sidebar-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-link.active {
    color: var(--accent-neon);
    background: rgba(0, 240, 255, 0.1);
    border-left: 3px solid var(--accent-neon);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1), transparent);
    opacity: 0.5;
}

/* Content Area */
.content-area {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 3rem 4rem;
    max-width: 1200px;
}

.article-header {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a0aec0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 800px;
}

/* Topics Sections */
.topic-section {
    margin-bottom: 5rem;
    scroll-margin-top: calc(var(--nav-height) + 2rem);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.topic-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.topic-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-neon);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topic-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-neon), transparent);
    opacity: 0.3;
}

.topic-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition-normal);
}

.topic-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* New Image Layout Styles */
.card-content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.card-image {
    width: 320px;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--border-radius);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    background-color: rgba(255, 255, 255, 0.02);
}

.topic-card:hover .card-image {
    transform: scale(1.02);
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    margin-top: 0;
    /* Remove top margin when inside flex container */
    line-height: 1.3;
}

.card-summary {
    list-style: none;
    margin-bottom: 1.5rem;
}

.card-summary li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.card-summary li::before {
    content: '•';
    color: var(--accent-purple);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.4rem;
}

.source-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-neon);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.source-btn:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        background: rgba(10, 14, 23, 0.95);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
        padding: 2rem 1.5rem;
    }

    .mobile-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .card-content-wrapper {
        flex-direction: column;
    }

    .card-image {
        width: 100%;
        height: 250px;
        margin-bottom: 1.5rem;
    }
}