:root {
    /* Modern Palette */
    --bg-dark: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glass-hover: rgba(255, 255, 255, 0.2);

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    --accent-primary: #818cf8;
    /* Soft Indigo */
    --accent-secondary: #c084fc;
    /* Soft Purple */
    --accent-glow: rgba(129, 140, 248, 0.5);

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-xl: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;

    /* Dynamic Background */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(129, 140, 248, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(192, 132, 252, 0.15), transparent 25%);
    background-attachment: fixed;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-glass-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Layout */
.app {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 40px;
    height: fit-content;
    padding: 30px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: all 0.3s ease;
}

.sidebar:hover {
    border-color: var(--border-glass-hover);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 10px 25px var(--accent-glow);
    animation: float 6s ease-in-out infinite;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.profile-bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(5px);
}

.nav-item a.active {
    background: rgba(129, 140, 248, 0.1);
    color: var(--accent-primary);
    border-color: rgba(129, 140, 248, 0.2);
    box-shadow: 0 0 15px rgba(129, 140, 248, 0.1);
}

.nav-icon {
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    animation: fadeIn 0.5s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.page-title {
    margin-bottom: 50px;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--accent-primary), transparent);
    border-radius: 2px;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.content-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.content-card:hover::before {
    transform: translateX(100%);
}

.content-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background: var(--bg-card-hover);
}

.card-date {
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.card-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.content-card:hover .read-more {
    gap: 12px;
    color: #fff;
}

/* Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-reading {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-finished {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* Article Page */
.article-container {
    max-width: 750px;
    color: #e2e8f0;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: #fff;
    margin-top: 2em;
    margin-bottom: 0.8em;
}

.article-content h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 20px;
}

.article-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 1.5em;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-secondary);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-secondary);
    background: linear-gradient(to right, rgba(192, 132, 252, 0.1), transparent);
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.article-content code {
    background: rgba(255, 255, 255, 0.1);
    color: #ff79c6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
}

.article-content pre {
    background: #1e1e24;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    overflow-x: auto;
    margin: 30px 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.article-content pre code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
}

.article-content img {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 40px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--bg-card-hover);
    color: white;
    transform: translateX(-5px);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .app {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sidebar {
        position: relative;
        top: 0;
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: center;
    }

    .nav-item a {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .page-title h1 {
        font-size: 2.2rem;
    }
}

/* Image/Video Max Width Fix */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
}