/* Homepage Redesign Styles */

:root {
    --tech-primary: #00d2ff;
    /* Cyan/Blue neon */
    --tech-secondary: #3a7bd5;
    /* Deep blue */
    --tech-dark: #0f172a;
    /* Dark slate */
    --tech-darker: #020617;
    /* Almost black */
    --tech-text: #e2e8f0;
    /* Light gray text */
    --tech-text-muted: #94a3b8;
    --tech-accent: #f43f5e;
    /* Pink/Red accent */
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Font variables - change these to switch fonts */
    --font-heading: "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
}

/* ===========================================
   FONT TESTING SYSTEM

   To test different font pairings, add one of these
   classes to the <body> tag in home.html:

   - font-theme-1: Space Grotesk + DM Sans (Techy + Clean)
   - font-theme-2: Playfair Display + Inter (Elegant + Modern)
   - font-theme-3: Outfit + Work Sans (Friendly + Professional)
   - font-theme-4: Sora + Plus Jakarta Sans (Modern + Minimal)
   - font-theme-5: Inter + Inter (Current - Clean + Consistent)

   Example: <body id="page-top" class="font-theme-1">
   =========================================== */

/* Theme 1: Space Grotesk + DM Sans (Techy + Clean) */
body.font-theme-1 {
    --font-heading: "Space Grotesk", sans-serif;
    --font-body: "DM Sans", sans-serif;
}

/* Theme 2: Playfair Display + Inter (Elegant + Modern) */
body.font-theme-2 {
    --font-heading: "Playfair Display", serif;
    --font-body: "Inter", sans-serif;
}

/* Theme 3: Outfit + Work Sans (Friendly + Professional) */
body.font-theme-3 {
    --font-heading: "Outfit", sans-serif;
    --font-body: "Work Sans", sans-serif;
}

/* Theme 4: Sora + Plus Jakarta Sans (Modern + Minimal) */
body.font-theme-4 {
    --font-heading: "Sora", sans-serif;
    --font-body: "Plus Jakarta Sans", sans-serif;
}

/* Theme 5: Inter + Inter (Current - Clean + Consistent) */
body.font-theme-5 {
    --font-heading: "Inter", sans-serif;
    --font-body: "Inter", sans-serif;
}

/* Theme 6: Fjalla One + Cantarell (Bold + Readable) */
body.font-theme-6 {
    --font-heading: "Fjalla One", sans-serif;
    --font-body: "Cantarell", sans-serif;
}

/* Theme 7: Unica One + Crimson Text (Stylish + Classic) */
body.font-theme-7 {
    --font-heading: "Unica One", sans-serif;
    --font-body: "Crimson Text", serif;
}

/* Theme 8: Oswald + Merriweather (Strong + Refined) */
body.font-theme-8 {
    --font-heading: "Oswald", sans-serif;
    --font-body: "Merriweather", serif;
}

/* Apply font variables to elements */
h1,
h2,
h3,
h4,
h5,
h6,
.masthead-heading,
.display-4,
.navbar-brand {
    font-family: var(--font-heading);
}

body,
p,
.content-body,
.nav-link,
.btn {
    font-family: var(--font-body);
}

body#page-top {
    background-color: var(--tech-darker);
    color: var(--tech-text);
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        sans-serif;
}

/* Hero Section */
header.masthead {
    position: relative;
    background: url("/assets/img/website-redesign-bg.png") no-repeat center
        center scroll;
    background-size: cover;
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3rem;
}

header.masthead::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(2, 6, 23, 0.3) 0%,
        var(--tech-darker) 100%
    );
    pointer-events: none;
}

.masthead-content {
    z-index: 1;
    text-align: center;
}

header.masthead .masthead-content .masthead-heading {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--tech-text-muted) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.35rem;
}

header.masthead .masthead-content .masthead-subheading {
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--tech-primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.35rem;
}

/* Homepage Masthead - Larger styling */
header.masthead.masthead-home .masthead-content .masthead-heading {
    margin-top: 2rem;
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

header.masthead.masthead-home .masthead-content .masthead-subheading {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

@media (max-width: 992px) {
    header.masthead.masthead-home .masthead-content .masthead-heading {
        font-size: 2rem;
    }

    header.masthead.masthead-home .masthead-content .masthead-subheading {
        font-size: 0.9rem;
    }

    .btn-tech {
        padding: 0.4rem 1.2rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    header.masthead.masthead-home .masthead-content .masthead-heading {
        font-size: 2rem;
    }

    header.masthead.masthead-home .masthead-content .masthead-subheading {
        font-size: 0.85rem;
    }

    .btn-tech {
        padding: 0.35rem 1rem;
        font-size: 0.7rem;
    }

    section {
        padding: 0.5rem 0;
    }
}

/* Buttons */
.btn-tech {
    background: transparent;
    border: 2px solid var(--tech-primary);
    color: var(--tech-primary);
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-tech::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--tech-primary);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn-tech:hover {
    color: var(--tech-darker);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

.btn-tech:hover::before {
    width: 100%;
}

/* Primary Button Animation (Bootstrap btn-primary) */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

/* Outline Primary Button Animation */
.btn-outline-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-outline-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--bs-primary, #667eea);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    color: white;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.btn-outline-primary:hover::before {
    width: 100%;
}

/* Pill Button Animations - Purple Gradient */
.btn.rounded-pill[style*="linear-gradient(135deg, #667eea"] {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease !important;
}

.btn.rounded-pill[style*="linear-gradient(135deg, #667eea"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn.rounded-pill[style*="linear-gradient(135deg, #667eea"]:hover::before {
    width: 100%;
}

.btn.rounded-pill[style*="linear-gradient(135deg, #667eea"]:hover {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

/* Pill Button Animations - Light Purple */
.btn.rounded-pill[style*="rgba(102, 126, 234, 0.1)"] {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease !important;
}

.btn.rounded-pill[style*="rgba(102, 126, 234, 0.1)"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(102, 126, 234, 0.3);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn.rounded-pill[style*="rgba(102, 126, 234, 0.1)"]:hover::before {
    width: 100%;
}

.btn.rounded-pill[style*="rgba(102, 126, 234, 0.1)"]:hover {
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* Pill Button Animations - Pink */
.btn.rounded-pill[style*="rgba(238, 9, 121, 0.1)"] {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease !important;
}

.btn.rounded-pill[style*="rgba(238, 9, 121, 0.1)"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(238, 9, 121, 0.3);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn.rounded-pill[style*="rgba(238, 9, 121, 0.1)"]:hover::before {
    width: 100%;
}

.btn.rounded-pill[style*="rgba(238, 9, 121, 0.1)"]:hover {
    box-shadow: 0 0 15px rgba(238, 9, 121, 0.4);
    transform: translateY(-2px);
}

/* Badge Tag Animations */
.badge.rounded-pill[style*="rgba(102, 126, 234, 0.1)"] {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease !important;
}

.badge.rounded-pill[style*="rgba(102, 126, 234, 0.1)"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(102, 126, 234, 0.3);
    z-index: -1;
    transition: all 0.3s ease;
}

.badge.rounded-pill[style*="rgba(102, 126, 234, 0.1)"]:hover::before {
    width: 100%;
}

.badge.rounded-pill[style*="rgba(102, 126, 234, 0.1)"]:hover {
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* Category Badge in Blog Cards - Purple Gradient */
.badge.rounded-pill[style*="linear-gradient(135deg, #667eea"] {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease !important;
}

.badge.rounded-pill[style*="linear-gradient(135deg, #667eea"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
    transition: all 0.3s ease;
}

.badge.rounded-pill[style*="linear-gradient(135deg, #667eea"]:hover::before {
    width: 100%;
}

.badge.rounded-pill[style*="linear-gradient(135deg, #667eea"]:hover {
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

/* Custom Blue Button (Get in Touch) */
.btn[style*="background-color: #0033cc"] {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease !important;
}

.btn[style*="background-color: #0033cc"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn[style*="background-color: #0033cc"]:hover::before {
    width: 100%;
}

.btn[style*="background-color: #0033cc"]:hover {
    box-shadow: 0 0 20px rgba(0, 51, 204, 0.5);
    transform: translateY(-2px);
}

/* Content Sections */
section {
    padding: 1.5rem 0;
    position: relative;
}

.section-dark {
    background-color: var(--tech-darker);
}

.section-glass {
    background: linear-gradient(
        180deg,
        var(--tech-darker) 0%,
        var(--tech-dark) 100%
    );
}

.content-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    border-color: var(--tech-primary);
}

.display-4 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
}

.content-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--tech-text-muted);
}

.img-tech {
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.2);
    border: 2px solid var(--glass-border);
    transition: all 0.3s ease;
}

.img-tech:hover {
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.4);
    border-color: var(--tech-primary);
}

/* Navbar Overrides */
.navbar-custom {
    background-color: rgba(2, 6, 23, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar-dark .navbar-brand {
    font-weight: 700;
    color: #fff;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--tech-text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--tech-primary);
}

/* Responsive */
@media (max-width: 992px) {
    header.masthead .masthead-content .masthead-heading {
        font-size: 1.25rem;
    }

    header.masthead .masthead-content .masthead-subheading {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    header.masthead .masthead-content .masthead-heading {
        font-size: 1.1rem;
    }

    header.masthead .masthead-content .masthead-subheading {
        font-size: 0.65rem;
    }

    header.masthead {
        min-height: 20vh;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .content-card {
        padding: 1.25rem;
    }

    /* Mobile: Tighter layout - maximize screen real estate */
    .container,
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .px-4,
    .px-5 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .p-5 {
        padding: 0.75rem !important;
    }

    /* Navbar: Brand left, hamburger right */
    .navbar {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .navbar-brand {
        margin-left: 0;
        padding-left: 0;
    }

    .navbar-toggler {
        margin-right: 0;
        padding-right: 0.5rem;
    }

    /* Content areas - full width on mobile */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Blog content cards */
    .card {
        margin-left: 0;
        margin-right: 0;
    }

    .card-body {
        padding: 1rem;
    }

    /* Justified text on mobile for cleaner edges */
    .content-body,
    .card-text,
    article p {
        text-align: justify;
        hyphens: auto;
        -webkit-hyphens: auto;
        line-height: 1.5;
    }

    /* Exclude centered elements from justification */
    .text-center p,
    footer p {
        text-align: center !important;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    /* Tighter section padding on mobile */
    section {
        padding: 0.5rem 0;
    }
}

/* Small Masthead for Child Pages */
header.masthead.masthead-small {
    min-height: auto;
    height: auto;
    padding-top: 6rem;
    /* Account for navbar */
    padding-bottom: 1.5rem;
    background-attachment: scroll;
}

header.masthead.masthead-small .masthead-heading {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    /* Match homepage gradient */
    background: linear-gradient(135deg, #fff 0%, var(--tech-text-muted) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header.masthead.masthead-small .masthead-subheading {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--tech-primary);
    /* Match homepage subtitle color */
    letter-spacing: 0.15em;
}

@media (max-width: 576px) {
    header.masthead.masthead-small {
        padding-top: 5rem;
        padding-bottom: 1rem;
    }

    header.masthead.masthead-small .masthead-heading {
        font-size: 1.4rem;
    }

    header.masthead.masthead-small .masthead-subheading {
        font-size: 0.8rem;
    }
}

/* Global Tech Theme Overrides */
body {
    background-color: var(--tech-darker);
    color: var(--tech-text);
}

a {
    color: var(--tech-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--tech-accent);
}

/* Post Titles in Lists */
h2.post-title a,
.post-title a {
    color: var(--tech-primary) !important;
    /* Lighter blue */
}

h2.post-title a:hover,
.post-title a:hover {
    color: var(--tech-accent) !important;
}

/* Forms */
.form-control {
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--tech-text);
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
}

.form-control:focus {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: var(--tech-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 210, 255, 0.25);
    color: var(--tech-text);
}

.form-label {
    color: var(--tech-text);
    font-weight: 500;
}

/* Cards (Blog, etc) */
.card {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
}

.card-title {
    color: #fff;
}

.card-text {
    color: var(--tech-text-muted);
}

.text-muted {
    color: #64748b !important;
}

/* Pagination */
.page-link {
    background-color: var(--tech-dark);
    border-color: var(--glass-border);
    color: var(--tech-primary);
}

.page-link:hover {
    background-color: var(--tech-darker);
    border-color: var(--tech-primary);
    color: var(--tech-primary);
}

.page-item.active .page-link {
    background-color: var(--tech-primary);
    border-color: var(--tech-primary);
    color: var(--tech-darker);
}

.page-item.disabled .page-link {
    background-color: var(--tech-darker);
    border-color: var(--glass-border);
    color: var(--tech-text-muted);
}

/* Projects Page */
.project-highlight {
    display: block;
    margin: 1rem auto 0;
    max-width: calc(100% - 2rem);
    height: auto;
}

/* Footer Styles */
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 8px;
    font-size: 1.5rem;
    color: var(--tech-text-muted);
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    color: var(--tech-primary);
    transform: translateY(-3px);
}

/* Font Customizer - Subtle styling */
.font-customizer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.customizer-label {
    display: block;
    font-size: 0.7rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.font-select-minimal {
    background: transparent;
    border: 1px solid #334155;
    color: #64748b;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.font-select-minimal:hover {
    border-color: var(--tech-primary);
    color: var(--tech-text-muted);
}

.font-select-minimal:focus {
    outline: none;
    border-color: var(--tech-primary);
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.1);
}

.font-select-minimal option {
    background: var(--tech-darker);
    color: var(--tech-text);
}

/* Blog/Article Table Styles */
article table,
.blog-content table,
.content-body table,
.content-typography table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
}

article table th,
.blog-content table th,
.content-body table th,
.content-typography table th {
    background: rgba(0, 210, 255, 0.1);
    color: var(--tech-primary);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--glass-border);
}

article table td,
.blog-content table td,
.content-body table td,
.content-typography table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--tech-text);
}

article table tr:last-child td,
.blog-content table tr:last-child td,
.content-body table tr:last-child td,
.content-typography table tr:last-child td {
    border-bottom: none;
}

article table tr:hover,
.blog-content table tr:hover,
.content-body table tr:hover,
.content-typography table tr:hover {
    background: rgba(0, 210, 255, 0.05);
}

@media (max-width: 768px) {
    article table,
    .blog-content table,
    .content-body table,
    .content-typography table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }

    article table th,
    article table td,
    .blog-content table th,
    .blog-content table td,
    .content-body table th,
    .content-body table td,
    .content-typography table th,
    .content-typography table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}

/* Blog/Article Code Block Styles */
article pre,
.blog-content pre,
.content-body pre,
.content-typography pre {
    background: var(--tech-dark);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

article pre code,
.blog-content pre code,
.content-body pre code,
.content-typography pre code {
    background: transparent;
    color: var(--tech-text);
    font-family: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0;
}

/* Inline code */
article code,
.blog-content code,
.content-body code,
.content-typography code {
    background: rgba(0, 210, 255, 0.1);
    color: var(--tech-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
    font-size: 0.875em;
}

/* Reset inline styles when inside pre */
article pre code,
.blog-content pre code,
.content-body pre code,
.content-typography pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Bold text styling - pink accent for emphasis (excluding tables) */
article strong,
article b,
.blog-content strong,
.blog-content b,
.content-body strong,
.content-body b,
.content-typography strong,
.content-typography b {
    color: var(--tech-accent);
    font-weight: 700;
}

/* Keep table bold text normal colored */
article table strong,
article table b,
.blog-content table strong,
.blog-content table b,
.content-body table strong,
.content-body table b,
.content-typography table strong,
.content-typography table b {
    color: inherit;
}

/* ===========================================
   SOCIAL SHARE FLOATING BAR
   =========================================== */

.social-share-bar {
    position: fixed;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
    padding: 1rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.social-share-bar .share-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tech-text-muted);
    text-align: center;
    margin-bottom: 0.25rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--tech-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    border-radius: 50%;
    z-index: -1;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.1);
    color: white;
}

.share-btn:hover::before {
    width: 100%;
}

/* Platform-specific colors */
.share-facebook:hover {
    background: #1877f2;
    box-shadow: 0 0 20px rgba(24, 119, 242, 0.5);
}

.share-linkedin:hover {
    background: #0a66c2;
    box-shadow: 0 0 20px rgba(10, 102, 194, 0.5);
}

.share-twitter:hover {
    background: #000000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.share-email:hover {
    background: var(--tech-primary);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

.share-copy:hover {
    background: var(--tech-accent);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.5);
}

/* Copy tooltip */
.share-btn .copy-tooltip {
    position: absolute;
    left: calc(100% + 10px);
    background: var(--tech-dark);
    color: var(--tech-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid var(--glass-border);
}

.share-btn .copy-tooltip::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--tech-dark);
}

.share-btn.copied .copy-tooltip {
    opacity: 1;
    visibility: visible;
}

.share-btn.copied {
    background: var(--tech-accent) !important;
    color: white !important;
    transition: background 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
}

/* Fade out transition when copied state is ending */
.share-btn.copied-fading {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--tech-text-muted) !important;
    box-shadow: none !important;
}

.share-btn.copied-fading .copy-tooltip {
    opacity: 0;
    visibility: hidden;
}

/* Mobile: Bottom bar */
@media (max-width: 992px) {
    .social-share-bar {
        position: fixed;
        left: 50%;
        top: auto;
        bottom: 1rem;
        transform: translateX(-50%);
        flex-direction: row;
        padding: 0.75rem 1rem;
        border-radius: 50px;
        gap: 0.75rem;
    }

    .social-share-bar .share-label {
        display: none;
    }

    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .share-btn .copy-tooltip {
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(100% + 10px);
        top: auto;
    }

    .share-btn .copy-tooltip::before {
        right: auto;
        left: 50%;
        top: 100%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-top-color: var(--tech-dark);
        border-right-color: transparent;
    }
}

/* Very small screens: Smaller buttons */
@media (max-width: 400px) {
    .social-share-bar {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* Blog Post Images - Responsive sizing */
.content-typography img {
    display: block;
    width: 50%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem auto;
}

@media (max-width: 768px) {
    .content-typography img {
        width: 80%;
    }
}

/* Poetry - Centered with line breaks */
.poetry {
    text-align: center;
    line-height: 2;
    font-style: italic;
    margin: 1.5rem 0;
}

.poetry p {
    margin-bottom: 1.5rem;
}

/* GitHub Gist Embed - Dark Theme Styling */
.gist {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.gist .gist-file {
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px !important;
    background: var(--tech-dark) !important;
    overflow: hidden;
}

/* Additional GitHub container classes */
.gist .file {
    background: var(--tech-dark) !important;
    border: none !important;
}

.gist .Box-body {
    background: var(--tech-dark) !important;
}

.gist .js-gist-file-update-container {
    background: var(--tech-dark) !important;
}

.gist .highlight {
    background: var(--tech-dark) !important;
}

.gist table.highlight {
    background: var(--tech-dark) !important;
    margin: 0 !important;
}

.gist .gist-data {
    background: var(--tech-dark) !important;
    border-bottom: none !important;
}

.gist .gist-meta {
    background: rgba(15, 23, 42, 0.5) !important;
    border-top: 1px solid var(--glass-border) !important;
    color: var(--tech-text-muted) !important;
    font-family: var(--font-body) !important;
    font-size: 0.75rem !important;
    padding: 0.75rem 1rem !important;
}

.gist .gist-meta a {
    color: var(--tech-primary) !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.gist .gist-meta a:hover {
    color: var(--tech-accent) !important;
    text-decoration: none !important;
}

.gist .blob-wrapper {
    background: var(--tech-dark) !important;
    border-radius: 0 !important;
}

.gist .blob-code-inner,
.gist .blob-code {
    color: var(--tech-text) !important;
    background: transparent !important;
    font-family: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace !important;
}

.gist .blob-num {
    background: rgba(0, 0, 0, 0.2) !important;
    color: var(--tech-text-muted) !important;
    border-right: 1px solid var(--glass-border) !important;
    padding: 0.25rem 0.75rem !important;
}

.gist .blob-num:hover {
    background: rgba(0, 210, 255, 0.1) !important;
    color: var(--tech-primary) !important;
}

/* Gist syntax highlighting - dark theme colors */
.gist .pl-c {
    color: #6b7280 !important;
} /* Comments */
.gist .pl-k {
    color: #f43f5e !important;
} /* Keywords */
.gist .pl-s {
    color: #4ade80 !important;
} /* Strings */
.gist .pl-pds {
    color: #4ade80 !important;
} /* String delimiters */
.gist .pl-ent {
    color: var(--tech-primary) !important;
} /* Entity/Tag names */
.gist .pl-en {
    color: #fbbf24 !important;
} /* Functions */
.gist .pl-v {
    color: var(--tech-primary) !important;
} /* Variables */
.gist .pl-smi {
    color: var(--tech-text) !important;
} /* Source/Member info */
.gist .pl-c1 {
    color: #a78bfa !important;
} /* Constants */
.gist .pl-bu {
    color: #f87171 !important;
} /* Builtins */

/* ===========================================
   READING PROGRESS BAR
   =========================================== */

.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1100;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--tech-primary), var(--tech-accent));
    width: 0%;
    transition: width 150ms ease-out;
    box-shadow: 0 0 10px var(--tech-primary);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--tech-dark);
    border: 1px solid var(--tech-primary);
    color: var(--tech-text);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification i {
    color: var(--tech-primary);
    font-size: 1.1rem;
}

/* Mobile Toast Position */
@media (max-width: 576px) {
    .toast-notification {
        bottom: 5rem; /* Above the bottom social bar */
        width: 90%;
        max-width: 300px;
        justify-content: center;
    }
}

/* ===========================================
   BLOG CARD GRID LAYOUT
   =========================================== */

.blog-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .blog-card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .blog-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .blog-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Blog Card */
.blog-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: var(--tech-primary);
    box-shadow: 0 20px 40px rgba(0, 210, 255, 0.15);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-link:hover {
    color: inherit;
}

/* Card Image Container - 1:1 aspect ratio */
.blog-card-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, var(--tech-dark) 0%, var(--tech-darker) 100%);
}

.blog-card-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.5s ease;
    margin: 0 !important;
    border-radius: 0 !important;
}

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

/* Placeholder for posts without images */
.blog-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.blog-card-placeholder i {
    font-size: 4rem;
    color: var(--tech-primary);
    opacity: 0.3;
}

/* Card Content */
.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--tech-text-muted);
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    text-transform: capitalize;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card:hover .blog-card-title {
    color: var(--tech-primary);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--tech-text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.blog-card-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--tech-primary);
    transition: all 0.3s ease;
}

.blog-card:hover .blog-card-tag {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
}

/* ===========================================
   BLOG HERO BANNER (Full-width under title)
   =========================================== */

.blog-hero-banner {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Full-width hero banner (edge to edge) */
.blog-hero-banner-fullwidth {
    width: 100%;
    margin: 0;
    padding: 0;
}

.blog-hero-banner-fullwidth .blog-hero-banner-wrapper {
    border-radius: 0; /* No rounded corners for full-width */
}

.blog-hero-banner-wrapper {
    position: relative;
    width: 100%;
    padding-top: 20%; /* 5:1 aspect ratio for banner */
    overflow: hidden;
    border-radius: 12px;
    background: var(--tech-dark);
}

.blog-hero-banner-image {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

@media (max-width: 768px) {
    .blog-hero-banner-wrapper {
        padding-top: 30%; /* Slightly taller on mobile */
    }
}

/* Blog pagination outside grid */
.blog-pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}
