@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    list-style: none;
    scroll-behavior: smooth;
    text-decoration: none;
}

html {
    -webkit-text-size-adjust: 100%;
}

:root {
    --text-color: #e2e8f0;
    --hover-color: #22d3ee;
    --accent-purple: #7c3aed;
    --bg-color: #04060d;
    --secon-bg-color: #0c1422;
    --big-font: clamp(1.85rem, 4vw, 2.8rem);
    --norma-font: clamp(1.25rem, 2.5vw, 2rem);
    --neon-box-shadow: 0 0 .5rem #22d3ee;
    --h2-font: clamp(1.6rem, 3.5vw, 2.4rem);
    --section-pad-x: clamp(1rem, 5vw, 10%);
    --font-neon-text-shadow: 0 0 10px rgb(34, 211, 238),
        0 0 20px rgb(34, 211, 238),
        0 0 30px rgb(34, 211, 238),
        0 0 40px rgb(34, 211, 238);
}

body {
    font-family: "Poppins", sans-serif;
    background: radial-gradient(rgb(15,39,51),rgb(6,10,20),rgb(4,6,13));
    background-attachment: fixed;
    color: var(--text-color);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px var(--section-pad-x);
    background: rgba(6, 10, 20, .55);
    position: fixed;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

header.scrolled {
    background: rgba(6, 10, 20, .85);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: clamp(1.05rem, 2.5vw, 1.375rem);
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-color);
    flex-shrink: 0;
}

span {
    color: var(--hover-color);
}

.navlist {
    display: flex;
}

.navlist a {
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 20px;
}

.navlist a:hover,
.navlist a.active {
    color: var(--hover-color);
    text-shadow: var(--font-neon-text-shadow);
}

#menu-icon {
    font-size: 1.8rem;
    z-index: 10001;
    cursor: pointer;
    margin-left: 25px;
    background: var(--hover-color);
    border-radius: 3px;
    color: var(--secon-bg-color);
    display: none;
}

/* ===== BLOG PAGE ===== */
.blogs-page {
    min-height: 100vh;
    padding: 120px var(--section-pad-x) 100px;
    background: transparent;
    width: 100%;
}

.main-text {
    text-align: center;
    margin-bottom: 24px;
}

.main-text h2 {
    font-size: var(--big-font);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.main-text p {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    color: rgba(203, 213, 225, 0.7);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.blogs-container {
    max-width: 860px;
    margin: 48px auto 0;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 4vw, 40px);
    width: 100%;
}

.blogs-page--post .blogs-container {
    margin-top: 24px;
}

/* ===== PREVIEW CARDS ===== */
.blog-preview {
    display: block;
    color: inherit;
    text-decoration: none;
}

.blog-card--preview h2 {
    margin-bottom: clamp(0.85rem, 2vw, 1.1rem);
    padding-bottom: 0;
    border-bottom: none;
}

.blog-excerpt {
    font-size: clamp(0.92rem, 2vw, 1rem);
    line-height: 1.75;
    color: rgba(226, 232, 240, 0.78);
    margin-bottom: 1.25rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hover-color);
    font-size: 0.95rem;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.blog-preview:hover .read-more {
    gap: 10px;
}

/* ===== BACK NAV ===== */
.blog-nav {
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.blog-nav--bottom {
    margin-top: clamp(1.5rem, 4vw, 2rem);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(203, 213, 225, 0.75);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease, gap 0.3s ease;
}

.back-link:hover {
    color: var(--hover-color);
    gap: 10px;
}

.back-link i {
    font-size: 1.25rem;
}

/* ===== BLOG CARD ===== */
.blog-card {
    background: linear-gradient(145deg, var(--bg-color), var(--secon-bg-color));
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 15px;
    padding: clamp(1.35rem, 4vw, 45px) clamp(1.25rem, 4vw, 50px);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.3s ease;
    width: 100%;
    box-shadow:
        var(--neon-box-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.blog-card:hover {
    border-color: var(--hover-color);
    box-shadow:
        0 15px 35px rgba(34, 211, 238, 0.2),
        0 0 25px rgba(34, 211, 238, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--hover-color);
    border: 1px solid rgba(34, 211, 238, 0.25);
    padding: 5px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.blog-tag i {
    font-size: 0.9rem;
}

.blog-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(203, 213, 225, 0.55);
    font-size: 0.85rem;
}

.blog-card h2 {
    font-size: clamp(1.2rem, 3vw, 1.65rem);
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: clamp(1.25rem, 3vw, 30px);
    border-bottom: 1px solid rgba(34, 211, 238, 0.15);
    padding-bottom: clamp(1rem, 2.5vw, 25px);
    word-wrap: break-word;
}

/* ===== BLOG BODY ===== */
.blog-card-body p {
    font-size: clamp(0.92rem, 2vw, 1rem);
    line-height: 1.8;
    color: rgba(226, 232, 240, 0.82);
    margin-bottom: 18px;
}

.blog-card-body h3 {
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    font-weight: 700;
    color: var(--hover-color);
    margin: 30px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card-body h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background: var(--hover-color);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
    flex-shrink: 0;
}

.blog-card-body ul {
    list-style: none;
    padding: 0;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-card-body ul li {
    font-size: clamp(0.92rem, 2vw, 1rem);
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.78);
    padding-left: 20px;
    position: relative;
}

.blog-card-body ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--hover-color);
    font-size: 1.2rem;
    line-height: 1.5;
}

.blog-card-body code {
    background: rgba(34, 211, 238, 0.08);
    color: var(--hover-color);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(34, 211, 238, 0.15);
    word-break: break-word;
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 25px;
    color: var(--hover-color);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, gap 0.3s ease;
}

.external-link:hover {
    border-bottom-color: var(--hover-color);
    gap: 10px;
}

.external-link i {
    font-size: 1rem;
}

footer {
    background: transparent;
    padding: 1.5rem var(--section-pad-x);
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: auto;
}

footer p {
    color: rgba(203, 213, 225, .7);
    text-align: center;
    font-size: clamp(0.75rem, 2vw, 0.95rem);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    header {
        padding: 15px var(--section-pad-x);
    }
    .blogs-page {
        padding: 100px var(--section-pad-x) 80px;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
        transition: all .4s ease;
        margin-left: 12px;
        flex-shrink: 0;
    }
    #menu-icon.bx-x {
        transform: rotate(-180deg);
    }
    .navlist {
        z-index: 999;
        display: flex;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        background: rgba(4, 6, 13, .98);
        text-align: left;
        padding: 0 var(--section-pad-x);
        border-bottom: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 16px 40px rgba(0,0,0,.45);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    .navlist a {
        display: block;
        padding: 0.85rem 0;
        font-size: 1rem;
    }
    .navlist.open {
        max-height: 420px;
        opacity: 1;
        pointer-events: auto;
        padding: 0.75rem var(--section-pad-x) 1.25rem;
    }
    .blogs-page {
        padding: 90px var(--section-pad-x) 60px;
    }
    .main-text {
        margin-bottom: 16px;
    }
    .blog-card:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 480px) {
    .blog-card-body h3 {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card {
        transition: none;
    }
    .blog-card:hover {
        transform: none;
    }
}
