﻿/* ===============================
   Root & Base
   =============================== */
:root {
    --primary: #0b3c78;
    --primary-dark: #061c36;
    --accent: #FF8A3D;
    --muted: #F5F5F5;
    --text: #333333;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Inter, Roboto, Arial, sans-serif;
    color: var(--text);
    margin: 0;
    background: radial-gradient( circle at top, #0b3c78 0%, #061c36 65%, #041325 100% );
}

/* ===============================
   Page Background & Main Card
   =============================== */
.page-bg {
    min-height: 100vh;
    padding: 64px 24px;
}

.main-card {
    max-width: 1000px;
    margin: 0 auto;
    background: transparent; /* IMPORTANT */
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.35);
}

/* ===============================
   Card Header (BLUE PART OF CARD)
   =============================== */
.card-header {
    background: linear-gradient( 180deg, #0c3d78, #082a52 );
    color: white;
    padding-bottom: 48px;
}

/* ===============================
   Hero (inside card header)
   =============================== */
.hero {
    text-align: center;
    padding: 48px 32px 0;
    background: transparent;
    box-shadow: none;
}

    .hero h1 {
        font-size: 36px;
        margin: 0;
        color: #ffffff;
    }

    .hero .tagline {
        font-size: 18px;
        font-weight: 500;
        color: #cfe0ff;
        margin: 10px 0 14px;
    }

    .hero p:not(.tagline) {
        max-width: 640px;
        margin: 0 auto 18px;
        font-size: 14px;
        line-height: 1.6;
        color: #dbe7ff;
    }

/* ===============================
   Buttons
   =============================== */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: #ffffff;
    color: var(--primary);
    margin: 6px;
    border: none;
}

    .btn.primary {
        background: var(--accent);
        color: white;
    }

/* ===============================
   Card Body (WHITE PART OF CARD)
   =============================== */
.card-body {
    background: #ffffff;
    padding: 56px 48px;
    border-radius: 0 0 18px 18px;
}

/* ===============================
   Sections
   =============================== */
.cards,
.thoughts {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 0;
    flex-direction: row; /* 🔑 default, explicit */
}


/* ===============================
   Section Headings
   =============================== */
section h2 {
    font-size: 24px;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.section-subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 24px;
}

/* ===============================
   Projects Grid
   =============================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

    .project h3 {
        font-size: 18px;
        margin: 0 0 6px;
    }

    .project p {
        font-size: 14px;
        color: #555;
        line-height: 1.5;
    }

    .project a {
        display: inline-block;
        margin-top: 8px;
        font-size: 14px;
        font-weight: 600;
        color: var(--primary-dark);
        text-decoration: none;
    }

/* ===============================
   Bug Chronicles & Learning Log
   =============================== */
.two-col {
    display: flex;
    gap: 64px;
    position: relative;
}

    .two-col::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 32px;
        height: 60%;
        width: 1px;
        background: linear-gradient( to bottom, transparent, #e5e7eb, transparent );
    }

    .two-col > div:last-child {
        padding-left: 230px; /* slide Learning Log to the right */
    }



    .two-col ul,
    .thoughts ul {
        list-style: none;
        padding: 0;
        margin-top: 16px;
    }

    .two-col li,
    .thoughts li {
        margin-bottom: 10px;
        padding-left: 18px;
        position: relative;
        font-size: 14px;
    }

        .two-col li::before,
        .thoughts li::before {
            content: "›";
            position: absolute;
            left: 0;
            color: var(--accent);
            font-weight: 700;
        }

/* ===============================
   Thoughts & Avatar
   =============================== */
.thoughts {
    display: flex;
    align-items: center;
    gap: 48px;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    background: #e5e7eb;
    margin-left: auto; /* push to right */
    margin-right: 157px; /* 🔑 space from right edge */
}

    .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* PERFECT crop */
        filter: blur(8px);
        -webkit-filter: blur(8px);
    }



/* ===============================
   Footer (CENTERED)
   =============================== */
.site-footer {
    background: transparent;
    padding: 32px 0 16px;
    font-size: 14px;
    color: #cfd8e3;
    text-align: center; /* FIX */
}

    .site-footer a {
        color: #ffffff;
        text-decoration: none;
    }

/* ===============================
   Responsive
   =============================== */
@media (max-width: 768px) {
    .card-body {
        padding: 40px 24px;
    }

    .thoughts {
        flex-direction: column;
    }

    .thoughts {
        text-align: center;
    }

    .avatar {
        margin: 0 auto;
    }

    .two-col::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .page-bg {
        padding: 32px 16px;
    }
}


/* =========================================================
   FIX MAIN HEADER TO MATCH REFERENCE IMAGE
   ========================================================= */

/* Full-width blue background stays */
.site-header {
    background: linear-gradient(180deg, #0c3d78, #082a52);
    padding: 18px 0;
}

    /* LIMIT header content width (THIS WAS MISSING) */
    .site-header .container {
        max-width: 1000px; /* SAME AS CARD */
        margin: 0 auto;
        padding: 0 32px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Remove extra height */
    .site-header .brand-logo,
    .site-header .main-nav a {
        line-height: 1;
        text-decoration:none;
    }

    /* Header links spacing like reference */
    .site-header .main-nav a {
        margin-left: 20px;
        font-size: 14px;
        text-decoration: none;
        color: rgba(255,255,255,0.9);
    }

        .site-header .main-nav a:hover {
            color: #ffffff;
        }

/* Pull card slightly up so it visually connects */
.page-bg {
    padding-top: 32px; /* was too large */
}


/* =========================================================
   SEPARATE HEADER FROM CARD (SPACING FIX)
   ========================================================= */

main[role="main"] {
    margin-top: 24px;
}


/* =========================================================
   MAKE HERO THE BLUE CARD HEADER (INSIDE CARD)
   ========================================================= */

/* Override hero background ONLY inside card */
.main-card .hero {
    background: linear-gradient( 180deg, #0c3d78, #082a52 );
    padding: 56px 32px;
    border-radius: 18px 18px 0 0;
}

    /* Ensure hero text colors are correct */
    .main-card .hero h1,
    .main-card .hero p,
    .main-card .hero .tagline {
        color: #ffffff;
    }


/* =========================================================
   ENSURE CARD BODY STARTS CLEANLY AFTER HERO
   ========================================================= */

.main-card .card-body {
    margin-top: 0;
}


/* =========================================================
   FOOTER VISUAL SAFETY (CENTERED, NON-INTRUSIVE)
   ========================================================= */

.site-footer {
    position: relative;
    z-index: 5;
}

/* =========================================
   HEADER LOGO COLOR FIX (MATCH REFERENCE)
   ========================================= */

/* Make logo icon white inside header */
.site-header .logo-icon,
.card-header .logo-icon {
    color: #ffffff;
}

/* Optional: slightly soften text for better balance */
.site-header .logo-text {
    color: #ffffff;
}


/* =========================================
   FORCE HEADER LOGO ICON TO WHITE
   ========================================= */

/* Highest specificity override */
.site-header .brand-logo .logo-icon,
.site-header .brand-logo .logo-icon i {
    color: var(--accent) !important;
}

/* Ensure logo text is also white */
.site-header .brand-logo .logo-text {
    color: #ffffff;
}


/* ================= ABOUT ================= */
.about {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: first baseline; /* 🔑 FIX */
}

.social {
    text-align: right;
    font-size: 14px;
    color: #475569;
}

    .social .email {
        margin-bottom: 12px;
    }

    .social .icons a {
        margin-left: 12px;
        color: #475569;
        font-size: 18px;
        text-decoration: none;
    }

        .social .icons a:hover {
            color: #2563eb;
        }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .thoughts {
        grid-template-columns: 1fr;
    }

    .social {
        text-align: left;
        margin-top: 24px;
    }

        .social .icons a {
            margin-left: 0;
            margin-right: 12px;
        }
}

@media (max-width: 600px) {
    .about {
        grid-template-columns: 1fr;
    }

    .social {
        text-align: left;
        margin-top: 24px;
    }
}

.two-col li a {
    text-decoration: none; /* ❌ remove underline */
    color: #334155; /* normal text color */
    cursor: pointer; /* 👆 hand icon */
}

/* =========================================================
   LEARNING PAGE – EXTENSIONS (MATCHES EXISTING DESIGN)
   ========================================================= */

/* Learning page hero tweaks (reuse hero, just spacing) */
.learning-page .hero {
    padding: 56px 32px 48px;
}

    .learning-page .hero h1 {
        font-size: 34px;
    }

    .learning-page .hero .tagline {
        font-size: 16px;
        color: #cfe0ff;
    }

/* Today learning card – slightly highlighted */
.learning-highlight {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
}

    .learning-highlight h3 {
        margin-top: 0;
        font-size: 18px;
    }

.learning-meta {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
}

/* Learning cards reuse .project but improve spacing */
.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

    .learning-grid .project {
        transition: box-shadow 0.2s ease, transform 0.2s ease;
    }

        .learning-grid .project:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 24px rgba(0,0,0,0.08);
        }

/* Learning tags */
.learning-tags {
    margin-top: 10px;
}

    .learning-tags span {
        display: inline-block;
        background: #fff4ec;
        color: var(--accent);
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 999px;
        margin-right: 6px;
    }

/* Two-column learning section spacing fix */
.learning-page .two-col {
    margin-top: 56px;
}

    .learning-page .two-col > div:last-child {
        padding-left: 230px; /* keep your visual offset */
    }

/* Learning lists refinement */
.learning-page ul li {
    line-height: 1.6;
}

/* Responsive learning tweaks */
@media (max-width: 900px) {
    .learning-page .two-col {
        flex-direction: column;
        gap: 40px;
    }

        .learning-page .two-col::before {
            display: none;
        }

        .learning-page .two-col > div:last-child {
            padding-left: 0;
        }
}

@media (max-width: 480px) {
    .learning-page .hero h1 {
        font-size: 26px;
    }
}

.project h3 a {
    text-decoration: none;
    color: var(--primary-dark);
}

    .project h3 a:hover {
        color: var(--accent);
    }


/* =========================================================
   LEARNING PAGE – VISUAL POLISH
   ========================================================= */

/* Make Today's learning stand out */
.learning-highlight {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border-left: 4px solid var(--accent);
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

/* Meta text consistency */
.learning-meta {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
}

/* Improve card spacing & hover */
.project {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .project:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 32px rgba(0,0,0,0.08);
    }

    /* Make learning links feel premium */
.project {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

    .project:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    }

    .project h3 {
        font-size: 18px;
        margin: 0 0 6px;
    }

        .project h3 a {
            text-decoration: none;
            color: var(--primary-dark);
            font-weight: 600;
            position: relative;
        }

            .project h3 a::after {
                content: "";
                position: absolute;
                left: 0;
                bottom: -3px;
                width: 0;
                height: 2px;
                background: var(--accent);
                transition: width 0.2s ease;
            }

            .project h3 a:hover::after {
                width: 100%;
            }

    .project p {
        font-size: 14px;
        color: #555;
        line-height: 1.5;
    }

    .project a {
        display: inline-block;
        margin-top: 8px;
        font-size: 14px;
        font-weight: 600;
        color: var(--primary-dark);
        text-decoration: none;
    }


/* Improve section rhythm */
.cards {
    padding-top: 32px;
    padding-bottom: 32px;
}

/* Improve two-column readability */
.two-col h2 {
    margin-bottom: 12px;
}

.two-col ul li {
    line-height: 1.7;
}

/* Make hero feel more premium */
.main-card .hero {
    position: relative;
}

    .main-card .hero::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 60%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
        transform: translateX(-50%);
    }

/* =========================================================
   🔒 LEARNING PAGE SAFETY FIX (NO GLOBAL IMPACT)
   ========================================================= */

/* Disable learning hover effects outside learning page */
body:not(.learning-page) .project {
    transform: none !important;
    box-shadow: none !important;
    cursor: default !important;
    transition: none !important;
}

    body:not(.learning-page) .project:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Disable animated underline outside learning page */
    body:not(.learning-page) .project h3 a::after {
        display: none !important;
    }

/* =========================================================
   ✅ LEARNING PAGE – FINAL, CLEAN, SCOPED
   ========================================================= */

.learning-page .project {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

    .learning-page .project:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    }

    /* Learning link underline animation */
    .learning-page .project h3 a {
        position: relative;
    }

        .learning-page .project h3 a::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -3px;
            width: 0;
            height: 2px;
            background: var(--accent);
            transition: width 0.2s ease;
        }

        .learning-page .project h3 a:hover::after {
            width: 100%;
        }

/* Learning highlight (single source of truth) */
.learning-page .learning-highlight {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border-left: 4px solid var(--accent);
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

/* Learning spacing rhythm */
.learning-page .cards {
    padding-top: 36px;
    padding-bottom: 36px;
}

/* Learning meta */
.learning-page .learning-meta {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
}

/* Learning grid tone */
.learning-page .projects-grid .project {
    background: #fbfdff;
}

/* Learning hero typography tweak only */
.learning-page .hero h1 {
    font-size: 34px;
}

/* Responsive learning only */
@media (max-width: 900px) {
    .learning-page .two-col {
        flex-direction: column;
        gap: 40px;
    }

        .learning-page .two-col::before {
            display: none;
        }

        .learning-page .two-col > div:last-child {
            padding-left: 0;
        }
}

@media (max-width: 480px) {
    .learning-page .hero h1 {
        font-size: 26px;
    }
}

/* =========================================================
   WHAT I LEARNED TODAY – CARD DESIGN
   ========================================================= */

.learning-page .learning-today-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
}

.learning-page .learning-today-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .learning-page .learning-today-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
    }

    .learning-page .learning-today-card h3 {
        font-size: 18px;
        margin: 0 0 8px;
    }

        .learning-page .learning-today-card h3 a {
            text-decoration: none;
            color: var(--primary-dark);
            font-weight: 600;
        }

            .learning-page .learning-today-card h3 a:hover {
                color: var(--accent);
            }

    .learning-page .learning-today-card p {
        font-size: 14px;
        color: #475569;
        line-height: 1.6;
        margin-bottom: 10px;
    }

    /* Slight highlight for today's section */
    .learning-page .learning-today-card:first-child {
        border-left: 4px solid var(--accent);
        background: linear-gradient(180deg, #f8fafc, #ffffff);
    }

/*Project Page*/

/* ===== Portfolio Projects ===== */

.portfolio-projects {
    margin-top: 16px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.portfolio-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

    .portfolio-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 24px 55px rgba(0, 0, 0, 0.12);
    }

.portfolio-image img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.portfolio-content {
    padding: 22px 24px 26px;
}

    .portfolio-content h3 {
        font-size: 22px;
        margin-bottom: 10px;
        color: #0f172a;
    }

    .portfolio-content p {
        font-size: 15px;
        line-height: 1.6;
        color: #475569;
        margin-bottom: 16px;
    }

.portfolio-tech {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

    .portfolio-tech span {
        background: #f1f5f9;
        color: #334155;
        padding: 6px 12px;
        border-radius: 999px;
        font-size: 13px;
    }

.portfolio-link {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

    .portfolio-link:hover {
        text-decoration: underline;
    }

/* Card clickable wrapper */
.portfolio-card-link {
    text-decoration: none;
    color: inherit;
}

    .project-status.live {
        background: #dcfce7;
        color: #166534;
    }

/* Visibility */
.project-visibility {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    color: #6b7280;
}

/* Role */
.project-role {
    font-size: 13px;
    color: #64748b;
    margin: 6px 0 10px;
}

.project-visibility.internal {
    color: #64748b;
}

.project-visibility.public {
    color: #065f46;
}

.portfolio-link.disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.portfolio-note {
    font-size: 13px;
    color: #6b7280;
}

/* Base container */
.portfolio-image {
    height: 170px;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

/* IMAGE TYPE: PHOTO / ILLUSTRATION */
.image-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fills nicely */
}

/* IMAGE TYPE: LOGO / BANNER */
.image-contain {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .image-contain img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* no cropping */
    }


    /*Project details page styles*/

.project-detail-page .project-hero {
    text-align: center;
}

.project-meta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.project-section {
    margin-bottom: 36px;
}

    .project-section h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .project-section p {
        color: #475569;
        line-height: 1.7;
    }

.project-list {
    padding-left: 18px;
}

    .project-list li {
        margin-bottom: 8px;
        color: #334155;
    }

.project-note {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    color: #64748b;
}

.project-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 720px;
    margin: 0 auto 28px;
}

/* Status pill */
.project-status {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

    .project-status.active {
        background: #e0f2fe;
        color: #0369a1;
    }

/* Visibility + role */
.project-visibility,
.project-role {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Card */
.project-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

    .project-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
    }

/* Image */
.project-image {
    height: 180px;
    overflow: hidden;
    background: #f4f6f8;
}

    .project-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }


    /* SCREENSHOT / UI */

    /* LOGO / BANNER */
    .project-image.contain img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .project-image.cover {
        padding: 0;
    }

        .project-image.cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

/* Body */
.project-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Badges */
.project-badges {
    display: flex;
    gap: 8px;
}

.badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}

    .badge.status {
        background: #e6f4ea;
        color: #137333;
    }

    .badge.visibility {
        background: #eef2ff;
        color: #3730a3;
    }

/* Text */
.project-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 6px 0 0;
}

.project-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* Link */
.project-link {
    margin-top: auto;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

    .project-link:hover {
        text-decoration: underline;
    }

