:root {
    --primary-color: #111111;
    --secondary-color: #1a1a1a;
    --accent-color: #c5a059;
    /* Elegant Bronze/Gold */
    --accent-hover: #e0bb73;
    --text-main: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition-slow: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Admin Floating Button */
.admin-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: var(--transition-fast);
    text-decoration: none;
}

.admin-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: scale(1.1) rotate(90deg);
}

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

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

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

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

header {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: radial-gradient(circle at center, #1e1e1e 0%, #111111 100%);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.05;
    transform: translate(-50%, -50%) rotate(45deg);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

header h1 {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

header p {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-secondary);
    border-radius: 13px;
    position: relative;
}

.mouse::after {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--accent-color);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

main {
    max-width: 1200px;
    margin: -10vh auto 8rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8rem;
    position: relative;
    z-index: 10;
}

/* Slider Component */
.project-card {
    opacity: 0;
    transform: translateY(100px) scale(0.9) rotateX(15deg);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    perspective: 1000px;
    backface-visibility: hidden;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
}

.project-info {
    margin-bottom: 2rem;
}

.project-info h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.project-info p {
    color: var(--text-secondary);
    font-weight: 300;
}

/* Admin Dashboard Styles */
.admin-container {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--secondary-color);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.admin-project-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
    position: relative;
}

.admin-input-group {
    margin-bottom: 1.5rem;
}

.admin-input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Existing Projects List in Admin */
.admin-existing-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.admin-existing-info {
    flex: 1;
}

.btn-delete-action {
    background: #ff4444;
    color: white;
    padding: 0.5rem 1.5rem !important;
    margin-left: 20px;
}

.btn-delete-action:hover {
    background: #ff2222;
    transform: translateY(-2px);
}

.admin-input-group input[type="text"] {
    width: 100%;
    background: var(--primary-color);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: var(--transition-fast);
}

.admin-input-group input[type="text"]:focus {
    border-color: var(--accent-color);
    outline: none;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.upload-box {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.upload-box:hover {
    border-color: var(--accent-color);
    background: rgba(197, 160, 89, 0.05);
}

.upload-box.has-file {
    border-style: solid;
    border-color: var(--accent-color);
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-add {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    width: 100%;
    margin-top: 1rem;
}

.btn-add:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.ba-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 32px;
    overflow: hidden;
    background-color: var(--secondary-color);
    border: 1px solid var(--glass-border);
}

.ba-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-after {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
}

.ba-slider {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: ew-resize;
    background: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    outline: none;
    margin: 0;
    touch-action: pan-y;
    /* Prevent page scroll during horizontal swipe */
}

.ba-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    /* Much larger hit area for touch */
    height: 100vh;
    background: transparent;
    /* Keep it invisible since we have ba-handle */
    cursor: ew-resize;
}

.ba-slider::-moz-range-thumb {
    width: 60px;
    height: 100vh;
    background: transparent;
    border: none;
    cursor: ew-resize;
}

.ba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66px;
    /* Slightly larger to accommodate thicker border */
    height: 66px;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(15px);
    border: 3px solid var(--accent-color);
    /* Thicker border */
    border-radius: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Vertical line passing through the middle */
.ba-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 2000px;
    /* Long enough to cover any image height */
    background: var(--accent-color);
    z-index: -1;
    pointer-events: none;
}

.ba-handle svg {
    width: 24px;
    height: 24px;
    fill: var(--accent-color);
}

.ba-label {
    position: absolute;
    bottom: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 100px;
    z-index: 4;
    pointer-events: none;
    transition: var(--transition-fast);
}

.label-before {
    left: 2rem;
}

.label-after {
    right: 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

footer {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(to top, #0a0a0a, transparent);
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
}

footer p {
    font-size: 0.9rem;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    header {
        min-height: 100vh;
        /* Occupy full screen to avoid overlap */
        padding: 6rem 1.5rem 8rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    .scroll-indicator {
        bottom: 5rem;
        /* Move it up slightly from the very bottom for better visibility */
    }

    main {
        margin-top: 2rem;
        /* Remove negative margin to prevent overlap */
        gap: 4rem;
    }

    .ba-container {
        aspect-ratio: 4 / 3;
        border-radius: 20px;
    }

    .project-info h2 {
        font-size: 1.5rem;
    }

    .ba-handle {
        width: 50px;
        height: 50px;
    }

    .ba-label {
        padding: 0.5rem 1rem;
        font-size: 0.65rem;
        bottom: 1.5rem;
    }

    .label-before {
        left: 1rem;
    }

    .label-after {
        right: 1rem;
    }

    /* Admin Panel Mobile Adjustments */
    .admin-container {
        margin: 1rem;
        padding: 1rem;
        border-radius: 16px;
    }

    .admin-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        margin-bottom: 2rem;
    }

    .admin-project-item {
        padding: 1.25rem;
    }

    .admin-existing-item {
        flex-direction: column;
        gap: 1.5rem;
    }

    .btn-delete-action {
        margin-left: 0;
    }

    .upload-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .upload-box {
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}