@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* Variables */
:root {
    --light: #fff;
    --light-alt: #afb6cd;
    --bg: #131417;
    --bg-alt: #252830;
    --primary: #4fcf70;
    --gradient: linear-gradient(115deg, #4fcf70, #fad648, #a767e5, #12bcfe, #44ce7b);
    --font: 'Poppins', sans-serif;
    --font-sm: 1.6rem;
    --font-md: 2.4rem;
    --font-lg: 3rem;
    --font-xl: 4rem;
    --gap: 2rem;
}

/* Base */
html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: var(--font-sm);
    background: var(--bg);
    color: var(--light-alt);
    letter-spacing: 1px;
    transition: background 0.4s, color 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(19, 20, 23, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.shrink {
    padding: 1rem 2rem;
    background: rgba(19, 20, 23, 0.95);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4fcf70, #fad648);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.menu-toggle {
    display: none;
    font-size: 3rem;
    color: var(--light);
    cursor: pointer;
}

.menu {
    display: flex;
}

.list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.list-item {}

.list-link {
    position: relative;
    font-size: 1.6rem;
    padding: 0.5rem 1rem;
    color: var(--light-alt);
    transition: 0.3s;
}

.list-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient);
    transition: 0.4s ease 0.2s;
    border-radius: 2px;
}

.list-link:hover::after {
    width: 100%;
    left: 0;
}

.list-link:hover {
    color: var(--light);
}

/* Mobile nav */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg);
        padding: 2rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .menu.open {
        display: block;
    }

    .list {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar {
        position: relative;
    }
}

/* Featured Section */
.featured-articles-section {
    padding: 60px 20px;
    text-align: center;
}

.featured-title,
.category-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.featured-title::after,
.category-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4fcf70, #fad648, #a767e5);
    border-radius: 2px;
}

.featured-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.featured-article {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.featured-article a {
    display: block;
    padding: 10px;
    color: inherit;
    text-decoration: none;
}

.featured-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.article-category {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary);
    background-color: rgba(79, 207, 112, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    margin: 1rem auto 0.8rem;
    width: fit-content;
    text-transform: uppercase;
}

.article-title {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 15px;
    color: white;
}

.featured-article a:hover .article-title {
    color: var(--primary);
}

/* Category Filter */
.category-filter {
    padding: 60px 20px;
    text-align: center;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.filter-btn {
    padding: 0.7rem 1.8rem;
    border: 2px solid var(--primary);
    background: none;
    color: var(--primary);
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: #000;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

.fade-in { animation: fadeIn 0.4s ease forwards; }
.fade-out { animation: fadeOut 0.3s ease forwards; }

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.post-card {
    background: #1f1f1f;
    border-radius: 8px;
    padding: 16px;
    color: #f0f0f0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: 0.2s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card h3 {
    margin: 0 0 10px;
}

/* Comments */
.comments-section {
    margin-top: 2rem;
    background: #1e1e1e;
    padding: 1rem;
    border-radius: 6px;
}

#comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#comment-form input,
#comment-form textarea {
    padding: 1rem;
    background: #2a2a2a;
    color: #fff;
    border: none;
    border-radius: 6px;
    resize: vertical;
}

#comment-form button {
    padding: 1rem;
    background: var(--gradient);
    color: #000;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

.comment {
    margin-top: 2rem;
    background: #2d2d2d;
    padding: 1rem;
    border-radius: 6px;
    word-wrap: break-word;
}


.post-card {
    display: flex;
    gap: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-link {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.post-thumb {
    height: 200px; /* or 150px */
    object-fit: cover;
}

.post-info {
    padding: 1rem;
}

.post-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.post-excerpt {
    font-size: 0.95rem;
    line-height: 1.4;
}
/* About Me */
.about-section, .skills-section, .contact-section {
    padding: 4rem 1rem;
    max-width: 900px;
    margin: auto;
}

.about-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-content img.about-image {
    max-width: 250px;
    border-radius: 10px;
    object-fit: cover;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.skills-list {
    list-style: none;
    padding: 0;
}

.skills-list li {
    background: #424141;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.contact-section a {
    color: #007acc;
    text-decoration: underline;
}
.skills-list-text {
    color: var(--primary);
}
/* === Responsive Fixes for Mobile === */
@media screen and (max-width: 768px) {
    /* Featured Articles */
    .featured-articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .featured-article {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .featured-article img.featured-image {
        width: 100%;
        max-width: 400px;
        height: auto;
        border-radius: 10px;
    }

    .featured-article .article-title {
        font-size: 1.2rem;
        margin-top: 0.5rem;
        text-align: center;
    }

    .article-category {
        font-size: 0.85rem;
        margin-top: 0.3rem;
        background-color: rgba(0, 0, 0, 0.05);
        padding: 4px 8px;
        border-radius: 4px;
    }

    /* Latest Posts Grid */
    .posts-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-card {
        padding: 1rem;
        border-radius: 8px;
    }

    .post-thumb {
        width: 100%;
        max-height: 180px;
        object-fit: cover;
        border-radius: 6px;
    }

    .post-info h3 {
        font-size: 1.1rem;
        margin: 0.5rem 0;
    }

    .post-meta, .post-excerpt {
        font-size: 0.9rem;
    }
}
