/* Premium Slate & Indigo Stylesheet for Max Chan Portfolio */

:root {
    --bg-dark: #0B0F19;         /* Very dark slate blue */
    --bg-card: #161E2F;         /* Dark slate for containers */
    --bg-card-hover: #1E293B;   /* Slate hover card */
    --primary: #6366F1;         /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-hover: #4F46E5;   /* Deep Indigo */
    --accent: #8B5CF6;          /* Violet */
    --accent-glow: rgba(139, 92, 246, 0.2);
    --text-light: #F8FAFC;      /* Slate 50 */
    --text-muted: #94A3B8;      /* Slate 400 */
    --text-dim: #64748B;        /* Slate 500 */
    --border-color: rgba(99, 102, 241, 0.12); /* Subtle indigo border */
    --border-hover: rgba(99, 102, 241, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-light);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Navigation Header */
header {
    background-color: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #FFF 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

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

/* Mobile Nav Styles */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: var(--transition);
    background-color: var(--text-light);
}

/* Hero Section */
#hero {
    min-height: 95vh;
    padding: 8rem 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.hero-bg-glow {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(99, 102, 241, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
    z-index: 10;
}

.hero-text {
    flex: 1.2;
}

.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.2rem;
    background: linear-gradient(to right, #FFF 30%, var(--primary) 70%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.cta-buttons {
    display: flex;
    gap: 1.2rem;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--text-light);
    transform: translateY(-2px);
}

.hero-graphic {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.monogram-card {
    position: relative;
    width: 338px;
    height: 338px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    overflow: hidden;
    flex-shrink: 0;
}

.card-mc {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary);
    z-index: 10;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.profile-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 10;
    transition: var(--transition);
}

.monogram-card:hover .profile-image {
    transform: scale(1.05);
}

.card-pulse {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: var(--accent);
    filter: blur(50px);
    opacity: 0.25;
    animation: pulsate 8s infinite alternate;
}

@keyframes pulsate {
    0% { transform: scale(0.9) translate(-10px, -10px); opacity: 0.2; }
    100% { transform: scale(1.3) translate(15px, 15px); opacity: 0.45; }
}

/* Sections Layout */
section {
    padding: 7rem 2rem;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    display: block;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

section h2 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.section-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3.5rem;
    max-width: 650px;
}

/* About Section */
#about {
    border-bottom: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 4rem;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 20px;
    transition: var(--transition);
}

.detail-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.detail-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.detail-card p:last-child { margin-bottom: 0; }
.detail-card strong { color: var(--text-light); }

/* Portfolio Section */
#portfolio {
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(11, 15, 25, 0.4);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.highlight-card {
    grid-column: span 2;
}

.portfolio-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition);
}

/*
@media (min-width: 769px) {
    .portfolio-card:last-child:nth-child(even) {
        grid-column: span 2;
        justify-self: center;
        width: 100%;
        max-width: calc(50% - 1rem);
    }
}
*/

.portfolio-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    cursor: pointer;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.video-wrapper:hover .video-placeholder {
    transform: scale(1.03);
}

.play-btn {
    width: 70px;
    height: 70px;
    background-color: rgba(99, 102, 241, 0.95);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
    transition: var(--transition);
    z-index: 10;
}

.play-btn svg {
    width: 32px;
    height: 32px;
    margin-left: 4px; /* Align play triangle */
}

.video-wrapper:hover .play-btn {
    transform: scale(1.1);
    background-color: var(--accent);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.5);
}

.video-duration {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #EF4444;
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.portfolio-info {
    padding: 2rem;
}

.portfolio-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.role {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Proficiencies Section */
#proficiencies {
    border-bottom: 1px solid var(--border-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
}

.skill-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    transition: var(--transition);
}

.skill-box:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.skill-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background-color: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.skill-box:hover .skill-icon {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
}

.skill-box h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.skill-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Timeline (Experience) */
#experience {
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(11, 15, 25, 0.2);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 5px;
    width: 2px;
    height: 98%;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-badge {
    position: absolute;
    left: -2.5rem;
    top: 5px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 3px solid var(--primary);
    z-index: 5;
    transition: var(--transition);
}

.timeline-item:hover .timeline-badge {
    background-color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.3);
}

.timeline-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 20px;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--border-hover);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.timeline-date {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
}

.timeline-company {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Contact Section */
#contact {
    padding-bottom: 9rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
}

.contact-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3rem 2.5rem;
    border-radius: 24px;
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.contact-link {
    display: block;
    font-size: 1.6rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.contact-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.contact-note {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

.contact-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    background-color: #080B13;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-scale-up {
    animation: scaleUp 1s ease-out forwards;
}

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

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .hero-text h1 { font-size: 3.8rem; }
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--bg-dark);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 2rem;
        gap: 1.5rem;
    }
    
    .nav-links.active {
        display: flex;
    }

    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero-content { flex-direction: column-reverse; gap: 3rem; text-align: center; }
    .hero-description { margin-left: auto; margin-right: auto; }
    .cta-buttons { justify-content: center; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .highlight-card { grid-column: span 1; }
    .timeline-header { flex-direction: column; gap: 0.3rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-link { font-size: 1.3rem; }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
    
    #hero { padding-top: 6rem; }
    section { padding: 5rem 1.5rem; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 2.8rem; }
    .subtitle { font-size: 1.2rem; }
    .skills-grid { grid-template-columns: 1fr; }
    .contact-buttons { flex-direction: column; }
    .cta-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; text-align: center; }
}

/* ==========================================================================
   Admin Mode & CMS Visual Editor Styles
   ========================================================================== */

body.admin-mode {
    padding-bottom: 80px; /* Space for sticky admin bar */
}

.admin-only {
    display: none !important;
}

body.admin-mode .admin-only {
    display: inline-block !important;
}

body.admin-mode .admin-only-flex {
    display: flex !important;
}

/* Edit Section Trigger Pencil */
.edit-trigger {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 1.2rem;
    transition: var(--transition);
    vertical-align: middle;
    display: inline-block;
}

.edit-trigger:hover {
    background-color: var(--primary);
    color: #FFF;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Sticky Admin Control Bar */
.admin-control-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(22, 30, 47, 0.95);
    border-top: 2px solid var(--primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981; /* Green */
    box-shadow: 0 0 8px #10B981;
}

.admin-email {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.btn-admin {
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-admin-publish {
    background-color: #10B981; /* Green */
    color: #FFF;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-admin-publish:hover {
    background-color: #059669;
    transform: translateY(-2px);
}

.btn-admin-logout {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-admin-logout:hover {
    border-color: var(--text-light);
    color: var(--text-light);
}

/* Admin Login trigger in Footer */
.admin-login-link {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.8rem;
    display: inline-block;
    cursor: pointer;
    transition: var(--transition);
}

.admin-login-link:hover {
    color: var(--primary);
}

/* Visual Editor Modal Overlay */
.editor-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.editor-modal-overlay.active {
    display: flex;
}

/* Modal Box */
.editor-modal {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.editor-modal-overlay.active .editor-modal {
    transform: scale(1);
}

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

.editor-modal-header h3 {
    font-size: 1.4rem;
    color: var(--text-light);
}

.editor-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.editor-modal-close:hover {
    color: var(--text-light);
}

.editor-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.editor-modal-footer {
    padding: 1.2rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background-color: rgba(11, 15, 25, 0.2);
}

/* Form Fields Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    background-color: rgba(11, 15, 25, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* List Items Editor (Timeline / Projects) */
.list-item-editor {
    background-color: rgba(11, 15, 25, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
}

.list-item-editor-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.btn-list-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-list-control:hover {
    background-color: var(--primary);
    color: #FFF;
}

.btn-list-delete {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.btn-list-delete:hover {
    background-color: #EF4444;
    color: #FFF;
}

.btn-add-item {
    width: 100%;
    padding: 0.8rem;
    background-color: rgba(99, 102, 241, 0.1);
    border: 1px dashed var(--primary);
    color: var(--primary);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-add-item:hover {
    background-color: var(--primary);
    color: #FFF;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Hidden Sections and Nav Links in Admin Preview Mode */
.section-hidden-preview {
    opacity: 0.6;
    border: 2px dashed var(--primary) !important;
    border-radius: 24px;
    padding: 2rem 1.5rem;
    position: relative;
    background-image: repeating-linear-gradient(45deg, rgba(99, 102, 241, 0.03) 0px, rgba(99, 102, 241, 0.03) 10px, transparent 10px, transparent 20px);
}

.section-hidden-preview::before {
    content: "⚠️ DRAFT: HIDDEN FROM PUBLIC VISITORS";
    position: absolute;
    top: 10px;
    right: 20px;
    background-color: #EF4444;
    color: #FFF;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.nav-link-hidden-preview {
    opacity: 0.5;
}

/* Mobile Admin Control Bar Optimization */
@media (max-width: 768px) {
    body.admin-mode {
        padding-bottom: 140px; /* Make sure content isn't covered by taller mobile bar */
    }
    .admin-control-bar {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.8rem 1rem;
        align-items: center;
    }
    .admin-info {
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }
    .admin-actions {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.4rem;
        width: 100%;
    }
    .btn-admin {
        padding: 0.5rem 0.4rem;
        font-size: 0.72rem;
        text-align: center;
        white-space: nowrap;
        margin-right: 0 !important; /* Override inline margin-right */
    }
}

/* Custom Confirm Dialog */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.custom-confirm-overlay.active {
    display: flex;
}

.custom-confirm-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-confirm-overlay.active .custom-confirm-box {
    transform: scale(1);
}

.custom-confirm-box p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.custom-confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Custom Mixed Section Elements */
.custom-element {
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease;
}
.custom-element:last-child {
    margin-bottom: 0;
}
.custom-element-paragraph {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    opacity: 0.95;
    margin-bottom: 1.5rem;
}
.custom-element-video {
    max-width: 800px;
    margin-bottom: 2rem;
}
.custom-element-skill {
    max-width: 500px;
    margin-bottom: 1.5rem;
}
.custom-element-experience {
    max-width: 800px;
    margin-bottom: 2rem;
}
.custom-element-image {
    max-width: 800px;
    margin-bottom: 2rem;
}
.custom-element-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}
.custom-element-image img:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}
.custom-element-image .caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    text-align: center;
    font-style: italic;
}
.custom-element-file {
    max-width: 400px;
    margin-bottom: 1.5rem;
}

