:root {
    --font-accent: 'Allura', cursive;
    --font-main: 'Poppins', sans-serif;
    --sidebar-width: 300px;
    --sidebar-bg: rgba(15, 18, 20, 0.45);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --glow-color: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --overlay-bg: rgba(0, 0, 0, 0.55);
    --transition-speed: 0.5s;
    --transition-curve: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-main);
    overflow-x: hidden;
    color: var(--text-color);
}

/* Background Area with 3D Perspective Context */
.main_box {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.6)), url("photo.jpg");
    height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1500px; /* Enable 3D space for child components */
}

/* Click-to-Close Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--overlay-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    z-index: 15;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
}

#check:checked ~ .overlay {
    opacity: 1;
    visibility: visible;
}

/* Floating Hamburger Menu Button */
.btn_one {
    position: fixed;
    left: 24px;
    top: 24px;
    z-index: 10;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-speed) var(--transition-curve);
    opacity: 1;
}

.btn_one label {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn_one i {
    color: var(--text-color);
    font-size: 20px;
    transition: transform 0.4s var(--transition-curve);
}

.btn_one:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.08);
    box-shadow: 0 8px 32px 0 rgba(59, 130, 246, 0.25);
}

.btn_one:hover i {
    transform: rotate(90deg);
}

/* Hide Hamburger Menu Button when sidebar is active */
#check:checked ~ .btn_one {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) rotate(90deg);
}

/* Hidden Input Checkbox Control */
#check {
    display: none;
}

/* 3D Hinge-Fold Sliding Glassmorphic Sidebar Menu */
.sidebar_menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    z-index: 20;
    
    /* 3D Transform Settings */
    transform: rotateY(-90deg);
    transform-origin: left center;
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-speed) var(--transition-curve), 
                opacity var(--transition-speed) ease, 
                visibility var(--transition-speed) ease;
    
    display: flex;
    flex-direction: column;
}

#check:checked ~ .sidebar_menu {
    transform: rotateY(0deg);
    opacity: 1;
    visibility: visible;
}

/* Sidebar Logo Header */
.sidebar_menu .logo {
    height: 90px;
    display: flex;
    align-items: center;
    padding-left: 30px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar_menu .logo a {
    font-family: var(--font-accent);
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Sidebar Close Button */
.sidebar_menu .btn_two {
    position: absolute;
    top: 32px;
    right: 24px;
    z-index: 21;
}

.sidebar_menu .btn_two label {
    cursor: pointer;
    display: block;
}

.sidebar_menu .btn_two i {
    color: var(--text-muted);
    font-size: 22px;
    transition: all 0.3s ease;
}

.sidebar_menu .btn_two i:hover {
    color: #ffffff;
    transform: rotate(90deg) scale(1.15);
}

/* Navigation List */
.sidebar_menu .menu {
    flex-grow: 1;
    margin-top: 30px;
    padding: 0 20px;
    overflow-y: auto;
}

.sidebar_menu .menu ul {
    list-style: none;
}

.sidebar_menu .menu li {
    margin-bottom: 8px;
    border-radius: 8px;
    transform: translateX(-35px);
    opacity: 0;
    perspective: 500px; /* Enable 3D depth for icons inside this item */
    transition: transform 0.4s var(--transition-curve), 
                opacity 0.4s var(--transition-curve), 
                background-color 0.3s ease;
}

.sidebar_menu .menu li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar_menu .menu li i {
    font-size: 18px;
    margin-right: 16px;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
    transition: transform 0.5s ease, color 0.3s ease;
}

/* Hover States on Links */
.sidebar_menu .menu li:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar_menu .menu li:hover a {
    color: #ffffff;
}

/* 3D Spin Animation on Menu Icons Hover */
.sidebar_menu .menu li:hover i {
    transform: scale(1.2) rotateY(360deg);
    color: var(--primary-color);
}

/* Sequential Cascading Animation on Open */
#check:checked ~ .sidebar_menu .menu li {
    transform: translateX(0);
    opacity: 1;
}

#check:checked ~ .sidebar_menu .menu li:nth-child(1) { transition-delay: 0.08s; }
#check:checked ~ .sidebar_menu .menu li:nth-child(2) { transition-delay: 0.13s; }
#check:checked ~ .sidebar_menu .menu li:nth-child(3) { transition-delay: 0.18s; }
#check:checked ~ .sidebar_menu .menu li:nth-child(4) { transition-delay: 0.23s; }
#check:checked ~ .sidebar_menu .menu li:nth-child(5) { transition-delay: 0.28s; }
#check:checked ~ .sidebar_menu .menu li:nth-child(6) { transition-delay: 0.33s; }
#check:checked ~ .sidebar_menu .menu li:nth-child(7) { transition-delay: 0.38s; }

/* Sidebar Footer / Social Media Links */
.sidebar_menu .social_media {
    padding: 24px 30px;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar_menu .social_media ul {
    display: flex;
    justify-content: center;
    gap: 24px;
    list-style: none;
    perspective: 500px;
}

.sidebar_menu .social_media a {
    color: var(--text-muted);
    font-size: 20px;
    transition: all 0.5s ease;
    display: inline-block;
}

/* 3D Spin and lift on Social Links Hover */
.sidebar_menu .social_media a:hover {
    color: var(--primary-color);
    transform: translateY(-4px) rotateY(360deg) scale(1.2);
}

/* Landing Page Hero Layout with 3D Float Support */
.hero_container {
    max-width: 650px;
    text-align: center;
    padding: 50px 40px;
    background: rgba(10, 12, 14, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    animation: slideUpFade 1s var(--transition-curve);
    z-index: 2;
    margin: 0 24px;
    
    /* 3D Card Setting */
    transform-style: preserve-3d;
    transform: translate3d(0, 0, 0);
    transition: transform 0.5s var(--transition-curve), box-shadow 0.5s ease;
}

/* 3D Float and Tilt on Hover */
.hero_container:hover {
    transform: translate3d(0, -8px, 20px) rotateX(1deg) rotateY(1.5deg);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

.hero_subtitle {
    font-family: var(--font-accent);
    font-size: 38px;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
    letter-spacing: 2px;
    transform: translateZ(25px); /* Lift element in 3D layer */
}

.hero_title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateZ(35px); /* Lift element in 3D layer */
}

.hero_desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 35px;
    transform: translateZ(20px); /* Lift element in 3D layer */
}

.hero_actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    transform: translateZ(30px); /* Lift element in 3D layer */
}

.btn_primary, .btn_secondary {
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn_primary {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.35);
}

.btn_primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
}

.btn_secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn_secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles & Media Queries */
@media (max-width: 768px) {
    .hero_title {
        font-size: 42px;
    }
    .hero_subtitle {
        font-size: 32px;
    }
    .hero_container {
        padding: 40px 30px;
    }
    .hero_container:hover {
        /* Reduce 3D tilt on smaller devices for better touch responsiveness */
        transform: translate3d(0, -4px, 10px) rotateX(0.5deg) rotateY(0.5deg);
    }
}

@media (max-width: 480px) {
    :root {
        --sidebar-width: 85vw;
    }

    .btn_one {
        left: 16px;
        top: 16px;
        width: 46px;
        height: 46px;
    }

    .btn_one i {
        font-size: 18px;
    }

    .sidebar_menu .logo {
        padding-left: 20px;
        height: 75px;
    }

    .sidebar_menu .logo a {
        font-size: 26px;
    }

    .sidebar_menu .btn_two {
        top: 26px;
        right: 18px;
    }

    .hero_container {
        padding: 30px 20px;
        margin: 0 16px;
    }

    .hero_container:hover {
        /* Disable 3D tilt on mobile for performance */
        transform: none;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    }

    .hero_title {
        font-size: 32px;
    }

    .hero_subtitle {
        font-size: 26px;
    }

    .hero_desc {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .btn_primary, .btn_secondary {
        width: 100%;
        justify-content: center;
        padding: 11px 20px;
    }
}