:root {
    --bg-color: #0c0d0e;
    --border-color: #22272e;
    --text-main: #adbac7;
    --text-muted: #636e7b;
    --text-subtle: #768390;
    --accent-green: #00ff66;
    --accent-blue: #58a6ff;
    --accent-yellow: #daaa3f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Fira Code', monospace;
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-green) !important;
}

input:focus,
button:focus {
    outline: 1px solid var(--accent-green);
}

/* Mobile Overlay */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Sidebar Layout */
#sidebar {
    width: 280px;
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.2s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 0.9rem;
}

.sidebar-blurb {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-nav {
    padding: 1rem;
    flex: 1;
}

.nav-section-title {
    color: #f0f6fc;
    font-weight: 700;
    font-size: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link-custom {
    color: var(--text-subtle);
    display: block;
    padding: 0.15rem 0;
    font-size: 0.8rem;
}

.nav-home {
    color: var(--accent-green);
}

.achievements-container {
    margin-top: 0.5rem;
    text-align: center;
}

.achievement-vault-img {
    height: 48px;
    width: auto;
}

.achievement-ipv6-img {
    border: 0;
    width: 80%;
    height: auto;
    margin-top: 0.5rem;
}

.social-channels {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    justify-content: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Content & Headers */
#main-content {
    margin-left: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-color);
}

.main-header {
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-cmd {
/*    display: flex; */
    width: 100%;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

#mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--accent-green);
    padding: 0.2rem 0.5rem;
    font-family: 'Fira Code', monospace;
    cursor: pointer;
    font-size: 0.8rem;
}

.prompt-user {
    color: var(--accent-green);
}

.prompt-cmd {
    color: var(--text-main);
}

.header-tty {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Profile / Bio Section */
.profile-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    max-width: 100%;
}

.announcement-box {
    border: 1px dashed var(--accent-yellow);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    background: rgba(218, 170, 63, 0.03);
}

.announcement-title {
    color: var(--accent-yellow);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-card {
    border: 1px solid var(--border-color);
    padding: 1rem;
}

.about-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.about-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-green);
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-subtle);
    padding: 0.25rem 0.6rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    cursor: pointer;
}

.tab-btn.active {
    color: var(--accent-green);
    border-color: var(--accent-green);
}

.tab-content-bio {
    font-size: 0.85rem;
    color: var(--text-subtle);
}

.tab-content-contact {
    display: none;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

.tab-paragraph {
    margin: 0 0 0.5rem 0;
}

.text-main {
    color: var(--text-main);
}

/* Posts Feed */
.posts-feed {
    padding: 1.5rem;
    max-width: 95%;
    flex: 1;
}

.posts-feed-header {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.post-card {
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
    margin-bottom: 1.75rem;
    transition: border-color 0.2s ease;
}

.post-card:hover {
    border-left-color: var(--accent-green);
}

.post-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.tag-ai {
    color: #f78166;
}

.tag-thoughts {
    color: #d2a8ff;
}

.tag-projects {
    color: #79c0ff;
}

.tag-guides {
    color: #56d364;
}

.post-title {
    font-size: 1.05rem;
    margin: 0 0 0.4rem 0;
    font-weight: 500;
}

.post-body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 0.5rem;
}

.post-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.post-excerpt {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

/* Legacy Bootstrap-compatible layout helpers for older posts */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem 1.5rem;
    align-items: stretch;
}

.row > [class*="col-"] {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    min-width: 0;
}

.col-sm,
.col-md,
.col-lg,
.col-md-6 {
    position: relative;
    width: 100%;
    min-height: 1px;
}

.col-sm {
    flex: 0 0 auto;
    width: auto;
    max-width: 420px;
}

.col-md {
    flex: 1 1 0;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-lg {
    flex: 1 1 0;
}

.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-blue);
    background: rgba(88, 166, 255, 0.08);
    color: var(--text-main);
}

.alert-info {
    border-left-color: var(--accent-blue);
    background: rgba(88, 166, 255, 0.06);
}

.alert-heading {
    margin: 0 0 0.5rem 0;
    color: #ffffff;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.small {
    font-size: 0.75rem;
}

.post-img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.post-dual-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin: 1.5rem 0;
}

.post-dual-image {
    flex: 0 0 420px;
    max-width: 420px;
}

.post-dual-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.post-body-content img,
.post-body-content iframe,
.post-body-content video {
    max-width: 100%;
    height: auto;
}

pre,
code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: 'Fira Code', monospace;
}

pre {
    background: #0d1117;
    border: 1px solid var(--border-color);
    padding: 1rem;
    margin: 1rem 0;
    color: var(--text-main);
    overflow-x: auto;
}

code {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .row {
        display: block;
        margin: 0 0 1.5rem;
    }

    .row > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
        padding-left: 0;
        padding-right: 0;
    }

    .post-dual-layout {
        display: block;
    }

    .post-dual-image {
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

/* Main Footer */
.main-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.open {
        transform: translateX(0) !important;
    }

    #main-content {
        margin-left: 0 !important;
    }

    #mobile-toggle {
        display: inline-block !important;
    }

    #overlay.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* Container styling */
#news-slider {
    width: 100%;
    overflow: hidden;
    color: #fff;
    font-family: system-ui, sans-serif;
/*    display: flex; */
}

/* Gradient overlays to fade edges (optional styling) */

/* The moving track */
.marquee-track {
    display: flex;
    white-space: nowrap;
    width: max-content;
}

/* Combined group of items for the infinite illusion */
.marquee-group {
    display: flex;
    align-items: center;
    gap: 40px;
    /* Space between news items */
    padding-right: 40px;
    /* Must match the gap */
}

/* Individual news item styling */
.news-item {
    display: inline-flex;
    align-items: center;
}

/* Modern GPU-accelerated motion (Only if user accepts motion) */
@media (prefers-reduced-motion: no-preference) {
    .marquee-track {
        animation: scroll-marquee 25s linear infinite;
    }

    /* Pause scrolling on hover for readability and accessibility */
    #news-slider:hover .marquee-track {
        animation-play-state: paused;
    }
}

/* The keyframe that enables infinite scrolling */
@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Slides exactly halfway because track contains 2 identical groups */
}

.custom-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background-color: #0d1117;
    padding: 14px 20px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
    border-top: 1px solid #00ff66;
    border-left: 1px solid #00ff66;
    border-right: 1px solid #00ff66;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.15);
}

.custom-player button,
.custom-player a {
    background-color: #161b22;
    color: #00ff66;
    border: 1px solid #00ff66;
    border-radius: 2px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px rgba(0, 255, 102, 0.5);
}

.custom-player button:hover,
.custom-player a:hover {
    background-color: #00ff66;
    color: #0d1117;
    box-shadow: 0 0 8px #00ff66;
    text-shadow: none;
}

.custom-player a.download {
    background-color: #161b22;
    color: #00ff66;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #00ff66;
}

.custom-player a.download:hover {
    background-color: #00ff66;
    color: #0d1117;
}

.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.controls {
    display: flex;
    align-items: center;
    text-align: center;
    align-content: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 4px;
    width: 100%;
}

.statusText {
    font-size: 12px;
    color: #00ff66;
    font-style: normal;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    display: flex;
    width: 100%;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(0, 255, 102, 0.6);
}

#playlist {
    list-style: none;
    padding: 0;
    margin-top: 0;
    border-radius: 0 0 4px 4px;
    border-bottom: 1px solid #00ff66;
    border-left: 1px solid #00ff66;
    border-right: 1px solid #00ff66;
    background-color: #0d1117;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 5px 10px rgba(0, 255, 102, 0.15);
}

#playlist li {
    padding: 8px 12px;
    margin: 8px;
    background-color: #161b22;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
    color: #008033;
    border: 1px solid #003311;
    margin-top: 0;
}

#playlist li:hover {
    background-color: #0d1117;
    color: #00ff66;
    border-color: #00ff66;
    box-shadow: 0 0 5px rgba(0, 255, 102, 0.3);
}

#playlist .active {
    background-color: #00ff66;
    font-weight: bold;
    color: #0d1117;
    border-color: #00ff66;
    box-shadow: 0 0 8px #00ff66;
}

#audioPlayer {
    display: none;
}

#volumeSlider {
    -webkit-appearance: none;
    width: 100px;
    height: 6px;
    background: #161b22;
    border: 1px solid #00ff66;
    border-radius: 0;
    outline: none;
    cursor: pointer;
}

/* Chrome, Safari, Opera */
#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #00ff66;
    border-radius: 0;
    border: none;
    box-shadow: 0 0 5px #00ff66;
}

#volumeSlider::-webkit-slider-thumb:hover {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Firefox */
#volumeSlider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #00ff66;
    border-radius: 0;
    border: none;
    box-shadow: 0 0 5px #00ff66;
}

#volumeSlider::-moz-range-thumb:hover {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Modal styling for image/video lightbox popups */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(12, 13, 14, 0.8);
}

body.modal-open {
    overflow: hidden;
}

.modal.show,
.modal[style*="display: flex"],
.modal[style*="display: block"] {
    display: flex;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
}

.modal-dialog {
    position: relative;
    width: min(90vw, 900px);
    margin: 0 auto;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-lg {
    width: min(75vw, 900px);
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}

.close {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.close:hover,
.close:focus {
    color: #ffffff;
    outline: none;
}

#image-viewer-img,
#video-viewer-iframe,
.modal img,
.modal iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 0;
    background: #000;
}

#video-viewer-iframe {
    min-height: 500px;
}

#progressSlider {
    -webkit-appearance: none;
    height: 8px;
    background: #161b22;
    border: 1px solid #00ff66;
    border-radius: 0;
    outline: none;
    cursor: pointer;
    width: 100%;
    box-shadow: inset 0 0 5px #000;
}

/* Chrome, Safari, Opera */
#progressSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #00ff66;
    border: none;
    border-radius: 0;
    margin-top: -3px;
    box-shadow: 0 0 6px #00ff66;
}

/* Firefox */
#progressSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #00ff66;
    border: none;
    border-radius: 0;
    box-shadow: 0 0 6px #00ff66;
}