/* Base Styles */
:root {
    --primary: #9d4edd;
    --primary-dark: #7b2cbf;
    --primary-light: #c77dff;
    --secondary: #240046;
    --dark: #10002b;
    --light: #f8f9fa;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

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

body {
    font-family: 'General Sans', sans-serif;
    line-height: 1.6;
    color: var(--light);
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header Styles */
header {
    background-color: rgba(16, 0, 43, 0.95);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links li a:hover, 
.nav-links li a.active {
    color: var(--primary);
}

.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.hamburger-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Writeups Hero Section */
.writeups-hero {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(rgba(16, 0, 43, 0.8), rgba(36, 0, 70, 0.8)), 
                url('https://images.unsplash.com/photo-1510511233900-1982d92bd835?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    margin-bottom: 40px;
}

.writeups-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.writeups-hero span {
    color: var(--primary);
}

.writeups-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--light-gray);
}

/* Categories Section */
.categories {
    margin-bottom: 40px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.category-filter li {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-filter li:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.category-filter li.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Writeups Grid Section */
.writeups {
    padding-bottom: 80px;
}

.writeups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.writeup-card {
    background-color: rgba(36, 0, 70, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.writeup-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.writeup-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image .category {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-content {
    padding: 25px;
}

.card-content h2 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.writeup-card:hover .card-content h2 {
    color: var(--primary);
}

.card-content p {
    color: #b8b8b8;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.85rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background-color: rgba(157, 78, 221, 0.5);
}

.pagination button.active {
    background-color: var(--primary);
}

.pagination button.next {
    width: auto;
    padding: 0 20px;
    border-radius: 20px;
}

/* Footer */
footer {
    background-color: rgba(16, 0, 43, 0.95);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-left h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.footer-left p {
    color: #b8b8b8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .writeups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .writeups-hero h1 {
        font-size: 2.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .writeups-grid {
        grid-template-columns: 1fr;
    }
    
    .writeups-hero h1 {
        font-size: 2rem;
    }
    
    .category-filter {
        gap: 10px;
    }
    
    .category-filter li {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}
/* Mobile Menu Styles */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(16, 0, 43, 0.95);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        display: none;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    /* Hamburger menu animation */
    .hamburger-menu.active i::before {
        content: "\f00d"; /* Font Awesome X icon */
    }
}
