    /* === THEMING === */
    :root {
        --bg-grad-start: #2b5876;
        --bg-grad-end: #4e4376;
        --text-main: #e0e0e0;
        --text-light: #ffffff;
        --text-accent: #c0d4e8;
        --border-color: rgba(255, 255, 255, 0.12);
        --shadow-color: rgba(0, 0, 0, 0.3);
        --radius-main: 12px;
        --highlight-color: #85C1E9;
        --brand-github: #ffffff;
        --brand-medium: #eec6a4;
        --brand-store: #f39c12;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
    }

    html,
    body {
        width: 100%;
        min-height: 100%;
        overscroll-behavior: none;
        background: linear-gradient(to right top, var(--bg-grad-start), var(--bg-grad-end)) fixed;
        background-color: #2b5876;

    }

    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        line-height: 1.7;
        color: var(--text-main);
        padding: 40px 20px;
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow-x: hidden;
        min-height: 100dvh;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: linear-gradient(to right top, var(--bg-grad-start), var(--bg-grad-end)) fixed;
        z-index: -2;
    }

    body::after {
        content: "";
        position: fixed;
        inset: 0;
        background-image: url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
        opacity: 0.03;
        z-index: -1;
        pointer-events: none;
    }

    .glass-effect {
        background: rgba(44, 88, 118, 0.85);
        border-radius: var(--radius-main);
        border: 1px solid var(--border-color);
        box-shadow: 0 8px 20px var(--shadow-color);
        position: relative;
    }

    @supports (backdrop-filter: blur(15px)) or (-webkit-backdrop-filter: blur(15px)) {
        .glass-effect {
            background: rgba(255, 255, 255, 0.07);
            -webkit-backdrop-filter: blur(15px);
            backdrop-filter: blur(15px);
        }
    }

    .container {
        padding: 20px 40px 20px;
        max-width: 900px;
        width: 95%;
        margin-bottom: 30px;
    }

    /* --- Widen container ONLY on desktop when MATRIX VIEW is active --- */
    @media (min-width: 769px) {
        .container.matrix-view-active {
            max-width: 1000px;
            padding-bottom: 20px;
            transition: max-width 0.4s ease-in-out;
        }
    }

    .profile-header {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 25px;
        width: 100%;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--border-color);

        padding-top: 20px;
        padding-bottom: 40px;
        /* space over the line */

    }

    .profile-main-link {
        display: flex;
        align-items: center;
        gap: 16px;
        text-decoration: none;
    }

    @media (min-width: 769px) {
        .profile-main-link {
            gap: 45px;
        }
    }

    .profile-picture {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        border: 3px solid var(--border-color);
        object-fit: cover;
        box-shadow: 0 0 15px var(--shadow-color);
        transition: transform 0.3s ease;
    }

    .profile-picture:hover {
        transform: scale(1.15);
    }

    h1 {
        font-size: 2.8em;
        color: var(--text-light);
        font-weight: 700;
        text-align: center;
    }

    h2 {
        font-size: 2em;
    }

    /* === NAVIGATION PILLS STYLE === */
    .nav-pill {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--text-accent);
        text-decoration: none;
        font-size: 0.95em;
        font-weight: 600;
        padding: 8px 20px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50px;
        transition: all 0.3s ease;
    }

    .nav-pill:hover {
        background: var(--highlight-color);
        color: #2b5876;
        border-color: var(--highlight-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(133, 193, 233, 0.3);
    }

    .nav-pill i {
        font-size: 0.9em;
    }

    .contact-btn {
        font-size: 1.1em;
        padding: 10px 25px;
        border-radius: 8px;
        font-weight: 600;
        text-decoration: none;
        width: 100%;
        text-align: center;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        position: relative;
        overflow: hidden;
        z-index: 1;
        background-color: #485563;
        color: #ecf0f1;
        border: none;
        transition: color 0.3s ease, transform 0.2s ease;
    }

    .actions-section {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 30px;
        width: 100%;
        transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), margin 0.5s cubic-bezier(0.4, 0, 0.2, 1), gap 0.5s ease;
    }

    .actions-section .showcase-item {
        flex: 1;
        padding: 0;
    }

    .intro-right-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        min-width: 260px;
    }

    .contact-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 100%;
        background-color: #2c3e50;
        transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: -1;
    }

    .contact-btn .icon {
        transition: transform 0.4s ease-in-out;
    }

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

    .contact-btn:hover .icon {
        transform: rotate(360deg);
    }

    .contact-btn:hover {
        transform: translateY(-2px);
    }

    .contact-btn:active {
        transform: translateY(1px);
    }

    .top-social-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }

    .top-social-links a {
        color: rgba(255, 255, 255, 0.5);
        text-decoration: none;

        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition:
            width 0.3s ease 0.3s,
            margin 0.3s ease 0.3s,
            opacity 0.3s ease 0.3s,
            color 0.3s ease 0s,
            transform 0.3s ease 0s;
    }

    .top-social-links a:hover {
        color: var(--highlight-color);
        transform: scale(1.4);
    }

    .top-social-links .fa-brands {
        font-size: 28px;
    }

    .top-social-links .fa-gitlab,
    .top-social-links .fa-bitbucket {
        font-size: 25px;
    }

    .top-social-links .fa-amazon {
        font-size: 30px;
    }

    .top-social-links svg {
        width: 28px;
        height: 28px;
    }

    .top-social-links a[title="Gitea"] svg {
        width: auto;
        height: 25px;
    }

    .interactive-card {
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    }

    .interactive-card.visible:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
    }

    .showcase-item {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 0 20px;
        width: 100%;
    }

    .bio-logo-link {
        position: relative;
        display: block;
        overflow: visible;
        border-radius: 8px;
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        perspective: 1000px;
        background: none;
        transition: opacity 0.3s ease,
            transform 0.6s cubic-bezier(0.4, 2, 0.5, 1),
            height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
            margin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .bio-logo {
        width: 100%;
        height: 100%;
        border-radius: 8px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.1);
        display: block;
    }

    .flipper {
        position: relative;
        width: 100%;
        height: 100%;
        transform-style: preserve-3d;
        transition: transform 0.6s;
    }

    .bio-logo-link:hover .flipper {
        transform: rotateY(180deg);
    }

    .front,
    .back {
        position: absolute;
        width: 100%;
        height: 100%;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        border-radius: 8px;
    }

    .back {
        transform: rotateY(180deg);
        background: rgba(0, 0, 0, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.2em;
        color: white;
    }

    .item-text {
        flex: 1;
        text-align: left;
    }

    .bio-text {
        font-size: 1em;
        font-style: normal;
        /*font-style: italic;*/
        margin: 0;
        color: #f5f5f59f;
        /*#e0e0e0*/
    }

    .book-showcase {
        padding: 20px;
        margin-top: 10px;
        /* space from the bottom of the section line*/
        margin-bottom: 30px;
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .book-text {
        flex: 1;
        text-align: left;
    }

    .book-media-asset {
        width: 100px;
        height: 150px;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s ease;
        display: block;
    }

    .book-media-asset:hover {
        transform: scale(1.1);
    }

    .book-media-container {
        display: flex;
        gap: 15px;
        align-items: center;
    }

    .video-play-container {
        position: relative;
        display: block;
    }

    .video-play-container::before {
        content: '';
        position: absolute;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 8px;
        opacity: 0;
        transition: opacity 0.3s ease-out;
        pointer-events: none;
    }

    .video-play-container::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 25px 0 25px 42px;
        border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
        transition: opacity 0.3s ease-out, transform 0.3s ease-out;
        pointer-events: none;
    }

    .video-play-container:hover::before {
        opacity: 1;
    }

    .video-play-container:hover::after {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    #open-source-projects .showcase-item,
    #articles-insights .showcase-item,
    #digital-bookshelf .showcase-item {
        padding: 20px;
        margin-top: 10px;
        /* space from the bottom of the section line*/
        margin-bottom: 30px;
    }

    .item-image {
        width: 120px;
        height: 120px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .item-image:hover {
        transform: scale(1.1);
    }

    .card-title-link {
        text-decoration: none;
        color: inherit;
    }

    .section-title {
        font-size: 1.3em;
        color: #85C1E9;
        margin-bottom: 8px;
        transition: color 0.2s ease;
    }

    .interactive-card:hover .section-title {
        color: #ffffff;
    }

    .article-title {
        font-size: 1.2em;
    }

    .book-subtitle {
        color: #ffffff;
        font-size: 1.1em;
    }

    .view-on-text {
        color: #ccc;
        margin-bottom: 10px;
        font-size: 0.9em;
        font-weight: bold;
    }

    .project-description {
        font-size: 1em;
        color: #c5c6c7;
        line-height: 1.65;
        margin-bottom: 20px;
    }

    .matrix-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        color: rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.05);
        transition: all 0.2s ease;
        text-decoration: none;
        font-size: 15px;
        border: none;
        cursor: pointer;
    }

    .matrix-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.15);
    }

    .project-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-link {
        display: inline-block;
        color: #ffffff;
        padding: 5px 10px;
        font-size: 0.8em;
        border-radius: 5px;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s ease;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .project-link:hover,
    .project-link:focus {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .github {
        background-color: rgba(51, 51, 51, 0.65);
    }

    .project-link.github:hover {
        background-color: rgba(51, 51, 51, 1);
    }

    .gitlab {
        background-color: rgba(252, 163, 38, 0.65);
    }

    .project-link.gitlab:hover {
        background-color: rgba(252, 163, 38, 1);
    }

    .bitbucket {
        background-color: rgba(0, 82, 204, 0.65);
    }

    .project-link.bitbucket:hover {
        background-color: rgba(0, 82, 204, 1);
    }

    .gitea {
        background-color: rgba(96, 153, 38, 0.65);
    }

    .project-link.gitea:hover {
        background-color: rgba(96, 153, 38, 1);
    }

    .medium {
        background-color: rgba(18, 16, 14, 0.65);
    }

    .project-link.medium:hover {
        background-color: rgba(18, 16, 14, 1);
    }

    .amazon {
        background-color: rgba(255, 153, 0, 0.65);
        color: #fff;
        font-weight: 600;
    }

    .project-link.amazon:hover {
        background-color: rgba(255, 153, 0, 1);
    }

    .google-books {
        background-color: rgba(66, 133, 244, 0.65);
    }

    .project-link.google-books:hover {
        background-color: rgba(66, 133, 244, 1);
    }

    .apple-books {
        background-color: rgba(51, 51, 51, 0.65);
    }

    .project-link.apple-books:hover {
        background-color: rgba(51, 51, 51, 1);
    }

    .kobo {
        background-color: rgba(0, 157, 159, 0.65);
    }

    .project-link.kobo:hover {
        background-color: rgba(0, 157, 159, 1);
    }

    .lulu {
        background-color: rgba(216, 36, 43, 0.65);
    }

    .project-link.lulu:hover {
        background-color: rgba(216, 36, 43, 1);
    }

    .gumroad {
        background-color: rgba(255, 144, 232, 0.65);
    }

    .project-link.gumroad:hover {
        background-color: rgba(255, 144, 232, 1);
    }

    .youtube {
        background-color: rgba(255, 0, 0, 0.65);
    }

    .project-link.youtube:hover {
        background-color: rgba(255, 0, 0, 1);
    }

    /* === FOOTER STYLES === */
    footer {
        font-size: 0.9em;
        padding: 25px;
        text-align: center;
        max-width: 850px;
        width: 95%;
        margin: 30px auto 0;
        background-color: transparent;
    }

    footer a {
        color: #85C1E9;
        text-decoration: none;
        transition: color 0.2s;
    }

    footer a:hover {
        color: #ffffff;
        text-decoration: underline;
    }

    footer .copyright {
        display: block;
        margin-top: 15px;
        margin-bottom: 1px;
        color: #d1d1d1;
    }

    .footer-separator {
        color: rgba(255, 255, 255, 0.4);
        margin: 0 5px;
    }

    .mobile-break {
        display: none;
    }

    .mobile-hide-separator {
        display: inline;
    }

    /* === BACK ON TOP BUTTON STYLES === */
    #back-to-top {
        position: fixed;
        bottom: 20px;
        right: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        background-color: rgba(44, 62, 80, 0.8);
        color: #ecf0f1;
        border-radius: 50%;
        font-size: 20px;
        text-decoration: none;
        box-shadow: 0 4px 12px var(--shadow-color);
        z-index: 100;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s;
    }

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

    #back-to-top:hover {
        background-color: #34495e;
        transform: scale(1.1);
    }

    .fade-in-up {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }

    .fade-in-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* === COMPACT STICKY HEADER STYLES === */
    #sticky-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        z-index: 1000;
        border-radius: 0 0 12px 12px;
        border-top: none;
        background: rgba(44, 88, 118, 0.379);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);

        /* HIDE BY DEFAULT */
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;

        display: flex;
        justify-content: center;
        align-items: center;
        will-change: transform;
    }

    #sticky-header.visible {
        transform: translateY(0);
        /* Slide down */
    }

    .sticky-content {
        width: 100%;
        max-width: 900px;
        padding: 0 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sticky-name {
        font-weight: 700;
        font-size: 1.1em;
        color: #ffffff;
        letter-spacing: 0.5px;
    }

    .sticky-actions {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .sticky-actions a {
        color: #c0d4e8;
        font-size: 1.1em;
        transition: color 0.2s;
        text-decoration: none;
    }

    .sticky-actions a:hover {
        color: #9ff0e7e2;
    }

    /* 1. Base State */
    .sticky-connect-btn {
        background: rgba(255, 255, 255, 0.1);
        padding: 5px 15px;
        border-radius: 20px;
        font-size: 0.9em !important;
        border: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        gap: 8px;
        color: #fff;

        transition: all 0.2s ease;
    }

    /* 2. Hover State */
    .sticky-connect-btn:hover {
        background: rgba(0, 0, 0, 0.18);
        color: #9ff0e7e2 !important;
        border: 1px solid #9ff0e7e2;
    }

    .sticky-actions .fa-linkedin {
        font-size: 1.7em;
        vertical-align: middle;

    }




    /* === AI ATLAS SPECIFIC STYLES === */
    .section-header.align-right {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding-right: 10px;
    }

    .section-trigger.icon-only {
        gap: 8px;
    }

    .section-trigger.icon-only .trigger-chevron {
        margin-left: 0;
    }

    /* Book Icons */
    .book-icon-toggle {
        font-size: 0.8em;
        color: var(--highlight-color);
    }

    .book-icon-toggle .fa-book-open {
        display: none;
    }

    .section-trigger.expanded .book-icon-toggle .fa-book {
        display: none;
    }

    .section-trigger.expanded .book-icon-toggle .fa-book-open {
        display: inline-block;
    }

    /* Bio Icons */
    /* Bio Icons Container */
    .bio-icon-toggle {
        font-size: 0.8em;
        color: var(--highlight-color);
    }

    /* 1. By default (closed), hide the Info icon. */
    .bio-icon-toggle .fa-circle-info {
        display: none;
    }

    /* 2. When expanded (open), show the Info icon... */
    .section-trigger.expanded .bio-icon-toggle .fa-circle-info {
        display: inline-block;
    }

    /* 3. ...and hide the User icon. */
    .section-trigger.expanded .bio-icon-toggle .fa-user {
        display: none;
    }

    /* Atlas Layout */
    .atlas-layout {
        display: flex;
        gap: 20px;
        align-items: center;
        padding: 15px;
        margin-top: 10px;
    }

    .mobile-icons-container,
    .bio-text-mobile,
    .mobile-social-break {
        display: none;
    }

    .section-header {
        color: #f5f5f5;
        margin: 20px 0 2px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding-bottom: 0px;
        text-align: center;
        font-size: 1.7em;

    }

    .section-header a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .section-header a:hover {
        color: #ffffcb;
    }

    .section-trigger {
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        font: inherit;
        color: inherit;
        width: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .section-trigger:hover,
    .section-trigger:focus {
        color: var(--text-light);
        outline: none;
    }

    .folder-icon-toggle {
        font-size: 0.8em;
        color: var(--highlight-color);
        margin-right: 15px;
    }

    .folder-icon-toggle .fa-folder-open {
        display: none;
    }

    .section-trigger.expanded .folder-icon-toggle .fa-folder {
        display: none;
    }

    .section-trigger.expanded .folder-icon-toggle .fa-folder-open {
        display: inline-block;
    }

    .trigger-chevron {
        font-size: 0.7em;
        margin-left: 15px;
        color: var(--text-accent);
        transition: transform 0.3s ease-in-out;
    }

    .section-trigger.expanded .trigger-chevron {
        transform: rotate(180deg);
    }

    .collapsible-section-content {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.5s ease-in-out;
    }

    .collapsible-section-content.expanded {
        grid-template-rows: 1fr;
    }

    .collapsible-section-content>div {
        overflow: hidden;
    }


    /* === TOOLTIP STYLES === */
    [data-tooltip] {
        position: relative;
        cursor: pointer;
    }

    /* Base style for ALL tooltips */
    [data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        background-color: #2c3e50c0;
        color: #ecf0f1;
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 13px;

        white-space: pre-wrap;
        /* Respects \n AND wraps long text */
        width: max-content;
        /* Forces text to stay wide/one-line */
        max-width: 110px;
        /* Caps the width so huge text wraps eventually */

        line-height: 1.4;
        /* Adds breathing room for multi-line text */
        text-align: center;
        /* Optional: Looks better on multi-line */


        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, transform 0.3s;
        pointer-events: none;
        z-index: 100;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        font-style: normal;
        font-weight: 500;
        text-transform: none;
        letter-spacing: normal;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    /* --- Top Tooltip --- */
    .tooltip-top[data-tooltip]::after {
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(5px);
        margin-bottom: 12px;
    }

    .tooltip-top[data-tooltip]:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    /* --- Bottom Tooltip --- */
    .tooltip-bottom[data-tooltip]::after {
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-5px);
        margin-top: 12px;
    }

    .tooltip-bottom[data-tooltip]:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        /* Animate downwards into place */
    }

    /* --- Left Tooltip --- */
    .tooltip-left[data-tooltip]::after {
        top: 50%;
        right: 100%;
        transform: translateY(-50%) translateX(5px);
        margin-right: 12px;
    }

    .tooltip-left[data-tooltip]:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(0);
    }

    /* --- Right Tooltip --- */
    .tooltip-right[data-tooltip]::after,
    [data-tooltip]:not([class*="tooltip-"])::after {
        top: 50%;
        left: 100%;
        transform: translateY(-50%) translateX(-5px);
        margin-left: 12px;
    }

    .tooltip-right[data-tooltip]:hover::after,
    [data-tooltip]:not([class*="tooltip-"]):hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(0);
    }


    .view-btn {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid var(--border-color);
        color: var(--text-accent);
        padding: 10px 0;
        border-radius: 8px;
        cursor: pointer;
        font-family: inherit;
        font-weight: 600;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 160px;
    }

    .view-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .view-btn.active {
        background: var(--highlight-color);
        color: #2b5876;
        border-color: var(--highlight-color);
        box-shadow: 0 0 10px rgba(133, 193, 233, 0.3);
    }

    .hidden-view {
        display: none !important;
    }

    /* Matrix Table Styles */
    .table-container {
        width: 100%;
        overflow-x: auto;
        margin-top: 10px;
        border-radius: var(--radius-main);

        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
        transition: scrollbar-color 0.3s;

        max-height: 720px;
        /* Adjust this value to show ~9 rows */
        overflow-y: auto;
        /* Add a vertical scrollbar when content overflows */
    }

    .table-container:hover {
        scrollbar-color: var(--highlight-color) rgba(0, 0, 0, 0.3);
    }

    /* WebKit (Chrome, Edge, Safari) Settings */
    .table-container::-webkit-scrollbar {
        height: 8px;
        /* Horizontal scrollbar height */
        width: 8px;
        /* Vertical scrollbar width */
    }

    /* WebKit: Hidden by default */
    .table-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .table-container::-webkit-scrollbar-thumb {
        background-color: transparent;
        border-radius: 4px;
    }

    /* WebKit: Show on Hover */
    .table-container:hover::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.3);
    }

    .table-container:hover::-webkit-scrollbar-thumb {
        background-color: var(--highlight-color);
    }

    .project-matrix-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        background: rgba(0, 0, 0, 0.2);
        min-width: 900px;
        /* MATRIX VIEW TABLE SIZE*/
    }

    /* Center All Headers and Cells by default */
    .project-matrix-table th,
    .project-matrix-table td {
        padding: 12px 15px;
        vertical-align: middle;
        border-bottom: 1px solid var(--border-color);
        white-space: nowrap;
        text-align: center;
    }

    .project-matrix-table th {
        color: var(--text-accent);
    }

    .project-matrix-table thead tr {
        font-size: 0.9em;
        text-transform: uppercase;
    }

    .project-matrix-table tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }

    /* Sticky header row sticky */
    .project-matrix-table thead th {
        position: sticky;
        top: 0;
        z-index: 20;
        background-color: rgba(59, 80, 99, 0.85);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    /* This SEPARATE rule ensures the top-left corner stays on top */
    .project-matrix-table thead th:nth-child(1) {
        z-index: 30;
    }

    .project-matrix-table td.col-title,
    .project-matrix-table td.col-type,
    .project-matrix-table td.col-desc {
        text-align: left;
    }

    /* Sticky First Column (Image) */
    .project-matrix-table th:nth-child(1),
    .project-matrix-table td:nth-child(1) {
        position: sticky;
        left: 0;
        background-color: #3b5063;
        z-index: 10;
        border-right: 1px solid var(--border-color);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        width: 60px;
    }

    .project-matrix-table tbody tr:hover td:nth-child(1) {
        background-color: #455d72;
    }

    /* Column Widths */
    .col-img {
        width: 50px;
    }

    .col-title {
        width: 140px;
        text-align: left;
        white-space: normal !important;
    }

    .col-type {
        width: 173px;
        text-align: left;
    }

    .project-matrix-table th.col-type {
        z-index: 25;
    }

    .col-desc {
        min-width: 250px;
        white-space: normal !important;
        line-height: 1.4;
        text-align: left;
    }

    .col-links {
        width: 100px;
    }

    .col-info {
        width: 60px;
    }

    /* Sorting & Filtering Controls */
    .header-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
    }

    .sort-btn {
        background: none;
        border: none;
        color: var(--text-accent);
        cursor: pointer;
        padding: 3px;
    }

    .sort-btn:hover {
        color: var(--highlight-color);
        transform: scale(1.1);
    }

    .fa-arrow-up {
        transform: translateY(0.5px);
        font-size: 1.2em;
    }

    .sort-btn i:not(.fa-sort) {
        color: #39FF14;
        /* Neon Green */
        text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
        /* Neon Green Glow */
    }

    .filter-input {
        width: 100%;
        padding: 7px 8px;
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.2);
        color: #fff;
        font-size: 0.86em;
        /* SIZE OF FILTER TEXT*/
        outline: none;
    }

    .filter-input option {
        background: #2b5876;
    }

    /* Table Content Elements */
    .table-img {
        width: 35px;
        height: 35px;
        object-fit: cover;
        border-radius: 6px;
    }

    .table-title-text {
        font-size: 1em;
        font-weight: 600;
        color: var(--text-light);
        text-decoration: none;
    }

    .table-title-text:hover {
        color: var(--highlight-color);
        text-decoration: underline;
    }

    .type-tag {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 0.7em;
        font-weight: 700;
        text-transform: uppercase;
    }

    .type-code {
        background-color: rgba(52, 152, 219, 0.2);
        color: #85C1E9;
        border: 1px solid rgba(52, 152, 219, 0.3);
    }

    .type-art {
        background-color: rgba(155, 89, 182, 0.2);
        color: #D2B4DE;
        border: 1px solid rgba(155, 89, 182, 0.3);
    }

    .type-book {
        background-color: rgba(241, 196, 15, 0.2);
        color: #F7DC6F;
        border: 1px solid rgba(241, 196, 15, 0.3);
    }

    /* Left Aligned Links */
    .links-wrapper {
        display: flex;
        justify-content: flex-start;
        gap: 8px;
        padding-left: 5px;
    }

    .matrix-link.github:hover {
        color: var(--brand-github);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }

    .matrix-link.medium:hover {
        color: var(--brand-medium);
        box-shadow: 0 0 10px rgba(238, 198, 164, 0.2);
    }

    .matrix-link.store {
        background-color: rgba(7, 77, 55, 0.953);
    }

    .matrix-link.store:hover {
        background-color: rgba(255, 255, 255, 0.31);
        color: var(--brand-store);
        box-shadow: 0 0 10px rgba(243, 157, 18, 0.398);
    }

    .matrix-link.jump-btn:hover {
        color: var(--highlight-color);
        box-shadow: 0 0 10px rgba(133, 193, 233, 0.3);
    }

    .matrix-link.youtube {
        background-color: rgba(204, 0, 0, 0.355);
        color: #fff;
    }

    .matrix-link.youtube:hover {
        background-color: #ff0000a6;
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.202);
        transform: scale(1.15);
    }

    .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        /* Prevent line breaks */
        border: 0;
    }

    .title-wrapper {
        display: flex;
        align-items: center;
        /* Vertically centers the items */
        gap: 4px;
        /* Creates space between title and badge */
        flex-wrap: wrap;
        /* Allows content to wrap if needed */
    }

    .title-wrapper .table-title-text {
        line-height: 1.3;
    }

    .title-indicator {
        font-size: 0.65em;
        font-weight: 700;
        padding: 3px 8px;
        border-radius: 5px;
        background-color: rgba(2, 82, 91, 0.817);
        color: rgba(255, 255, 255, 0.6);
        text-transform: uppercase;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .header-icon {
        font-size: 1.2em;
    }





















    /* Flash Highlight Animation */
    @keyframes highlightPulse {
        0% {
            border-color: var(--highlight-color);
            box-shadow: 0 0 0 0 rgba(133, 193, 233, 0.7);
        }

        20% {
            /* THICKER BORDER EFFECT */
            border-color: var(--highlight-color);
            box-shadow: 0 0 0 3px rgba(133, 193, 233, 0.6), 0 0 20px rgba(133, 193, 233, 0.4);
            transform: scale(1.01);
            /* Slight pop effect */
        }

        100% {
            border-color: rgba(255, 255, 255, 0.12);
            /* Fade back to original grey */
            box-shadow: 0 0 0 0 rgba(133, 193, 233, 0);
            transform: scale(1);
        }
    }

    .highlight-card {
        animation: highlightPulse 6s ease-out forwards;
    }

    /* NEON RED Highlight Animation */
    @keyframes highlightPulseRed {
        0% {
            border-color: #FF3131;
            box-shadow: 0 0 0 0 rgba(255, 49, 49, 0.7);
            transform: scale(1);
        }

        10% {
            border-color: #FF3131;
            box-shadow: 0 0 0 4px rgba(255, 49, 49, 1), 0 0 50px rgba(255, 49, 49, 0.8);
            transform: scale(1.05);
            z-index: 1000;
            /* Ensure it sits ON TOP of everything */
        }

        40% {
            border-color: #FF3131;
            box-shadow: 0 0 0 4px rgba(255, 49, 49, 1), 0 0 50px rgba(255, 49, 49, 0.8);
            transform: scale(1.05);
            z-index: 1000;
        }

        100% {
            border-color: rgba(255, 255, 255, 0.25);
            box-shadow: 0 0 0 0 rgba(255, 49, 49, 0);
            transform: scale(1);
            z-index: 1;
        }
    }

    .highlight-gallery {
        animation: highlightPulseRed 4s ease-out forwards !important;
        /* Time */
    }






























    .view-switcher-container {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 10px;
        margin-bottom: 0px;
        padding-top: 25px;
        padding-bottom: 25px;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .internal-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
        margin-top: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
    }

    /* === MULTI-SELECT FILTER STYLES === */
    .custom-select-wrapper {
        position: relative;
        user-select: none;
        width: 100%;
    }

    .custom-select-wrapper.disabled {
        opacity: 0.2;
        /* Make it look faded */
        pointer-events: none;
        /* Prevent clicking/opening */
        cursor: not-allowed;
    }

    .custom-select-trigger {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 8px;
        font-size: 0.85em;
        font-weight: 400;
        color: #fff;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s ease;
        text-transform: none;
    }

    .custom-select-trigger:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--highlight-color);
    }

    .custom-select-trigger:after {
        content: '\f0d7';
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 1em;
        margin-left: 1px;
        transition: transform 0.2s ease;
    }

    .custom-select-wrapper.open .custom-select-trigger:after {
        transform: rotate(180deg);
    }

    .custom-options {
        position: absolute;
        display: block;
        top: 100%;
        left: 0;
        margin-top: 1px;
        background: #2b4555;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all 0.2s ease-in-out;

        min-width: 160px;
        width: max-content;
        padding: 1px 0;
    }

    .custom-select-wrapper.open .custom-options {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: translateY(0);
    }

    .option-item {
        padding: 7px 9px;
        cursor: pointer;
        transition: background 0.2s;
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 13px !important;
        font-weight: 500 !important;
        text-transform: capitalize !important;
        color: #b0ebf0db;
        text-align: left;
        white-space: nowrap;
        line-height: 1.2;
    }

    .option-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .option-item input[type="checkbox"] {
        accent-color: var(--highlight-color);
        cursor: pointer;
        width: 16px;
        height: 16px;
        margin: 0;
    }


    /* Projects Placeholder (Unified) */

    #view-analytics:not(.hidden-view)~.projects-placeholder {
        display: none !important;
    }

    .projects-placeholder {
        margin-top: 20px !important;
        margin-bottom: 2px !important;
        text-align: center;
        width: 100%;
        display: block;
        color: #0adfc385;
        font-size: 1em;
    }

    #view-matrix {
        padding-bottom: 35px !important;
        display: block;
    }

    #view-matrix .table-container {
        margin-bottom: 0 !important;
    }








    /* === ANALYTICS VIEW STYLES === */

    #view-analytics {
        margin-top: 9px;
    }

    :root {
        /* RGB Values for Opacity Manipulation */
        --rgb-blue: 133, 193, 233;
        --rgb-yellow: 247, 220, 111;
        --rgb-purple: 210, 180, 222;
        --rgb-teal: 92, 210, 198;

        /* Full Colors */
        --blue-icon: rgb(var(--rgb-blue));
        --blue-border: rgba(var(--rgb-blue), 0.5);
        --blue-glow: rgba(var(--rgb-blue), 0.4);

        --yellow-icon: rgb(var(--rgb-yellow));
        --yellow-border: rgba(var(--rgb-yellow), 0.5);
        --yellow-glow: rgba(var(--rgb-yellow), 0.4);

        --purple-icon: rgb(var(--rgb-purple));
        --purple-border: rgba(var(--rgb-purple), 0.5);
        --purple-glow: rgba(var(--rgb-purple), 0.4);

        --teal-icon: rgb(var(--rgb-teal));
        --teal-border: rgba(var(--rgb-teal), 0.5);
        --teal-glow: rgba(var(--rgb-teal), 0.4);

        --orbit-color: rgba(255, 255, 255, 0.08);
        --planet-bg: #2b4555;
    }

    /* 2. KPI Cards */
    .kpi-row {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        width: 100%;
        margin-bottom: 25px;
        max-width: 650px;
        margin-left: auto;
        margin-right: auto;
    }

    @media (min-width: 769px) {
        .kpi-row {
            margin-top: 25px;
            /* Add space on Desktop only */
        }
    }

    .kpi-card {
        flex: 1;
        min-width: 150px;
        padding: 15px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: rgba(44, 88, 118, 0.85);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s ease;
        cursor: pointer;
        user-select: none;
    }

    @supports (backdrop-filter: blur(15px)) {
        .kpi-card {
            background: rgba(5, 50, 60, 0.6) !important;
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
        }
    }

    .kpi-card:hover {
        transform: translateY(-3px);
    }

    .kpi-icon {
        font-size: 1.4em;
        margin-bottom: 8px;
    }

    .kpi-number {
        font-size: 2em;
        font-weight: 700;
        color: #fff;
        line-height: 1;
    }

    .kpi-label {
        color: #c0d4e8;
        font-size: 0.75em;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-top: 5px;
    }

    .kpi-total-fraction {
        color: rgba(255, 255, 255, 0.397);
        font-size: 0.7em;
        font-weight: 500;
        margin-left: 2px;
    }




    /* KPI ACTIVE STATE */

    /* 1. Articles (Purple) - Active */
    .kpi-row .kpi-card:nth-child(1).active-filter {
        background: rgba(210, 180, 222, 0.2) !important;
        border-color: rgba(210, 180, 222, 1.0) !important;
        box-shadow: 0 0 25px rgba(210, 180, 222, 0.6);
        transform: translateY(-3px);
    }

    /* 2. Open Source (Blue) - Active */
    .kpi-row .kpi-card:nth-child(2).active-filter {
        background: rgba(133, 193, 233, 0.2) !important;
        border-color: rgba(133, 193, 233, 1.0) !important;
        box-shadow: 0 0 25px rgba(133, 193, 233, 0.6);
        transform: translateY(-3px);
    }

    /* 3. Books (Yellow) - Active */
    .kpi-row .kpi-card:nth-child(3).active-filter {
        background: rgba(247, 220, 111, 0.2) !important;
        border-color: rgba(247, 220, 111, 1.0) !important;
        box-shadow: 0 0 25px rgba(247, 220, 111, 0.6);
        transform: translateY(-3px);
    }

    .icon-pen {
        color: var(--purple-icon);
    }

    .icon-code {
        color: var(--blue-icon);
    }

    .icon-book {
        color: var(--yellow-icon);
    }


    /* 3. Analytics Inner Toggles */
    .analytics-toggles {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-bottom: 20px;
        z-index: 10;
    }

    .toggle-btn {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.6);
        padding: 8px 24px;
        border-radius: 20px;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        font-size: 0.9em;
        transition: all 0.3s ease;
    }

    .toggle-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .toggle-btn.active {
        background: rgba(133, 193, 233, 0.2);
        border-color: #9ff0e6;
        color: #fff;
        box-shadow: 0 0 10px rgba(133, 193, 233, 0.2);
    }

    .toggle-btn i {
        margin-left: 8px;
        font-size: 0.9em;
    }

    .analytics-glass-container {
        padding: 40px 40px 20px 40px;
        width: 100%;
        min-height: 380px;
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        position: relative;
        background: rgba(20, 40, 60, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.25);
    }


    /* 2. Orbit View Styles */
    #view-orbit {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .orbit-container {
        position: relative;
        height: 380px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hex-center {
        position: relative;
        width: 100px;
        height: 110px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--blue-icon);
        font-size: 2.5em;
        z-index: 20;
        clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
        transition: transform 0.3s ease;
    }

    .hex-center::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.10);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        clip-path: inherit;
        z-index: -1;
        animation: glassPulse 4s ease-in-out infinite;
    }

    .hex-center::after {
        content: "";
        position: absolute;
        inset: -6px;
        clip-path: inherit;
        filter: blur(12px);
        background: rgba(133, 193, 233, 0.35);
        z-index: -2;
        animation: glowPulse 4s ease-in-out infinite;
    }

    .hex-center:hover {
        transform: scale(1.1);
    }

    .orbit-ring {
        position: absolute;
        border: 1px dashed var(--orbit-color);
        border-radius: 50%;
        animation: spin linear infinite;
        pointer-events: none;
    }

    .orbit-ring>* {
        pointer-events: auto;
    }

    .ring-1 {
        width: 220px;
        height: 220px;
        animation-duration: 25s;
        z-index: 5;
    }

    .ring-2 {
        width: 380px;
        height: 380px;
        animation-duration: 40s;
        animation-direction: reverse;
        z-index: 4;
    }

.planet {
    position: absolute;
    /* FIX: Split shorthand to ensure counter-rotation works with inherited timing */
    animation-name: counterSpin;
    animation-duration: inherit;
    animation-timing-function: inherit;
    animation-iteration-count: inherit;
    animation-direction: inherit;
    
    transition: all 0.3s ease;
    cursor: default;
    max-width: 160px;
}

    .planet-content {
        background: var(--planet-bg);
        border: 1px solid var(--blue-border);
        padding: 6px 14px;
        border-radius: 30px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        color: #eee;
        max-width: 150px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.8em;
    }

    .planet-content span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    /* === GENERAL PLANET STYLES === */
    .planet-content i {
        font-size: 0.9em;
        transition: color 0.3s ease;
        color: var(--blue-icon);
        /* Default icon color is blue */
    }

    .planet:hover .planet-content {
        background: rgba(133, 193, 233, 0.2);
        border-color: var(--blue-icon);
        color: #fff;
        box-shadow: 0 0 15px var(--blue-glow);
    }

    .planet:hover {
        z-index: 50;
    }


    /* === Orbit Planet Styling for BOOK Category Overrides (Yellow) === */
    .planet[data-category="book"] .planet-content {
        border-color: var(--yellow-border);
    }

    .planet[data-category="book"] .planet-content i {
        color: var(--yellow-icon);
    }

    .planet[data-category="book"]:hover .planet-content {
        background: rgba(247, 220, 111, 0.2);
        border-color: var(--yellow-icon);
        box-shadow: 0 0 15px var(--yellow-glow);
    }

    /* Orbit Planet Styling for Book Articles Category (#5CD2C6) */
    .planet[data-category="book-article"] .planet-content {
        border-color: var(--teal-border);
    }

    .planet[data-category="book-article"] .planet-content i {
        color: var(--teal-icon);
    }

    .planet[data-category="book-article"]:hover .planet-content {
        background: rgba(92, 210, 198, 0.2);
        border-color: var(--teal-icon);
        box-shadow: 0 0 15px var(--teal-glow);
    }

    /* Orbit Planet Styling for ARTICLE Category (Purple) === */
    .planet[data-category="article"] .planet-content {
        border-color: var(--purple-border);
    }

    .planet[data-category="article"] .planet-content i {
        color: var(--purple-icon);
    }

    .planet[data-category="article"]:hover .planet-content {
        background: rgba(210, 180, 222, 0.2);
        border-color: var(--purple-icon);
        box-shadow: 0 0 15px var(--purple-glow);
    }


















    @keyframes spin {
        100% {
            transform: rotate(360deg);
        }
    }

    @keyframes glassPulse {
        0% {
            background: rgba(255, 255, 255, 0.08);
        }

        50% {
            background: rgba(255, 255, 255, 0.14);
        }

        100% {
            background: rgba(255, 255, 255, 0.08);
        }
    }

    @keyframes glowPulse {
        0% {
            opacity: 0.35;
        }

        50% {
            opacity: 0.75;
        }

        100% {
            opacity: 0.35;
        }
    }

    @keyframes selfSpin {
        100% {
            transform: rotate(360deg);
        }
    }

    @keyframes selfSpinReverse {
        100% {
            transform: rotate(-360deg);
        }
    }

@keyframes counterSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}






    /* 1. Carousel View Styles */
    #view-carousel {
        width: 100%;
        height: 100%;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
    }

    .carousel-scene {
        width: 100%;
        max-width: 600px;
        height: 250px;
        perspective: 1000px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .carousel {
        width: 100%;
        height: 100%;
        position: absolute;
        transform-style: preserve-3d;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .carousel-card {
        position: absolute;
        width: 150px;
        height: 90px;
        /*SIZE OF CARDS */
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: #fff;
        font-size: 0.9em;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        backface-visibility: visible;
        user-select: none;
        transition: all 0.3s ease;
    }

    .carousel-card span {
        display: block;
        width: 100%;
        padding: 0 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .carousel-card i {
        font-size: 1.6em;
        margin-bottom: 8px;
        transition: all 0.3s ease;
    }

    .carousel-card.highlight {
        background: rgba(var(--card-rgb), 0.75) !important;
        box-shadow: 0 0 25px rgba(var(--card-rgb), 0.6);
        z-index: 100;
    }

    .carousel-card.highlight span {
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
        font-weight: 400;
    }

    .carousel-card.highlight i {
        filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7));
    }


    /* Default "code" category styles (Blue) */
    .carousel-card {
        --card-rgb: var(--rgb-blue);
        background: rgba(var(--rgb-blue), 0.15);
    }

    .carousel-card i {
        color: var(--blue-icon);
    }

    /* "book" category override (Yellow) */
    .carousel-card[data-category="book"] {
        --card-rgb: var(--rgb-yellow);
        background: rgba(var(--rgb-yellow), 0.15);
        border-color: var(--yellow-border);
    }

    .carousel-card[data-category="book"] i {
        color: var(--yellow-icon);
    }

    /* Book-Related Articles (#5CD2C6) */
    .carousel-card[data-category="book-article"] {
        --card-rgb: var(--rgb-teal);
        background: rgba(var(--rgb-teal), 0.15);
        border-color: var(--teal-border);
    }

    .carousel-card[data-category="book-article"] i {
        color: var(--teal-icon);
    }

    /* "article" category override (Purple) */
    .carousel-card[data-category="article"] {
        --card-rgb: var(--rgb-purple);
        background: rgba(var(--rgb-purple), 0.15);
    }

    .carousel-card[data-category="article"] i {
        color: var(--purple-icon);
    }

    .carousel-controls {
        display: flex;
        gap: 20px;
        z-index: 100;
    }

    .c-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        font-size: 0.9em;
        transition: all 0.3s ease;
        backdrop-filter: blur(5px);
    }

    .c-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(133, 193, 233, 0.4);
    }

    .c-btn:active {
        transform: scale(0.95);
    }






    /* === DESKTOP: Make Orbit Container a Square === */
    @media (min-width: 769px) {

        .analytics-glass-container.orbit-view-active {
            min-height: 550px;
        }

        .orbit-container {
            width: 450px;
            height: 450px;
            flex-shrink: 0;
        }
    }








    /* KPI BORDERS & GLOW */

    /* 1. Articles Card (Purple) */
    .kpi-row .kpi-card:nth-child(1) {
        border: 1.2px solid rgba(var(--rgb-purple), 0.5) !important;
        box-shadow: none;
    }

    .kpi-row .kpi-card:nth-child(1):hover {
        border-color: rgba(var(--rgb-purple), 1.0) !important;
        box-shadow: 0 0 25px rgba(var(--rgb-purple), 0.5);
    }

    /* 2. Open Source Card (Blue) */
    .kpi-row .kpi-card:nth-child(2) {
        border: 1.2px solid rgba(var(--rgb-blue), 0.5) !important;
        box-shadow: none;
    }

    .kpi-row .kpi-card:nth-child(2):hover {
        border-color: rgba(var(--rgb-blue), 1.0) !important;
        box-shadow: 0 0 25px rgba(var(--rgb-blue), 0.5);
    }

    /* 3. Books Card (Yellow) */
    .kpi-row .kpi-card:nth-child(3) {
        border: 1.2px solid rgba(var(--rgb-yellow), 0.5) !important;
        box-shadow: none;
    }

    .kpi-row .kpi-card:nth-child(3):hover {
        border-color: rgba(var(--rgb-yellow), 1.0) !important;
        box-shadow: 0 0 25px rgba(var(--rgb-yellow), 0.5);
    }

    /* === ANALYTICS SEARCH BAR STYLING === */
    .analytics-search-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-bottom: 20px;
        position: relative;
        z-index: 10;
    }

    .search-wrapper {
        position: relative;
        width: 100%;
        max-width: 350px;
    }

    .analytics-search-input {
        width: 100%;
        padding: 10px 20px 10px 40px;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50px;
        color: #fff;
        font-size: 0.9em;
        outline: none;
        transition: all 0.3s ease;
    }

    .analytics-search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .analytics-search-input:focus {
        background: rgba(0, 0, 0, 0.3);
        border-color: #9ff0e6 !important;
        box-shadow: 0 0 10px rgba(133, 193, 233, 0.2);
    }

    .search-icon-overlay {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-accent);
        font-size: 0.9em;
        pointer-events: none;
    }


    /* === GALLERY VIEW STYLES === */
    :root {
        --grid-item-size: 200px;
        --thumb-scale: 1;
    }

    /* CONTROLS AREA */
    .controls-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 40px;
        padding-bottom: 15px;
        gap: 25px;
    }

    .slider-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        width: 100%;
        color: var(--text-accent);
    }

    .slider-icon {
        font-size: 1.1em;
        opacity: 0.8;
    }

    /* SLIDER INPUT */
    input[type=range] {
        -webkit-appearance: none;
        appearance: none;
        width: 250px;
        height: 6px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 5px;
        outline: none;
        cursor: pointer;
    }

    input[type=range]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--highlight-color);
        cursor: pointer;
        box-shadow: 0 0 10px rgba(133, 193, 233, 0.5);
        transform: scale(var(--thumb-scale));
        transition: transform 0.1s linear;
    }

    /* TOGGLES */
    .gallery-toggles {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 10px;
    }

    .toggle-item {
        --active-color: #9fcdf0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 7px 15px 7px 4px;
        border-radius: 999px;
        background: rgba(9, 66, 69, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(8px);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        cursor: pointer;
        user-select: none;
        min-width: 120px;
    }

    .toggle-item.special-bg {
        --active-color: #9ff0e6;
        background: linear-gradient(135deg, rgba(159, 240, 230, 0.08), rgba(159, 240, 230, 0.01));
        border-color: rgba(159, 240, 230, 0.15);
    }

    .toggle-item.active-state {
        border-color: var(--active-color);
        background: rgba(255, 255, 255, 0.08);
    }

    .toggle-track {
        position: relative;
        width: 44px;
        height: 24px;
        border-radius: 999px;
        flex-shrink: 0;
        background: rgba(0, 0, 0, 0.3);
        box-shadow: inset 1px 1px 4px rgba(0, 0, 0, 0.4);
        transition: background 0.3s ease;
    }

    .toggle-knob {
        position: absolute;
        top: 2px;
        left: 2px;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: linear-gradient(145deg, #e6e6e6, #c0c0c0);
        box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
        display: grid;
        place-items: center;
        transition: 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
        z-index: 2;
    }

    .toggle-knob i {
        position: absolute;
        font-size: 10px;
        color: #3a4a63;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .icon-1 {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    .icon-2 {
        opacity: 0;
        transform: scale(0.5) rotate(-90deg);
    }

    .custom-grid {
        position: absolute;
        display: grid;
        grid-template-columns: repeat(3, 2px);
        grid-template-rows: repeat(2, 2px);
        gap: 1.5px;
        opacity: 0;
        transform: scale(0.5) rotate(-90deg);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .custom-grid span {
        width: 2px;
        height: 2px;
        background: #3a4a63;
        border-radius: 50%;
    }

    .toggle-track.active .toggle-knob {
        left: 22px;
        background: var(--active-color);
        box-shadow: 0 0 8px var(--active-color);
    }

    .toggle-track.active .icon-1 {
        opacity: 0;
        transform: scale(0.5) rotate(90deg);
    }

    .toggle-track.active .icon-2,
    .toggle-track.active .custom-grid {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    .toggle-label {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-accent);
        letter-spacing: 0.5px;
    }

    .toggle-item.active-state .toggle-label {
        color: var(--active-color);
    }

    /* FILTER BAR */
    .gallery-filter-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        background: rgba(0, 0, 0, 0.2);
        padding: 12px 15px;
        border-radius: 8px;
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        position: relative;
    }

    .filter-group {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .gallery-input {
        width: 100%;
        padding: 8px 10px;
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.2);
        color: #fff;
        outline: none;
        font-size: 0.9em;
    }

    .gallery-input:focus {
        border-color: var(--highlight-color);
    }

    .gallery-filter-bar .custom-select-trigger {
        padding: 8px 10px;
    }

    /* GRID ITEMS */
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(var(--grid-item-size), 100%), 1fr));
        gap: 4px;
    }

    .gallery-item {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .gallery-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
        z-index: 10;
        border-color: rgba(255, 255, 255, 0.4);
    }

    .gallery-img-wrapper {
        width: 100%;
        aspect-ratio: 1 / 1;
        position: relative;
        overflow: hidden;
    }

    .gallery-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .gallery-item:hover .gallery-img {
        transform: scale(1.22);
    }

    /* === DYNAMIC SIZING FOR GALLERY LINKS === */
    .gallery-grid .matrix-link {
        /* Calculates width/height based on zoom level. 
           At 200px (default), it equals 32px. 
           Scales down to ~23px and caps at 40px. */
        width: min(40px, calc(18px + (var(--grid-item-size) * 0.07)));
        height: min(40px, calc(18px + (var(--grid-item-size) * 0.07)));

        /* Calculates icon size. 
           At 200px (default), it equals 15px. */
        font-size: min(18px, calc(9px + (var(--grid-item-size) * 0.03)));
    }

    /* BADGES */
    .type-icon-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        width: min(32px, calc(16px + (var(--grid-item-size) * 0.065)));
        height: min(32px, calc(16px + (var(--grid-item-size) * 0.065)));
        font-size: min(17px, calc(8px + (var(--grid-item-size) * 0.035)));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.25);
        z-index: 2;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    }

    .type-icon-badge.article {
        background-color: #5689C0;
        color: #ffffff;
    }

    .type-icon-badge.code {
        background-color: #D2C2AE;
        color: #333333;
    }

    .type-icon-badge.book {
        background-color: #865A50;
        color: #ffffff;
    }

    .type-icon-badge.stats {
        background: #46A094;
        color: #ffffff;
    }

    /* META DATA */
    .gallery-meta {
        display: flex;
        flex-direction: column;
        background: rgba(44, 62, 80, 0.9);
        border-top: 1px solid var(--border-color);
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.3s ease-in-out;
        flex-grow: 0;
        justify-content: space-between;
    }

    .gallery-grid.show-titles .gallery-meta,
    .gallery-grid.show-links .gallery-meta {
        max-height: 150px;
        opacity: 1;
        padding: 10px;
    }

    .gallery-title-row {
        display: none;
        text-align: center;
        margin-bottom: 5px;
    }

    .gallery-grid.show-titles .gallery-title-row {
        display: block;
    }

    /* Gallery Title Text */
    .gallery-title-link {
        color: var(--text-light);
        text-decoration: none;
        font-weight: 500;
        font-size: min(25px, calc(6px + (var(--grid-item-size) * 0.04)));
        line-height: 1.1;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: default;
    }

    /* Title Hover Effect */
    .gallery-title-link:hover {
        color: var(--highlight-color);
        /* NO UNDERLINE (So it doesn't look like a link) */
        text-decoration: none;
    }

    .gallery-links-row a {
        cursor: pointer !important;
    }

    .gallery-links-row {
        display: none;
        justify-content: center;
        padding-top: 5px;
        gap: max(3px, calc(2px + (var(--grid-item-size) * 0.02)));
    }

    .gallery-grid.show-links .gallery-links-row {
        display: flex;
    }

    .gallery-grid .matrix-link {
        flex-shrink: 0;
        aspect-ratio: 1 / 1;

        /* Optimized Math: Fits 3 icons in the smallest card size (75px) */
        /* Range: ~18px at min zoom to ~40px at max zoom */
        width: min(40px, calc(14px + (var(--grid-item-size) * 0.065)));
        height: min(40px, calc(14px + (var(--grid-item-size) * 0.065)));

        /* Font size scales with the button */
        font-size: min(18px, calc(7px + (var(--grid-item-size) * 0.03)));
    }


    .gallery-links-row .matrix-link.tooltip-top::after {
        bottom: 120%;
    }

    .gallery-item {
        overflow: visible !important;
    }

    .gallery-img-wrapper {
        border-radius: 8px;
        transition: border-radius 0.3s ease;
    }

    .gallery-grid.show-titles .gallery-img-wrapper,
    .gallery-grid.show-links .gallery-img-wrapper {
        border-radius: 8px 8px 0 0;
    }

    .gallery-grid.show-links .gallery-meta,
    .gallery-grid.show-titles .gallery-meta {
        overflow: visible !important;
        border-radius: 0 0 8px 8px;
        /* Manually round bottom corners */
    }

    .gallery-item:hover {
        z-index: 100 !important;
    }

    .gallery-links-row .matrix-link.tooltip-top::after {
        bottom: 125%;
        /* Push it up a bit more */
        margin-bottom: 0;
    }

    /* STATS MODE */
    .gallery-item.stats-card {
        display: none;
    }

    .gallery-grid.stats-mode .gallery-item {
        display: none !important;
    }

    .gallery-grid.stats-mode .gallery-item.stats-card {
        display: flex !important;
    }


    .collapsible-section-content>div {
        padding: 0 25px;
        margin: 0 -25px;
    }

    .glass-effect {
        border-radius: var(--radius-main);
        box-shadow:
            0 15px 55px -25px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }





    /* === BIO TOGGLE BUTTON & ANIMATION === */

    .profile-header {
        position: relative;
    }

    .profile-header .section-header {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
        height: 0;
    }

    #bio-section-trigger {
        position: absolute;
        left: auto;
        right: 10px;
        bottom: 0;
        top: auto;
        transform: none;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 20;
        padding: 0;
        width: auto;
    }



    /* === ANIMATION LOGIC === */
    #bio-content-wrapper .bio-logo-link {
        position: relative;
        z-index: 10;
        transition: opacity 1.0s ease, transform 1.5s cubic-bezier(0.4, 2, 0.5, 1);
    }

    #bio-content-wrapper .item-text {
        position: relative;
        z-index: 1;
        opacity: 1;
        transform: translateX(0);
        transition: all 1.2s ease;
    }

    #bio-content-wrapper>div {
        overflow: visible !important;
    }

    #bio-content-wrapper.collapsed .flipper {
        transform: rotateY(180deg);
    }

    #bio-content-wrapper.collapsed .bio-logo-link {
        opacity: 0;
        transform: scale(0.8);
        pointer-events: none;

        /* FIX: Shrink height to 0 to pull lines together */
        height: 80px;
        margin: -30px 0;

        /* FIX: Keep width reserved so text doesn't overlap/reflow */
        width: 80px;
        min-width: 80px;

        /* Transition logic */
        transition:
            transform 1.5s cubic-bezier(0.4, 2, 0.5, 1),
            opacity 1.0s ease 0.2s,
            height 1.2s ease,
            margin 1.2s ease;
    }





    /* 1. RIGHT COLUMN LAYOUT (Base) */
    .intro-right-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        min-width: 260px;
    }


    #bio-content-wrapper .item-text {
        max-height: 200px;
        opacity: 1;
        overflow: hidden;
        transition: max-height 1.2s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 1s ease,
            transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
            margin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #bio-content-wrapper.collapsed .item-text {
        max-height: 0;
        opacity: 0;
        margin: 0;
        transform: translateX(0px);
    }


    .top-social-links {
        position: absolute;
        bottom: 65px;
        right: 0;
        max-width: auto;
        width: 100%;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 20px;
        z-index: 10;
        pointer-events: auto;
        margin-right: 0px;
        opacity: 0;
        animation: fade-in-socials 0.8s ease forwards 0.2s;
        transition: none;
    }







    @keyframes fade-in-socials {
        0% {
            opacity: 0;
        }

        100% {
            opacity: 1;
        }
    }





    .contact-btn-wrapper {
        margin-top: 55px;
        transition: margin-top 0.5s ease;
        position: relative;
        z-index: 20;
    }





    /* === COLLAPSED STATE (The Fixes) === */
    #bio-content-wrapper.collapsed .contact-btn-wrapper {
        margin-top: 0;
    }


    #bio-content-wrapper.collapsed .top-social-links {
        opacity: 1;
        animation: collapse-icon-path 0.9s cubic-bezier(0.6, 0, 0.4, 1) forwards;
        right: 245px;
        bottom: 10px;
        max-width: 35px;
        gap: 0;
    }







    @keyframes collapse-icon-path {

        0% {
            right: 245px;
            bottom: 65px;
        }

        20% {
            right: 0px;
            bottom: 50px;
        }


        50% {
            right: 0px;
            bottom: 10px;
        }


        100% {
            right: 245px;
            bottom: 10px;
        }
    }


    #bio-content-wrapper.collapsed .top-social-links a:not(:first-child) {
        opacity: 0;
        width: 0;
        margin: 0;
        pointer-events: none;
        transition: none;

    }









    @keyframes spinIconOnce {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    #bio-content-wrapper.collapsed .contact-btn .icon {
        animation: spinIconOnce 0.6s ease-in-out 0.7s;
    }

    #bio-content-wrapper:not(.collapsed) .contact-btn .icon {
        animation: none;
    }

    .mobile-collapsed-linkedin {
        display: none;
    }
















    /* ================== MOBILE BREAKPOINT ================== */


    /* ================== >768px ================== */


    @media (max-width: 768px) {


        /* MOBILE ADJUSTMENT FOR STICKY HEADER */
        .sticky-name {
            font-size: 1em;
        }

        #gallery-total-icon {
            order: 5;
            margin-right: 5px !important;
            margin-left: 5px;
        }

        /* === Hide All Tooltips  === */
        [data-tooltip]::after {
            display: none !important;
        }

        /* This rule sets a shorter, mobile-friendly height for the scrollable table */
        #view-matrix .table-container {
            max-height: 70vh;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .showcase-item.glass-effect,
        .book-showcase.glass-effect {
            background: rgba(30, 60, 90, 0.503) !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            border: 1px solid rgba(255, 255, 255, 0.25);
            margin-bottom: 25px;
            box-shadow:
                0 8px 16px rgba(0, 0, 0, 0.35);

            /* This forces the browser to put this card on its own GPU layer */
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
            backface-visibility: hidden;
        }

        .book-subtitle,
        .project-description {
            color: #ffffffd1 !important;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        }

        .view-on-text {
            color: rgba(255, 255, 255, 0.9) !important;
        }

        body {
            font-size: 15px;
            line-height: 1.6;
            padding: 15px 2px;
        }

        .project-description {
            line-height: 1.55;
        }

        .container {
            width: 93%;
            padding: 15px 15px 25px;
            /* PARENT CONTAINER MOBILE */
        }

        .profile-header {
            flex-direction: column;
            gap: 15px;
            margin-bottom: 0px;
            padding-top: 10px;
            padding-bottom: 25px;
        }

        .profile-picture {
            width: 80px;
            height: 80px;
        }

        h1 {
            font-size: 1.9em;
            white-space: nowrap;
        }

        /*HEADER FOR MOBILE*/
        .actions-section {
            gap: 6px;
            flex-direction: column;
        }

        .actions-section>.showcase-item,
        .intro-right-col .top-social-links {
            display: none;
        }

        .showcase-item,
        #open-source-projects .showcase-item,
        #articles-insights .showcase-item,
        #digital-bookshelf .showcase-item {
            flex-direction: column;
        }

        .bio-text-mobile {
            display: block;
            order: 1;
            text-align: left;
            font-style: italic;
            padding: 0 10px;
            margin-top: 10px;
            font-size: 14px;
            color: #ffffff93;
        }

        .mobile-icons-container {
            display: flex;
            order: 2;
            justify-content: flex-start;
            align-items: center;
            width: 100%;
            padding: 0 15px;
            gap: 20px;
        }

        .mobile-icons-container .bio-logo-link {
            width: 70px;
            height: 70px;
            margin: 0;
        }

        .mobile-icons-container .top-social-links {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            max-width: 180px;
            gap: 2px;
        }

        .bio-logo-link,
        .contact-btn-wrapper {
            position: relative;
            z-index: 10;
        }

        .mobile-icons-container .top-social-links a {
            width: 38px;
            height: 38px;
            opacity: 0.9;
            transition: background-color 0.2s ease, opacity 0.2s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            transition: background-color 0.2s ease;
        }

        .mobile-icons-container .top-social-links a:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .mobile-icons-container .top-social-links a:focus {
            opacity: 1;
            background-color: rgba(255, 255, 255, 0.1);
        }

        .mobile-icons-container .top-social-links .fa-brands {
            font-size: 26px;
        }

        .mobile-icons-container .top-social-links .fa-gitlab,
        .mobile-icons-container .top-social-links .fa-bitbucket {
            font-size: 24px;
            /* Smaller than the default 26px */
        }

        .mobile-icons-container .top-social-links .fa-amazon {
            font-size: 27px;
            /* Larger than the default 26px */
        }

        .mobile-icons-container .top-social-links svg {
            width: 26px;
            height: 26px;
        }

        .mobile-social-break {
            display: block;
            flex-basis: 100%;
            height: 0;
        }

        .actions-section .tooltip-wrapper {
            order: 3;
            width: 100%;
        }

        .item-text,
        .book-text {
            text-align: center;
        }

        .book-showcase {
            flex-direction: column;
        }

        .item-image {
            width: 170px;
            height: 170px;
            margin: 0 auto 0px;
        }

        .book-media-asset {
            width: 100px;
            height: 150px;
            margin: 0;
        }

        .book-showcase>div:last-child {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            gap: 15px;
            margin-top: 20px;
        }

        .project-links {
            justify-content: center;
        }

        #open-source-projects .item-text,
        #articles-insights .item-text,
        #digital-bookshelf .item-text {
            text-align: left;
        }

        .mobile-break {
            display: block;
            height: 8px;
        }

        .mobile-hide-separator {
            display: none;
        }

        .book-showcase .book-text {
            text-align: left;
        }

        .book-showcase .project-links {
            justify-content: flex-start;
        }


        .internal-nav-row-1 {
            margin-bottom: 10px;
        }

        .internal-nav .separator {
            margin: 0;
        }

        .internal-nav-row-1,
        .internal-nav-row-2 {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
        }

        .internal-nav a {
            white-space: nowrap;
            font-size: 16px;
            margin: 0;
        }

        .internal-nav .separator:nth-of-type(2) {
            display: none;
        }


        .internal-nav {
            display: flex;
            flex-direction: column;
            gap: 10px !important;
            width: 100%;
            margin-top: 15px;
            border-bottom: none;
        }

        .internal-nav.hidden-view {
            display: none !important;
        }

        .nav-pill {
            width: 100%;
            justify-content: center;
            margin: 0;
        }

        .project-matrix-table {
            min-width: 750px !important;
        }

        /* This rule controls the description column specifically on mobile */
        #view-matrix .col-desc {
            font-size: 13px;
            line-height: 1.4;
            min-width: 295px;
            white-space: normal;
            word-break: break-word;
        }

        /* This rule controls the first column (image column) on mobile */
        .project-matrix-table th:nth-child(1),
        .project-matrix-table td:nth-child(1) {
            width: 50px;
            padding-left: 5px;
            padding-right: 5px;
        }

        /* THE AI ATLAS TABLE RAW (MOBILE VIEW) */
        #atlas-title-mobile {
            font-size: 15px !important;
            /* Force smaller size on mobile */
            white-space: nowrap !important;
            /* Prevent wrapping */
            letter-spacing: -0.5px;
            /* Squeeze slightly */
        }

        /* VIEW SWITCHER - SINGLE LINE */
        .view-switcher-container {
            flex-wrap: nowrap !important;
            /* Force one line */
            gap: 3px !important;
            /* Force small gap (overrides desktop) */
            padding-left: 0 !important;
            padding-right: 0 !important;

        }

        .view-btn {
            width: auto !important;
            flex: 1 !important;
            padding: 10px 10px !important;
            font-size: 12px !important;
            gap: 8px !important;
        }


        /* --- 1. SEARCH BARS & DROPDOWNS (Card Style) --- */
        .gallery-filter-bar,
        .gallery-input,
        .custom-select-trigger {
            background: rgba(30, 60, 90, 0.503) !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            border: 1px solid rgba(255, 255, 255, 0.25) !important;

            /* Kill iOS Native Styling */
            -webkit-appearance: none !important;
            appearance: none !important;

            color: #ffffff !important;
            border-radius: 8px !important;
            background-image: none !important;
        }

        .gallery-input::placeholder {
            color: rgba(255, 255, 255, 0.7) !important;
            -webkit-text-fill-color: rgba(255, 255, 255, 0.7) !important;
        }

        /* --- 2. TOGGLE BUTTONS (TITLES, LINKS, STATS) --- */

        /* A. STANDARD BUTTONS (Titles & Links) */
        .toggle-item {
            background: rgba(0, 0, 0, 0.25) !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
            border-radius: 50px !important;
            gap: 5px !important;
            padding: 6px 10px 6px 4px !important;
            white-space: nowrap !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            box-shadow: none !important;
        }

        /* B. "SEE STATS" BUTTON (Distinct Default Color) */
        .toggle-item.special-bg {
            background: rgba(4, 55, 50, 0.5) !important;
            border-color: rgba(159, 240, 230, 0.2) !important;
        }

        /* C. TEXT STYLING (Default) */
        .toggle-label {
            color: rgba(255, 255, 255, 0.7) !important;
            font-size: 10px !important;
            letter-spacing: 0.5px !important;
        }

        /* D. ACTIVE STATES (When Clicked) */

        /* Standard Active (Blue Glow) */
        .toggle-item.active-state {
            background: rgba(133, 193, 233, 0.15) !important;
            border-color: #85C1E9 !important;
        }

        .toggle-item.active-state .toggle-label {
            color: #85C1E9 !important;
            font-weight: 700 !important;
        }

        /* Stats Active (Teal Glow) */
        .toggle-item.special-bg.active-state {
            background: rgba(159, 240, 230, 0.25) !important;
            border-color: #9ff0e6 !important;
        }

        .toggle-item.special-bg.active-state .toggle-label {
            color: #9ff0e6 !important;
        }

        /* --- 3. ANALYTICS KPI CARDS & SWITCHER BUTTONS --- */
        .kpi-card,
        .toggle-btn {
            background: rgba(30, 60, 90, 0.503) !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            border: 1px solid rgba(255, 255, 255, 0.25) !important;
            box-shadow: none !important;
            color: #ffffff !important;
        }

        .kpi-card:nth-child(1) {
            border-color: rgba(210, 180, 222, 0.5) !important;
        }

        .kpi-card:nth-child(2) {
            border-color: rgba(133, 193, 233, 0.5) !important;
        }

        .kpi-card:nth-child(3) {
            border-color: rgba(247, 220, 111, 0.5) !important;
        }

        .toggle-btn.active {
            background: rgba(133, 193, 233, 0.2) !important;
            border-color: #9ff0e6 !important;
        }

        /* Style Orbit Hexagon for Mobile (Non-Glass) */
        .hex-center {
            border: 0px solid rgba(255, 255, 255, 0.25) !important;
        }

        .hex-center::before {
            background: rgba(48, 95, 142, 0.493) !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }

        html,
        body {
            background-attachment: scroll !important;
        }

        body::before {
            background-attachment: scroll !important;
        }

        .intro-right-col {
            display: contents;
        }

        .contact-btn-wrapper {
            margin-top: 0;
        }

        .top-social-links {
            position: static;
            bottom: auto;
            right: auto;
            left: auto;
            width: 100%;
            flex-wrap: wrap;
            margin-right: 0;
            justify-content: center;
            transition: none;
        }

        .mobile-icons-container .top-social-links a {
            color: var(--text-main) !important;
            text-decoration: none;

        }

        .section-header .section-trigger a {
            font-size: clamp(12px, 6vw, 30px) !important;
            white-space: nowrap !important;
        }

        .contact-btn {
            min-height: 50px;
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
        }


        .profile-header .section-header {
            display: block !important;
            position: absolute;
            bottom: 0;
            right: 0;
            width: 100%;
            height: 0;
            z-index: 50;
            border: none;
            margin: 0;
            padding: 0;
        }

        #bio-section-trigger .bio-icon-toggle {
            opacity: 0.4 !important;
        }

        #bio-section-trigger {
            right: 6px !important;
            bottom: 2px !important;
            font-size: clamp(12px, 6vw, 30px) !important;
        }

        .actions-section {
            display: flex;
            align-items: stretch;
            width: 100%;
            position: relative;
            transition: gap 0.4s ease, margin 0.4s ease;
        }


        #bio-content-wrapper.collapsed .mobile-collapsed-linkedin {
            display: flex;

            width: 50px !important;
            height: 50px !important;
            padding: 0 !important;

            margin-right: 10px;
            opacity: 1;
            visibility: visible;
            border: 1px solid rgba(255, 255, 255, 0.124);

            transition:
                width 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                margin-right 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                visibility 0s linear,
                height 0.8s ease,
                border 0.8s ease !important;
        }

        /*This forces the "Let's Connect" button to match the 50px height of the LinkedIn button exactly*/
        #bio-content-wrapper.collapsed .contact-btn {
            height: 50px !important;
            padding: 0 25px !important;
            /* Keep side padding, remove top/bottom */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* B. Shrink Connect Button (Your Exact Timing) */
        #bio-content-wrapper.collapsed .contact-btn-wrapper {
            width: calc(100% - 65px);
            /* 50px icon + 10px margin */
            margin-top: 10px;
            transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }


        /* D. Force Row Layout on collapse */
        #bio-content-wrapper.collapsed .actions-section {
            flex-direction: row !important;
            align-items: center !important;
            justify-content: center !important;
        }


        /* --- 3. THE EXPAND ANIMATION --- */

        /* A. LinkedIn Button (Disappears) */
        .mobile-collapsed-linkedin {
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            flex-shrink: 0;
            background: rgba(255, 255, 255, 0.099);
            border-radius: 8px;
            color: #ffffffc7;
            font-size: 1.8em;
            text-decoration: none;
            order: 3;
            width: 0;
            height: 50px;
            min-height: 50px;
            border: none;
            margin: 0;
            padding: 0;
            opacity: 0;
            visibility: hidden;
        }

        /* B. Connect Button (Expands to Full Width) */
        .contact-btn-wrapper {
            flex-shrink: 0;
            order: 2;
            margin-left: auto;
            width: 100%;
            transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
        }


        /* C. Icons (Slide UP - Existing Animation) */
        #bio-content-wrapper:not(.collapsed) .mobile-icons-container {
            display: flex;
            opacity: 0;
            animation-delay: 0.1s;
        }






        /* D. Bio Text (Slides DOWN - Existing Animation) */
        #bio-content-wrapper:not(.collapsed) .bio-text-mobile {
            display: block;
            animation: bioTextSlideDown 1.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
            opacity: 0;
            transform-origin: top center;
            will-change: opacity, transform, max-height;
        }





        @keyframes bioTextSlideDown {
            0% {
                opacity: 0;
                /* Start slightly higher (-15px) and smaller (0.95) for a "soft landing" effect */
                transform: translateY(-15px) scale(0.95);
                max-height: 0;
            }

            30% {
                opacity: 0.1;
            }

            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
                max-height: 200px;
            }
        }






        #bio-content-wrapper:not(.collapsed) .mobile-icons-container {
            display: flex;
            animation: bioIconsSlideUp 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            opacity: 0;
            animation-delay: 0.1s;
        }

        #bio-content-wrapper:not(.collapsed) .mobile-icons-container .bio-logo-link {
            opacity: 1 !important;
            transition: none !important;
            transform: none !important;
            margin: 0 !important;
        }






        @keyframes mobileGrowThenFlip {

            /* PHASE 1: Start Small (matches social icons ~40px) */
            0% {
                transform: rotateY(180deg) scale(0.5);
            }

            /* PHASE 2: Grow to Full Size (80px) - Still showing Cursor */
            40% {
                transform: rotateY(180deg) scale(1);
            }

            /* PAUSE: Hold cursor for a split second */
            55% {
                transform: rotateY(180deg) scale(1);
            }

            /* PHASE 3: Flip to Logo */
            100% {
                transform: rotateY(0deg) scale(1);
            }
        }











        @keyframes bioIconsSlideUp {
            0% {
                opacity: 0;
                transform: translateY(20px) scale(0.9);
            }

            28% {
                opacity: 0.2;
            }

            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }


        #bio-content-wrapper:not(.collapsed) .mobile-icons-container .flipper {
            transform: rotateY(180deg) scale(0.5);
            animation: mobileGrowThenFlip 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
            animation-delay: 0.4s;
        }




        #bio-content-wrapper:not(.collapsed) .actions-section {
            flex-direction: row !important;
            flex-wrap: wrap !important;
            align-items: center !important;
            gap: 0 !important;
        }

        #bio-content-wrapper:not(.collapsed) .mobile-icons-container {
            margin-bottom: 10px;
            margin-top: 10px;
        }

        /* 3. LINKEDIN BUTTON (Slide Left Exit) */
        .mobile-collapsed-linkedin {
            overflow: hidden;
            margin-right: 0px;
            transition:
                width 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                /* -2.5 forces margin to spike to ~50px */
                margin-right 0.8s cubic-bezier(0.25, -2.5, 0.25, 1),
                opacity 0.8s ease,
                visibility 0s linear 0.8s;
        }

        #bio-content-wrapper.collapsed .mobile-collapsed-linkedin {
            /* This is the gap that pushes the Connect button */
            margin-right: 15px !important;
            margin-top: 10px;
        }

        /* 4. CONNECT BUTTON: FILLS SPACE WITHOUT WRAPPING */
        .contact-btn-wrapper {
            order: 4;
            flex-grow: 1;
            flex-basis: auto;
            width: auto !important;
            /* STOP forcing 100% width (prevents dropping to new line) */
            min-width: 0;
        }



        /* COMMENT OUT FOR WORKING CODE*/
        #bio-content-wrapper.collapsed .bio-text-mobile,
        #bio-content-wrapper.collapsed .mobile-icons-container {
            display: none !important;
            opacity: 0;
            animation: none;
        }



    }









    /* ================== >600px ================== */

    @media (max-width: 600px) {
        .gallery-toggles {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .toggle-item {
            width: 100%;
        }

        #btn-stats {
            grid-column: 1 / -1;
            width: calc(50% - 5px);
            margin: 0 auto;
        }

        .gallery-filter-bar {
            grid-template-columns: 1fr;
        }

        input[type=range] {
            width: auto;
            flex: 1;
        }


        /* Mobile Adjustments for Analytics */

        .kpi-row {
            flex-wrap: nowrap;
            gap: 10px;
        }

        .kpi-card {
            min-width: 0;
            padding: 15px 5px;
            width: 33%;
        }

        .kpi-number {
            font-size: 1.8em;
        }

        .kpi-icon {
            font-size: 1.4em;
            margin-bottom: 8px;
        }

        .kpi-label {
            font-size: 0.65em;
            line-height: 1.4;
            white-space: normal;
        }

        .orbit-container {
            height: 350px;
        }

        .ring-1 {
            width: 140px;
            height: 140px;
        }

        .ring-2 {
            width: 250px;
            height: 250px;
        }

        .hex-center {
            width: 70px;
            height: 80px;
            font-size: 1.8em;
        }

        .planet {
            font-size: 0.7em;
            padding: 4px 10px;
        }

        .carousel-scene {
            perspective: 800px;
        }

        .carousel-card {
            width: 120px;
            height: 70px;
            font-size: 0.8em;
        }

    }








    /* ================== 389>768px ================== */

    /* This media query targets "larger" mobile screens, like an iPhone 13 and up.*/
    @media (min-width: 390px) and (max-width: 768px) {

        /* Hide the element that forces the icons to wrap to a second line */
        .mobile-social-break {
            display: none;
        }

        .mobile-icons-container {
            padding: 0;
        }

        .mobile-icons-container .top-social-links {
            max-width: 100%;
            gap: 1px;
        }
    }









    /* ================== >389px ================== */

    /* ALLOW 2+2 WRAP */
    @media (max-width: 389px) {
        .view-switcher-container {
            flex-wrap: wrap !important;
            /* Allow wrapping */
            gap: 8px !important;
        }

        .view-btn {
            /* Force 2 buttons per row (50% minus gap) */
            flex: 0 0 48% !important;
            font-size: 12px !important;
            /* Slightly larger since we have room now */
        }
    }