/* Fonts Integration */
@font-face {
    font-family: 'Monument Extended';
    src: url('./assets/fonts/MonumentExtended-Ultrabold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SVN-Gilroy';
    src: url('./assets/fonts/SVN-Gilroy Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SVN-Gilroy';
    src: url('./assets/fonts/SVN-Gilroy Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SVN-Gilroy';
    src: url('./assets/fonts/SVN-Gilroy Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('./assets/fonts/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Signature';
    src: url('./assets/fonts/NVN-Motherland-Signature.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Agency FB';
    src: url('./assets/fonts/SVN-Agency FB.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Design Style: Minimalist Dark - Atmospheric Depth */
    --background: #0A0A0F;
    --background-alt: #12121A;
    --foreground: #FAFAFA;
    --muted: #1A1A24;
    --muted-foreground: #71717A;
    --accent: #F59E0B; /* Amber-500 */
    --accent-foreground: #0A0A0F;
    --accent-muted: rgba(245, 158, 11, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --card: rgba(26, 26, 36, 0.6);
    --card-solid: #1A1A24;
    --ring: #F59E0B;

    /* Legacy mapping for compatibility with existing components */
    --bg-color: var(--background);
    --surface-color: var(--background-alt);
    --primary-text: var(--foreground);
    --secondary-text: var(--muted-foreground);
    --accent-color: var(--accent);
    --accent-dim: var(--accent-muted);
    
    /* Typography */
    --font-heading: "Space Grotesk", system-ui, sans-serif;
    --font-body: "JetBrains Mono", monospace;
    --font-accent: 'Signature', cursive;
    --font-tech: "JetBrains Mono", monospace;

    /* Spacing Scale (Rem-based for better scalability) */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 200ms ease-out;
    --transition-cinematic: 300ms ease-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Text Selection */
::selection {
    background: var(--accent);
    color: var(--accent-foreground);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

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

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

/* Subtle Noise Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015; /* Extremely subtle */
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* Ambient Glow Orbs */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.08; /* Increased for visibility */
    background: var(--accent);
}

.orb-1 {
    width: 600px;
    height: 600px;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    background: #3B82F6; /* Subtle cool contrast */
    opacity: 0.02;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 5vw;
    width: 100%;
    transition: opacity var(--transition-cinematic);
}





/* Lights Out Effect */
body.lights-out .container:not(.about-container),
body.lights-out #main-nav,
body.lights-out footer {
    opacity: 0.15;
    filter: blur(4px);
    pointer-events: none;
}

body.lights-out .works-section {
    z-index: 100;
}

body.lights-out .works-section .container {
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

.work-item.project-focus {
    transform: scale(1.02);
    z-index: 101;
}

.work-item.project-focus .work-meta {
    opacity: 1;
}

body:not(.lights-out) .work-item:not(:hover) {
    opacity: 0.8;
}

/* Minimalist White Cursor */
#custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: difference;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: transform 0.1s ease-out;
}

#custom-cursor::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border 0.3s;
}

#custom-cursor.hovering::after {
    width: 50px;
    height: 50px;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Centered Floating Navigation */
#main-nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    padding: 10px 30px;
    display: flex;
    gap: var(--space-xl);
    align-items: center;
    z-index: 1000;
    background: rgba(26, 26, 36, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all var(--transition-cinematic);
    contain: layout style;
}

#main-nav:hover {
    background: rgba(26, 26, 36, 0.6);
    border-color: var(--border-hover);
    padding: 10px 40px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-links a {
    text-decoration: none;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    font-family: var(--font-heading);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover, .nav-links a:focus-visible {
    color: var(--accent);
}

.nav-links a.nav-cta {
    background: var(--accent);
    color: var(--accent-foreground);
    padding: 8px 20px;
    border-radius: 100px;
    margin-left: var(--space-md);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.nav-links a.nav-cta:hover {
    background: #fff;
    color: var(--accent-foreground);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 25px rgba(245, 158, 11, 0.3);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-2xl) 5vw var(--space-xl);
    overflow: hidden;
}

/* Footer - Optimized */
footer {
    position: relative;
    padding: var(--space-xl) 0;
    background: #000;
    overflow: hidden;
    content-visibility: auto;
    /* Optimization: Render only when in viewport */
    contain-intrinsic-size: 500px 400px;
}

.hero-credential {
    position: absolute;
    top: 15%;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10;
}

.cred-line {
    width: 1px;
    height: 30px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.cred-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cred-id {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    letter-spacing: 0.1em;
    font-weight: 700;
}

.cred-label {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--primary-text);
    letter-spacing: 0.3em;
    font-weight: 800;
    opacity: 0.8;
}

.hero-main {
    position: relative;
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-identity-block {
    position: absolute;
    bottom: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.id-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.id-tag {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    font-weight: 700;
}

.id-line {
    width: 30px;
    height: 1px;
    background: var(--accent-color);
}

.id-name {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 10vw, 6.5rem);
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    color: var(--foreground);
    white-space: nowrap;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.9));
    margin: 0;
    will-change: transform, opacity;
}

.id-name .accent-name {
    color: var(--accent);
    position: relative;
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.id-profession-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.id-line-sm {
    width: 20px;
    height: 1px;
    background: var(--border);
}

.id-profession {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--foreground);
    font-weight: 500;
    opacity: 0.8;
}

.hero-text-background {
    position: absolute;
    top: 40%;
    /* Pushed up slightly */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.marquee-container {
    width: 100%;
    display: flex;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    gap: 10vw;
    white-space: nowrap;
    animation: marquee-scroll 60s linear infinite;
}

.marquee-content span {
    font-family: 'SVN-Gilroy', sans-serif;
    font-size: clamp(8rem, 20vw, 30rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.02);
    text-transform: uppercase;
    letter-spacing: -0.04em;
    user-select: none;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

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

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

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

.hero-portrait-container {
    position: relative;
    width: 100%;
    max-width: 650px;
    z-index: 5;
    margin-top: -5vh;
    /* Pushing portrait up */
    display: flex;
    justify-content: center;
    aspect-ratio: 4 / 5;
    /* Prevention for CLS */
}

.hero-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.05) brightness(1.1);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    position: relative;
    will-change: filter;
    /* GPU Acceleration */
}

.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
}

.hero-side-content {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.status-pill {
    position: absolute;
    left: 0;
    top: 60%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: var(--space-sm) var(--space-lg);
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    font-family: var(--font-tech);
    font-weight: 600;
    letter-spacing: 0.05em;
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #4ADE80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ADE80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

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

.hero-bio {
    position: absolute;
    right: 0;
    top: 60%;
    max-width: 280px;
    font-size: 0.9rem;
    color: var(--secondary-text);
    text-align: left;
    line-height: 1.4;
}

.cta-pill {
    position: absolute;
    right: 0;
    bottom: 0;
    background: var(--primary-text);
    color: var(--bg-color);
    padding: 1.2rem 2.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    pointer-events: auto;
    transition: var(--transition-cinematic);
}

.cta-pill:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.05) rotate(-2deg);
}

.hero-logos {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    opacity: 0.8;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* GIỚI THIỆU VỀ TÔI (About) - Optimized */
.about-section {
    padding: var(--space-2xl) 0;
    content-visibility: auto;
    /* Optimization: Render only when in viewport */
    contain-intrinsic-size: 500px 800px;
}

/* Works Section - Optimized */
.works-section {
    padding: var(--space-2xl) 0;
    content-visibility: auto;
    /* Optimization: Render only when in viewport */
    contain-intrinsic-size: 500px 1000px;
}

.section-header {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 0.1em;
}

.section-desc {
    font-size: 0.875rem;
    color: var(--secondary-text);
    margin-top: var(--space-sm);
    font-family: var(--font-tech);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 600;
    opacity: 1;
}

/* Cinematic Console (Tabs) *//* Load More Button Cinematic */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.btn-load-more-cinematic {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: var(--font-tech);
    font-size: 0.85rem;
    letter-spacing: 0.4em;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    padding: 15px 40px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-load-more-cinematic .btn-line {
    width: 40px;
    height: 1px;
    background: var(--accent);
    opacity: 0.3;
    transition: width 0.4s ease, opacity 0.4s ease;
}

.btn-load-more-cinematic:hover {
    color: #fff;
}

.btn-load-more-cinematic:hover .btn-line {
    width: 80px;
    opacity: 1;
}

.btn-load-more-cinematic:active {
    transform: scale(0.95);
}

.console-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.console-tab {
    background: var(--card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    padding: 10px 24px;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 300ms ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.console-tab:hover {
    border-color: var(--border-hover);
    color: var(--foreground);
    background: rgba(26, 26, 36, 0.8);
}

.console-tab.active {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

.tab-icon {
    font-size: 1rem;
    opacity: 0.7;
}

.console-tab.active .tab-icon {
    opacity: 1;
}

/* Works Section */
.works-container {
    padding: var(--space-xl) 0;
}

/* Impeccable Project Reveal Animation */
@keyframes projectReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
        filter: blur(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.project-reveal-anim {
    opacity: 0;
    animation: projectReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--space-lg);
    transition: opacity 0.4s ease;
}

.work-item {
    background: var(--card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 400ms var(--ease-out-quint);
    position: relative;
    display: flex;
    flex-direction: column;
}

.work-item.hidden {
    display: none;
    opacity: 0;
}

.work-item:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--border-hover);
    background: rgba(26, 26, 36, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.05);
}

.thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.project-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.work-item:hover .project-thumb {
    transform: scale(1.05);
}

.work-meta {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.work-year {
    font-family: var(--font-tech);
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.work-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--foreground);
    letter-spacing: -0.01em;
}

.work-cat-overlay {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    z-index: 15;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--foreground);
    font-family: var(--font-tech);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
    transition: all 300ms ease;
}

.work-item:hover .work-cat-overlay {
    border-color: var(--accent);
}

/* Play Overlay on Thumbnails */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
    z-index: 5;
}

.play-btn-cinematic {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    padding-left: 4px;
    transform: scale(0.8);
    transition: all var(--transition-cinematic);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

.work-item:hover .play-overlay {
    opacity: 1;
}

.work-item:hover .play-btn-cinematic {
    transform: scale(1);
}

.work-item {
    cursor: pointer;
}

/* About Section & Dossier V2 */
/* Section Header V2 */
.section-header-v2 {
    margin-bottom: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    padding-bottom: var(--space-lg);
}

.section-header-v2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 1px;
    background: var(--accent);
}

.header-label {
    font-family: var(--font-tech);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.8em;
    font-weight: 700;
    opacity: 0.9;
    text-transform: uppercase;
    display: block;
}

.header-title-v2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--primary-text);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    line-height: 1;
}

/* Mini Variant for Dossier/Inner Sections */
.section-header-v2.mini {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    gap: 8px;
    border-bottom: none;
}

.section-header-v2.mini .header-label {
    font-size: 0.65rem;
    letter-spacing: 0.5em;
    opacity: 0.5;
}

.section-header-v2.mini .header-title-v2 {
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: var(--accent);
}

.section-header-v2.mini::after {
    width: 30px;
}

.reel-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-lg);
}

/* Concise Bio Section */
.concise-bio-container {
    width: 100%;
    margin: 0 0 var(--space-lg);
}

.bio-text-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: var(--space-lg) var(--space-xl);
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.intro-name-stretched {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 2.5rem);
    font-weight: 200;
    text-transform: uppercase;
    color: var(--accent-color);
    text-align: justify;
    text-align-last: justify;
    display: block;
    width: 100%;
    margin-bottom: 4px;
    opacity: 0.8;
}

.intro-name-stretched::after {
    content: "";
    display: inline-block;
    width: 100%;
}

.bio-text-block p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--primary-text);
    text-align: center;
    margin: 0;
}

.bio-text-block strong {
    color: var(--accent-color);
}

/* Dossier V3 - Scalable Layout */
.dossier-layout-v3 {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

/* Work Reel (Carousel) */
/* Work Reel styles migrated to dossier-folder */

.reel-controls {
    display: flex;
    gap: 12px;
    margin-bottom: var(--space-md); /* Alignment fix */
}

.reel-controls {
    display: flex;
    gap: var(--space-md);
}

.reel-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-btn:hover {
    background: var(--accent-color);
    color: #000;
}

.work-reel-container {
    display: flex;
    gap: var(--space-lg);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: var(--space-md);
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.work-reel-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.reel-card {
    min-width: 300px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: var(--space-lg);
    transition: var(--transition-cinematic);
    position: relative;
}

.reel-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.reel-card-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.reel-date {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent-color);
    letter-spacing: 0.05em;
}

.reel-company {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 5px;
    color: var(--primary-text);
    text-transform: uppercase;
}

.reel-role {
    font-size: 0.8rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-tech);
}

.reel-star {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--accent-color);
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Secondary Dossier Grid */
.secondary-dossier-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: var(--space-sm);
    align-items: start; /* Align headers to top */
}

/* Toolkit V2 styles removed - now uses dossier-folder */

.toolkit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dossier-label {
    font-family: var(--font-tech);
    font-size: 0.75rem;
    color: var(--secondary-text);
    letter-spacing: 0.4em;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0.8;
}

.toolkit-status {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent-color);
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.software-dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-xl) var(--space-md);
    margin-top: var(--space-lg);
}

.soft-module {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    transition: var(--transition-cinematic);
    position: relative;
    cursor: default;
}

.soft-icon-box {
    position: relative;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: var(--transition-cinematic);
    overflow: hidden;
}

.soft-icon-box svg {
    width: 80%;
    height: 80%;
    object-fit: contain;
    display: block;
}

.soft-id-large {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.8;
    transition: var(--transition-cinematic);
    z-index: 2;
}

.soft-module {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    transition: var(--transition-cinematic);
    position: relative;
    cursor: default;
}

.soft-module:hover .soft-icon-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
}

.soft-info-v2 {
    text-align: center;
}

.soft-name-v2 {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--secondary-text);
    text-transform: uppercase;
    transition: var(--transition-fast);
}

/* Removal of old bar-fill styles */

/* Folder System (Aside) */
.dossier-folder {
    background: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition-cinematic);
}

.dossier-folder:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.folder-header {
    background: rgba(255, 255, 255, 0.02);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.folder-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--accent);
    text-transform: uppercase;
}

.skills-cloud-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.skill-pill {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.skill-pill:hover {
    background: var(--accent-dim);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.skill-group {
    margin-bottom: var(--space-lg);
}

.skill-group:last-child {
    margin-bottom: 0;
}

.group-label {
    display: block;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent-color);
    opacity: 0.9;
    letter-spacing: 0.15em;
    font-weight: 800;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.folder-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
}

/* Footer Section - Premium Director's Cut */
footer {
    position: relative;
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
    overflow: hidden;
}

.footer-premium {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-2xl);
    align-items: flex-end;
}

.footer-main-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.brand-signature {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.signature-label {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent-color);
    letter-spacing: 0.3em;
    font-weight: 800;
}

.footer-logo-impeccable {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-text);
    line-height: 0.8;
    letter-spacing: -0.05em;
    opacity: 0.15;
}

.footer-mega-slogan {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 0.85;
    text-transform: uppercase;
    color: var(--primary-text);
    letter-spacing: -0.04em;
}

.footer-details-zone {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
    align-items: flex-end;
    text-align: right;
}

.footer-metadata-strip {
    display: flex;
    gap: var(--space-xl);
}

.meta-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    letter-spacing: 0.2em;
    font-weight: 700;
}

.meta-value {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--primary-text);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.footer-cta-box {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cta-label {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent-color);
    letter-spacing: 0.3em;
    font-weight: 800;
}

.footer-email-link {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 800;
    transition: var(--transition-medium);
}

.cta-line {
    width: 60px;
    height: 1px;
    background: var(--accent-color);
    align-self: flex-end;
    transition: var(--transition-medium);
}

.footer-cta-box:hover .footer-email-link {
    color: var(--accent-color);
}

.footer-cta-box:hover .cta-line {
    width: 100%;
}

.footer-legal-impeccable {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.copyright-v4 {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    opacity: 0.8;
    letter-spacing: 0.1em;
}

.legal-id {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent-color);
    opacity: 0.8;
    padding: 2px 4px;
    border: 1px solid var(--accent-color);
}

.footer-light-leak {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(139, 0, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

@media (max-width: 768px) {
    .footer-premium {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-details-zone {
        align-items: flex-start;
        text-align: left;
    }

    .footer-metadata-strip {
        flex-direction: column;
        gap: var(--space-md);
    }

    .cta-line {
        align-self: flex-start;
    }

    .footer-legal-impeccable {
        justify-content: flex-start;
    }
}

.folder-content.timeline-v2 {
    position: relative;
    padding-left: 2.2rem;
    /* Pushed further in specifically for timeline */
}

.timeline-v2::before {
    content: "";
    position: absolute;
    left: 1.05rem;
    /* Adjusted line to match new padding */
    top: var(--space-lg);
    bottom: var(--space-lg);
    width: 1px;
    background: rgba(226, 29, 29, 0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--space-xl);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.25rem;
    /* Re-aligned dot with the line */
    top: 0.4rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    z-index: 1;
}

.timeline-date {
    display: block;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent-color);
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}

.timeline-content .exp-company {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--primary-text);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.timeline-content .exp-info {
    font-size: 0.875rem;
    color: var(--secondary-text);
    line-height: 1.4;
}

.footer-link-main {
    display: block;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--primary-text);
    text-decoration: none;
    margin-top: var(--space-sm);
    transition: var(--transition-fast);
}

.footer-link-main:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-sub {
    font-size: 0.8rem;
    color: var(--secondary-text);
    margin-top: var(--space-xs);
}

.footer-socials {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.social-link {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--secondary-text);
    text-decoration: none;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: var(--transition-fast);
    width: fit-content;
    position: relative;
}

.social-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: var(--transition-fast);
}

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

.social-link:hover::after {
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: var(--space-lg);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    opacity: 0.05;
    letter-spacing: -0.05em;
}

.footer-legal {
    text-align: right;
}

.copyright {
    font-size: 0.875rem;
    color: var(--secondary-text);
    opacity: 0.8;
    letter-spacing: 0.1em;
}

.dev-tag {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent-color);
    opacity: 0.8;
    margin-top: 4px;
    letter-spacing: 0.2em;
}



@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-info {
        grid-template-columns: 1fr;
    }
}

/* Video Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-cinematic);
}

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

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
}

.lightbox-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: #000;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: var(--transition-cinematic);
    z-index: 3001;
}

.lightbox.active .lightbox-container {
    transform: scale(1);
}

.video-wrapper {
    width: 100%;
    height: 100%;
}

.video-wrapper iframe,
#player {
    width: 100%;
    height: 100%;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    letter-spacing: 0.3em;
    opacity: 0.9;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    opacity: 1;
    color: var(--accent-color);
}

.close-icon {
    font-size: 2rem;
}

/* Cinematic Page Load */
.hero-badge,
.hero-title,
.hero-portrait-container,
.hero-side-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-cinematic);
}

body.loaded .hero-badge {
    opacity: 0.6;
    transform: translateY(0);
    transition-delay: 200ms;
}

body.loaded .hero-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 400ms;
}

body.loaded .hero-portrait-container {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 600ms;
}

body.loaded .hero-side-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 800ms;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-cinematic);
}

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

/* General Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-md);
    }

    .nav-links {
        display: none;
        /* Mobile menu needed later */
    }

    .works-grid.bento-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .works-grid.bento-layout {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .work-item.bento-large,
    .work-item.bento-wide {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* ==========================================================================
   ADMIN COMMAND CENTER (Dashboard v2.0 - Quieter & Refined)
   ========================================================================== */

.admin-body {
    background: #080808;
    color: var(--primary-text);
    min-height: 100vh;
    font-family: var(--font-body);
}

.admin-section {
    display: none;
    animation: fadeIn 0.5s var(--transition-cinematic);
}

.admin-section.active {
    display: block;
}

.admin-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 0% 0%, rgba(139, 0, 0, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(139, 0, 0, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

.admin-wrapper {
    display: block;
    min-height: 100vh;
    width: 100%;
    padding-top: 100px; /* Space for floating nav */
}


/* Floating Pill Navigation */
.admin-nav-pill {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 
                0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideDownIn 0.8s var(--transition-cinematic);
}

@keyframes slideDownIn {
    from { transform: translate(-50%, -40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.nav-pill-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 16px;
    margin-right: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-pill-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    object-fit: cover;
}

.nav-pill-name {
    font-family: var(--font-tech);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--primary-text);
}

.admin-sidebar {
    display: none; /* Hide old sidebar */
}


.sidebar-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-xl);
    text-align: center;
}

.sidebar-avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    padding: 4px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.admin-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--accent);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1;
    border-radius: 4px;
}

.admin-label {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    color: var(--secondary-text);
    font-weight: 700;
}

.admin-version {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent);
    opacity: 0.9;
    margin-top: 2px;
}

.sidebar-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #4ade80;
    border: 3px solid #0a0a0a;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

#sidebar-name,
.sidebar-identity h2 {
    font-family: var(--font-tech);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--primary-text);
    margin-bottom: 4px;
}

#sidebar-profession,
.sidebar-identity p {
    font-size: 0.8rem;
    color: var(--secondary-text);
    font-family: var(--font-tech);
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-label {
    font-size: 0.7rem;
    color: var(--secondary-text);
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    opacity: 0.4;
    font-weight: 700;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--secondary-text);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s var(--transition-fast);
}

.nav-tab:hover {
    color: var(--primary-text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    background: var(--accent);
    color: var(--accent-foreground);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.nav-tab .tab-icon {
    font-size: 0.9rem;
    opacity: 0.8;
}

.nav-pill-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

.back-to-site {
    padding: 8px 14px;
    color: var(--secondary-text);
    text-decoration: none;
    font-family: var(--font-tech);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.back-to-site:hover {
    color: #fff;
}


.nav-tab.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    font-size: 1.1rem;
    opacity: 0.5;
}

.sidebar-footer {
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.back-link {
    color: var(--secondary-text);
    text-decoration: none;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    opacity: 0.8;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    position: relative;
}

.back-link:hover {
    opacity: 1;
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--secondary-text);
    width: 100%;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-text);
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Content Area - Optimized */
.admin-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-xl);
    width: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--accent);
    text-transform: uppercase;
}

.admin-greeting {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--secondary-text);
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.status-pulse {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}


.status-dot {
    width: 6px;
    height: 6px;
    background: #00FF41;
    border-radius: 50%;
    box-shadow: 0 0 12px #00FF41;
    will-change: opacity;
    /* Optimization: Hints browser for GPU animation */
    animation: pulseStatus 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Project Grid (Replaces Table) */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--space-xl);
}

.project-card {
    position: relative;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--accent);
}

.card-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), filter 0.4s ease;
}

.project-card:hover .card-thumbnail img {
    transform: scale(1.08);
    filter: brightness(1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 40%, rgba(0,0,0,0.4) 100%);
    opacity: 0.6;
    transition: opacity 0.4s ease;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: var(--space-md);
    z-index: 10;
    pointer-events: none;
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.card-actions-row {
    display: flex;
    gap: 8px;
    pointer-events: auto; /* Force buttons to be clickable */
}



.card-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md);
    z-index: 20;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255,255,255,0.05);
    transform: translateY(10px);
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .card-meta {
    transform: translateY(0);
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0.5));
}

.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: var(--space-md);
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-year {
    font-family: var(--font-tech);
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

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

.card-id {
    font-family: var(--font-tech);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
}


@keyframes pulseStatus {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

.status-text {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: var(--secondary-text);
    font-weight: 700;
}

/* Admin Panels - Crafted Studio Look & Optimized */
.admin-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    contain: layout style;
    /* Optimization: Browser isolates this panel for faster rendering */
    transition: transform 0.3s var(--ease-out-quint), border-color 0.3s ease, background 0.3s ease;
}

.panel-header {
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-subtitle {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    opacity: 0.8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.panel-body {
    padding: 32px;
}

/* Section Heading inside Panel */
.section-heading {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--primary-text);
    margin-bottom: 0;
    font-weight: 800;
}

/* Badges System */
.badge {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    display: inline-block;
}

.badge.commercial {
    background: rgba(255, 165, 0, 0.1);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.2);
}

.badge.music-video {
    background: rgba(138, 43, 226, 0.1);
    color: #9400d3;
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.badge.travel {
    background: rgba(30, 144, 255, 0.1);
    color: #1e90ff;
    border: 1px solid rgba(30, 144, 255, 0.2);
}

.badge.wedding {
    background: rgba(255, 20, 147, 0.1);
    color: #ff1493;
    border: 1px solid rgba(255, 20, 147, 0.2);
}

/* Stats Grid inside Panel */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-lg);
    border-radius: 12px;
    transition: var(--transition-fast);
}

.stat-card.accent {
    background: var(--accent-dim);
    border-color: rgba(226, 29, 29, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: var(--space-2xl);
    border-radius: 12px;
    transition: var(--transition-medium);
}

.stat-label {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 20px;
    font-weight: 700;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 12px;
}

.stat-trend {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    opacity: 0.8;
    margin-top: 8px;
    display: block;
}

/* Tables - Performance Optimized */
.admin-table-container {
    background: transparent;
    border: none;
    content-visibility: auto;
    /* Optimization: Render only when visible */
    contain-intrinsic-size: 100px 500px;
}

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

.activity-time {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    min-width: 120px;
}

.activity-desc {
    font-size: 0.9rem;
    color: var(--primary-text);
    opacity: 0.8;
    line-height: 1.6;
}

/* Tables */

.btn-icon {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--secondary-text);
    padding: 8px 16px;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-text);
}

/* Editor - IDE Interface */
.editor-interface {
    display: grid;
    grid-template-columns: 50px 1fr;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.line-numbers {
    background: rgba(255, 255, 255, 0.01);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--secondary-text);
    opacity: 0.6;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    line-height: 2;
    user-select: none;
}

.editor-container {
    display: flex;
    flex-direction: column;
    background: #060606;
}

.editor-header {
    background: rgba(255, 255, 255, 0.01);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.file-name {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    letter-spacing: 0.1em;
}

.file-status {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: #ffaa00;
    font-weight: 900;
}

.admin-textarea {
    width: 100%;
    height: 350px;
    background: transparent;
    border: none;
    padding: 24px;
    color: #b0b0b0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 2;
    resize: none;
    outline: none;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-lg);
}

.save-status {
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--secondary-text);
    opacity: 0.7;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.1em;
    transition: all 0.3s var(--ease-out-quint);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* Enhanced Admin Interface */
.form-container-reveal {
    animation: slideDown 0.5s var(--transition-cinematic);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.form-group label {
    display: block;
    font-family: var(--font-tech);
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 700;
}

.admin-input,
.admin-textarea-sm,
.admin-form select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 6px;
    color: var(--primary-text);
    font-family: var(--font-tech);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.admin-input:focus,
.admin-textarea-sm:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.form-actions {
    display: flex;
    gap: 12px;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    color: var(--secondary-text);
    font-family: var(--font-tech);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

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

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.profile-tab-content {
    display: none;
}

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

/* Managers */
.folder-header.reel-header-sync {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.manager-title {
    font-family: var(--font-tech);
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--primary-text);
}

.skills-editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.skill-edit-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
}

.skill-top-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.skill-icon-preview {
    width: 60px;
    height: 60px;
    background: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.skill-icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.no-icon {
    font-size: 0.6rem;
    color: var(--secondary-text);
    opacity: 0.5;
}

.skill-inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-edit-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.skill-edit-item .admin-input {
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* Public Portfolio Software Image */
.soft-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    z-index: 2;
    position: relative;
    transition: var(--transition-cinematic);
}

.soft-module:hover .soft-img {
    transform: scale(1.1);
}

.experience-editor-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.exp-edit-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: 100px 1fr 1fr auto;
    gap: 16px;
    align-items: center;
}

/* Settings V2 - Optimized Layout */
.settings-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
    align-items: start;
}

.settings-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    /* Giảm từ xl xuống md để khít hơn */
}

.setting-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: var(--space-lg);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.3s ease;
}

.setting-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.setting-label {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--secondary-text);
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-input,
.admin-textarea-sm,
.admin-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 6px;
    color: var(--primary-text);
    font-family: var(--font-main);
    font-size: 0.9rem;
}

.admin-textarea-sm {
    min-height: 100px;
    resize: vertical;
}

.avatar-uploader-preview {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    align-items: center;
}

#avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.color-picker-group {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-color-picker {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
}

.helper-text {
    font-size: 0.75rem;
    color: var(--secondary-text);
    margin-top: 6px;
    opacity: 0.6;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    backdrop-filter: blur(4px);
    color: var(--primary-text);
}

.btn-icon svg {
    display: block;
    pointer-events: none; /* Let clicks pass to the button */
}

.btn-icon.edit {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.2);
}

.btn-icon.edit:hover {
    background: #4ade80;
    color: #000;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.btn-icon.delete {
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.2);
}

.btn-icon.delete:hover {
    background: #ff4444;
    color: #fff;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

/* Panel Footer / Action Bar */
.admin-panel-footer {
    margin-top: 32px;
    padding-top: 24px;
    padding-bottom: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.save-status {
    font-size: 0.8rem;
    color: var(--secondary-text);
    font-family: var(--font-tech);
    opacity: 0.5;
}

/* Cải tiến nút bấm để trông "đắt tiền" hơn */
.btn-primary {
    background: var(--accent);
    color: var(--accent-foreground);
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 14px 32px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2);
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: #fff;
    color: var(--accent-foreground);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Add Video Form Redesign - Optimized */
.add-form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 60px;
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.6s var(--ease-out-quint);
}

.ingester-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    /* Giảm khoảng cách giữa 2 cột */
    margin-bottom: 40px;
    /* Tăng khoảng cách với footer */
}

.form-group {
    margin-bottom: 30px;
    /* Tăng khoảng cách giữa các nhóm nhập liệu */
}

.setting-label {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 20px !important;
    display: block;
    text-transform: uppercase;
}

/* Loại bỏ dấu chấm bự bự */
.admin-input {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--foreground);
    transition: all var(--transition-fast);
}

.admin-input:focus {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

/* Category Chips - Premium UI */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    cursor: pointer;
}

.chip input {
    display: none;
}

.chip span {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--muted-foreground);
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
}

.chip:hover span {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    color: var(--foreground);
}

.chip input:checked+span {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}

.editable-chip {
    position: relative;
}

.chip-actions {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.editable-chip:hover .chip-actions {
    opacity: 1;
}

.btn-remove-chip {
    width: 22px;
    height: 22px;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    background: var(--accent-color);
}

.btn-remove-chip:hover {
    transform: scale(1.1);
    background: #ff0000;
}

.chip-text[contenteditable="true"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0 4px;
}

.category-quick-manager {
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.category-quick-manager .admin-input {
    flex: 1;
    margin: 0;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
}

.admin-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: #fff;
    transition: all 0.2s ease;
}

.admin-tag:hover {
    border-color: var(--accent-color);
    background: rgba(226, 29, 29, 0.05);
}

.btn-remove-tag {
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-remove-tag:hover {
    color: var(--accent-color);
}

.btn-remove-tag:hover {
    color: var(--accent-color);
}

/* Video Preview slot - Cinematic */
.video-preview-slot {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    transition: all 0.5s ease;
}

.preview-empty {
    text-align: center;
    opacity: 0.4;
}

.preview-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
    color: var(--accent-color);
}

#video-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-empty p {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
}

/* Button Group Refinement */
.admin-panel-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    /* Giảm padding trên */
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 12px 24px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(226, 29, 29, 0.4);
    filter: brightness(1.1);
}

/* Avatar Upload Interface - NEW */
.avatar-upload-wrapper {
    display: flex;
    gap: 30px;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-preview-container {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(226, 29, 29, 0.2);
    flex-shrink: 0;
}

.avatar-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-dropzone {
    flex: 1;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s var(--ease-out-quint);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.avatar-dropzone.drag-active {
    border-color: var(--accent-color);
    background: rgba(226, 29, 29, 0.05);
    transform: scale(1.01);
}

.dropzone-content p {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 5px;
}

.dropzone-content span {
    font-size: 0.75rem;
    color: var(--secondary-text);
}

.mt-15 {
    margin-top: 15px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- RESPONSIVE NAVIGATION --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-text);
    position: relative;
    transition: var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-text);
    transition: var(--transition-fast);
}

.hamburger::before { top: -8px; left: 0; }
.hamburger::after { bottom: -8px; left: 0; }

/* Active State for Hamburger */
.mobile-nav-toggle.active .hamburger { background: transparent; }
.mobile-nav-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.mobile-nav-toggle.active .hamburger::after { transform: rotate(-45deg); bottom: 0; }

@media (max-width: 768px) {
    #main-nav {
        width: 90%;
        padding: 10px 20px;
        justify-content: space-between;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 10, 11, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-xl);
        transition: var(--transition-cinematic);
        z-index: 1000;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.5s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delay for li items */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }

    .nav-links a.nav-cta {
        margin-left: 0;
    }
}

/* ============================================================
   MICROLINK FETCHER + R2 THUMBNAIL WORKFLOW
   ============================================================ */

.microlink-tool,
.r2-thumb-section {
    margin-top: 4px;
}

/* Input + Action button rows */
.microlink-input-row,
.r2-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

/* Microlink Fetch Button */
.btn-microlink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    background: rgba(226, 29, 29, 0.12);
    border: 1px solid rgba(226, 29, 29, 0.4);
    border-radius: 8px;
    color: oklch(0.78 0.12 20);
    font-family: var(--font-tech);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.btn-microlink:hover:not(:disabled) {
    background: rgba(226, 29, 29, 0.22);
    border-color: rgba(226, 29, 29, 0.7);
    color: #fff;
    transform: translateY(-1px);
}

.btn-microlink:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* R2 Preview Button */
.btn-preview-r2 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-tech);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.btn-preview-r2:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

/* Status Indicator */
.microlink-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-tech);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.microlink-status.status-loading {
    background: rgba(255, 170, 0, 0.08);
    color: oklch(0.82 0.14 72);
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.microlink-status.status-success {
    background: rgba(0, 180, 80, 0.08);
    color: oklch(0.78 0.15 148);
    border: 1px solid rgba(0, 180, 80, 0.22);
}

.microlink-status.status-error {
    background: rgba(226, 29, 29, 0.08);
    color: oklch(0.72 0.18 20);
    border: 1px solid rgba(226, 29, 29, 0.22);
}

/* Result URL row */
.microlink-result {
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

.result-url-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 8px 12px;
    overflow: hidden;
}

.result-url-text {
    font-family: var(--font-tech);
    font-size: 0.7rem;
    color: oklch(0.74 0.06 200);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Copy Button */
.btn-copy-url {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(0, 180, 80, 0.1);
    border: 1px solid rgba(0, 180, 80, 0.3);
    border-radius: 6px;
    color: oklch(0.78 0.14 148);
    font-family: var(--font-tech);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-copy-url:hover {
    background: rgba(0, 180, 80, 0.2);
    border-color: rgba(0, 180, 80, 0.5);
    color: #fff;
}

.btn-copy-url.copied {
    background: rgba(0, 180, 80, 0.25);
    border-color: oklch(0.72 0.15 148);
    color: oklch(0.88 0.14 148);
}

/* Optional label tag */
.label-optional {
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

/* R2 Badge on Project Cards */
.r2-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: oklch(0.38 0.16 148);
    color: #fff;
    font-family: var(--font-tech);
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 3px 7px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}
/* --- YOUTUBE OPTIMIZED EMBED & MASKING --- */
.youtube-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    border-radius: 8px;
}

.youtube-wrapper iframe {
    position: absolute;
    top: 0; /* Revert to normal */
    left: 0;
    width: 100%;
    height: 100%; /* Revert to normal */
    z-index: 1;
}

/* Blocks clicks on YouTube logo in bottom right ONLY */
.yt-mask-bottom-right {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 60px;
    z-index: 10;
    background: transparent;
    pointer-events: auto;
    cursor: default;
}

/* Blocks clicks on YouTube logo in bottom right */
.yt-mask-bottom-right {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 60px;
    z-index: 10;
    background: transparent;
    pointer-events: auto;
    cursor: default;
}

/* Small visual fade to hide the logo slightly more if needed */
.youtube-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 5;
}

/* Drag & Drop Reordering Admin */
.project-card {
    cursor: grab;
    position: relative;
}

.project-card:active {
    cursor: grabbing;
}

/* Hide the old handle but keep the functionality for the whole card */
.card-drag-handle {
    display: none;
}

.sortable-ghost {
    opacity: 0.3;
    border: 2px dashed var(--accent);
}

.sortable-drag {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    cursor: grabbing;
}

/* Ensure buttons still look like buttons */
.btn-icon {
    cursor: pointer !important;
}

/* --- ADMIN SKILL UI OPTIMIZATION --- */
.input-group-impeccable {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.admin-label-tiny {
    font-family: var(--font-tech);
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.6;
}

.badge-svg-detected {
    font-family: var(--font-tech);
    font-size: 0.55rem;
    font-weight: 900;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    letter-spacing: 0.05em;
    animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.code-font {
    font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
    letter-spacing: -0.02em !important;
}

textarea.admin-input {
    min-height: 44px;
    max-height: 200px;
    resize: vertical;
    padding: 12px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

textarea.admin-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px color-mix(in srgb, var(--accent) 10%, transparent) !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

.skill-icon-preview {
    transition: transform 0.3s ease;
}

.skill-edit-item:hover .skill-icon-preview {
    transform: scale(1.05);
}

/* Timeline Drag Support */
.exp-edit-item {
    cursor: grab;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exp-edit-item:active {
    cursor: grabbing;
}

.exp-edit-item.sortable-ghost {
    opacity: 0.4;
    border: 1px dashed var(--accent);
    background: rgba(255, 255, 255, 0.05);
}
