/* =========================================================
   MYZUBAIRI ENGINEERING BLOG
   COMPLETE STYLESHEET
   Compatible with current blog.php
   ========================================================= */


/* =========================================================
   1. BLOG VARIABLES
   ========================================================= */

:root {
    --blog-bg: #07101d;
    --blog-bg-deep: #050b14;
    --blog-surface: #0d1b2c;
    --blog-surface-hover: #112238;

    --blog-text: #edf3fb;
    --blog-heading: #f2f5f9;
    --blog-muted: #91a0b5;
    --blog-muted-dark: #64758c;

    --blog-accent: #f5b800;
    --blog-accent-light: #ffd45c;

    --blog-border: rgba(255,255,255,.09);
    --blog-border-strong: rgba(255,255,255,.15);

    --blog-container: 1180px;
}


/* =========================================================
   2. PAGE BASE
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--blog-bg);
    color: var(--blog-text);
}

.blog-page,
.blog-page * {
    box-sizing: border-box;
}

.blog-page a {
    -webkit-tap-highlight-color: transparent;
}

.blog-page .container {
    width: calc(100% - 40px);
    max-width: var(--blog-container);
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   3. NAVBAR
   ========================================================= */

.blog-header {
    position: relative;
    z-index: 1000;

    background: rgba(5,12,23,.97);
    border-bottom: 1px solid rgba(255,255,255,.07);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.blog-header .navbar {
    min-height: 76px;
}

.blog-header .logo {
    color: #fff;
    text-decoration: none;
}

.blog-header .nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    gap: 28px;
}

.blog-header .nav-menu a {
    color: #c6d0df;
    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    transition: color .2s ease;
}

.blog-header .nav-menu a:hover,
.blog-header .nav-menu a.active {
    color: var(--blog-accent);
}


/* =========================================================
   4. BLOG HERO
   ========================================================= */

.blog-hero {
    position: relative;
    overflow: hidden;

    padding: 125px 0 100px;

    background:
        radial-gradient(
            circle at 82% 25%,
            rgba(95,168,255,.07),
            transparent 30%
        ),
        var(--blog-bg);

    border-bottom: 1px solid var(--blog-border);
}

.blog-hero::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    opacity: .30;

    background-image:
        linear-gradient(
            rgba(255,255,255,.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.018) 1px,
            transparent 1px
        );

    background-size: 42px 42px;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-hero-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(320px, .75fr);

    align-items: center;

    gap: 70px;
}

.blog-hero-main {
    max-width: 820px;
}


/* =========================================================
   5. HERO EYEBROW
   ========================================================= */

.eyebrow {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 24px;

    color: var(--blog-accent);

    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";

    width: 30px;
    height: 1px;

    background: var(--blog-accent);
}


/* =========================================================
   6. HERO TITLE
   ========================================================= */

.blog-hero h1 {
    display: block;

    margin: 0;

    color: var(--blog-heading);

    font-family:
        "Space Grotesk",
        "Poppins",
        sans-serif;

    font-size: clamp(48px, 6vw, 82px);

    font-weight: 700;

    line-height: .98;

    letter-spacing: -3px;
}

.blog-hero h1 span {
    display: block;

    color: var(--blog-accent);
}

.blog-hero p {
    max-width: 740px;

    margin: 28px 0 0;

    color: var(--blog-muted);

    font-family: "Inter", sans-serif;
    font-size: 17px;

    line-height: 1.8;
}


/* =========================================================
   7. HERO BUTTONS
   ========================================================= */

.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 32px;
}

.btn-main,
.btn-secondary {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 0 22px;

    border-radius: 7px;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        transform .2s ease,
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.btn-main {
    color: #111;

    background: var(--blog-accent);
}

.btn-main:hover {
    color: #111;

    background: var(--blog-accent-light);

    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--blog-text);

    background: rgba(255,255,255,.025);

    border: 1px solid var(--blog-border-strong);
}

.btn-secondary:hover {
    color: var(--blog-accent);

    border-color: var(--blog-accent);

    transform: translateY(-2px);
}


/* =========================================================
   8. TERMINAL
   ========================================================= */

.blog-hero-side {
    display: flex;
    justify-content: flex-end;
}

.terminal-card {
    width: 100%;
    max-width: 430px;

    overflow: hidden;

    background: var(--blog-bg-deep);

    border: 1px solid rgba(255,255,255,.12);

    border-radius: 12px;

    box-shadow:
        0 30px 80px rgba(0,0,0,.35);
}

.terminal-top {
    height: 42px;

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 0 15px;

    background: #0c1624;

    border-bottom: 1px solid rgba(255,255,255,.06);
}

.terminal-top span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #536174;
}

.terminal-body {
    padding: 28px;

    color: #c7d1df;

    font-family: "Courier New", monospace;

    font-size: 13px;

    line-height: 2;
}

.terminal-line {
    color: #c7d1df;
}

.terminal-green {
    color: #71d99a;
}

.terminal-blue {
    color: #65aefc;
}

.terminal-command {
    margin-top: 15px;

    color: #f3f6fa;
}

.terminal-output {
    margin-top: 15px;

    padding-left: 18px;

    color: var(--blog-accent);

    border-left: 1px solid rgba(245,184,0,.4);
}

.terminal-cursor {
    margin-top: 12px;

    color: var(--blog-accent);
}


/* =========================================================
   9. CATEGORY SECTION
   Current blog.php places this OUTSIDE .container,
   therefore width and centering are handled here.
   ========================================================= */

.blog-category-grid {
    width: calc(100% - 40px);
    max-width: var(--blog-container);

    margin: 0 auto;

    padding: 100px 0;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 18px;
}


/* =========================================================
   10. CATEGORY CARD
   ========================================================= */

.blog-category {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 255px;

    padding: 28px;

    overflow: hidden;

    color: var(--blog-text) !important;

    background: var(--blog-surface) !important;

    border: 1px solid #1d2b3d !important;

    border-radius: 12px;

    text-decoration: none !important;

    transition:
        transform .25s ease,
        background .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.blog-category:link,
.blog-category:visited,
.blog-category:active {
    color: var(--blog-text) !important;
    text-decoration: none !important;
}


/* Engineering grid */

.blog-category::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    opacity: .40;

    background-image:
        linear-gradient(
            rgba(255,255,255,.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.025) 1px,
            transparent 1px
        );

    background-size: 28px 28px;
}


/* Yellow glow */

.blog-category::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -100px;
    bottom: -100px;

    border-radius: 50%;

    background: rgba(245,184,0,.07);

    filter: blur(20px);

    pointer-events: none;

    transition:
        transform .3s ease,
        background .3s ease;
}


/* =========================================================
   11. CATEGORY NUMBER
   ========================================================= */

.category-number {
    position: relative;
    z-index: 2;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 25px;

    margin-bottom: 34px;

    color: var(--blog-accent);

    background: rgba(245,184,0,.05);

    border: 1px solid rgba(245,184,0,.30);

    border-radius: 4px;

    font-family: "Courier New", monospace;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   12. CATEGORY TITLE
   ========================================================= */

.blog-category h2 {
    position: relative;
    z-index: 2;

    margin: 0 0 12px;

    color: var(--blog-heading) !important;

    font-family:
        "Space Grotesk",
        "Poppins",
        sans-serif;

    font-size: 25px;
    font-weight: 700;

    line-height: 1.2;
}


/* =========================================================
   13. CATEGORY DESCRIPTION
   ========================================================= */

.blog-category p {
    position: relative;
    z-index: 2;

    max-width: 340px;

    margin: 0;

    color: #8291a6 !important;

    font-family: "Inter", sans-serif;

    font-size: 13px;

    line-height: 1.7;
}


/* =========================================================
   14. CATEGORY LINK
   ========================================================= */

.category-link {
    position: relative;
    z-index: 2;

    display: block;

    margin-top: auto;

    padding-top: 25px;

    color: var(--blog-accent) !important;

    font-family: "Inter", sans-serif;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .3px;
}


/* =========================================================
   15. CATEGORY HOVER
   ========================================================= */

.blog-category:hover {
    color: var(--blog-text) !important;

    background: var(--blog-surface-hover) !important;

    border-color: var(--blog-accent) !important;

    transform: translateY(-6px);

    box-shadow:
        0 18px 45px rgba(0,0,0,.30);
}

.blog-category:hover::after {
    transform: scale(1.4);

    background: rgba(245,184,0,.12);
}

.blog-category:hover .category-link {
    color: var(--blog-accent-light) !important;
}


/* =========================================================
   16. FEATURED ARTICLE
   ========================================================= */

.featured-section {
    padding: 20px 0 100px;
}

.section-label {
    margin-bottom: 14px;

    color: var(--blog-accent);

    font-family: "Inter", sans-serif;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.featured-card {
    display: grid;

    grid-template-columns:
        70px minmax(0,1fr) 360px;

    min-height: 390px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #102138,
            #0b1728
        );

    border: 1px solid var(--blog-border);

    border-radius: 16px;
}

.featured-number {
    padding: 32px 0 0 25px;

    color: rgba(255,255,255,.25);

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 15px;
    font-weight: 700;
}

.featured-content {
    padding: 55px 35px 55px 15px;
}

.article-tag {
    display: inline-block;

    margin-bottom: 18px;

    padding: 7px 10px;

    color: var(--blog-accent);

    border: 1px solid rgba(245,184,0,.25);

    border-radius: 4px;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.featured-content h2 {
    max-width: 720px;

    margin: 0;

    color: var(--blog-heading);

    font-family:
        "Space Grotesk",
        "Poppins",
        sans-serif;

    font-size: clamp(30px,4vw,48px);

    line-height: 1.08;

    letter-spacing: -1.5px;
}

.featured-content p {
    max-width: 680px;

    margin: 22px 0;

    color: var(--blog-muted);

    font-size: 15px;

    line-height: 1.8;
}

.article-info {
    display: flex;
    flex-wrap: wrap;

    gap: 25px;

    margin-top: 25px;

    color: #718097;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1px;
}

.read-link {
    display: inline-flex;

    gap: 10px;

    margin-top: 28px;

    color: var(--blog-accent);

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
}

.read-link span {
    transition: transform .2s ease;
}

.read-link:hover span {
    transform: translateX(5px);
}


/* =========================================================
   17. FEATURED DIAGRAM
   ========================================================= */

.featured-diagram {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 15px;

    padding: 35px;

    background:
        radial-gradient(
            circle at center,
            rgba(245,184,0,.09),
            transparent 65%
        );

    border-left: 1px solid var(--blog-border);
}

.diagram-box {
    width: 120px;

    padding: 15px;

    text-align: center;

    background: rgba(255,255,255,.025);

    border: 1px solid rgba(255,255,255,.12);
}

.diagram-box.active {
    border-color: rgba(245,184,0,.5);

    box-shadow:
        0 0 30px rgba(245,184,0,.07);
}

.diagram-title {
    margin-bottom: 15px;

    color: #77869b;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;
}

.diagram-node {
    padding: 12px 5px;

    color: #e6edf6;

    border: 1px solid rgba(255,255,255,.12);

    font-family: "Courier New", monospace;

    font-size: 12px;
}

.diagram-box.active .diagram-node {
    color: var(--blog-accent);

    border-color: rgba(245,184,0,.35);
}

.diagram-line {
    width: 1px;
    height: 18px;

    margin: auto;

    background: rgba(255,255,255,.15);
}

.diagram-arrow {
    color: var(--blog-accent);

    font-size: 25px;
}


/* =========================================================
   18. TOPICS SECTION
   ========================================================= */

.topics-section {
    padding: 100px 0;

    background:
        linear-gradient(
            180deg,
            #07101d 0%,
            #091525 100%
        );
}

.section-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 40px;

    margin-bottom: 40px;
}

.section-heading h2 {
    margin: 0;

    color: var(--blog-heading);

    font-family:
        "Space Grotesk",
        "Poppins",
        sans-serif;

    font-size: clamp(34px,4vw,48px);

    font-weight: 700;

    line-height: 1.1;

    letter-spacing: -1.5px;
}

.section-heading h2 span {
    color: var(--blog-accent);
}

.section-heading > p {
    max-width: 440px;

    margin: 0;

    color: var(--blog-muted);

    font-size: 14px;

    line-height: 1.8;
}


/* =========================================================
   19. TOPIC GRID
   ========================================================= */

.topics-grid {
    display: grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap: 18px;
}

.topic-card {
    position: relative;

    display: grid;

    grid-template-columns:
        38px minmax(0,1fr) 20px;

    gap: 15px;

    min-height: 170px;

    padding: 28px;

    color: var(--blog-text) !important;

    background: var(--blog-surface);

    border: 1px solid var(--blog-border);

    border-radius: 10px;

    text-decoration: none !important;

    transition: .25s ease;
}

.topic-card:visited {
    color: var(--blog-text) !important;
}

.topic-card:hover {
    color: var(--blog-text) !important;

    background: var(--blog-surface-hover);

    border-color: rgba(245,184,0,.4);

    transform: translateY(-4px);
}

.topic-number {
    color: var(--blog-accent);

    font-family: "Courier New", monospace;

    font-size: 11px;
    font-weight: 700;
}

.topic-card h3 {
    margin: 0 0 10px;

    color: var(--blog-heading);

    font-family:
        "Space Grotesk",
        "Poppins",
        sans-serif;

    font-size: 21px;
}

.topic-card p {
    margin: 0;

    color: var(--blog-muted);

    font-size: 13px;

    line-height: 1.7;
}

.topic-arrow {
    align-self: end;

    color: var(--blog-muted-dark);

    font-size: 18px;

    transition: .2s ease;
}

.topic-card:hover .topic-arrow {
    color: var(--blog-accent);

    transform: translateX(4px);
}


/* =========================================================
   20. LATEST ARTICLES
   ========================================================= */

.latest-section {
    padding: 100px 0;
}

.articles-grid {
    display: grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap: 18px;
}

.article-card {
    display: flex;
    flex-direction: column;

    min-height: 340px;

    padding: 28px;

    background: var(--blog-surface);

    border: 1px solid var(--blog-border);

    border-radius: 10px;

    transition: .25s ease;
}

.article-card:hover {
    background: var(--blog-surface-hover);

    border-color: rgba(245,184,0,.4);

    transform: translateY(-5px);
}

.article-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.article-category {
    color: var(--blog-accent);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.article-number {
    color: #435268;

    font-family: "Courier New", monospace;

    font-size: 11px;
}

.article-icon {
    width: 64px;
    height: 64px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 35px 0 25px;

    color: var(--blog-accent);

    background: rgba(245,184,0,.035);

    border: 1px solid rgba(245,184,0,.25);

    border-radius: 8px;

    font-family: "Courier New", monospace;

    font-size: 12px;
    font-weight: 700;
}

.article-card h3 {
    margin: 0 0 12px;

    color: var(--blog-heading);

    font-family:
        "Space Grotesk",
        "Poppins",
        sans-serif;

    font-size: 22px;

    line-height: 1.25;
}

.article-card p {
    margin: 0;

    color: var(--blog-muted);

    font-size: 13px;

    line-height: 1.75;
}

.article-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: auto;

    padding-top: 25px;

    border-top: 1px solid rgba(255,255,255,.06);
}

.article-footer span {
    color: #65748a;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1px;
}

.article-footer a {
    color: var(--blog-accent);

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;
}

.article-footer a:hover {
    color: var(--blog-accent-light);
}


/* =========================================================
   21. CTA
   ========================================================= */

.blog-cta {
    padding: 40px 0 100px;
}

.cta-inner {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 40px;

    padding: 55px;

    background:
        linear-gradient(
            135deg,
            #111f32,
            #0c1727
        );

    border: 1px solid var(--blog-border);

    border-radius: 14px;
}

.cta-inner h2 {
    margin: 0;

    color: var(--blog-heading);

    font-family:
        "Space Grotesk",
        "Poppins",
        sans-serif;

    font-size: clamp(32px,4vw,50px);

    line-height: 1.1;

    letter-spacing: -1.5px;
}

.cta-inner h2 span {
    color: var(--blog-accent);
}

.cta-inner p {
    margin: 12px 0 0;

    color: var(--blog-muted);
}


/* =========================================================
   22. FOOTER
   ========================================================= */

.blog-page footer {
    margin-top: 0;

    padding: 35px 0;

    border-top: 1px solid var(--blog-border);

    background: #050b14;
}

.footer-inner {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.footer-logo {
    margin-bottom: 8px;

    color: #fff;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 20px;
    font-weight: 800;
}

.footer-logo span {
    color: var(--blog-accent);
}

.footer-inner p {
    margin: 0;

    color: #647287;

    font-size: 11px;

    line-height: 1.7;
}

.footer-right {
    text-align: right;
}


/* =========================================================
   23. TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .blog-hero {
        padding: 120px 0 80px;
    }

    .blog-hero-grid {
        grid-template-columns: 1fr;

        gap: 45px;
    }

    .blog-hero-side {
        justify-content: flex-start;
    }

    .terminal-card {
        max-width: 600px;
    }

    .blog-category-grid,
    .topics-grid,
    .articles-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

    .featured-card {
        grid-template-columns:
            50px minmax(0,1fr);
    }

    .featured-diagram {
        grid-column: 1 / -1;

        min-height: 240px;

        border-left: none;

        border-top:
            1px solid var(--blog-border);
    }
}


/* =========================================================
   24. MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .blog-page .container {
        width: calc(100% - 30px);
    }

    .blog-hero {
        padding: 105px 0 70px;
    }

    .blog-hero h1 {
        font-size: 46px;

        letter-spacing: -2px;
    }

    .blog-hero p {
        font-size: 15px;

        line-height: 1.75;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-main,
    .btn-secondary {
        width: 100%;
    }

    .blog-category-grid {
        width: calc(100% - 30px);

        grid-template-columns: 1fr;

        gap: 14px;

        padding: 70px 0;
    }

    .blog-category {
        min-height: 225px;

        padding: 25px;
    }

    .blog-category h2 {
        font-size: 23px;
    }

    .featured-section,
    .topics-section,
    .latest-section {
        padding: 70px 0;
    }

    .section-heading {
        display: block;
    }

    .section-heading > p {
        margin-top: 16px;
    }

    .topics-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-number {
        padding: 25px 25px 0;
    }

    .featured-content {
        padding: 20px 25px 35px;
    }

    .featured-diagram {
        padding: 30px 15px;

        overflow-x: auto;
    }

    .cta-inner {
        flex-direction: column;

        align-items: flex-start;

        padding: 35px 25px;
    }

    .footer-inner {
        flex-direction: column;

        align-items: flex-start;
    }

    .footer-right {
        text-align: left;
    }
}


/* =========================================================
   25. SMALL PHONE
   ========================================================= */

@media (max-width: 420px) {

    .blog-hero {
        padding-top: 95px;
    }

    .blog-hero h1 {
        font-size: 40px;
    }

    .terminal-body {
        padding: 20px;

        font-size: 12px;
    }

    .featured-content h2 {
        font-size: 30px;
    }

    .diagram-box {
        min-width: 105px;
    }

    .blog-category {
        min-height: 215px;
    }
}


/* =========================================================
   26. FOCUS / ACCESSIBILITY
   ========================================================= */

.blog-category:focus-visible,
.topic-card:focus-visible,
.btn-main:focus-visible,
.btn-secondary:focus-visible,
.read-link:focus-visible,
.article-footer a:focus-visible {
    outline: 2px solid var(--blog-accent);

    outline-offset: 3px;
}


/* =========================================================
   END
   ========================================================= */
