/* ================================= */
/* Theme Variables - Light Theme (Default) */
/* ================================= */
:root {
    /* Refined color palette - Option 1 */
    --primary-color: #d85a1f;      /* Muted orange - less eye strain */
    --secondary-color: #044571;    /* Deeper blue - more professional */
    --tertiary-color: #16a34a;     /* Green for success states */
    --third-color: #666666;        /* Neutral gray - WCAG AA compliant */
    --background-color: #ffffff;
    --text-color: #333333;
    --navbar-bg: var(--secondary-color);
    --navbar-text: #ffffff;
    --navbar-hover: var(--primary-color);
    --footer-bg: var(--secondary-color);
    --footer-text: #ffffff;

    /* Typography - Modular Scale (1.25 ratio - Major Third) */
    --font-size-base: 1rem;        /* 16px */
    --font-size-h6: 1rem;          /* 16px */
    --font-size-h5: 1.25rem;       /* 20px */
    --font-size-h4: 1.563rem;      /* 25px */
    --font-size-h3: 1.953rem;      /* 31px */
    --font-size-h2: 2.441rem;      /* 39px */
    --font-size-h1: 3.052rem;      /* 49px */

    /* PaperMod theme variables for light theme */
    --gap: 24px;
    --content-gap: 20px;
    --nav-width: 1024px;
    --main-width: 720px;
    --header-height: 60px;
    --footer-height: 60px;
    --radius: 8px;
    --theme: rgb(255, 255, 255);
    --entry: rgb(255, 255, 255);
    --primary: rgb(30, 30, 30);
    --secondary: rgb(108, 108, 108);
    --tertiary: rgb(214, 214, 214);
    --content: rgb(31, 31, 31);
    --code-block-bg: rgb(28, 29, 33);
    --code-bg: rgb(245, 245, 245);
    --border: rgb(238, 238, 238);
}

/* Dark Theme Overrides */
.dark {
    --background-color: #2a2a2a;   /* Lightened for better readability */
    --text-color: #f0f0f0;
    --navbar-bg: var(--primary-color);
    --navbar-text: #ffffff;
    --footer-bg: var(--primary-color);
    --footer-text: #ffffff;

    /* PaperMod theme variables */
    --theme: rgb(29, 30, 32);
    --entry: rgb(46, 46, 51);
    --primary: rgb(218, 218, 219);
    --secondary: rgb(155, 156, 157);
    --tertiary: rgb(65, 66, 68);
    --content: rgb(196, 196, 197);
    --code-block-bg: rgb(46, 46, 51);
    --code-bg: rgb(55, 56, 62);
    --border: rgb(51, 51, 51);
}

/* ================================= */
/* Accessibility Features */
/* ================================= */

/* Skip to Main Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    z-index: 1001;
    border-radius: 0 0 4px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Focus Indicators for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove default focus styles in favor of custom ones */
*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Breadcrumb Navigation - Removed duplicate styles */
/* See lines 1056-1098 for active breadcrumb CSS */

/* ================================= */
/* Global Reset & Base */
/* ================================= */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* ================================= */
/* Navbar */
/* ================================= */
.navbar {
    background-color: var(--navbar-bg);
    color: var(--navbar-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-title {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--navbar-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
    background-color: white;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-title:hover .navbar-logo {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--navbar-text);
    text-decoration: none;
    margin-left: 8px;
    font-weight: bold;
    padding: 12px 8px;  /* Minimum 44px touch target */
    display: inline-block;
}

.nav-links a:hover {
    color: var(--navbar-hover);
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

#theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    margin-left: 15px;
    padding: 10px;  /* Minimum 44px touch target */
    min-width: 44px;
    min-height: 44px;
    transition: transform 0.3s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
}

#theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Mobile Hamburger Menu */
.mobile-menu-btn {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background-color: var(--navbar-text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hamburger animation when menu is open */
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 60px);
        background-color: var(--navbar-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .nav-links.mobile-menu-open {
        right: 0;
    }

    .nav-links a {
        width: 100%;
        margin: 0 0 15px 0;
        padding: 15px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a.active,
    .nav-links a[aria-current="page"] {
        border-bottom: 1px solid var(--primary-color);
        background-color: rgba(216, 90, 31, 0.1);
    }

    #theme-toggle-btn {
        margin: 20px 0 0 0;
        width: 100%;
        justify-content: flex-start;
    }

    /* Reduce motion for accessibility */
    .nav-links.reduce-motion {
        transition: none;
    }

    .reduce-motion .hamburger-line {
        transition: none;
    }
}

/* Progressive enhancement: Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .nav-links,
    .hamburger-line,
    .mobile-toc-toggle,
    .mobile-toc-content,
    .mobile-toc-icon {
        transition: none !important;
        animation: none !important;
    }
}

/* ================================= */
/* Main Content Wrapper */
/* ================================= */
main.content {
    min-height: calc(100vh - 200px);
    background-color: var(--background-color);
}

main.home {
    text-align: center;
    padding: 50px 20px;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Homepage backgrounds removed - use default theme backgrounds */

/* ================================= */
/* Homepage Hero Section */
/* ================================= */
.home-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
    background-color: var(--background-color);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 40px 20px;
}

.site-logo {
    margin-bottom: 80px;
}

.site-logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
}

.home-social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.home-social-icons a {
    color: var(--primary-color);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.home-social-icons a:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}

/* ================================= */
/* Scramble Text Area */
/* ================================= */
#scramble-text-container {
    margin-top: 30px;
    margin-bottom: 80px;
    font-size: 3.5rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

#scramble-text {
    filter: blur(0.3px);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Removed color-alternate animation - span-level colors are sufficient */

/* Optional 'fuzzy' ghost text effect */
.ghost {
    opacity: 0.5;
    color: var(--third-color);
}

/* Scrambled text dynamic classes */
.scrambled {
    opacity: 0.6;
    color: var(--third-color);
}

.correct {
    opacity: 1;
    color: var(--primary-color);
}

/* ================================= */
/* Homepage Value Proposition */
/* ================================= */
.home-value-prop {
    margin-top: 40px;
    padding: 0 20px;
}

.home-headline {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.home-tagline {
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* ================================= */
/* Homepage Sections (Shared) */
/* ================================= */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 40px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
}

/* ================================= */
/* Featured HTB Writeup */
/* ================================= */
.home-featured-htb {
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.featured-htb-card {
    background-color: var(--card-bg, #ffffff);
    border-left: 6px solid var(--primary-color);
    padding: 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark .featured-htb-card {
    background-color: #1a1a1a;
}

.featured-htb-card:hover {
    box-shadow: 0 8px 24px rgba(216, 90, 31, 0.3);
    transform: translateY(-2px);
}

.featured-htb-content h3 {
    font-size: 2rem;
    margin: 0 0 15px 0;
}

.featured-htb-content h3 a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.featured-htb-content h3 a:hover {
    color: var(--primary-color);
}

.featured-htb-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 20px 0 30px 0;
    color: var(--text-color);
}

.featured-htb-cta {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 12px 30px;
    margin-top: 20px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.featured-htb-cta:hover {
    background-color: var(--secondary-color);
    transform: translateX(5px);
}

/* ================================= */
/* Why This Blog Exists */
/* ================================= */
.home-why-exists {
    background-color: var(--background-color);
}

.why-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.why-content p {
    margin: 0 0 20px 0;
    color: var(--text-color);
}

.why-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.why-list li {
    padding: 8px 0 8px 40px;
    position: relative;
    color: var(--text-color);
}

.why-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

/* ================================= */
/* Latest Posts Grid */
/* ================================= */
.home-latest-posts {
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card-home {
    background-color: var(--card-bg, #ffffff);
    border-left: 4px solid var(--primary-color);
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-width: 450px;
}

.dark .post-card-home {
    background-color: #1a1a1a;
}

.post-card-home:hover {
    box-shadow: 0 4px 16px rgba(216, 90, 31, 0.2);
    border-left-color: var(--secondary-color);
    transform: translateY(-2px);
}

.post-card-home h3 {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.post-card-home h3 a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.post-card-home h3 a:hover {
    color: var(--primary-color);
}

.post-meta-home {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--meta-color, #666666);
}

.post-category {
    background-color: var(--tertiary-color);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-summary-home {
    color: var(--text-color);
    line-height: 1.6;
    margin: 15px 0 20px 0;
}

.read-more-home {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    display: inline-block;
    transition: color 0.2s;
}

.read-more-home:hover {
    color: var(--secondary-color);
}

.view-all-posts {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #ffffff;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

/* Mobile Responsive for Homepage */
@media (max-width: 768px) {
    #scramble-text-container {
        height: 80px;
    }

    #scramble-text {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .home-headline {
        font-size: 1.8rem;
    }

    .home-tagline {
        font-size: 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .featured-htb-card {
        padding: 25px;
    }
}

/* ================================= */
/* Footer */
/* ================================= */
footer,
.site-footer {
    background-color: var(--footer-bg) !important;
    color: var(--footer-text) !important;
    padding: 40px 20px 20px !important;
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-section h4 {
    color: var(--footer-text) !important;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 700;
}

.footer-section p {
    color: var(--footer-text) !important;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    color: var(--footer-text) !important;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.2s ease;
    padding: 4px 0;
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p,
.footer-bottom a {
    color: var(--footer-text) !important;
    opacity: 0.7;
}

.footer-bottom a:hover {
    opacity: 1;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ================================= */
/* Post Listings (Homepage) */
/* ================================= */
.post-list {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.post-section {
    margin-bottom: 60px;
}

.post-section h2 {
    font-size: var(--font-size-h2);
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.post-card {
    background-color: var(--background-color);
    border: 1px solid var(--third-color);
    border-radius: 0;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-card h3 {
    margin: 0 0 15px 0;
    font-size: var(--font-size-h4);
}

.post-card h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.post-card h3 a:hover {
    color: var(--primary-color);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--third-color);
}

.post-meta time {
    font-style: italic;
}

.post-meta .tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.post-meta .tag {
    background-color: var(--secondary-color);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 0;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.post-meta .tag:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.post-card .summary {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
}

.view-all {
    text-align: center;
    margin-top: 30px;
}

.view-all .button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--background-color);
    text-decoration: none;
    border-radius: 0;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.2s;
}

.view-all .button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-section h2 {
        font-size: var(--font-size-h3);
    }
}

/* ================================= */
/* List Pages (Blog & HTB Archives) */
/* ================================= */
.list-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: var(--background-color);
}

.page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    text-align: center;
}

.page-header h1 {
    font-size: var(--font-size-h1);
    color: var(--secondary-color);
    margin: 0 0 15px 0;
    font-weight: 700;
}

.page-description {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* List Page Hero Image */
.list-hero-image {
    position: relative;
    width: 100%;
    height: 400px;
    margin: -20px -20px 30px -20px;
    overflow: hidden;
}

.list-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.list-hero-image .hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 60px 40px 30px 40px;
}

.list-hero-image .hero-title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .list-hero-image {
        height: 250px;
    }

    .list-hero-image .hero-title {
        font-size: 2rem;
    }

    .list-hero-image .hero-overlay {
        padding: 40px 20px 20px 20px;
    }
}

.list-page .post-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.list-page .post-card {
    background-color: var(--background-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 0;
    padding: 25px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.list-page .post-card:hover {
    box-shadow: 0 4px 16px rgba(216, 90, 31, 0.2);
    border-left-color: var(--secondary-color);
}

.list-page .post-card h2 {
    margin: 0 0 12px 0;
    font-size: var(--font-size-h3);
    font-weight: 600;
}

.list-page .post-card h2 a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.list-page .post-card h2 a:hover {
    color: var(--primary-color);
}

.list-page .post-card .summary {
    margin: 12px 0 15px 0;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.9;
}

.list-page .post-card .read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background-color: var(--secondary-color);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.2s;
}

.list-page .post-card .read-more:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateX(5px);
}

/* ================================= */
/* Single Post Pages */
/* ================================= */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    gap: 24px;
    position: relative;
}

.single-post {
    flex: 1;
    max-width: 850px;
    margin: 0 auto;
    background-color: var(--background-color);
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 25px;
    padding: 10px 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: var(--text-color);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--meta-color, #666666);
}

.breadcrumb-current {
    color: var(--meta-color, #666666);
    font-weight: 500;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 3px solid var(--secondary-color);
}

.post-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
    line-height: 1.3;
    font-weight: 700;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Content Typography */
.post-content h1 {
    font-size: var(--font-size-h1);
    color: var(--secondary-color);
    margin: 40px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

.post-content h2 {
    font-size: var(--font-size-h2);
    color: var(--secondary-color);
    margin: 35px 0 15px 0;
    font-weight: 600;
}

.post-content h3 {
    font-size: var(--font-size-h3);
    color: var(--primary-color);
    margin: 25px 0 12px 0;
    font-weight: 600;
}

.post-content h4 {
    font-size: var(--font-size-h4);
    color: var(--text-color);
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.post-content h5 {
    font-size: var(--font-size-h5);
    color: var(--text-color);
    margin: 18px 0 8px 0;
    font-weight: 600;
}

.post-content h6 {
    font-size: var(--font-size-h6);
    color: var(--text-color);
    margin: 15px 0 8px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-content p {
    margin: 15px 0;
}

.post-content ul, .post-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.post-content li {
    margin: 8px 0;
}

.post-content a {
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 2px solid var(--primary-color);
    transition: all 0.2s;
}

.post-content a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    background-color: rgba(216, 90, 31, 0.05);
    padding: 15px 20px;
    margin: 25px 0;
    font-style: italic;
    color: var(--text-color);
}

/* Inline code styling */
.post-content code:not(.chroma code) {
    background-color: rgba(216, 90, 31, 0.1);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 0;
    font-family: 'Courier New', 'Menlo', 'Monaco', monospace;
    font-size: 0.9em;
    font-weight: 500;
}

.dark .post-content code:not(.chroma code) {
    background-color: rgba(216, 90, 31, 0.2);
    color: var(--primary-color);
}

/* Code block container styling - Terminal-like black background for both themes */
.post-content pre {
    background-color: #0d0d0d;
    border: none;
    padding: 20px;
    border-radius: 0;
    overflow-x: auto;
    margin: 25px 0;
}

/* Dark theme - same terminal-like styling */
.dark .post-content pre {
    background-color: #0d0d0d;
    border: none;
}

.post-content pre code {
    color: #ffffff !important;
    background-color: transparent !important;
}


.dark .post-content pre code {
    color: #ffffff !important;
    background-color: transparent !important;
}

body.dark .post-content pre code {
    color: #ffffff !important;
    background-color: transparent !important;
}

html.dark .post-content pre code {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Chroma syntax highlighted code blocks with terminal-style header */
.post-content .highlight:not(table),
.highlight:not(table),
div.highlight:not(table) {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Remove theme's background from pre inside highlight */
.post-content .highlight pre,
.highlight pre {
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Hide copy code button and any CODE text */
.copy-code,
.highlight .copy-code,
div.highlight .copy-code,
.post-content .copy-code,
button.copy-code {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Terminal-style header and buttons removed - now handled by macos-codeblocks.js */

/* Chroma content - completely transparent, no inner box */
.post-content .chroma,
.chroma,
.highlight .chroma,
.post-content .highlight .chroma {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    padding: 20px !important;
    margin: 0 !important;
    overflow-x: auto;
    box-shadow: none !important;
}

/* Dark theme - same styling */
.dark .post-content .chroma,
.dark .chroma {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
}

/* Remove ALL styling from pre and code inside highlight */
.post-content .highlight pre,
.highlight pre,
.post-content pre code,
.highlight pre code,
.post-content .highlight pre code {
    background-color: transparent !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Courier New', 'Menlo', 'Monaco', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    display: block !important;
}

/* Chroma specific overrides */
.chroma .lntd:first-child {
    padding-right: 15px;
}

.chroma code {
    background-color: transparent !important;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    margin: 20px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content table th,
.post-content table td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    text-align: left;
}

.post-content table th {
    background-color: var(--secondary-color);
    color: var(--background-color);
    font-weight: 600;
}

.post-content table tr:nth-child(even) {
    background-color: rgba(4, 69, 113, 0.05);
}

.post-content table tr:hover {
    background-color: rgba(216, 90, 31, 0.05);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 0.95rem;
}

.post-meta time {
    color: var(--third-color);
    font-weight: 500;
}

.post-meta .tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-meta .tag {
    background-color: var(--secondary-color);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.post-meta .tag:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 3px solid var(--secondary-color);
    gap: 20px;
}

.nav-previous, .nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.post-navigation a {
    display: block;
    padding: 20px;
    background-color: rgba(4, 69, 113, 0.05);
    border-left: 4px solid var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s;
}

.post-navigation a:hover {
    background-color: rgba(216, 90, 31, 0.1);
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.nav-previous a:hover {
    transform: translateX(-5px);
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: var(--third-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-title {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content h1 {
        font-size: var(--font-size-h2);
    }

    .post-content h2 {
        font-size: var(--font-size-h3);
    }

    .post-content h3 {
        font-size: var(--font-size-h4);
    }

    .post-content h4 {
        font-size: var(--font-size-h5);
    }

    .post-navigation {
        flex-direction: column;
    }

    .nav-next {
        text-align: left;
    }
}

/* ================================= */
/* Floating Table of Contents */
/* ================================= */
.floating-toc {
    position: sticky;
    top: 100px;
    width: 280px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    background: var(--secondary-color);
    border: 3px solid var(--secondary-color);
    border-left: 6px solid var(--primary-color);
    padding: 20px;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.toc-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-content li {
    margin: 8px 0;
}

.toc-content a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.toc-content a:hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.3);
    padding-left: 18px;
    transform: translateX(3px);
    font-weight: 600;
}

.toc-content ul ul {
    padding-left: 15px;
    margin-top: 5px;
}

.toc-content ul ul a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    border-left-width: 3px;
}

.toc-content ul ul a:hover {
    color: #ffffff;
}

/* Dark Theme TOC */
.dark .floating-toc {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-left-color: #4dabf7;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.dark .toc-title {
    color: #ffffff;
    border-bottom-color: #4dabf7;
}

.dark .toc-content a {
    color: #ffffff;
}

.dark .toc-content a:hover {
    color: #4dabf7;
    background: rgba(77, 171, 247, 0.3);
    border-left-color: #4dabf7;
}

/* Back to Top Button in TOC */
.toc-quick-jump {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.toc-quick-jump button {
    width: 100%;
    padding: 0.75rem;
    background: rgba(77, 171, 247, 0.2);
    color: #ffffff;
    border: 1px solid #4dabf7;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.toc-quick-jump button:hover {
    background: #4dabf7;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 171, 247, 0.3);
}

.dark .toc-quick-jump {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.dark .toc-quick-jump button {
    background: rgba(77, 171, 247, 0.2);
    border-color: #4dabf7;
    color: #ffffff;
}

.dark .toc-quick-jump button:hover {
    background: #4dabf7;
    color: #000000;
}

/* Tags Page Styling */
.tags-page {
    max-width: 1200px;
    margin: 0 auto;
}

.tags-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tag-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #044571;
    color: #ffffff;
    border: 2px solid #044571;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tag-box:hover {
    background: #d85a1f;
    border-color: #d85a1f;
    color: #000000;
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(216, 90, 31, 0.3);
}

.tag-name {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: capitalize;
}

.tag-count {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tag-box:hover .tag-count {
    opacity: 1;
}

/* Dark theme for tag boxes */
body.dark .tag-box {
    background: #044571;
    border-color: #044571;
}

body.dark .tag-box:hover {
    background: #d85a1f;
    border-color: #d85a1f;
    color: #000000;
}

/* Hide TOC on smaller screens */
@media (max-width: 1200px) {
    .floating-toc {
        display: none;
    }

    .page-container {
        max-width: 900px;
    }

    .tags-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

/* ================================= */
/* Mobile Table of Contents */
/* ================================= */
.mobile-toc-container {
    display: none;
    margin-bottom: 24px;
}

.mobile-toc-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--secondary-color);
    border: 3px solid var(--secondary-color);
    border-left: 6px solid var(--primary-color);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 44px;
}

.mobile-toc-toggle:hover {
    background: rgba(26, 46, 81, 0.95);
    border-left-width: 8px;
}

.mobile-toc-toggle:active {
    transform: scale(0.98);
}

.mobile-toc-toggle span {
    flex: 1;
    text-align: center;
}

.mobile-toc-icon {
    transition: transform 0.3s ease;
}

.mobile-toc-toggle[aria-expanded="true"] .mobile-toc-icon {
    transform: rotate(180deg);
}

.mobile-toc-content {
    max-height: 0;
    overflow: hidden;
    background: var(--secondary-color);
    border: 0 solid var(--secondary-color);
    border-left: 6px solid var(--primary-color);
    transition: max-height 0.3s ease, padding 0.3s ease, border-width 0.3s ease;
}

.mobile-toc-content.mobile-toc-open {
    max-height: 1000px;
    padding: 20px;
    border-width: 3px;
    border-top-width: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-toc-content li {
    margin: 8px 0;
}

.mobile-toc-content a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-toc-content a:hover,
.mobile-toc-content a:active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.3);
    padding-left: 18px;
}

.mobile-toc-content ul ul {
    padding-left: 15px;
    margin-top: 5px;
}

.mobile-toc-content ul ul a {
    font-size: 0.85rem;
    color: var(--third-color);
    border-left-width: 3px;
}

/* Dark Theme Mobile TOC */
.dark .mobile-toc-toggle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-left-color: #4dabf7;
}

.dark .mobile-toc-toggle:hover {
    background: rgba(45, 55, 72, 0.95);
}

.dark .mobile-toc-content {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-left-color: #4dabf7;
}

.dark .mobile-toc-content a:hover,
.dark .mobile-toc-content a:active {
    color: #4dabf7;
    background: rgba(77, 171, 247, 0.3);
    border-left-color: #4dabf7;
}

/* Show mobile TOC on smaller screens */
@media (max-width: 1200px) {
    .mobile-toc-container {
        display: block;
    }
}

/* ================================= */
/* MacOS-Style Terminal Blocks */
/* ================================= */

/* Base Terminal Styling */
.terminal-block {
    margin: 25px 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    border: none;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    position: relative;
    user-select: none;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    position: absolute;
    left: 15px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-button.close {
    background-color: #ff5f57;
}

.terminal-button.minimize {
    background-color: #febc2e;
}

.terminal-button.maximize {
    background-color: #28c840;
}

.terminal-title {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.terminal-body {
    padding: 15px 20px;
    overflow-x: auto;
}

.terminal-line {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.terminal-prompt {
    font-weight: 600;
    margin-right: 8px;
    white-space: nowrap;
}

.terminal-pwd {
    color: inherit;
    margin: 0 3px;
}

.terminal-command {
    flex: 1;
    word-break: break-all;
}

/* Attacker Terminal - Dark Theme */
.attacker-terminal {
    border: none;
}

.attacker-terminal .terminal-header {
    background-color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.attacker-terminal .terminal-title {
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.attacker-terminal .terminal-body {
    background-color: #0d0d0d;
    color: #ffffff;
}

.attacker-terminal .terminal-prompt {
    color: var(--primary-color);
    font-weight: bold;
}

.attacker-terminal .terminal-pwd {
    color: #ffffff;
}

.attacker-terminal .terminal-command {
    color: #ffffff;
}

/* Target Terminal - Dark Theme */
.target-terminal {
    border: none;
}

.target-terminal .terminal-header {
    background-color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.target-terminal .terminal-title {
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.target-terminal .terminal-body {
    background-color: #0d0d0d;
    color: #ffffff;
}

.target-terminal .terminal-prompt {
    color: #4dabf7;
    font-weight: bold;
}

.target-terminal .terminal-pwd {
    color: #ffffff;
}

.target-terminal .terminal-command {
    color: #ffffff;
}

/* Shell Terminal - Dark theme for both light and dark modes */
.shell-terminal {
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shell-terminal .terminal-header {
    background-color: var(--third-color);  /* #666666 - Site palette neutral */
    border-bottom: 1px solid #555555;
}

.shell-terminal .terminal-title {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.8rem;
}

.shell-terminal .terminal-body {
    background-color: #0d0d0d;
    color: #ffffff;
}

.shell-terminal .terminal-prompt {
    color: #4dabf7;
    font-weight: bold;
}

.shell-terminal .terminal-command {
    color: #ffffff;
}

/* LSD (LSDeluxe) Style Terminal Output */
/* Use these classes in your terminal content for lsd-style formatting */

/* Base lsd container */
.lsd-output {
    font-family: 'Courier New', 'Menlo', 'Monaco', monospace;
    line-height: 1.6;
    color: #ffffff;
}

/* LSD Icons using Unicode */
.lsd-icon {
    display: inline-block;
    width: 1.5em;
    text-align: center;
    margin-right: 0.5em;
}

/* Folder icon and color */
.lsd-dir::before {
    content: "📁 ";
    color: #5796f8;
    font-weight: bold;
}

.lsd-dir {
    color: #5796f8;
    font-weight: bold;
}

/* File types */
.lsd-file {
    color: #d4d4d4;
}

.lsd-exec::before {
    content: "⚡ ";
    color: #76e268;
}

.lsd-exec {
    color: #76e268;
    font-weight: bold;
}

/* Symlink */
.lsd-link::before {
    content: "🔗 ";
    color: #6cc7f6;
}

.lsd-link {
    color: #6cc7f6;
    font-style: italic;
}

/* Archive files */
.lsd-archive::before {
    content: "📦 ";
    color: #ff6b6b;
}

.lsd-archive {
    color: #ff6b6b;
}

/* Image files */
.lsd-image::before {
    content: "🖼️ ";
    color: #ffa94d;
}

.lsd-image {
    color: #ffa94d;
}

/* Video files */
.lsd-video::before {
    content: "🎬 ";
    color: #ff8787;
}

.lsd-video {
    color: #ff8787;
}

/* Audio files */
.lsd-audio::before {
    content: "🎵 ";
    color: #ff9ff3;
}

.lsd-audio {
    color: #ff9ff3;
}

/* Code/Source files */
.lsd-code::before {
    content: "📝 ";
    color: #74c0fc;
}

.lsd-code {
    color: #74c0fc;
}

/* Config files */
.lsd-config::before {
    content: "⚙️ ";
    color: #ffd43b;
}

.lsd-config {
    color: #ffd43b;
}

/* Document files */
.lsd-doc::before {
    content: "📄 ";
    color: #c9c9c9;
}

.lsd-doc {
    color: #c9c9c9;
}

/* Hidden files (starting with .) */
.lsd-hidden {
    color: #6c757d;
    opacity: 0.7;
}

/* LSD permissions display */
.lsd-perms {
    color: #8c8c8c;
    font-family: 'Courier New', monospace;
    margin-right: 1em;
}

/* LSD size display */
.lsd-size {
    color: #76e268;
    text-align: right;
    display: inline-block;
    min-width: 4em;
    margin-right: 1em;
}

/* LSD date display */
.lsd-date {
    color: #74c0fc;
    margin-right: 1em;
}

/* LSD owner/group */
.lsd-owner {
    color: #ffd43b;
    margin-right: 0.5em;
}

.lsd-group {
    color: #ffa94d;
    margin-right: 1em;
}

/* LSD grid layout for detailed view */
.lsd-grid {
    display: grid;
    grid-template-columns: auto auto auto auto auto 1fr;
    gap: 0.5em;
    align-items: center;
}

.lsd-grid-item {
    white-space: nowrap;
}

/* LSD tree view styling */
.lsd-tree {
    font-family: 'Courier New', monospace;
}

.lsd-tree-branch {
    color: #6c757d;
}

/* Output Terminal - Collapsible */
.output-terminal {
    border: none;
}

.output-terminal .terminal-header {
    background-color: #4a4a4a;
    border-bottom: 1px solid #3a3a3a;
    cursor: pointer;
    transition: background-color 0.2s;
}

.output-terminal .terminal-header:hover {
    background-color: #5a5a5a;
}

.output-terminal .terminal-title {
    color: #e0e0e0;
    font-style: italic;
}

.output-terminal .terminal-title::before {
    content: "▼ ";
    font-style: normal;
    margin-right: 5px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.terminal-type-label {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.output-terminal .terminal-body {
    background-color: #0d0d0d;
    color: #ffffff;
    border: 1px solid #3a3a3a;
    border-top: none;
    padding: 5px 10px !important;
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 500px;
    overflow-y: auto;
}

.output-terminal .terminal-body.collapsed {
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
}

.output-content {
    margin: 0;
    padding: 0 !important;
    white-space: pre-wrap;
    color: #ffffff !important;
    background-color: transparent !important;
    word-wrap: break-word;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Syntax highlighting inside output terminals */
.output-terminal .chroma {
    background-color: transparent !important;
    margin: 0;
    padding: 0 !important;
}

.output-terminal .chroma pre {
    margin: 0;
    padding: 0 !important;
    background-color: transparent !important;
}

.output-terminal .chroma code {
    background-color: transparent !important;
}

.collapse-indicator {
    position: absolute;
    right: 15px;
    display: flex;
    align-items: center;
}

.collapse-icon {
    transition: transform 0.3s ease;
    color: #666666;
}

.output-terminal .terminal-body:not(.collapsed) ~ .terminal-header .collapse-icon,
.collapse-icon.expanded {
    transform: rotate(180deg);
}

/* Dark Theme Overrides for Target Terminal - Keep BLUE */
.dark .target-terminal {
    border-color: var(--secondary-color);
}

.dark .target-terminal .terminal-header {
    background-color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.dark .target-terminal .terminal-title {
    color: #ffffff;
}

/* ================================================== */
/* Tags Page Styling */
/* ================================================== */

.terms-tags {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.terms-tags li {
    display: inline-block;
}

.terms-tags a {
    display: inline-block;
    padding: 12px 20px;
    background: rgba(4, 69, 113, 0.1);
    border: 2px solid var(--secondary-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.terms-tags a:hover {
    background: var(--primary-color);    /* Solid color instead of gradient */
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(var(--primary-color), 0.3);
    border-color: var(--primary-color);
}

.terms-tags a sup {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-left: 5px;
}

.terms-tags a:hover sup {
    color: white;
}

/* Dark theme adjustments for tags */
.dark .terms-tags a {
    background: rgba(216, 90, 31, 0.15);    /* Solid color with opacity */
    border-color: var(--secondary-color);
}

.dark .terms-tags a:hover {
    background: var(--primary-color);       /* Solid color instead of gradient */
    border-color: var(--primary-color);
    color: white;
}

/* Target terminal body remains the same in dark mode since it's already black */

.dark .output-terminal {
    border: none;
}

.dark .output-terminal .terminal-header {
    background-color: #4a4a4a;
    border-bottom-color: #3a3a3a;
}

.dark .output-terminal .terminal-header:hover {
    background-color: #5a5a5a;
}

.dark .output-terminal .terminal-title {
    color: #e0e0e0;
}

.dark .output-terminal .terminal-body {
    background-color: #0d0d0d;
    color: #ffffff;
    border-color: #3a3a3a;
}

.dark .collapse-icon {
    color: #aaaaaa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal-block {
        font-size: 0.8rem;
    }

    .terminal-body {
        padding: 12px 15px;
    }

    .terminal-line {
        flex-direction: column;
    }

    .terminal-prompt {
        margin-bottom: 5px;
    }
}

/* ================================================== */
/* Timeline Shortcode Styles */
/* ================================================== */

.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
}

.timeline-item {
    position: relative;
    margin: 30px 0;
    display: flex;
    align-items: center;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--background-color);
    z-index: 2;
}

.timeline-content {
    width: 45%;
    padding: 20px;
    background: rgba(4, 69, 113, 0.05);
    border-left: 4px solid var(--secondary-color);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    margin-right: 5%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
    margin-left: 5%;
}

.timeline-time {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.timeline-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.timeline-description {
    color: var(--text-color);
    line-height: 1.6;
}

/* Dark theme timeline adjustments */
.dark .timeline-content {
    background: rgba(216, 90, 31, 0.1);
    border-left-color: var(--primary-color);
}

/* Responsive timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-marker {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 50px !important;
        margin-right: 0 !important;
    }
}

/* ================================================== */
/* Admonition Box Styles */
/* ================================================== */

.admonition {
    margin: 25px 0;
    padding: 0;
    border-left: 4px solid;
    background-color: rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.admonition-title {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-weight: bold;
    gap: 10px;
}

.admonition-icon {
    font-size: 1.2rem;
}

.admonition-content {
    padding: 12px 16px;
}

.admonition-content p:last-child {
    margin-bottom: 0;
}

/* Note type - Uses secondary color (blue) */
.admonition-note {
    border-left-color: var(--secondary-color);
}

.admonition-note .admonition-title {
    background-color: rgba(4, 69, 113, 0.1);
    color: var(--secondary-color);
}

/* Warning type - Uses primary color (orange) */
.admonition-warning {
    border-left-color: var(--primary-color);
}

.admonition-warning .admonition-title {
    background-color: rgba(216, 90, 31, 0.1);
    color: var(--primary-color);
}

/* Tip type - Uses tertiary color (green) */
.admonition-tip {
    border-left-color: var(--tertiary-color);
}

.admonition-tip .admonition-title {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--tertiary-color);
}

/* Info type - Uses secondary color (blue) */
.admonition-info {
    border-left-color: var(--secondary-color);
}

.admonition-info .admonition-title {
    background-color: rgba(4, 69, 113, 0.1);
    color: var(--secondary-color);
}

/* Danger type - Uses darker shade of primary */
.admonition-danger {
    border-left-color: #c44820;
}

.admonition-danger .admonition-title {
    background-color: rgba(196, 72, 32, 0.1);
    color: #c44820;
}

/* Success type - Uses tertiary color (green) */
.admonition-success {
    border-left-color: var(--tertiary-color);
}

.admonition-success .admonition-title {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--tertiary-color);
}

/* Dark theme admonition adjustments */
.dark .admonition {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ================================================== */
/* Gallery Styles */
/* ================================================== */

.gallery {
    margin: 30px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery[data-columns="2"] .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
}

.gallery[data-columns="4"] .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.85rem;
    text-align: center;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-slide {
    display: none;
    text-align: center;
}

.lightbox-slide.active {
    display: block;
}

.lightbox-slide img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    padding: 15px;
    font-size: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    z-index: 10000;
}

.lightbox-prev:hover, .lightbox-next:hover {
    color: var(--primary-color);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Responsive gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .gallery-item img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ================================================== */
/* Audio Block Styles */
/* ================================================== */

.audio-block {
    margin: 30px 0;
    padding: 20px;
    background: rgba(4, 69, 113, 0.05);
    border-left: 4px solid var(--secondary-color);
}

.audio-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.audio-player {
    width: 100%;
    margin: 15px 0;
    outline: none;
}

.audio-caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    font-style: italic;
}

/* Dark theme audio adjustments */
.dark .audio-block {
    background: rgba(216, 90, 31, 0.1);
    border-left-color: var(--primary-color);
}

/* ================================================== */
/* Video Block Styles */
/* ================================================== */

.video-block {
    margin: 30px 0;
}

.video-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border: 3px solid var(--secondary-color);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-caption {
    margin-top: 10px;
    padding: 10px;
    background: rgba(4, 69, 113, 0.05);
    border-left: 4px solid var(--secondary-color);
    font-size: 0.9rem;
    color: var(--text-color);
    font-style: italic;
}

/* Dark theme video adjustments */
.dark .video-wrapper {
    border-color: var(--primary-color);
}

.dark .video-caption {
    background: rgba(216, 90, 31, 0.1);
    border-left-color: var(--primary-color);
}

/* ================================================== */
/* Tabs Shortcode Styles */
/* ================================================== */

.tabs-container {
    margin: 30px 0;
}

.tabs-header {
    display: flex;
    border-bottom: 3px solid var(--secondary-color);
    margin-bottom: 20px;
}

.tab-item {
    flex: 1;
}

.tab-button {
    width: 100%;
    padding: 15px 20px;
    background: rgba(4, 69, 113, 0.05);
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.tab-item.active .tab-button {
    background: var(--secondary-color);
    color: white;
    border-bottom-color: var(--primary-color);
}

.tab-button:hover {
    background: rgba(4, 69, 113, 0.15);
}

.tab-content {
    display: none;
    padding: 20px;
    border-left: 4px solid var(--secondary-color);
    background: rgba(4, 69, 113, 0.02);
}

.tab-item.active .tab-content {
    display: block;
}

/* Dark theme tabs */
.dark .tab-button {
    background: rgba(216, 90, 31, 0.05);
}

.dark .tab-item.active .tab-button {
    background: var(--primary-color);
}

.dark .tab-content {
    border-left-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.05);
}

/* ================================================== */
/* Collapsible/Accordion Styles */
/* ================================================== */

.collapse-container {
    margin: 25px 0;
    border: 2px solid var(--secondary-color);
}

.collapse-header {
    width: 100%;
    padding: 15px 20px;
    background: rgba(4, 69, 113, 0.05);
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.collapse-header:hover {
    background: rgba(4, 69, 113, 0.15);
}

.collapse-header.active {
    background: var(--secondary-color);
    color: white;
}

.collapse-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.collapse-header.active .collapse-icon {
    transform: rotate(90deg);
}

.collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.collapse-content.active {
    max-height: 2000px;
    padding: 20px;
}

/* Dark theme collapse */
.dark .collapse-container {
    border-color: var(--primary-color);
}

.dark .collapse-header {
    background: rgba(216, 90, 31, 0.05);
}

.dark .collapse-header.active {
    background: var(--primary-color);
}

/* ================================================== */
/* Code Diff Styles */
/* ================================================== */

.code-diff {
    margin: 25px 0;
    border-left: 4px solid var(--secondary-color);
}

.diff-title {
    padding: 10px 15px;
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.code-diff pre {
    margin: 0;
    padding: 15px;
    background: #1e1e1e;
    overflow-x: auto;
}

.code-diff code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Diff line styling */
.code-diff .line-add {
    background: rgba(0, 255, 0, 0.1);
    display: block;
}

.code-diff .line-remove {
    background: rgba(255, 0, 0, 0.1);
    display: block;
}

/* ================================================== */
/* File Tree Styles */
/* ================================================== */

.file-tree {
    margin: 25px 0;
    border: 2px solid var(--secondary-color);
    background: rgba(4, 69, 113, 0.02);
}

.file-tree-title {
    padding: 10px 15px;
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.file-tree-content {
    margin: 0;
    padding: 20px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-color);
    overflow-x: auto;
}

/* Dark theme file tree */
.dark .file-tree {
    border-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.05);
}

.dark .file-tree-title {
    background: var(--primary-color);
}

/* ================================================== */
/* Copyable Block Styles */
/* ================================================== */

.copyable-block {
    margin: 25px 0;
    position: relative;
}

/* Remove top margin from macos wrapper when inside copyable block to connect title and code */
.copyable-block .macos-code-wrapper {
    margin-top: 0;
}

.copyable-title {
    padding: 10px 15px;
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.copyable-header {
    display: none;  /* Hide copy button from copyable blocks */
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.copy-button.copied {
    background: #4caf50;
}

.copy-button.copied .copy-text::after {
    content: 'ed!';
}

.copyable-block pre {
    margin: 0;
    padding: 40px 15px 15px 15px;
    background: #1e1e1e;
    overflow-x: auto;
}

/* ================================================== */
/* Badge/Label Styles */
/* ================================================== */

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-default {
    background: var(--third-color);  /* #666666 - Site palette */
    color: white;
}

.badge-primary {
    background: var(--primary-color);  /* #d85a1f */
    color: white;
}

.badge-secondary {
    background: var(--secondary-color);  /* #044571 */
    color: white;
}

.badge-success {
    background: var(--tertiary-color);  /* #16a34a - Site palette green */
    color: white;
}

.badge-danger {
    background: #c44820;  /* Darker shade derived from primary */
    color: white;
}

.badge-warning {
    background: var(--primary-color);  /* #d85a1f - Site palette orange */
    color: white;
}

.badge-info {
    background: var(--secondary-color);  /* #044571 - Site palette blue */
    color: white;
}

.badge-high {
    background: #dc3545;
    color: white;
}

.badge-medium {
    background: #ff9800;
    color: white;
}

.badge-low {
    background: #ffc107;
    color: #212529;
}

.badge-critical {
    background: #9c27b0;
    color: white;
}

/* ================================================== */
/* Keyboard Key Styles */
/* ================================================== */

.kbd-container {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.kbd-key {
    display: inline-block;
    padding: 3px 8px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    font-weight: bold;
    line-height: 1;
    color: #333;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #ced4da;
    border-radius: 0;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.kbd-plus {
    margin: 0 2px;
    color: var(--text-color);
    font-weight: bold;
}

/* Dark theme kbd */
.dark .kbd-key {
    color: #f0f0f0;
    background: linear-gradient(180deg, #495057 0%, #343a40 100%);
    border-color: #212529;
}

/* ================================================== */
/* CTF Flag Box Styles */
/* ================================================== */

.flag-box {
    margin: 30px 0;
    border: 3px solid var(--primary-color);
    background: rgba(216, 90, 31, 0.1);    /* Solid color with opacity instead of gradient */
}

.flag-header {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flag-icon {
    font-size: 1.5rem;
}

.flag-content {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.flag-text {
    flex: 1;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
}

.flag-copy {
    padding: 10px 15px;
    background: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.flag-copy:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Platform-specific flag styles */
.flag-platform {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Only use BLUE and ORANGE for flag boxes */

.flag-htb {
    border-color: var(--secondary-color);  /* #044571 - Blue */
    background: rgba(4, 69, 113, 0.1);
}

.flag-htb .flag-header {
    background: var(--secondary-color);  /* #044571 - Blue */
    color: white;
}

.flag-htb .flag-text {
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

.flag-offsec {
    border-color: var(--primary-color);  /* #d85a1f - Orange */
    background: rgba(216, 90, 31, 0.1);
}

.flag-offsec .flag-header {
    background: var(--primary-color);  /* #d85a1f - Orange */
    color: white;
}

.flag-offsec .flag-text {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.flag-thm {
    border-color: var(--secondary-color);  /* #044571 - Blue */
    background: rgba(4, 69, 113, 0.1);
}

.flag-thm .flag-header {
    background: var(--secondary-color);  /* #044571 - Blue */
    color: white;
}

.flag-thm .flag-text {
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

.flag-ctf {
    border-color: var(--primary-color);  /* #d85a1f - Orange */
    background: rgba(216, 90, 31, 0.1);
}

.flag-ctf .flag-header {
    background: var(--primary-color);  /* #d85a1f - Orange */
    color: white;
}

.flag-ctf .flag-text {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* ================================================== */
/* Figure (Image with Caption) Styles */
/* ================================================== */

.shortcode-figure {
    margin: 30px 0;
}

.shortcode-figure img {
    display: block;
    margin: 0 auto;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.figure-title {
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-color);
}

.figure-caption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    font-style: italic;
}

.dark .shortcode-figure img {
    border-color: var(--primary-color);
}

/* ================================================== */
/* Hash Display Styles */
/* ================================================== */

.hash-block {
    margin: 25px 0;
    border: 2px solid var(--secondary-color);
    background: rgba(4, 69, 113, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.hash-header {
    padding: 10px 15px;
    background: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hash-type {
    font-weight: bold;
    font-family: var(--font-monospace);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 3px;
}

.hash-title {
    flex: 1;
    font-size: 0.95rem;
}

.hash-copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.hash-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.hash-copy-btn.copied {
    background: rgba(22, 163, 74, 0.3);
    border-color: rgba(22, 163, 74, 0.5);
}

.hash-content {
    padding: 15px;
}

.hash-value {
    font-family: var(--font-monospace);
    font-size: 0.95rem;
    word-break: break-all;
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
    border-radius: 3px;
    display: block;
}

.dark .hash-block {
    border-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.05);
}

.dark .hash-value {
    background: rgba(255, 255, 255, 0.05);
}

/* ================================================== */
/* Credentials Display Styles */
/* ================================================== */

.credentials-block {
    margin: 25px 0;
    border: 2px solid var(--secondary-color);  /* #044571 - Blue */
    background: rgba(4, 69, 113, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.credentials-header {
    padding: 10px 15px;
    background: var(--secondary-color);  /* #044571 - Blue */
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.credentials-icon {
    font-size: 1.2rem;
}

.credentials-service {
    flex: 1;
    font-weight: bold;
}

.credentials-copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.credentials-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.credentials-copy-btn.copied {
    background: rgba(22, 163, 74, 0.3);
    border-color: rgba(22, 163, 74, 0.5);
}

.credentials-body {
    padding: 15px;
}

.credentials-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.credentials-row:last-child {
    margin-bottom: 0;
}

.credentials-label {
    font-weight: bold;
    min-width: 90px;
    color: var(--text-color);
    opacity: 0.8;
}

.credentials-value {
    font-family: var(--font-monospace);
    font-size: 0.95rem;
    color: var(--secondary-color);  /* #044571 - Blue */
    background: rgba(4, 69, 113, 0.1);
    padding: 6px 10px;
    border-radius: 3px;
    flex: 1;
}

.credentials-notes {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(4, 69, 113, 0.2);
}

.credentials-notes-text {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
}

.dark .credentials-block {
    background: rgba(4, 69, 113, 0.1);
}

.dark .credentials-value {
    background: rgba(4, 69, 113, 0.15);
}

/* ================================================== */
/* Enhanced Quote Styles */
/* ================================================== */

.enhanced-quote {
    margin: 30px 0;
    padding: 0;
    border-left: 6px solid var(--secondary-color);
    background: rgba(4, 69, 113, 0.05);
    font-style: italic;
}

.quote-content {
    padding: 20px 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.quote-content p:last-child {
    margin-bottom: 0;
}

.quote-footer {
    padding: 15px 25px;
    background: rgba(4, 69, 113, 0.1);
    font-size: 0.9rem;
    font-style: normal;
}

.quote-author {
    font-weight: bold;
    color: var(--secondary-color);
}

.quote-source a {
    color: var(--primary-color);
    text-decoration: none;
}

.quote-source a:hover {
    text-decoration: underline;
}

/* Dark theme quote */
.dark .enhanced-quote {
    border-left-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.05);
}

.dark .quote-footer {
    background: rgba(216, 90, 31, 0.1);
}

.dark .quote-author {
    color: var(--primary-color);
}

/* ================================================== */
/* Progress Bar Styles */
/* ================================================== */

.progress-container {
    margin: 25px 0;
}

.progress-label {
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid var(--secondary-color);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    position: relative;
}

.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.progress-primary {
    background: var(--primary-color);
}

.progress-secondary {
    background: var(--secondary-color);
}

.progress-success {
    background: #28a745;
}

.progress-warning {
    background: #ffc107;
}

.progress-danger {
    background: #dc3545;
}

.progress-info {
    background: #17a2b8;
}

/* Dark theme progress */
.dark .progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

/* ================================================== */
/* Mermaid Diagram Styles */
/* ================================================== */

.mermaid-container {
    margin: 30px 0;
    padding: 20px;
    background: rgba(4, 69, 113, 0.02);
    border: 2px solid var(--secondary-color);
    overflow-x: auto;
}

.mermaid {
    display: flex;
    justify-content: center;
}

/* Dark theme mermaid */
.dark .mermaid-container {
    background: rgba(216, 90, 31, 0.05);
    border-color: var(--primary-color);
}

/* ================================================== */
/* ASCII Art Styles */
/* ================================================== */

.ascii-art {
    margin: 25px 0;
    border: 2px solid var(--secondary-color);
    background: rgba(4, 69, 113, 0.02);
}

.ascii-title {
    padding: 10px 15px;
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.ascii-content {
    margin: 0;
    padding: 20px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.2;
    color: var(--text-color);
    overflow-x: auto;
    white-space: pre;
}

/* Dark theme ASCII */
.dark .ascii-art {
    border-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.05);
}

.dark .ascii-title {
    background: var(--primary-color);
}

/* ================================================== */
/* Split View Styles */
/* ================================================== */

.split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.split-panel {
    border: 2px solid var(--secondary-color);
    background: rgba(4, 69, 113, 0.02);
}

.split-panel-title {
    padding: 12px 15px;
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.split-panel-content {
    padding: 20px;
}

/* Dark theme split view */
.dark .split-panel {
    border-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.05);
}

.dark .split-panel-title {
    background: var(--primary-color);
}

/* Responsive split view */
@media (max-width: 768px) {
    .split-view {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Gallery Filtering and Sharing Styles
   ========================================== */

/* Gallery Container */
.gallery-container {
    margin: 2rem 0;
}

/* Gallery Filter Buttons */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--background-color);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.dark .filter-btn {
    background: #2a2a2a;
    border-color: var(--primary-color);
}

.dark .filter-btn:hover,
.dark .filter-btn.active {
    background: var(--primary-color);
}

/* Gallery Items - Update for better transitions */
.gallery-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Lightbox Share Button */
.lightbox-share {
    position: absolute;
    top: 20px;
    right: 70px;
    z-index: 1002;
}

.share-btn {
    background: rgba(216, 90, 31, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Share Menu */
.share-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: 0;
    padding: 10px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
}

.share-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.share-link i {
    font-size: 16px;
}

.dark .share-menu {
    background: #2a2a2a;
    border-color: var(--primary-color);
}

/* ==========================================
   Embed Block Styles (SoundCloud, Spotify)
   ========================================== */

.soundcloud-block,
.spotify-block {
    margin: 2rem 0;
    padding: 20px;
    background: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: 0;
}

.embed-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.soundcloud-wrapper,
.spotify-wrapper {
    margin: 15px 0;
    border-radius: 0;
    overflow: hidden;
}

.embed-caption {
    margin-top: 15px;
    padding: 10px;
    background: rgba(216, 90, 31, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 0;
    font-size: 14px;
    color: var(--text-color);
    font-style: italic;
}

.dark .soundcloud-block,
.dark .spotify-block {
    background: #2a2a2a;
    border-color: var(--primary-color);
}

.dark .embed-caption {
    background: rgba(216, 90, 31, 0.2);
}

/* Responsive Embeds */
@media (max-width: 768px) {
    .soundcloud-block,
    .spotify-block {
        padding: 15px;
    }

    .embed-title {
        font-size: 16px;
    }

    .lightbox-share {
        right: 60px;
        top: 15px;
    }

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


/* ==========================================
   Reading Progress Bar
   ========================================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(4, 69, 113, 0.2);
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: var(--primary-color);    /* Solid color instead of gradient */
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

.dark .reading-progress {
    background: rgba(216, 90, 31, 0.2);    /* Updated to new primary color */
}

/* ==========================================
   Series Navigation
   ========================================== */

.series-box {
    margin: 2rem 0;
    padding: 25px;
    background: rgba(216, 90, 31, 0.1);    /* Solid color with opacity instead of gradient */
    border: 2px solid var(--primary-color);
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.series-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.series-icon {
    font-size: 24px;
}

.series-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.series-description {
    margin: 15px 0;
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.6;
}

.series-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.series-item {
    margin: 10px 0;
    padding: 12px 15px;
    background: var(--background-color);
    border-left: 4px solid var(--secondary-color);
    border-radius: 0;
    transition: all 0.3s ease;
}

.series-item:hover {
    border-left-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.series-item.current {
    border-left-color: var(--primary-color);
    background: rgba(216, 90, 31, 0.1);
    font-weight: 600;
}

.series-item a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.series-item.current a {
    color: var(--primary-color);
}

.series-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.series-item.current .series-number {
    background: var(--primary-color);
}

.series-post-title {
    flex: 1;
}

.series-current-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

.series-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--primary-color);
}

.series-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 48%;
}

.series-nav-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(216, 90, 31, 0.3);
}

.series-nav-btn.next {
    justify-content: flex-end;
    text-align: right;
}

.series-nav-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #ccc;
}

.dark .series-box {
    background: rgba(216, 90, 31, 0.15);    /* Solid color with opacity instead of gradient */
}

.dark .series-item {
    background: #2a2a2a;
}

.dark .series-item.current {
    background: rgba(216, 90, 31, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .series-box {
        padding: 20px 15px;
    }

    .series-title {
        font-size: 18px;
    }

    .series-navigation {
        flex-direction: column;
    }

    .series-nav-btn {
        max-width: 100%;
    }

    .series-nav-btn.next {
        justify-content: flex-start;
        text-align: left;
    }
}

/* ========================================
   MacOS-Style Code Blocks
   ======================================== */

.macos-code-wrapper {
    margin: 1.5em 0;
    background-color: #0d0d0d;
    border: 1px solid #3a3a3a;
    overflow: hidden;
}

.macos-code-header {
    display: flex;
    align-items: center;
    background-color: #2d2d2d;
    padding: 8px 12px;
    border-bottom: 1px solid #3a3a3a;
}

.macos-code-buttons {
    display: flex;
    gap: 8px;
    margin-right: 12px;
}

.macos-code-title {
    font-size: 12px;
    color: #888;
    font-family: var(--font-monospace);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1; /* Push copy button to the right */
}

/* Code Copy Button */
.code-copy-btn {
    display: none;  /* Hide copy button from macOS code blocks */
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.code-copy-btn.copied {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    border-color: rgba(22, 163, 74, 0.3);
}

/* Light theme copy button */
body:not(.dark) .code-copy-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #666;
}

body:not(.dark) .code-copy-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    border-color: rgba(0, 0, 0, 0.2);
}

body:not(.dark) .code-copy-btn.copied {
    background: rgba(22, 163, 74, 0.15);
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.3);
}

/* Code block styling inside wrapper */
.macos-code-wrapper .chroma {
    margin: 0;
    background-color: #0d0d0d !important;
    padding: 1em;
}

.macos-code-wrapper pre {
    margin: 0;
    background-color: transparent !important;
}

/* Light theme adjustments - Keep code blocks dark in both themes */
body:not(.dark) .macos-code-wrapper {
    background-color: #0d0d0d;
    border-color: #3a3a3a;
}

body:not(.dark) .macos-code-header {
    background-color: #2d2d2d;
    border-bottom-color: #3a3a3a;
}

body:not(.dark) .macos-code-title {
    color: #888;
}

body:not(.dark) .macos-code-wrapper .chroma {
    background-color: #0d0d0d !important;
    color: #ffffff !important;
}

/* ========================================
   Scroll to Top Button
   ======================================== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* ========================================
   Terminal Copy Button
   ======================================== */

/* Hide ALL copy buttons across the entire site */
.terminal-copy-btn,
.flag-copy,
.hash-copy-btn,
.credentials-copy-btn,
.copy-btn,
button[class*="copy"],
[class*="-copy-btn"] {
    display: none !important;
}

.terminal-copy-btn:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0;
}

.terminal-copy-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.terminal-copy-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.terminal-copy-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* Touch device support - always show copy button */
@media (hover: none) and (pointer: coarse) {
    .terminal-copy-btn {
        color: rgba(255, 255, 255, 0.9);
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Terminal Output Styles */
.terminal-output {
    margin-top: 0.5em;
    opacity: 0.9;
}

.terminal-output pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: var(--font-monospace);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ========================================
   PowerShell Terminal
   ======================================== */

.powershell-terminal {
    border: 1px solid #1e3a5f;
}

.powershell-terminal .terminal-header {
    background-color: var(--secondary-color);  /* #044571 - Site palette blue */
    border-bottom: 2px solid #033a5d;
}

.powershell-terminal .terminal-title {
    color: #ffffff;
    font-weight: 600;
}

.powershell-terminal .terminal-body {
    background-color: #0d0d0d;
    color: #ffffff;
}

.powershell-terminal .terminal-prompt {
    color: #5c9fd8;
    font-weight: bold;
}

.powershell-terminal .terminal-command {
    color: #ffffff;
}

/* ========================================
   CMD Terminal
   ======================================== */

.cmd-terminal {
    border: 1px solid #3a3a3a;
}

.cmd-terminal .terminal-header {
    background-color: var(--third-color);  /* #666666 - Site palette neutral */
    border-bottom: 2px solid #555555;
}

.cmd-terminal .terminal-title {
    color: #ffffff;
    font-weight: 600;
}

.cmd-terminal .terminal-body {
    background-color: #0d0d0d;
    color: #c0c0c0;
}

.cmd-terminal .terminal-prompt {
    color: #c0c0c0;
    font-weight: bold;
}

.cmd-terminal .terminal-command {
    color: #ffffff;
}

/* ========================================
   SQL Terminal
   ======================================== */

.sql-terminal {
    border: 1px solid #b84a1a;
}

.sql-terminal .terminal-header {
    background-color: var(--primary-color);  /* #d85a1f - Site palette orange */
    border-bottom: 2px solid #b84a1a;
}

.sql-terminal .terminal-title {
    color: #ffffff;
    font-weight: 600;
}

.sql-terminal .terminal-body {
    background-color: #0d0d0d;
    color: #ffffff;
}

.sql-terminal .terminal-prompt {
    color: #00d9ff;
    font-weight: bold;
}

.sql-terminal .terminal-command {
    color: #ffffff;
}

.sql-terminal .terminal-content {
    margin: 0;
    color: #ffffff;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========================================
   Terminal Syntax Highlighting Support
   ======================================== */

/* Make Chroma code blocks inline in terminal commands */
.terminal-command .highlight,
.terminal-command .chroma {
    display: inline;
    background-color: transparent !important;
    padding: 0;
    margin: 0;
}

.terminal-command .highlight pre,
.terminal-command .chroma pre {
    display: inline;
    background-color: transparent !important;
    padding: 0;
    margin: 0;
    border: none;
}

.terminal-command .highlight code,
.terminal-command .chroma code {
    display: inline;
    background-color: transparent !important;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}

/* Remove color inheritance for syntax highlighting */
.terminal-command .chroma * {
    color: inherit;
}

/* Allow Chroma tokens to use their own colors */
.terminal-command .chroma .k,  /* Keywords */
.terminal-command .chroma .kc, /* Keyword.Constant */
.terminal-command .chroma .kd, /* Keyword.Declaration */
.terminal-command .chroma .kn, /* Keyword.Namespace */
.terminal-command .chroma .kp, /* Keyword.Pseudo */
.terminal-command .chroma .kr, /* Keyword.Reserved */
.terminal-command .chroma .kt, /* Keyword.Type */
.terminal-command .chroma .s,  /* String */
.terminal-command .chroma .s1, /* String.Single */
.terminal-command .chroma .s2, /* String.Double */
.terminal-command .chroma .se, /* String.Escape */
.terminal-command .chroma .si, /* String.Interpol */
.terminal-command .chroma .n,  /* Name */
.terminal-command .chroma .nf, /* Name.Function */
.terminal-command .chroma .nb, /* Name.Builtin */
.terminal-command .chroma .nc, /* Name.Class */
.terminal-command .chroma .no, /* Name.Constant */
.terminal-command .chroma .nd, /* Name.Decorator */
.terminal-command .chroma .ni, /* Name.Entity */
.terminal-command .chroma .ne, /* Name.Exception */
.terminal-command .chroma .nl, /* Name.Label */
.terminal-command .chroma .nn, /* Name.Namespace */
.terminal-command .chroma .nx, /* Name.Other */
.terminal-command .chroma .py, /* Name.Property */
.terminal-command .chroma .nt, /* Name.Tag */
.terminal-command .chroma .nv, /* Name.Variable */
.terminal-command .chroma .m,  /* Number */
.terminal-command .chroma .mf, /* Number.Float */
.terminal-command .chroma .mh, /* Number.Hex */
.terminal-command .chroma .mi, /* Number.Integer */
.terminal-command .chroma .mo, /* Number.Oct */
.terminal-command .chroma .c,  /* Comment */
.terminal-command .chroma .c1, /* Comment.Single */
.terminal-command .chroma .cm, /* Comment.Multiline */
.terminal-command .chroma .o,  /* Operator */
.terminal-command .chroma .ow  /* Operator.Word */
{
    color: revert !important;
}



/* ========================================
   Theme-Specific Syntax Highlighting
   Solarized Light / Solarized Dark
   ======================================== */

/* Syntax highlighting now uses Hugo's Monokai theme for colored syntax */
/* The macos-codeblocks.js wrapper provides the dark background */

/* ================================= */
/* HTB Writeup Specific Styles */
/* ================================= */

/* HTB Machine Info Card */
.htb-machine-info {
    background: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: 0;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.htb-machine-info .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.htb-machine-info .info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.htb-machine-info .info-label {
    font-size: 0.85rem;
    color: var(--third-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.htb-machine-info .info-value {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.htb-machine-info .info-value i {
    color: var(--primary-color);
}

.htb-machine-info .info-value code {
    background: var(--code-bg);
    padding: 4px 8px;
    border-radius: 0;
    font-family: 'Courier New', monospace;
}

/* Difficulty Badges */
.difficulty-easy {
    color: #16a34a !important;
}

.difficulty-medium {
    color: #f59e0b !important;
}

.difficulty-hard {
    color: #ef4444 !important;
}

.difficulty-insane {
    color: #7c3aed !important;
}

/* OS Icons */
.os-linux i {
    color: #fcc419;
}

.os-windows i {
    color: #0078d4;
}

/* HTB Attack Path */
.htb-attack-path {
    background: var(--background-color);
    border-left: 4px solid var(--secondary-color);
    padding: 25px;
    margin: 30px 0;
}

.htb-attack-path h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.htb-attack-path .path-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
}

.htb-attack-path .path-step {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
}

.htb-attack-path .path-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.htb-attack-path .step-number {
    background: var(--primary-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.htb-attack-path .path-arrow {
    color: var(--third-color);
    font-size: 1.2rem;
}

/* HTB Navigation Cards */
.htb-nav-card {
    display: block;
    background: var(--background-color);
    border: 2px solid var(--third-color);
    border-radius: 0;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.htb-nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.htb-nav-card:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.htb-nav-card:hover::before {
    transform: scaleY(1);
}

.htb-nav-card .nav-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
    display: block;
    margin: 10px 0;
}

.htb-nav-card .nav-difficulty {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0;
    margin-right: 10px;
}

.htb-nav-card .nav-os {
    font-size: 0.85rem;
    color: var(--third-color);
}

.htb-nav-card .nav-direction {
    font-size: 0.75rem;
    color: var(--third-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* HTB Badge */
.htb-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.htb-badge .htb-logo {
    font-size: 1.2rem;
}

/* HTB Summary */
.htb-summary {
    background: var(--background-color);
    border-left: 4px solid var(--tertiary-color);
    padding: 20px 25px;
    margin: 25px 0;
}

.htb-summary h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tertiary-color);
    margin-bottom: 15px;
}

/* HTB Tags */
.htb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.htb-tag {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* HTB Learnings */
.htb-learnings {
    background: var(--background-color);
    border: 2px solid var(--tertiary-color);
    border-radius: 0;
    padding: 25px;
    margin: 30px 0;
}

.htb-learnings h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tertiary-color);
    margin-bottom: 20px;
}

.htb-learnings .learnings-list {
    list-style: none;
    padding: 0;
}

.htb-learnings .learnings-list li {
    padding: 12px 0 12px 30px;
    position: relative;
    border-bottom: 1px solid var(--third-color);
}

.htb-learnings .learnings-list li:last-child {
    border-bottom: none;
}

.htb-learnings .learnings-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--tertiary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Dark Mode Adjustments for HTB */
.dark .htb-machine-info,
.dark .htb-attack-path,
.dark .htb-summary,
.dark .htb-learnings,
.dark .htb-nav-card {
    border-color: var(--primary-color);
}

.dark .htb-attack-path .path-arrow {
    color: #888;
}

.dark .htb-learnings .learnings-list li {
    border-bottom-color: #444;
}

/* Mobile Responsiveness for HTB */
@media (max-width: 768px) {
    .htb-machine-info .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .htb-attack-path .path-steps {
        flex-direction: column;
        align-items: flex-start;
    }

    .htb-attack-path .path-arrow {
        transform: rotate(90deg);
    }

    .htb-nav-card:hover {
        transform: none;
    }
}

/* ============================================
   SYNTAX HIGHLIGHTING - DRACULA THEME
   Generated using: hugo gen chromastyles --style=dracula
   ============================================ */

/* Background - Modified to use transparent background for our macOS wrapper */
.bg { color:#f8f8f2; }
.chroma { color:#f8f8f2; background-color: transparent !important; }

/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit }
/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; }
/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; }
/* LineHighlight */ .chroma .hl { background-color:#3d3f4a }
/* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f }
/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f }
/* Line */ .chroma .line { display:flex; }

/* Keywords */
.chroma .k { color:#ff79c6 }  /* Keyword */
.chroma .kc { color:#ff79c6 } /* KeywordConstant */
.chroma .kd { color:#8be9fd;font-style:italic } /* KeywordDeclaration */
.chroma .kn { color:#ff79c6 } /* KeywordNamespace */
.chroma .kp { color:#ff79c6 } /* KeywordPseudo */
.chroma .kr { color:#ff79c6 } /* KeywordReserved */
.chroma .kt { color:#8be9fd } /* KeywordType */

/* Names */
.chroma .na { color:#50fa7b } /* NameAttribute */
.chroma .nc { color:#50fa7b } /* NameClass */
.chroma .nl { color:#8be9fd;font-style:italic } /* NameLabel */
.chroma .nt { color:#ff79c6 } /* NameTag */
.chroma .nb { color:#8be9fd;font-style:italic } /* NameBuiltin */
.chroma .bp { font-style:italic } /* NameBuiltinPseudo */
.chroma .nv { color:#8be9fd;font-style:italic } /* NameVariable */
.chroma .vc { color:#8be9fd;font-style:italic } /* NameVariableClass */
.chroma .vg { color:#8be9fd;font-style:italic } /* NameVariableGlobal */
.chroma .vi { color:#8be9fd;font-style:italic } /* NameVariableInstance */
.chroma .vm { color:#8be9fd;font-style:italic } /* NameVariableMagic */
.chroma .nf { color:#50fa7b } /* NameFunction */
.chroma .fm { color:#50fa7b } /* NameFunctionMagic */

/* Strings */
.chroma .s { color:#f1fa8c }  /* LiteralString */
.chroma .sa { color:#f1fa8c } /* LiteralStringAffix */
.chroma .sb { color:#f1fa8c } /* LiteralStringBacktick */
.chroma .sc { color:#f1fa8c } /* LiteralStringChar */
.chroma .dl { color:#f1fa8c } /* LiteralStringDelimiter */
.chroma .sd { color:#f1fa8c } /* LiteralStringDoc */
.chroma .s2 { color:#f1fa8c } /* LiteralStringDouble */
.chroma .se { color:#f1fa8c } /* LiteralStringEscape */
.chroma .sh { color:#f1fa8c } /* LiteralStringHeredoc */
.chroma .si { color:#f1fa8c } /* LiteralStringInterpol */
.chroma .sx { color:#f1fa8c } /* LiteralStringOther */
.chroma .sr { color:#f1fa8c } /* LiteralStringRegex */
.chroma .s1 { color:#f1fa8c } /* LiteralStringSingle */
.chroma .ss { color:#f1fa8c } /* LiteralStringSymbol */

/* Numbers */
.chroma .m { color:#bd93f9 }  /* LiteralNumber */
.chroma .mb { color:#bd93f9 } /* LiteralNumberBin */
.chroma .mf { color:#bd93f9 } /* LiteralNumberFloat */
.chroma .mh { color:#bd93f9 } /* LiteralNumberHex */
.chroma .mi { color:#bd93f9 } /* LiteralNumberInteger */
.chroma .il { color:#bd93f9 } /* LiteralNumberIntegerLong */
.chroma .mo { color:#bd93f9 } /* LiteralNumberOct */

/* Operators */
.chroma .o { color:#ff79c6 }  /* Operator */
.chroma .ow { color:#ff79c6 } /* OperatorWord */

/* Comments */
.chroma .c { color:#6272a4 }  /* Comment */
.chroma .ch { color:#6272a4 } /* CommentHashbang */
.chroma .cm { color:#6272a4 } /* CommentMultiline */
.chroma .c1 { color:#6272a4 } /* CommentSingle */
.chroma .cs { color:#6272a4 } /* CommentSpecial */
.chroma .cp { color:#ff79c6 } /* CommentPreproc */
.chroma .cpf { color:#ff79c6 } /* CommentPreprocFile */

/* Generic */
.chroma .gd { color:#f55 } /* GenericDeleted */
.chroma .ge { text-decoration:underline } /* GenericEmph */
.chroma .gh { font-weight:bold } /* GenericHeading */
.chroma .gi { color:#50fa7b;font-weight:bold } /* GenericInserted */
.chroma .go { color:#44475a } /* GenericOutput */
.chroma .gu { font-weight:bold } /* GenericSubheading */
.chroma .gl { text-decoration:underline } /* GenericUnderline */

/* ================================= */
/* Code Block Line Highlighting */
/* ================================= */

/* Highlighted lines in code blocks */
.chroma .hl {
    display: block;
    background-color: rgba(216, 90, 31, 0.25) !important;
    border-left: 4px solid var(--primary-color, #d85a1f);
    padding-left: calc(1em - 4px);
    margin-left: -1em;
    margin-right: -1em;
    padding-right: 1em;
}

/* Dark mode highlighted lines */
.dark .chroma .hl {
    background-color: rgba(216, 90, 31, 0.35) !important;
    border-left-color: #d85a1f;
}

/* Ensure line numbers don't interfere with highlighting */
.chroma .hl .ln {
    margin-right: 0.5em;
}

/* ================================= */
/* Section Navigation Focus Styles */
/* ================================= */

/* Keyboard focus for headings (added via JavaScript) */
.post-content h2:focus,
.post-content h3:focus,
.htb-content h2:focus,
.htb-content h3:focus {
    outline: 2px solid var(--primary-color, #d85a1f);
    outline-offset: 4px;
    transition: outline 0.2s ease;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ================================= */
/* Admonition Icon Styling */
/* ================================= */

/* SVG icons in admonition boxes */
.admonition-icon-svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.admonition-note .admonition-icon-svg {
    color: #3b82f6; /* Blue for notes */
}

.admonition-warning .admonition-icon-svg {
    color: #f59e0b; /* Amber for warnings */
}

.admonition-tip .admonition-icon-svg {
    color: #10b981; /* Green for tips */
}

.admonition-info .admonition-icon-svg {
    color: #06b6d4; /* Cyan for info */
}

.admonition-danger .admonition-icon-svg {
    color: #ef4444; /* Red for danger */
}

.admonition-success .admonition-icon-svg {
    color: #22c55e; /* Green for success */
}

