@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');

/* ===== BRAND PALETTE ===== */
:root {
    --brand-primary: #6f42c1;
    --brand-primary-hover: #5a32a3;
    --brand-secondary: #0d6efd;
    --brand-accent: #d63384;
    --brand-gradient: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
    --brand-gradient-ring: conic-gradient(from 0deg, var(--brand-secondary), var(--brand-primary), var(--brand-accent), var(--brand-secondary));
}

[data-bs-theme="light"] {
    --badge-bg: #f0f0f0;
    --badge-color: #212529;
    --badge-border: #ddd;
    --brand-link: var(--brand-primary);
    --brand-link-hover: var(--brand-primary-hover);
    --section-heading: #212529;
}

[data-bs-theme="dark"] {
    --badge-bg: #444;
    --badge-color: #f8f9fa;
    --badge-border: #666;
    --brand-link: #a78bfa;
    --brand-link-hover: #c4b5fd;
    --section-heading: #f1f1f1;
}

html {
    scroll-behavior: smooth;
}

body {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* ===== TEXT SELECTION ===== */
::selection {
    background: var(--brand-primary);
    color: #fff;
    text-shadow: none;
}

::-moz-selection {
    background: var(--brand-primary);
    color: #fff;
    text-shadow: none;
}

/* ===== CUSTOM SCROLLBAR ===== */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--brand-primary) transparent;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-image: var(--brand-gradient);
    background-clip: padding-box;
    border: 3px solid transparent;
    border-radius: 10px;
    transition: background-color 200ms ease;
}

::-webkit-scrollbar-thumb:hover {
    background-image: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

[data-bs-theme="dark"] {
    scrollbar-color: var(--brand-primary) rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

/* ===== SKIP TO MAIN CONTENT (a11y) ===== */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-110%);
    z-index: 9999;
    background: var(--brand-primary-hover);
    color: #fff;
    padding: 0.65rem 1.1rem;
    font-weight: 600;
    border-radius: 0 0 0.5rem 0;
    text-decoration: none;
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

main:focus {
    outline: none;
}

section[id] {
    scroll-margin-top: 80px;
}

#fluent-text {
    font-family: 'Roboto Mono', monospace;
    font-weight: bold;
    font-size: clamp(1.4rem, 2vw, 3rem);
}

.custom-font {
    font-family: 'Source Code Pro', monospace;
    font-weight: bold;
}

h1, h2, h3, .custom-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* ===== SECTION HEADING GRADIENT UNDERLINE ===== */
section > h2.custom-font {
    display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
}

section > h2.custom-font::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--brand-gradient);
    border-radius: 2px;
}

#backToTop {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop.show:hover {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    transform: translateY(-2px);
}

#backToTop.show:active {
    transform: translateY(0);
    transition-duration: 80ms;
}

#backToTop .bi-arrow-up-short {
    transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

#backToTop.show:hover .bi-arrow-up-short {
    transform: translateY(-2px);
}

#header {
    font-size: .5rem;
}

.lead {
    text-align: left;
}

/* Constrain long-form prose to a comfortable reading width (~70 chars per line) */
.prose-narrow {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

#footer-text {
    font-size: .8rem;
}

#changeTheme {
    background: transparent;
    border: 0;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}

#changeTheme i {
    vertical-align: middle;
    transition: transform 0.4s ease;
}

#changeTheme:hover i {
    transform: rotate(180deg);
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bs-body-bg, #fff);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-initials {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: preloader-pulse 1.2s ease-in-out infinite;
}

@keyframes preloader-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== HERO NAME ===== */
.hero-name {
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-align: center;
    margin: 0;
}

/* ===== HERO STATUS PILL ===== */
.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1.15rem;
    border-radius: 2rem;
    background: rgba(111, 66, 193, 0.08);
    border: 1px solid rgba(111, 66, 193, 0.22);
    font-size: 0.95rem;
    font-weight: 400;
}

.hero-status-text {
    line-height: 1;
}

.hero-status-text strong {
    font-weight: 600;
    color: var(--brand-primary);
}

.hero-status-dot {
    position: relative;
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

.hero-status-dot::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: #10b981;
    opacity: 0.55;
    animation: hero-status-pulse 2s ease-out infinite;
}

@keyframes hero-status-pulse {
    0% { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(2.4); opacity: 0; }
}

[data-bs-theme="dark"] .hero-status {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.28);
}

[data-bs-theme="dark"] .hero-status-text strong {
    color: #a78bfa;
}

/* ===== HERO QUICK LINKS ===== */
.hero-quick-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.hero-quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(111, 66, 193, 0.28);
    background: transparent;
    color: var(--brand-primary);
    font-size: 1.2rem;
    transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1),
                background 200ms ease,
                color 200ms ease,
                border-color 200ms ease;
}

.hero-quick-link:hover {
    transform: translateY(-2px);
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 6px 14px rgba(111, 66, 193, 0.28);
}

.hero-quick-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.15);
    transition-duration: 80ms;
}

.hero-quick-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(111, 66, 193, 0.35);
}

[data-bs-theme="dark"] .hero-quick-link {
    border-color: rgba(167, 139, 250, 0.32);
    color: #a78bfa;
}

[data-bs-theme="dark"] .hero-quick-link:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* ===== PROFILE IMAGE GRADIENT RING ===== */
.profile-ring {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    padding: 4px;
    background: var(--brand-gradient-ring);
    animation: spin-ring 4s linear infinite;
}

.profile-ring img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bs-body-bg, #fff);
    transition: transform 0.3s ease;
}

.profile-ring:hover img {
    transform: scale(1.03) rotate(1deg);
}

@keyframes spin-ring {
    to { background: conic-gradient(from 360deg, var(--brand-secondary), var(--brand-primary), var(--brand-accent), var(--brand-secondary)); }
}

/* ===== HERO SECTION HEIGHT =====
   Bootstrap's .min-vh-100 = 100vh, but the section starts ~120px below the page top
   (sticky navbar + container's py-5 padding), so its bottom (and the scroll indicator
   pinned to it) falls below the visible viewport. Subtract that offset so the
   section's bottom aligns with the visible viewport bottom. svh = small viewport
   height, the iOS-Safari-friendly version of vh. */
#me.min-vh-100 {
    min-height: calc(100svh - 7rem) !important;
}

/* ===== HERO PHOTO CLUSTER (orbital tags around profile ring) ===== */
.hero-photo-cluster {
    position: relative;
    width: 460px;
    height: 460px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px dashed rgba(111, 66, 193, 0.3);
    pointer-events: none;
}

.orbital-ring::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: -5px;
    background: var(--brand-primary);
    box-shadow: 0 0 12px rgba(111, 66, 193, 0.6),
                0 0 4px rgba(111, 66, 193, 0.9);
}

.orbital-ring-inner {
    width: 360px;
    height: 360px;
    margin: -180px 0 0 -180px;
    animation: orbital-spin-cw 30s linear infinite;
}

.orbital-ring-outer {
    width: 460px;
    height: 460px;
    margin: -230px 0 0 -230px;
    animation: orbital-spin-ccw 45s linear infinite;
}

.orbital-ring-outer::before {
    width: 12px;
    height: 12px;
    margin-left: -6px;
    top: -6px;
    background: var(--brand-secondary);
    box-shadow: 0 0 14px rgba(13, 110, 253, 0.6),
                0 0 4px rgba(13, 110, 253, 0.9);
}

[data-bs-theme="dark"] .orbital-ring-inner::before {
    background: #c4b5fd;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.7),
                0 0 5px rgba(167, 139, 250, 1);
}

[data-bs-theme="dark"] .orbital-ring-outer::before {
    background: #8ab4ff;
    box-shadow: 0 0 14px rgba(110, 168, 255, 0.7),
                0 0 5px rgba(110, 168, 255, 1);
}

@keyframes orbital-spin-cw {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes orbital-spin-ccw {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

[data-bs-theme="dark"] .orbital-ring {
    border-color: rgba(167, 139, 250, 0.22);
}

.orbital-tag {
    position: absolute;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 5;
    backdrop-filter: blur(6px);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 250ms ease;
}

.orbital-tag-top {
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 6px 18px rgba(111, 66, 193, 0.3);
}

.orbital-tag-top:hover {
    transform: translate(-50%, -3px);
    box-shadow: 0 10px 24px rgba(111, 66, 193, 0.4);
}

.orbital-tag-right {
    top: 35%;
    right: 0;
    background: rgba(111, 66, 193, 0.12);
    color: var(--brand-primary);
    border: 1px solid rgba(111, 66, 193, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.orbital-tag-right:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(111, 66, 193, 0.18);
}

.orbital-tag-bottom {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    background: rgba(13, 110, 253, 0.1);
    color: var(--brand-secondary);
    border: 1px solid rgba(13, 110, 253, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.orbital-tag-bottom:hover {
    transform: translate(-50%, -3px);
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.2);
}

.orbital-tag-left {
    top: 35%;
    left: 0;
    background: var(--bs-body-bg, #fff);
    color: var(--brand-primary);
    border: 1px solid rgba(111, 66, 193, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.orbital-tag-left:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(111, 66, 193, 0.18);
}

[data-bs-theme="dark"] .orbital-tag-right {
    background: rgba(36, 28, 56, 0.92);
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .orbital-tag-bottom {
    background: rgba(20, 30, 56, 0.92);
    color: #8ab4ff;
    border-color: rgba(110, 168, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .orbital-tag-left {
    background: rgba(36, 36, 48, 0.92);
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

@media (max-width: 991.98px) {
    .hero-photo-cluster {
        width: 380px;
        height: 380px;
    }

    .orbital-ring-inner {
        width: 290px;
        height: 290px;
        margin: -145px 0 0 -145px;
    }

    .orbital-ring-outer {
        width: 380px;
        height: 380px;
        margin: -190px 0 0 -190px;
    }

    .orbital-tag {
        font-size: 0.78rem;
        padding: 0.38rem 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .hero-photo-cluster {
        width: 260px;
        height: 260px;
        margin-bottom: 1.5rem !important;
    }

    .orbital-ring-inner {
        width: 220px;
        height: 220px;
        margin: -110px 0 0 -110px;
    }

    .orbital-ring-outer {
        width: 260px;
        height: 260px;
        margin: -130px 0 0 -130px;
    }

    .orbital-ring::before {
        width: 8px;
        height: 8px;
        margin-left: -4px;
        top: -4px;
    }

    .orbital-ring-outer::before {
        width: 9px;
        height: 9px;
        margin-left: -4.5px;
        top: -4.5px;
    }

    /* Keep top + bottom orbital tags in their original positions; hide the side ones (no horizontal room on phone) */
    .orbital-tag-left,
    .orbital-tag-right {
        display: none;
    }

    .orbital-tag-top,
    .orbital-tag-bottom {
        font-size: 0.68rem;
        padding: 0.28rem 0.65rem;
    }

    /* Float top/bottom tags outside the cluster so they don't kiss the photo's gradient ring */
    .orbital-tag-top {
        top: -10px;
    }

    .orbital-tag-bottom {
        bottom: -10px;
    }

    /* Hero on mobile: anchor content to top so quick-links sit above the fold.
       Use svh (small viewport height) so iOS Safari's address bar doesn't inflate the section. */
    #me {
        min-height: calc(100svh - 7rem) !important;
        justify-content: flex-start !important;
        padding-top: 1.5rem;
        padding-bottom: 5rem;
    }

    .hero-name {
        font-size: clamp(2rem, 9vw, 2.8rem);
        margin-bottom: 1rem !important;
    }

    .hero-status {
        font-size: 0.85rem;
        padding: 0.4rem 0.9rem;
        margin-bottom: 1.25rem !important;
    }

    .hero-quick-links {
        gap: 0.85rem;
        margin-bottom: 1rem !important;
    }
}

/* ===== BADGES ===== */
.badge-skill {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 0.5rem;
    margin: 0.25em;
    display: inline-block;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    background-color: var(--badge-bg);
    color: var(--badge-color);
    border: 1px solid var(--badge-border);
}

.badge-skill:hover {
    transform: translateY(-2px);
    background-color: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* ===== CARDS ===== */
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.card-title.text-brand {
    color: var(--brand-primary);
}

[data-bs-theme="dark"] .card-title.text-brand {
    color: #a78bfa;
}

[data-bs-theme="light"] body {
    background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
    background-size: 24px 24px;
}

[data-bs-theme="dark"] body {
    background-color: #121212;
    color: #f1f1f1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
}

.card-text {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 4px 6px rgba(111, 66, 193, 0.06),
        0 10px 20px rgba(111, 66, 193, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .card:hover {
    box-shadow:
        0 4px 6px rgba(167, 139, 250, 0.08),
        0 10px 20px rgba(167, 139, 250, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="light"] .card-text {
    color: #595959;
}

[data-bs-theme="dark"] .card-text {
    color: #d4d4d4;
}

.text-justify {
    text-align: justify;
}

.blinking-cursor {
    animation: blink 1s step-start infinite;
    font-weight: 100;
}

@keyframes blink {
    50% {
    opacity: 0;
    }
}

/* ===== BUTTONS ===== */
.btn-brand {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.15);
    transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1),
                background-color 200ms ease,
                border-color 200ms ease;
}

.btn-brand:hover {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(111, 66, 193, 0.28);
}

.btn-brand:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.15);
    transition-duration: 80ms;
}

.btn-brand:focus-visible {
    outline: none;
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.15),
                0 0 0 4px rgba(111, 66, 193, 0.35);
}

.btn-brand:disabled,
.btn-brand.disabled {
    opacity: 0.65;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-brand .bi-send {
    transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-brand:hover .bi-send {
    transform: translateX(3px);
}

.btn-outline-brand {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-outline-brand:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    transform: scale(1.05);
}

[data-bs-theme="dark"] .btn-outline-brand {
    color: #a78bfa;
    border-color: #a78bfa;
}

[data-bs-theme="dark"] .btn-outline-brand:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.btn-outline-primary {
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-outline-primary:hover {
    transform: scale(1.05);
}

.badge {
    transition: transform 0.2s ease, background-color 0.3s ease;
    cursor: default;
}

.badge:hover {
    transform: translateY(-2px);
}

/* ===== LINKS ===== */
.elegant-link {
    color: var(--brand-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(111, 66, 193, 0.4);
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.elegant-link:hover {
    color: var(--brand-link-hover);
    text-decoration-color: currentColor;
}

[data-bs-theme="dark"] .elegant-link {
    text-decoration-color: rgba(167, 139, 250, 0.5);
}

/* The cta-link variant has its own animated underline; suppress the default one to avoid doubling */
.elegant-link.cta-link {
    text-decoration: none;
}

.elegant-link.cta-link {
    position: relative;
    font-weight: 500;
}

.elegant-link.cta-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transition: transform 0.3s ease;
    transform: scaleX(0);
    transform-origin: right;
}

.elegant-link.cta-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.strava-badge {
    background-color: #fc5200;
    color: white;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.strava-badge:hover {
    background-color: #d44400;
    opacity: 0.8;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: inherit;
    opacity: 0.5;
    animation: bounce 2s ease infinite;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== SKILL ICON CIRCLE ===== */
.skill-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-icon-circle:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 20px rgba(111, 66, 193, 0.4), 0 0 40px rgba(111, 66, 193, 0.2);
}

/* ===== PROJECT PLACEHOLDER ===== */
.project-placeholder {
    height: 160px;
    background: var(--brand-gradient);
    border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0;
}

.project-placeholder-text {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Poppins', sans-serif;
}

/* ===== FOOTER ===== */
.footer-nav-link {
    font-size: 0.85rem;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer-nav-link:hover {
    opacity: 1;
}

.footer-social-icon {
    font-size: 1.2rem;
    color: inherit;
    opacity: 0.6;
    margin: 0 0.4rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.footer-social-icon:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* ===== ACTIVE NAV INDICATOR ===== */
.nav-link {
    position: relative;
    padding-bottom: 0.4rem;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-gradient);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

.nav-link.active {
    color: var(--brand-primary) !important;
    font-weight: 600;
}

[data-bs-theme="dark"] .nav-link.active {
    color: #a78bfa !important;
}

/* ===== NAVBAR GLASSMORPHISM ===== */
header.sticky-top .navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] header.sticky-top .navbar {
    background: rgba(18, 18, 18, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== PROJECT IMAGE HOVER ===== */
.project-img-wrapper {
    overflow: hidden;
    border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0;
    position: relative;
}

.project-img-wrapper img {
    transition: transform 0.4s ease;
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-img-wrapper:hover img {
    transform: scale(1.08);
}

.project-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(111, 66, 193, 0.85), rgba(111, 66, 193, 0.2));
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-img-wrapper:hover .project-img-overlay {
    opacity: 1;
}

.project-img-overlay span {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.project-img-overlay .btn-light {
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.project-img-overlay .btn-light:hover {
    transform: scale(1.05);
}

/* ===== GITHUB CONTRIBUTION GRAPH ===== */
.github-graph-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

.github-graph {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.github-graph .graph-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
}

[data-bs-theme="light"] .github-graph .c0 { fill: #ebedf0; }
[data-bs-theme="light"] .github-graph .c1 { fill: #e5d4ff; }
[data-bs-theme="light"] .github-graph .c2 { fill: #c8a8ff; }
[data-bs-theme="light"] .github-graph .c3 { fill: #a076f9; }
[data-bs-theme="light"] .github-graph .c4 { fill: #7d4de2; }
[data-bs-theme="light"] .github-graph .graph-label { fill: #586069; }

[data-bs-theme="dark"] .github-graph .c0 { fill: #1f232a; }
[data-bs-theme="dark"] .github-graph .c1 { fill: #3c2a63; }
[data-bs-theme="dark"] .github-graph .c2 { fill: #5a2cc7; }
[data-bs-theme="dark"] .github-graph .c3 { fill: #a076f9; }
[data-bs-theme="dark"] .github-graph .c4 { fill: #d4c1ff; }
[data-bs-theme="dark"] .github-graph .graph-label { fill: #8b949e; }

/* ===== SECTION DIVIDERS ===== */
.section-divider {
    height: 3px;
    border: none;
    background: var(--brand-gradient);
    opacity: 0.3;
    margin: 0 auto;
    width: 60%;
    border-radius: 2px;
}

/* ===== READING PROGRESS BAR ===== */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--brand-gradient);
    z-index: 3000;
    transition: width 0.1s linear;
}

/* ===== STATS COUNTER ===== */
.stat-item {
    height: 100%;
    padding: 1.75rem 1rem;
    background: transparent;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1),
                border-color 200ms ease,
                background 200ms ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: rgba(111, 66, 193, 0.04);
    border-color: rgba(111, 66, 193, 0.22);
    box-shadow: 0 8px 18px rgba(111, 66, 193, 0.12);
}

.stat-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 0.35rem;
    box-shadow: 0 4px 10px rgba(111, 66, 193, 0.25);
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover .stat-icon-wrapper {
    transform: scale(1.06);
}

.stat-value {
    line-height: 1;
}

[data-bs-theme="dark"] .stat-item {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .stat-item:hover {
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 8px 18px rgba(167, 139, 250, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Poppins', sans-serif;
}

.stat-plus {
    font-size: 2rem;
    font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    margin-top: 0.25rem;
    opacity: 0.7;
    font-weight: 500;
}

/* ===== FORM INPUT FOCUS ===== */
.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

[data-bs-theme="dark"] .form-control:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 0.2rem rgba(167, 139, 250, 0.25);
}

/* ===== CURRENT WORK FEATURE CARD ===== */
.current-work-logo-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.current-work-logo-link:hover {
    transform: scale(1.03);
}

.current-work-logo {
    max-width: 100%;
    max-height: 180px;
    height: auto;
}

.current-work-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

[data-bs-theme="dark"] .current-work-eyebrow {
    color: #a78bfa;
}

.current-work-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
    .current-work-title {
        font-size: 2rem;
        text-align: center;
    }

    .current-work-eyebrow {
        text-align: center;
    }
}

/* ===== CHARACTER COUNTER ===== */
.character-counter {
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.character-counter.near-limit {
    color: #d97706;
    font-weight: 500;
}

.character-counter.at-limit {
    color: var(--bs-danger, #dc3545);
    font-weight: 600;
}

/* ===== ANIMATED GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(270deg, var(--brand-secondary), var(--brand-primary), var(--brand-accent), var(--brand-secondary));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== PHILOSOPHY QUOTE ===== */
.philosophy-quote {
    position: relative;
    padding: 2rem 2.5rem;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

.philosophy-quote::before {
    content: '\201C';
    position: absolute;
    top: -0.5rem;
    left: 0;
    font-size: 5rem;
    font-style: normal;
    line-height: 1;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.4;
    font-family: Georgia, serif;
}

.philosophy-author {
    font-style: normal;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* ===== .NET FOOTER BADGE ===== */
.badge-dotnet {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3em 0.75em;
    border-radius: 1rem;
    background: var(--brand-gradient);
    color: #fff;
    letter-spacing: 0.03em;
}

/* ===== TOASTS ===== */
.toast-brand {
    color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(111, 66, 193, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 320px;
}

.toast-brand.toast-success {
    background: linear-gradient(135deg, #1b8555, #2ea968);
}

.toast-brand.toast-error {
    background: linear-gradient(135deg, #b02a37, #d63384);
}

.toast-brand .toast-body {
    font-weight: 500;
    padding: 1rem;
}

.toast-brand .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.toast-brand .btn-close:hover {
    opacity: 1;
}

/* ===== 404 PAGE ===== */
.not-found-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: clamp(5rem, 20vw, 10rem);
    font-weight: 800;
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}

.not-found-digit {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: not-found-float 3s ease-in-out infinite;
}

.not-found-4:first-child {
    animation-delay: 0s;
}

.not-found-4:last-child {
    animation-delay: 0.4s;
}

.not-found-0 {
    position: relative;
    animation-delay: 0.2s;
}

.not-found-orbit {
    position: absolute;
    inset: 15% 20%;
    border: 3px dashed var(--brand-primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: not-found-spin 8s linear infinite;
}

@keyframes not-found-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes not-found-spin {
    to { transform: rotate(360deg); }
}

.not-found-lead {
    opacity: 0.8;
}

.not-found-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.not-found-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-weight: 500;
    color: var(--brand-primary);
    border: 1px solid rgba(111, 66, 193, 0.3);
    background: rgba(111, 66, 193, 0.05);
    transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
                background 220ms ease,
                color 220ms ease,
                box-shadow 220ms ease,
                border-color 220ms ease;
}

.not-found-link:hover {
    transform: translateY(-3px);
    background: var(--brand-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(111, 66, 193, 0.25);
}

.not-found-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.15);
    transition-duration: 80ms;
}

.not-found-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(111, 66, 193, 0.35);
}

.not-found-link i {
    font-size: 1.1rem;
}

[data-bs-theme="dark"] .not-found-link {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.3);
    background: rgba(167, 139, 250, 0.08);
}

[data-bs-theme="dark"] .not-found-link:hover {
    color: #fff;
}

/* ===== LANGUAGE PILLS ===== */
.language-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.1rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.language-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(111, 66, 193, 0.15);
}

.language-name {
    font-weight: 600;
}

.language-level {
    font-size: 0.8rem;
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    font-weight: 500;
}

.language-dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.language-dots > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

.language-native .language-dots > span:nth-child(-n+5),
.language-professional .language-dots > span:nth-child(-n+4),
.language-limited .language-dots > span:nth-child(-n+2),
.language-elementary .language-dots > span:nth-child(-n+1) {
    opacity: 1;
}

.language-native {
    background: var(--brand-gradient);
    color: #fff;
}

.language-native .language-level {
    background: rgba(255, 255, 255, 0.25);
}

.language-professional {
    background: rgba(111, 66, 193, 0.15);
    color: var(--brand-primary);
    border: 1px solid rgba(111, 66, 193, 0.3);
}

.language-professional .language-level {
    background: rgba(111, 66, 193, 0.2);
}

.language-limited {
    background: transparent;
    color: var(--brand-primary);
    border: 1px solid var(--brand-primary);
}

.language-limited .language-level {
    background: rgba(111, 66, 193, 0.1);
}

.language-elementary {
    background: transparent;
    color: var(--brand-primary);
    border: 1px dashed var(--brand-primary);
}

.language-elementary .language-level {
    background: rgba(111, 66, 193, 0.1);
}

[data-bs-theme="dark"] .language-professional {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.3);
}

[data-bs-theme="dark"] .language-professional .language-level {
    background: rgba(167, 139, 250, 0.2);
}

[data-bs-theme="dark"] .language-limited {
    color: #a78bfa;
    border-color: #a78bfa;
}

[data-bs-theme="dark"] .language-limited .language-level {
    background: rgba(167, 139, 250, 0.15);
}

[data-bs-theme="dark"] .language-elementary {
    color: #a78bfa;
    border-color: #a78bfa;
}

[data-bs-theme="dark"] .language-elementary .language-level {
    background: rgba(167, 139, 250, 0.15);
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 576px) {
    .profile-ring {
        width: 200px;
        height: 200px;
    }

    .custom-font:not(.hero-name) {
        font-size: 1.2rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-plus {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .philosophy-quote {
        padding: 1.5rem 1rem;
        font-size: 1rem;
    }

    .philosophy-quote::before {
        font-size: 3rem;
    }

    .section-divider {
        width: 80%;
    }

    .lead {
        font-size: 1rem;
    }

    .card.shadow-lg.p-4 {
        padding: 1rem !important;
    }

    .project-img-wrapper img {
        height: 160px;
    }

    .footer-nav-link {
        font-size: 0.75rem;
        margin: 0 0.25rem;
    }

    .language-pill {
        display: flex;
        width: 100%;
        max-width: 22rem;
        justify-content: space-between;
    }

    .language-pill .language-dots {
        margin-left: auto;
        margin-right: 0.6rem;
    }
}

@media (max-width: 768px) and (min-width: 577px) {
    .profile-ring {
        width: 250px;
        height: 250px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .philosophy-quote {
        padding: 1.5rem 1.5rem;
        font-size: 1.05rem;
    }
}

/* ===== HONEYPOT ANTI-SPAM ===== */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ===== FOCUS-VISIBLE (a11y) ===== */
.nav-link:focus-visible,
.footer-nav-link:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.footer-social-icon:focus-visible,
#changeTheme:focus-visible,
.scroll-indicator:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 4px;
    border-radius: 50%;
}

.elegant-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

#backToTop.show:focus-visible {
    outline: none;
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.15),
                0 0 0 4px rgba(111, 66, 193, 0.35);
}

[data-bs-theme="dark"] .nav-link:focus-visible,
[data-bs-theme="dark"] .footer-nav-link:focus-visible,
[data-bs-theme="dark"] .footer-social-icon:focus-visible,
[data-bs-theme="dark"] #changeTheme:focus-visible,
[data-bs-theme="dark"] .scroll-indicator:focus-visible {
    outline-color: #a78bfa;
}

/* ===== REUSABLE SECTION CARD (used by Now, Currently Building, Skills, Projects, Contact) ===== */
.section-card {
    background: transparent;
    border: 1px solid var(--bs-border-color);
    border-left: 4px solid var(--brand-primary);
    border-radius: 12px;
    padding: 1.75rem 1.75rem 1.5rem;
}

[data-bs-theme="dark"] .section-card {
    border-color: rgba(255, 255, 255, 0.08);
    border-left-color: var(--brand-primary);
}

@media (min-width: 768px) {
    .section-card {
        padding: 2.25rem 2.25rem 2rem;
    }
}

/* Soft card variant for sub-cards (Skills, Projects): subtle border, no left accent */
.card-accent {
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: transparent;
}

[data-bs-theme="dark"] .card-accent {
    border-color: rgba(255, 255, 255, 0.08);
}

.now-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.now-list li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    line-height: 1.55;
}

.now-list li i {
    flex-shrink: 0;
    color: var(--brand-primary);
    font-size: 1.15rem;
    margin-top: 0.15rem;
}

[data-bs-theme="dark"] .now-list li i {
    color: #a78bfa;
}

.now-updated {
    border-top: 1px dashed var(--bs-border-color);
    padding-top: 0.85rem;
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.now-updated-label {
    font-style: italic;
    font-weight: 500;
}

.now-fresh-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: now-fresh-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .now-fresh-dot {
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
}

@keyframes now-fresh-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

[data-bs-theme="dark"] @keyframes now-fresh-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

/* ===== RESPONSE-TIME BADGE ===== */
.response-time-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.35);
    font-size: 0.85rem;
    font-weight: 500;
}

[data-bs-theme="dark"] .response-time-badge {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.4);
}

/* ===== HEALTH BADGE ===== */
.health-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: border-color 200ms ease, color 200ms ease;
}

.health-badge:hover {
    border-color: var(--brand-primary);
    color: var(--bs-emphasis-color);
}

.health-badge:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.health-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    box-shadow: 0 0 0 3px transparent;
    animation: health-pulse 2s ease-in-out infinite;
}

.health-badge-dot.health-up {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.health-badge-dot.health-degraded {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.health-badge-dot.health-down {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

@keyframes health-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ===== HEALTH STATUS PAGE ===== */
.health-page {
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(111, 66, 193, 0.10), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(16, 185, 129, 0.06), transparent 60%);
    min-height: calc(100vh - 64px);
}

.health-status-card {
    position: relative;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1.25rem;
    padding: 2.25rem;
    box-shadow: 0 24px 60px -28px rgba(20, 16, 60, 0.18);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.health-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 70px -28px rgba(20, 16, 60, 0.22);
}

@media (prefers-reduced-motion: reduce) {
    .health-status-card { transition: none; }
    .health-status-card:hover { transform: none; }
}

.health-status-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--brand-gradient);
    opacity: 0.85;
}

.health-status-card.health-up::before { background: linear-gradient(90deg, #10b981, #22c55e); }
.health-status-card.health-degraded::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.health-status-card.health-down::before { background: linear-gradient(90deg, #ef4444, #b91c1c); }

.health-status-header {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.health-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.6rem;
    color: #fff;
    flex-shrink: 0;
}

.health-status-card.health-up .health-status-icon {
    background: #10b981;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.16);
}

.health-status-card.health-degraded .health-status-icon {
    background: #f59e0b;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.18);
}

.health-status-card.health-down .health-status-icon {
    background: #ef4444;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.18);
}

.health-status-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--bs-secondary-color);
    font-weight: 600;
}

.health-status-headline {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.health-status-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.health-status-card.health-up .health-status-pill {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.health-status-card.health-degraded .health-status-pill {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.health-status-card.health-down .health-status-pill {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.health-status-divider {
    border: 0;
    border-top: 1px solid var(--bs-border-color-translucent);
    margin: 1.5rem 0;
    opacity: 1;
}

.health-status-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem 2rem;
    margin: 0;
}

.health-status-meta > div { display: flex; flex-direction: column; gap: 0.25rem; }
.health-status-meta dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bs-secondary-color);
    font-weight: 600;
    margin: 0;
}

.health-status-meta dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.health-status-meta-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    font-weight: 400;
    margin-top: 0.15rem;
}

.health-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.health-check-entry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: center;
    gap: 0.25rem 2rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.health-check-entry:last-child { border-bottom: none; }

.health-check-entry-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.health-check-entry .health-badge-dot {
    animation: health-pulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .health-check-entry .health-badge-dot { animation: none; }
}

.health-check-entry-name { font-weight: 500; }

.health-check-entry-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    width: fit-content;
}

.health-check-entry-status.health-up {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.health-check-entry-status.health-degraded {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.health-check-entry-status.health-down {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.health-check-entry-detail {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-top: 0.25rem;
}

.health-status-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.health-status-version {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    font-family: var(--bs-font-monospace);
    letter-spacing: 0.02em;
}

/* ===== KEYBOARD SHORTCUTS MODAL ===== */
.shortcuts-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.shortcuts-modal.show {
    display: flex;
    animation: shortcuts-fade-in 180ms ease-out;
}

@keyframes shortcuts-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shortcuts-modal-content {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    padding: 2rem;
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    position: relative;
}

[data-bs-theme="dark"] .shortcuts-modal-content {
    background: #1a1a1f;
}

.shortcuts-close {
    position: absolute;
    top: 0.65rem;
    right: 0.85rem;
    background: transparent;
    border: 0;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--bs-secondary-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background-color 150ms ease, color 150ms ease;
}

.shortcuts-close:hover,
.shortcuts-close:focus-visible {
    color: var(--bs-emphasis-color);
    background: var(--bs-tertiary-bg);
    outline: none;
}

.shortcuts-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.7rem 1.4rem;
    margin: 0;
    align-items: center;
}

.shortcuts-list dt {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.shortcuts-list dd {
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.shortcuts-list kbd,
.command-palette-esc {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 2px 7px;
    font-family: 'Source Code Pro', monospace;
}

[data-bs-theme="dark"] .shortcuts-list kbd,
[data-bs-theme="dark"] .command-palette-esc {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.shortcuts-list kbd {
    font-size: 0.8rem;
    color: var(--bs-emphasis-color);
    min-width: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .shortcuts-list kbd {
    color: #f1f1f1;
}

/* ===== COMMAND PALETTE (Cmd/Ctrl+K) ===== */
.command-palette {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 1rem 1rem;
}

.command-palette[hidden] {
    display: none;
}

.command-palette-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: cp-fade 160ms ease-out;
}

.command-palette-box {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: cp-slide 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-bs-theme="dark"] .command-palette-box {
    background: #15161a;
    border-color: rgba(255, 255, 255, 0.08);
}

@keyframes cp-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cp-slide {
    from { opacity: 0; transform: translateY(-8px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.command-palette-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.command-palette-icon {
    font-size: 1.1rem;
    color: var(--bs-secondary-color);
    flex-shrink: 0;
}

.command-palette-input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bs-emphasis-color);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    padding: 0.2rem 0;
    min-width: 0;
}

.command-palette-input::placeholder {
    color: var(--bs-secondary-color);
}

.command-palette-esc {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    flex-shrink: 0;
}

.command-palette-results {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    max-height: min(420px, 50vh);
    overflow-y: auto;
}

.command-palette-group-label {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.command-palette-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: background-color 80ms ease, border-color 80ms ease;
    user-select: none;
}

.command-palette-item-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--bs-tertiary-bg);
    color: var(--brand-primary);
    font-size: 0.95rem;
}

[data-bs-theme="dark"] .command-palette-item-icon {
    background: rgba(167, 139, 250, 0.12);
    color: #c4b5fd;
}

.command-palette-item-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
}

.command-palette-item-hint {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    font-family: 'Source Code Pro', monospace;
}

.command-palette-item.is-active,
.command-palette-item:hover {
    background: linear-gradient(90deg, rgba(111, 66, 193, 0.08), transparent);
    border-left-color: var(--brand-primary);
}

[data-bs-theme="dark"] .command-palette-item.is-active,
[data-bs-theme="dark"] .command-palette-item:hover {
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.14), transparent);
    border-left-color: #a78bfa;
}

.command-palette-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 0.95rem;
}

.command-palette-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.55rem 1rem;
    border-top: 1px solid var(--bs-border-color);
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .command-palette-footer {
    background: rgba(255, 255, 255, 0.025);
    border-top-color: rgba(255, 255, 255, 0.08);
}

.command-palette-footer kbd {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.7rem;
    font-family: 'Source Code Pro', monospace;
    color: var(--bs-emphasis-color);
    margin-right: 0.25rem;
}

[data-bs-theme="dark"] .command-palette-footer kbd {
    background: #1a1a1f;
    border-color: rgba(255, 255, 255, 0.12);
    color: #f1f1f1;
}

/* ===== BLOG ===== */
.blog-article {
    max-width: 760px;
}

.blog-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
}

.blog-content h2 { font-size: 1.75rem; }
.blog-content h3 { font-size: 1.4rem; }
.blog-content h4 { font-size: 1.2rem; }

.blog-content p {
    margin-bottom: 1.25rem;
}

.blog-content a {
    color: var(--brand-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

[data-bs-theme="dark"] .blog-content a {
    color: #a78bfa;
}

.blog-content code {
    background: rgba(111, 66, 193, 0.08);
    color: var(--brand-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

[data-bs-theme="dark"] .blog-content code {
    background: rgba(167, 139, 250, 0.12);
    color: #c4b5fd;
}

.blog-content pre {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .blog-content pre {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.08);
}

.blog-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.9rem;
}

/* ===== PRISM.JS INTEGRATION ===== */
.blog-content pre[class*="language-"] {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-shadow: none;
}

.blog-content pre[class*="language-"] code,
.blog-content code[class*="language-"] {
    background: transparent;
    color: inherit;
    padding: 0;
    font-family: 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-shadow: none;
}

[data-bs-theme="dark"] .blog-content pre[class*="language-"] {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Prism toolbar - language label + copy button */
.blog-content div.code-toolbar {
    position: relative;
}

.blog-content div.code-toolbar > .toolbar {
    top: 0.5rem;
    right: 0.6rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.blog-content div.code-toolbar:hover > .toolbar,
.blog-content div.code-toolbar:focus-within > .toolbar {
    opacity: 1;
}

.blog-content div.code-toolbar > .toolbar > .toolbar-item > button,
.blog-content div.code-toolbar > .toolbar > .toolbar-item > span {
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-family: 'Source Code Pro', monospace;
    box-shadow: none;
}

.blog-content div.code-toolbar > .toolbar > .toolbar-item > button:hover,
.blog-content div.code-toolbar > .toolbar > .toolbar-item > button:focus {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .blog-content div.code-toolbar > .toolbar > .toolbar-item > button,
[data-bs-theme="dark"] .blog-content div.code-toolbar > .toolbar > .toolbar-item > span {
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .blog-content div.code-toolbar > .toolbar > .toolbar-item > button:hover,
[data-bs-theme="dark"] .blog-content div.code-toolbar > .toolbar > .toolbar-item > button:focus {
    color: #c4b5fd;
    border-color: #a78bfa;
    background: rgba(0, 0, 0, 0.5);
}

.blog-content blockquote {
    border-left: 4px solid var(--brand-primary);
    padding-left: 1rem;
    margin-left: 0;
    color: var(--bs-secondary-color);
    font-style: italic;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.4rem;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.blog-content th,
.blog-content td {
    border: 1px solid var(--bs-border-color);
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.blog-content th {
    background: var(--bs-tertiary-bg);
    font-weight: 600;
}

.badge-skill-active {
    background: var(--brand-gradient) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.stretched-link-hover:hover {
    color: var(--brand-primary) !important;
}

[data-bs-theme="dark"] .stretched-link-hover:hover {
    color: #a78bfa !important;
}

/* ===== BLOG LIKE BUTTON ===== */
.btn-reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--bs-secondary-color);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.btn-reaction i {
    font-size: 1.35rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.btn-reaction:hover {
    background: rgba(224, 36, 94, 0.08);
    color: #e0245e;
}

.btn-reaction:hover i {
    transform: scale(1.1);
}

.btn-reaction:active {
    transform: scale(0.96);
}

.btn-reaction:focus-visible {
    outline: 2px solid #e0245e;
    outline-offset: 2px;
}

.btn-reaction.is-liked {
    color: #e0245e;
}

.btn-reaction.is-liked .bi-heart-fill {
    animation: heart-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heart-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

[data-bs-theme="dark"] .btn-reaction {
    color: rgba(255, 255, 255, 0.6);
}

[data-bs-theme="dark"] .btn-reaction:hover {
    background: rgba(255, 92, 138, 0.12);
    color: #ff5c8a;
}

[data-bs-theme="dark"] .btn-reaction.is-liked {
    color: #ff5c8a;
}

/* ===== BLOG LAYOUT (article + TOC) ===== */
.blog-layout > .blog-article {
    margin-left: auto;
    margin-right: auto;
}

.blog-toc {
    display: none;
}

@media (min-width: 1200px) {
    .blog-layout:has(.blog-toc:not([hidden])) {
        display: grid;
        grid-template-columns: 220px minmax(0, 760px);
        gap: 3.5rem;
        justify-content: center;
        align-items: start;
    }

    .blog-layout:has(.blog-toc:not([hidden])) > .blog-article {
        max-width: 760px;
        margin-left: 0;
        margin-right: 0;
    }

    .blog-toc:not([hidden]) {
        display: block;
        position: sticky;
        top: 100px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        padding-right: 0.25rem;
    }
}

.blog-toc-nav {
    border-left: 2px solid var(--bs-border-color);
    padding-left: 1rem;
}

.blog-toc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin: 0 0 0.75rem 0;
}

.blog-toc-list,
.blog-toc-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc-sublist {
    margin-top: 0.25rem;
    padding-left: 0.75rem;
    border-left: 1px dashed var(--bs-border-color);
}

.blog-toc-item {
    margin: 0;
}

.blog-toc-item a {
    display: block;
    padding: 0.3rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--bs-secondary-color);
    text-decoration: none;
    border-left: 2px solid transparent;
    margin-left: -1.125rem;
    padding-left: 1rem;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.blog-toc-item-h3 a {
    font-size: 0.82rem;
    padding-left: 1.5rem;
    color: var(--bs-tertiary-color, var(--bs-secondary-color));
}

.blog-toc-item a:hover,
.blog-toc-item a:focus-visible {
    color: var(--brand-primary);
}

.blog-toc-item a.is-active {
    color: var(--brand-primary);
    border-left-color: var(--brand-primary);
    background: linear-gradient(90deg, rgba(111, 66, 193, 0.06), transparent);
    font-weight: 600;
}

[data-bs-theme="dark"] .blog-toc-item a:hover,
[data-bs-theme="dark"] .blog-toc-item a:focus-visible,
[data-bs-theme="dark"] .blog-toc-item a.is-active {
    color: #c4b5fd;
}

[data-bs-theme="dark"] .blog-toc-item a.is-active {
    border-left-color: #a78bfa;
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.12), transparent);
}

/* ===== SECTION REVEAL ON SCROLL ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    will-change: opacity, transform;
}

[data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

/* ===== VIEW TRANSITIONS (page-to-page crossfade) ===== */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.32s;
    animation-timing-function: ease-in-out;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
