/* ===========================
   FONTS
   =========================== */
@font-face {
    font-family: 'Butler';
    src: url('font/Butler_Ultra_Light.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Butler';
    src: url('font/Butler_Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Butler';
    src: url('font/Butler_Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Butler';
    src: url('font/Butler_Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Butler';
    src: url('font/Butler_Bold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Butler';
    src: url('font/Butler_ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Butler';
    src: url('font/Butler_Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

.texto-butler { font-family: 'Butler', serif !important; }
.butler-ultralight { font-family: 'Butler', serif !important; font-weight: 200; }
.butler-light { font-family: 'Butler', serif !important; font-weight: 300; }
.butler-semibold { font-family: 'Butler', serif !important; font-weight: 600; }
.butler-bold { font-family: 'Butler', serif !important; font-weight: 700; }

/* ===========================
   CSS CUSTOM PROPERTIES - LIGHT THEME (default)
   =========================== */
:root,
[data-bs-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #f3f0f8;
    --bg-card-hover: #ebe7f2;
    --bg-gradient-start: rgba(232, 210, 255, 0.4);
    --bg-gradient-mid: rgba(200, 220, 255, 0.3);
    --bg-gradient-end: rgba(255, 220, 230, 0.2);
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #8e8ea0;
    --text-link: #6c5ce7;
    --border-color: rgba(0, 0, 0, 0.08);
    --badge-bg: rgba(0, 0, 0, 0.06);
    --badge-text: #555570;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-border: rgba(0, 0, 0, 0.06);
    --tab-active-bg: #1a1a2e;
    --tab-active-text: #ffffff;
    --tab-inactive-text: #555570;
    --footer-border: rgba(0, 0, 0, 0.06);
    --scrollbar-thumb: #c4c4c4;
    --scrollbar-thumb-hover: #a0a0a0;
    --modal-bg: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --selection-bg: #6c5ce7;
    --selection-text: #ffffff;
    --project-label-bg: rgba(255, 255, 255, 0.92);
    --project-label-text: #1a1a2e;
    --theme-toggle-bg: rgba(0, 0, 0, 0.05);
    --theme-toggle-hover: rgba(0, 0, 0, 0.1);
}

/* ===========================
   DARK THEME
   =========================== */
[data-bs-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --bg-card: #000000;
    --bg-card-hover: #0a0a0a;
    --bg-gradient-start: transparent;
    --bg-gradient-mid: transparent;
    --bg-gradient-end: transparent;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --text-link: #a78bfa;
    --border-color: rgba(255, 255, 255, 0.06);
    --badge-bg: rgba(255, 255, 255, 0.08);
    --badge-text: #a0a0b8;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(0, 0, 0, 0.92);
    --nav-border: rgba(255, 255, 255, 0.06);
    --tab-active-bg: #e8e8f0;
    --tab-active-text: #0a0a0f;
    --tab-inactive-text: #a0a0b8;
    --footer-border: rgba(255, 255, 255, 0.06);
    --scrollbar-thumb: #333340;
    --scrollbar-thumb-hover: #44444f;
    --modal-bg: #18182a;
    --overlay-bg: rgba(0, 0, 0, 0.75);
    --selection-bg: #a78bfa;
    --selection-text: #0a0a0f;
    --project-label-bg: rgba(20, 20, 35, 0.92);
    --project-label-text: #e8e8f0;
    --theme-toggle-bg: rgba(255, 255, 255, 0.08);
    --theme-toggle-hover: rgba(255, 255, 255, 0.12);
}

/* ===========================
   PAGE TRANSITION
   =========================== */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

.page-transition-logo {
    width: 45px;
    height: auto;
    animation: transitionPulse 1.4s ease-in-out infinite;
}

[data-bs-theme="light"] .page-transition-logo {
    filter: invert(1);
}

@keyframes transitionPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1); }
}

/* Page content fade */
.page-content {
    opacity: 0;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-content.visible {
    opacity: 1;
}

/* ===========================
   BASE STYLES
   =========================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: var(--selection-bg);
    color: var(--selection-text);
}

::-moz-selection {
    background-color: var(--selection-bg);
    color: var(--selection-text);
}

/* ===========================
   SCROLLBAR
   =========================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

/* ===========================
   GRADIENT BACKGROUND
   =========================== */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    min-height: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

/* ===========================
   NAVBAR
   =========================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: padding 0.3s ease;
}

.site-nav.scrolled {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0.6rem 0;
}

.site-nav .container-portfolio {
    background: transparent !important;
}

.nav-logo img {
    height: 35px;
    width: auto;
    transition: opacity 0.2s ease, filter 0.3s ease;
}

[data-bs-theme="light"] .nav-logo img {
    filter: invert(1);
}

.nav-logo:hover img {
    opacity: 0.75;
}


.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--theme-toggle-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.theme-toggle:hover {
    background: var(--theme-toggle-hover);
    color: var(--text-primary);
}

/* ===========================
   HERO / BANNER SECTION
   =========================== */
.hero-section {
    position: relative;
    z-index: 1;
    padding-top: 6rem;
    padding-bottom: 1rem;
}

.hero-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.hero-name {
    font-family: 'Butler', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-description {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.25rem;
    max-width: 550px;
}

.hero-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-meta a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border-color);
    transition: text-decoration-color 0.2s ease;
}

.hero-meta a:hover {
    text-decoration-color: var(--text-primary);
}

/* Landing home (vhoda.sh): hero viewport + 2 columnas */
.page-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Bloque nav + banner = 1 pantalla completa (100vh); nav flota encima del hero */
.landing-viewport {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    isolation: isolate;
}

.landing-viewport .site-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

.hero-section--landing {
    flex: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    padding-top: 5.5rem;
    padding-bottom: 2rem;
    z-index: 1;
}

.hero-landing-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-landing-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-landing-media-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.hero-landing-video-ui {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 5;
    pointer-events: auto;
}

.hero-landing-video-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-landing-vid-volume {
    width: 92px;
    height: 6px;
    margin: 0 0.25rem 0 0.15rem;
    cursor: pointer;
    accent-color: rgba(255, 255, 255, 0.9);
    vertical-align: middle;
}

.hero-landing-vid-volume:focus {
    outline: none;
}

.hero-landing-vid-volume:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

.hero-landing-vid-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-landing-vid-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.hero-landing-inner {
    position: relative;
    z-index: 2;
}

.hero-landing-row {
    min-height: min(70vh, 28rem);
    --bs-gutter-x: 2rem;
    --bs-gutter-y: 3rem;
}

@media (min-width: 992px) {
    .hero-landing-row {
        --bs-gutter-x: 0;
        flex-wrap: nowrap;
        justify-content: center;
        column-gap: clamp(2.75rem, 7vw, 6rem);
    }
}

.hero-landing-logo {
    max-width: min(100%, 200px);
    height: auto;
    display: block;
    margin-bottom: 1.25rem;
    filter:
        drop-shadow(0 0 6px rgba(255, 255, 255, 0.45))
        drop-shadow(0 0 14px rgba(167, 139, 250, 0.35))
        drop-shadow(0 0 24px rgba(167, 139, 250, 0.18));
    transition: filter 0.35s ease;
}

.hero-landing-tagline {
    font-size: 0.95rem;
    font-weight: 400;
    color: rgba(240, 240, 248, 0.95);
    letter-spacing: 0.02em;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.35),
        0 0 22px rgba(167, 139, 250, 0.28),
        0 0 36px rgba(167, 139, 250, 0.12);
}

.hero-landing-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
}

@media (min-width: 992px) {
    .hero-landing-col--links {
        width: max-content;
        max-width: 100%;
    }
}

.hero-landing-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(248, 248, 252, 0.95);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.25s ease;
}

.hero-landing-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow:
        0 0 14px rgba(255, 255, 255, 0.22),
        0 0 28px rgba(167, 139, 250, 0.35),
        0 0 42px rgba(167, 139, 250, 0.15);
    transform: translateY(-1px);
}

.hero-landing-link:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.4),
        0 0 18px rgba(167, 139, 250, 0.45);
}

.hero-landing-link i {
    width: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
    opacity: 0.95;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.25));
}

.nav-offcanvas-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: var(--theme-toggle-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-offcanvas-toggle:hover {
    background: var(--theme-toggle-hover);
    color: var(--text-primary);
}

.nav-offcanvas-menu-icon {
    font-size: 1.35rem;
    line-height: 1;
    display: inline-block;
}

.offcanvas.show,
.offcanvas.showing {
    z-index: 100500 !important;
}

/*
 * Bootstrap 5 anima opacity en .offcanvas-backdrop; en Chrome/WebKit eso
 * desactiva o anula el efecto de backdrop-filter. Mantener opacity:1 y
 * fundir solo con background-color + blur.
 */
.offcanvas-backdrop {
    z-index: 100499 !important;
    --bs-offcanvas-backdrop-bg: transparent !important;
    --bs-offcanvas-backdrop-opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0) !important;
    opacity: 1 !important;
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    transition:
        background-color 0.2s ease,
        -webkit-backdrop-filter 0.28s ease,
        backdrop-filter 0.28s ease !important;
}

.offcanvas-backdrop.fade {
    opacity: 1 !important;
}

.offcanvas-backdrop.show {
    background-color: rgba(0, 0, 0, 0.48) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Offcanvas menú — panel oscuro + vidrio (blur del contenido detrás) */
.nav-offcanvas.offcanvas {
    --bs-offcanvas-bg: transparent;
    max-width: min(100vw, 380px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(
            165deg,
            rgba(12, 12, 15, 0.92) 0%,
            rgba(5, 5, 6, 0.94) 45%,
            rgba(2, 2, 3, 0.96) 100%
        ) !important;
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -20px 0 56px rgba(0, 0, 0, 0.65);
}

.nav-offcanvas-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-offcanvas-brand-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.nav-offcanvas-brand {
    height: 34px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 0 6px rgba(255, 255, 255, 0.42))
        drop-shadow(0 0 14px rgba(167, 139, 250, 0.32))
        drop-shadow(0 0 22px rgba(167, 139, 250, 0.15));
}

.nav-offcanvas-close {
    flex-shrink: 0;
    margin: 0;
    padding: 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0.9;
    transition: opacity 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-offcanvas-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.14) !important;
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.18),
        0 0 24px rgba(167, 139, 250, 0.22);
}

.nav-offcanvas-body {
    padding: 1.35rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 0;
    flex: 1 1 auto;
}

.nav-offcanvas-footer {
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-offcanvas-link--footer {
    width: 100%;
}

.nav-offcanvas-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(248, 248, 252, 0.95);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.25s ease;
}

.nav-offcanvas-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow:
        0 0 14px rgba(255, 255, 255, 0.22),
        0 0 28px rgba(167, 139, 250, 0.35),
        0 0 42px rgba(167, 139, 250, 0.15);
    transform: translateY(-1px);
}

.nav-offcanvas-link:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.5),
        0 0 18px rgba(167, 139, 250, 0.45);
}

.nav-offcanvas-ico {
    font-size: 1.28rem;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.22));
}

.nav-offcanvas-link-external {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-block;
    opacity: 0.78;
}

/* ===========================
   SECTION TABS
   =========================== */
.section-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2.5rem;
}

.section-tab {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tab-inactive-text);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
}

.section-tab:hover {
    color: var(--text-primary);
    background: var(--badge-bg);
}

.section-tab.active {
    background-color: var(--tab-active-bg);
    color: var(--tab-active-text);
}

/* ===========================
   PROJECT GRID
   =========================== */
.projects-grid {
    position: relative;
    z-index: 1;
    padding-bottom: 4rem;
}

.project-card {
    display: block;
    text-decoration: none;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.project-card-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.project-card:hover .project-card-image {
    transform: scale(1.03);
}

.project-card-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--project-label-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--project-label-text);
}

.project-card-label .dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* Wrapper for card + description */
.project-card-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.project-card {
    margin-bottom: 0;
}

.project-card-desc {
    font-size: 0.835rem;
    color: var(--text-secondary);
    margin: 0;
    padding: 0.4rem 0.15rem 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-wrapper:hover .project-card-desc {
    opacity: 1;
}

.project-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-soon {
    background: rgba(245, 166, 35, 0.9);
    color: #fff;
}

.badge-working {
    background: rgba(46, 160, 67, 0.9);
    color: #fff;
}

/* Project card without image */
.project-card-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
}

.project-card-info .project-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.project-card-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.project-card-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.project-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--badge-bg);
    color: var(--badge-text);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--footer-border);
    padding: 3rem 0 2rem;
    color: var(--text-secondary);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-brand img {
    height: 45px;
    width: auto;
}

.footer-brand-name {
    font-family: 'Butler', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-primary);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--text-primary);
}

.footer-contact-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-email:hover {
    color: var(--text-primary);
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--badge-bg);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.footer-social-link:hover {
    background: var(--theme-toggle-hover);
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--text-secondary);
}

/* ===========================
   BADGE OVERRIDES
   =========================== */
.badge {
    font-weight: 500;
    padding: 0.3rem 0.6rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem;
}

.text-bg-secondary {
    background-color: var(--badge-bg) !important;
    color: var(--badge-text) !important;
    border: none !important;
}

.text-bg-success {
    background-color: rgba(46, 160, 67, 0.15) !important;
    color: #2ea043 !important;
}

.text-bg-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    color: #dc3545 !important;
}

.text-bg-warning {
    background-color: rgba(245, 166, 35, 0.15) !important;
    color: #d48806 !important;
}

.text-bg-primary {
    background-color: rgba(108, 92, 231, 0.15) !important;
    color: #6c5ce7 !important;
}

.text-bg-info {
    background-color: rgba(0, 123, 255, 0.15) !important;
    color: #0d6efd !important;
}

.text-bg-discovery {
    background-color: rgba(114, 32, 228, 0.15) !important;
    color: #7220e4 !important;
}

[data-bs-theme="dark"] .text-bg-success {
    background-color: rgba(46, 160, 67, 0.2) !important;
    color: #56d364 !important;
}

[data-bs-theme="dark"] .text-bg-danger {
    background-color: rgba(220, 53, 69, 0.2) !important;
    color: #f85149 !important;
}

[data-bs-theme="dark"] .text-bg-warning {
    background-color: rgba(245, 166, 35, 0.2) !important;
    color: #f5a623 !important;
}

[data-bs-theme="dark"] .text-bg-primary {
    background-color: rgba(167, 139, 250, 0.2) !important;
    color: #a78bfa !important;
}

/* ===========================
   CONTAINER
   =========================== */
.container-portfolio {
    max-width: 96%;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1200px) {
    .container-large {
        max-width: 1400px;
    }
}

/* ===========================
   MODAL
   =========================== */
.modal-content {
    background-color: var(--modal-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
}

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

.modal-backdrop {
    background-color: var(--overlay-bg);
}

.btn-close {
    filter: var(--bs-btn-close-white-filter);
}

[data-bs-theme="light"] .btn-close {
    filter: none;
}

/* ===========================
   BUTTONS
   =========================== */
.btn-secondary {
    background-color: var(--badge-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.btn-secondary:hover {
    background-color: var(--theme-toggle-hover) !important;
}

/* ===========================
   FORMS
   =========================== */
.form-control {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 0.6rem 1rem;
}

.form-control:focus {
    background-color: var(--bg-secondary);
    border-color: var(--text-link);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

label {
    color: var(--text-primary);
}

/* Loading overlay deprecated - using .page-transition instead */

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fade-up:nth-child(1) { animation-delay: 0.05s; }
.animate-fade-up:nth-child(2) { animation-delay: 0.1s; }
.animate-fade-up:nth-child(3) { animation-delay: 0.15s; }
.animate-fade-up:nth-child(4) { animation-delay: 0.2s; }
.animate-fade-up:nth-child(5) { animation-delay: 0.25s; }
.animate-fade-up:nth-child(6) { animation-delay: 0.3s; }

/* ===========================
   POST STYLES
   =========================== */
.post-fluid {
    border-radius: 12px;
    margin: 1rem 0;
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===========================
   TOOLTIPS
   =========================== */
[data-tooltipp] {
    position: relative;
    cursor: pointer;
}

[data-tooltipp]::before {
    content: attr(data-tooltipp);
    visibility: hidden;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    text-align: center;
    border-radius: 8px;
    padding: 6px 12px;
    position: absolute;
    z-index: 9999;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    white-space: nowrap;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

[data-tooltipp]::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 120%;
    transform: translateX(-50%) translateY(6px);
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease;
}

[data-tooltipp]:hover::before,
[data-tooltipp]:hover::after {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===========================
   IMAGE MODAL
   =========================== */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.image-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    cursor: default;
    animation: imageModalFadeIn 0.2s ease;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--badge-bg);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 18px;
}

.image-modal-close:hover {
    background: var(--theme-toggle-hover);
}

@keyframes imageModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* ===========================
   SIDEBAR (for post pages)
   =========================== */
#sidebar-info {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-bottom: 20px;
    z-index: 2;
}

/* ===========================
   MOBILE FULLSCREEN MENU
   =========================== */
.mobile-fullscreen-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-fullscreen-menu.active {
    transform: translateX(0);
}

.mobile-menu-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1.25rem;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mobile-menu-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

[data-bs-theme="light"] .mobile-menu-logo {
    filter: invert(1);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.mobile-menu-close:hover {
    background: var(--badge-bg);
}

.mobile-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--badge-bg);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.mobile-menu-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.mobile-menu-item.active {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.mobile-menu-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.mobile-menu-section { margin-top: 0.5rem; }

.mobile-menu-accordion-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--badge-bg);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-accordion-btn:hover {
    background: var(--bg-card-hover);
}

.accordion-btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.accordion-btn-content i {
    color: var(--text-secondary);
    width: 20px;
    text-align: center;
}

.accordion-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-accordion-content.active {
    max-height: 2000px;
    margin-top: 0.5rem;
}

.collab-item {
    display: block;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 0.35rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.collab-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.collab-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.collab-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.collab-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.collab-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collab-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mobile-menu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

.mobile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-cv {
    background: var(--badge-bg);
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

.btn-cv:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary) !important;
    transform: translateY(-2px);
}

.btn-cv i, .btn-cv span { color: var(--text-primary) !important; }

.btn-status {
    background-color: rgba(46, 160, 67, 0.12);
    color: #2ea043 !important;
    border: 1px solid rgba(46, 160, 67, 0.2);
}

.btn-status:hover {
    background-color: rgba(46, 160, 67, 0.18);
    color: #2ea043 !important;
    transform: translateY(-2px);
}

.btn-status i, .btn-status span { color: #2ea043 !important; }

.mobile-menu-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 5rem;
    }

    .hero-section--landing {
        min-height: 100dvh;
        padding-top: 5rem;
        padding-bottom: 1.5rem;
    }

    .hero-landing-col--brand,
    .hero-landing-col--links {
        text-align: center;
    }

    .hero-landing-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-landing-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.75rem 1rem;
        width: 100%;
    }

    .hero-landing-link {
        gap: 0;
        padding: 0.7rem;
        min-width: 52px;
        min-height: 52px;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        font-size: 0;
    }

    .hero-landing-link:hover {
        transform: translateY(-2px) scale(1.04);
    }

    .hero-landing-link .hero-link-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .hero-landing-link i {
        width: auto;
        font-size: 1.65rem;
        line-height: 1;
    }

    .hero-landing-video-ui {
        bottom: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        display: flex;
        justify-content: flex-end;
    }

    .hero-landing-video-controls {
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .hero-landing-vid-volume {
        width: 72px;
    }

    .hero-name {
        font-size: 1.65rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .project-card {
        border-radius: 12px;
    }

    .mobile-menu-actions {
        grid-template-columns: 1fr;
    }

    .footer-row {
        flex-direction: column;
        gap: 2rem;
    }

    .image-modal-content {
        max-width: 95%;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* ===========================
   UTILITY
   =========================== */
.text-muted {
    color: var(--text-muted) !important;
}

.link-dark {
    color: var(--text-primary) !important;
}

/* Invert image in light mode (for white logos) */
.theme-invert-light {
    transition: filter 0.3s ease;
}

[data-bs-theme="light"] .theme-invert-light {
    filter: invert(1);
}

/* ===========================
   POST PAGE - NAV (Breadcrumb style)
   =========================== */
.post-nav {
    position: relative;
    z-index: 100;
    padding: 0.85rem 0;
    background-color: transparent;
    transition: all 0.3s ease;
}

.post-nav.scrolled {
    position: sticky;
    top: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nav-border);
    padding: 0.6rem 0;
}

.post-nav-logo {
    display: flex;
    align-items: center;
    height: 22px;
    overflow: hidden;
}

.post-nav-logo-img {
    height: 22px;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    pointer-events: none;
    flex-shrink: 0;
}

.post-nav-logo-img.active {
    max-width: 150px;
    opacity: 1;
    pointer-events: auto;
}

/* Text logo: invert in light mode */
[data-bs-theme="light"] .post-nav-logo-img {
    filter: invert(1);
}

/* Icon logo: same invert */
[data-bs-theme="light"] .post-nav-logo-icon {
    filter: invert(1);
}

.post-nav-logo:hover .post-nav-logo-img.active {
    opacity: 0.7;
}

/* Breadcrumb items slide-in animation */
.bc-item {
    opacity: 0;
    transform: translateX(-8px);
    animation: bcSlideIn 0.4s ease forwards;
}

.bc-item:nth-child(1) { animation-delay: 0.05s; }
.bc-item:nth-child(2) { animation-delay: 0.1s; }
.bc-item:nth-child(3) { animation-delay: 0.15s; }
.bc-item:nth-child(4) { animation-delay: 0.2s; }
.bc-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes bcSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Breadcrumb dynamic swap (ab.php) */
.ab-bc-dynamic {
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(0);
}

.ab-bc-dynamic.bc-in {
    opacity: 1;
    transform: translateX(0);
}

.ab-bc-dynamic.bc-out {
    opacity: 0;
    transform: translateX(-4px);
}

.post-nav-separator {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.post-nav .container-portfolio {
    transition: gap 0.35s ease;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.post-nav .container-portfolio::-webkit-scrollbar {
    display: none;
}

.post-nav-current {
    white-space: nowrap;
}

.post-nav-link {
    white-space: nowrap;
}

.post-nav-separator {
    flex-shrink: 0;
}

.post-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-nav-link:hover {
    color: var(--text-primary);
}

.post-nav-current {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===========================
   POST PAGE - HEADER
   =========================== */
.post-header {
    padding-top: 2rem;
}

.post-hero-icon {
    margin-bottom: 1.5rem;
}

.post-hero-icon-img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: var(--card-shadow);
}

.post-title {
    font-family: 'Butler', serif;
    font-size: 2.25rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* ===========================
   POST PAGE - METADATA GRID (4 columns)
   =========================== */
.post-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
}

.post-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.post-meta-label {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: capitalize;
}

.post-meta-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .post-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-header {
        padding-top: 2rem;
    }
}

@media (max-width: 480px) {
    .post-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

/* ===========================
   POST PAGE - MAIN IMAGE
   =========================== */
.post-main-image {
    margin-bottom: 3rem;
    border-radius: 16px;
    overflow: hidden;
}

.post-main-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* ===========================
   POST PAGE - BODY CONTENT
   =========================== */
.post-body {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.post-body .project-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-body .project-content h1,
.post-body .project-content h2,
.post-body .project-content h3,
.post-body .project-content h4,
.post-body .project-content h5,
.post-body .project-content h6 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-body .project-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.post-body .project-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.post-body .project-content img:hover {
    opacity: 0.92;
}

.post-body .project-content a {
    color: var(--text-link);
    text-decoration-color: rgba(108, 92, 231, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.post-body .project-content a:hover {
    text-decoration-color: var(--text-link);
}

.post-body .project-content ul,
.post-body .project-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.post-body .project-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.post-body .project-content blockquote {
    border-left: 3px solid var(--text-link);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-external-link {
    text-align: center;
}

/* ===========================
   BACK TO TOP (p.php)
   =========================== */
.p-back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

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

.p-back-to-top:hover {
    background: var(--text-primary);
    color: var(--card-bg);
    border-color: var(--text-primary);
}

/* ===========================
   POST PAGE - SUGGESTED
   =========================== */
.post-suggested {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.post-suggested-header {
    margin-bottom: 1.5rem;
}

.post-suggested-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.suggested-card {
    display: block;
    text-decoration: none;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    transition: all 0.3s ease;
    padding: 1.5rem;
}

.suggested-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.suggested-card h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.suggested-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.suggested-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

/* ===========================
   ABOUT PAGE (/ab/)
   =========================== */
.ab-page {
    padding: 40px 0 80px;
    min-height: 70vh;
}

/* Two-Column Layout */
.ab-layout {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 60px;
    align-items: start;
}

/* Sidebar Nav */
.ab-sidebar {
    position: sticky;
    top: 100px;
}

.ab-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ab-sidebar-link {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
    line-height: 1.6;
}

.ab-sidebar-link:hover {
    color: var(--text-primary);
}

.ab-sidebar-link.active {
    color: var(--text-link);
    font-weight: 500;
}

/* Sidebar sub-navigation (expandable) */
.ab-sidebar-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
    opacity: 0;
    padding-left: 12px;
}

.ab-sidebar-sub.expanded {
    max-height: 200px;
    opacity: 1;
}

.ab-sidebar-sublink {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 3px 0;
    transition: color 0.2s;
}

.ab-sidebar-sublink:hover {
    color: var(--text-primary);
}

.ab-sidebar-sublink.active {
    color: var(--text-link);
    font-weight: 500;
}

.ab-sidebar-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Content Column */
.ab-content {
    min-width: 0;
    overflow: hidden;
}

/* Header / About */
.ab-title {
    font-family: 'Butler', serif;
    font-weight: 500;
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.ab-city {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.ab-city i {
    font-size: 0.78rem;
    margin-right: 2px;
}

.ab-bio {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 640px;
}

/* Section Titles */
.ab-section {
    margin-bottom: 56px;
    scroll-margin-top: 80px;
}

.ab-section-title {
    font-family: 'Butler', serif;
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.ab-section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.ab-subsection-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 20px 0 10px;
}

/* Resume link under Experience title */
.ab-resume-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
    margin-bottom: 16px;
}

.ab-resume-link:hover {
    color: var(--text-link);
}

.ab-resume-link i {
    font-size: 0.7rem;
}

/* Experience List (compact - like Michelle Liu) */
.ab-exp-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ab-exp-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.ab-exp-item:last-child {
    border-bottom: none;
}

.ab-exp-logo {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--badge-bg);
}

.ab-exp-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ab-exp-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.ab-exp-company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ab-exp-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Timeline (Education & Experience) */
.ab-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ab-timeline-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.ab-timeline-item:last-child {
    border-bottom: none;
}

.ab-timeline-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--badge-bg);
}

.ab-timeline-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ab-timeline-initials {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.ab-timeline-content {
    flex: 1;
    min-width: 0;
}

.ab-timeline-content.has-multiple .ab-timeline-position {
    padding-left: 16px;
    border-left: 2px solid var(--border-color);
    margin-left: 4px;
}

.ab-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.ab-timeline-company {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.ab-timeline-dates {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.ab-timeline-role {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 2px 0 4px;
}

.ab-timeline-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-block;
    margin-right: 8px;
}

.ab-timeline-badge {
    font-size: 0.7rem;
    display: inline-block;
    padding: 1px 8px;
    border-radius: 20px;
    background: var(--badge-bg);
    color: var(--badge-text);
    margin-right: 8px;
}

.ab-timeline-location {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ab-timeline-location i {
    font-size: 0.7rem;
}

.ab-timeline-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 8px;
    margin-bottom: 0;
}

.ab-timeline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.ab-timeline-link {
    font-size: 0.78rem;
    color: var(--text-link);
    text-decoration: none;
    transition: opacity 0.2s;
}

.ab-timeline-link:hover {
    opacity: 0.7;
}

.ab-timeline-link i {
    font-size: 0.65rem;
}

.ab-timeline-position {
    padding: 8px 0;
}

.ab-timeline-position:first-child {
    padding-top: 0;
}

/* Specs */
.ab-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 28px 32px;
}

.ab-specs-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.ab-specs-card {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.ab-specs-card:last-child {
    border-bottom: none;
}

.ab-specs-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.ab-specs-detail {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.ab-specs-hw {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ab-specs-hw li {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.ab-specs-hw-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    min-width: 55px;
    flex-shrink: 0;
}

.ab-specs-hw-value {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Shelf */
.ab-shelf-category {
    margin-bottom: 40px;
}

.ab-shelf-category:last-child {
    margin-bottom: 0;
}

.ab-shelf-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ab-shelf-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ab-shelf-filter {
    background: none;
    border: 1px solid var(--border-color);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.ab-shelf-filter:hover {
    border-color: var(--text-muted);
}

.ab-shelf-filter.active {
    background: var(--tab-active-bg);
    color: var(--tab-active-text);
    border-color: var(--tab-active-bg);
}

.ab-shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.ab-shelf-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, opacity 0.2s;
}

.ab-shelf-item:hover {
    transform: translateY(-4px);
}

.ab-shelf-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--badge-bg);
}

.ab-shelf-cover-musica {
    aspect-ratio: 1 / 1;
}

.ab-shelf-cover-serie,
.ab-shelf-cover-pelicula {
    aspect-ratio: 2 / 3;
}

.ab-shelf-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ab-shelf-item:hover .ab-shelf-cover img {
    transform: scale(1.05);
}

.ab-shelf-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.ab-shelf-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ab-shelf-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ab-shelf-year {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Shelf skeleton placeholders */
.ab-shelf-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ab-shelf-sk-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: var(--border-color);
    animation: skeletonPulse 1s ease-in-out infinite;
}

.ab-shelf-sk-cover-tall {
    aspect-ratio: 2 / 3;
}

.ab-shelf-sk-title {
    height: 12px;
    width: 75%;
    border-radius: 4px;
    background: var(--border-color);
    animation: skeletonPulse 1s ease-in-out infinite;
    animation-delay: 0.1s;
}

.ab-shelf-sk-year {
    height: 10px;
    width: 35%;
    border-radius: 4px;
    background: var(--border-color);
    animation: skeletonPulse 1s ease-in-out infinite;
    animation-delay: 0.2s;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Shelf items fade in */
.shelf-fade-in {
    animation: shelfFadeIn 0.3s ease forwards;
}

@keyframes shelfFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* About Page Responsive */
@media (max-width: 991px) {
    .ab-layout {
        grid-template-columns: 120px 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .ab-page {
        padding: 24px 0 60px;
    }

    .ab-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ab-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 32px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .ab-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 14px;
    }

    .ab-sidebar-link {
        font-size: 0.82rem;
    }

    .ab-sidebar-sub {
        display: none;
    }

    .ab-title {
        font-size: 1.8rem;
    }

    .ab-section-title {
        font-size: 1.3rem;
    }

    .ab-specs-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ab-shelf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ab-shelf-category,
    .ab-shelf-grid {
        max-width: 100%;
        overflow: hidden;
    }

    .ab-content {
        overflow: hidden;
    }

    .ab-timeline-header {
        flex-direction: column;
        gap: 2px;
    }

    .ab-timeline-logo {
        width: 36px;
        height: 36px;
    }

    .ab-exp-logo {
        width: 38px;
        height: 38px;
    }

    .ab-shelf-controls {
        flex-direction: column;
    }

    .ab-shelf-dd {
        position: relative;
        display: inline-block;
        margin-bottom: 12px;
    }

    .ab-shelf-dd-trigger {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 14px;
        border-radius: 10px;
        border: 1px solid var(--border-color);
        background: var(--bg-primary);
        color: var(--text-primary);
        font-size: 0.84rem;
        font-weight: 500;
        cursor: pointer;
        transition: border-color 0.2s;
    }

    .ab-shelf-dd-trigger:active {
        border-color: var(--text-muted);
    }

    .ab-shelf-dd-arrow {
        font-size: 0.7rem;
        transition: transform 0.25s ease;
    }

    .ab-shelf-dd.open .ab-shelf-dd-arrow {
        transform: rotate(180deg);
    }

    .ab-shelf-dd-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        min-width: 170px;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 6px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        z-index: 50;
        display: none;
        flex-direction: column;
        gap: 2px;
    }

    .ab-shelf-dd.open .ab-shelf-dd-menu {
        display: flex;
    }

    .ab-shelf-dd-option {
        display: block;
        width: 100%;
        text-align: left;
        padding: 8px 12px;
        border: none;
        border-radius: 8px;
        background: none;
        font-size: 0.84rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: background 0.15s;
    }

    .ab-shelf-dd-option:hover,
    .ab-shelf-dd-option:active {
        background: var(--badge-bg);
    }

    .ab-shelf-dd-option.active {
        color: var(--text-link);
        font-weight: 600;
    }

    .ab-shelf-dd-option i {
        margin-right: 2px;
    }
}

@media (max-width: 480px) {
    .ab-shelf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ab-shelf-cover {
        border-radius: 6px;
    }

    .ab-shelf-title {
        font-size: 0.72rem;
    }

    .ab-shelf-year {
        font-size: 0.65rem;
    }
}
