/* Navigation styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    width: 100%;
    position: relative;
    z-index: 999;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-left: auto; /* Make sure it's pushed to the right */
    min-width: 140px; /* Match timer width for balance */
}

nav ul {
    display: flex;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 60px;
    padding: 8px 20px;
    border-radius: 30px;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.9;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

nav ul li a:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

nav ul li a.active {
    border-bottom: 2px solid #fff;
}

.location, .timer {
    font-weight: 600;
}

.name {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    flex: 1;
    margin: 0 20px;
}

.timer {
    min-width: 140px; /* Ensure consistent width */
    text-align: left;
    white-space: nowrap;
}

/* Enhanced Project Section */
.projects {
    position: relative;
    width: 100%;
    padding: 0 20px;
    margin-top: -8vh;
    z-index: 1;
}

.project-grid {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 20px 40px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px; /* Add some padding for the scrollbar */
    position: relative;
    top: 10vh;
}

/* Modern sleek scrollbar styling */
.project-grid::-webkit-scrollbar {
    height: 4px; /* Thinner scrollbar for a sleeker look */
    background: transparent; /* Transparent background */
}

.project-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15); /* Subtle light color */
    border-radius: 2px; /* Slightly rounded corners */
    transition: background 0.3s ease; /* Smooth transition for hover effect */
}

.project-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3); /* Brighter on hover */
}

.project-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2); /* Very subtle track */
    border-radius: 2px; /* Match the thumb radius */
    margin: 0 15%; /* Inset from edges for a floating effect */
}

/* Firefox scrollbar styling using new standards */
.project-grid {
    scrollbar-width: thin; /* 'thin' is the most modern option in Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.2); /* thumb and track colors */
}

/* Project hover styles */
.project-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 auto;
    width: calc(25% - 20px);
    min-width: 250px;
    height: 250px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center;
    scroll-snap-align: start;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 25px;
    opacity: 1;
    z-index: 2;
    transition: all 0.5s ease;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0) 60%);
    transform: translateY(20px);
}

.project-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.project-category {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.05s;
    padding: 4px 0;
    opacity: 0;
}

.project-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4);
}

.project-item:hover .project-overlay {
    transform: translateY(0);
}

.project-item:hover::before {
    opacity: 0.2;
}

.project-item:hover .project-title,
.project-item:hover .project-category {
    transform: translateY(0);
}

.project-item:hover .project-category {
    opacity: 0.8;
}

.project-item:hover img {
    transform: scale(1.07);
}

.view-project {
    margin-top: 15px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #fff;
    background: transparent;
    transition: all 0.4s ease;
    transform: translateY(20px);
    opacity: 0;
    position: relative;
    z-index: 1;
}

.view-project::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #fff;
    transition: width 0.4s ease;
}

.project-item:hover .view-project {
    transform: translateY(0);
    opacity: 0.9;
    transition-delay: 0.1s;
}

.view-project:hover {
    background: transparent;
    letter-spacing: 1.5px;
}

.view-project:hover::after {
    width: 100%;
}

/* Project counter badge */
.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    z-index: 3;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    border-radius: 2px;
}

/* Contact button styling */
.contact-btn {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Enhanced styling for the CONTACT button specifically */
.nav-buttons a:last-child {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-buttons a:last-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.8s;
}

.nav-buttons a:last-child:hover::before {
    left: 100%;
}

.nav-buttons a:last-child:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Styling for non-CONTACT buttons */
.nav-buttons a:not(:last-child) {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.nav-buttons a:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.8s;
}

.nav-buttons a:not(:last-child):hover::before {
    left: 100%;
}

.nav-buttons a:not(:last-child):hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Projects header */
.projects-header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.projects-header h2 {
    font-size: 28px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    color: #fff;
}

.projects-header p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* WORK title and section organization */
.section-title {
    padding: 0 58px;
    margin: 40px 0 -35px;
    position: relative;
}

.section-title h2 {
    font-size: 50px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 0;
    color: #fff;
}

/* Main layout structure */
body {
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 20px 0;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projects-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

footer {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.social-icon {
    color: #fff;
    font-size: 24px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: rgba(255, 255, 255, 0.7);
    transform: translateY(-3px);
}

.location {
    font-size: 14px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

/* Hamburger Menu Styles */
.hamburger-menu {
    display: none;
    position: relative;
    z-index: 9999;
    cursor: pointer;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    margin-left: 20px; /* Add space between nav buttons and hamburger */
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 15px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center;
}

.hamburger-icon span:first-child {
    top: 0;
}

.hamburger-icon span:last-child {
    bottom: 0;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9998;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    flex-direction: column;
    justify-content: flex-start;
    padding: 25px;
}

.mobile-menu.active {
    right: 0;
}

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

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    z-index: 9999;
    background: transparent;
    padding: 40px 20px 20px 20px;
    width: 100%;
    height: auto;
}

/* Open state for hamburger icon - make it a clear X */
.hamburger-open .hamburger-icon span:first-child {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 28px;
    height: 3px;
}

.hamburger-open .hamburger-icon span:last-child {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
    width: 28px;
    height: 3px;
}

.hamburger-open .hamburger-icon {
    transform: rotate(0deg);
    transition: transform 0.4s ease 0.1s;
}

.mobile-menu-item {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding: 5px 0;
}

.mobile-menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.mobile-menu-item:hover {
    transform: translateX(10px);
}

.mobile-menu-item:hover::after {
    width: 100%;
}

/* Responsive styles */
@media (max-height: 700px) {
    .section-title h2 {
        font-size: 40px;
    }
    
    .project-item {
        height: 180px;
    }
    
    .project-title {
        font-size: 16px;
    }
    
    .projects {
        margin-top: 0vh;
    }
    
    .section-title {
        margin: 0px 0 -80px;
    }
    
    footer {
        padding: 10px 40px;
    }
    
    .mobile-menu-item {
        font-size: 20px;
        margin-bottom: 15px;
    }
}

@media (max-height: 600px) {
    .section-title h2 {
        font-size: 40px;
    }
    
    .project-item {
        height: 180px;
    }
    
    .project-title {
        font-size: 16px;
    }
    
    .projects {
        margin-top: 0vh;
    }
    
    .section-title {
        margin: 0px 0 -70px;
    }
    
    footer {
        padding: 10px 40px;
    }
    
    .mobile-menu-item {
        font-size: 20px;
        margin-bottom: 15px;
    }
}

@media (max-height: 500px) {
    .section-title h2 {
        font-size: 32px;
    }
    
    .project-item {
        height: 150px;
    }
    
    nav {
        padding: 0.5rem 2rem;
    }
    
    .projects {
        margin-top: 0;
    }
    
    .project-grid {
        padding: 10px 40px;
    }
    
    .section-title {
        margin: 0px 0 -55px;
    }
    
    .mobile-menu-item {
        font-size: 18px;
        margin-bottom: 10px;
    }
}

@media (max-width: 1500px) {
    .project-item {
        width: calc(33.33% - 20px);
    }
    .section-title h2 {
        padding-left: -20%;
    }
    
    .section-title {
        padding-left: 1.4%;
    }
    
    .hamburger-menu {
        display: flex;
        margin-left: auto; /* Position it on the right when nav buttons are gone */
    }
    
    .nav-buttons {
        display: none;
    }
    
    .mobile-menu {
        display: flex;
    }
}

@media (max-width: 992px) {
    .name {
        font-size: 20px;
    }
    
    .timer {
        min-width: 120px;
        font-weight: 600;
    }
    
    nav {
        padding: 0.8rem 1.5rem;
    }
    .section-title h2 {
        font-size: 36px;
        padding-left: 0.6%;
    }
    
    .section-title {
        padding-left: -2%;
    }
}

@media (max-width: 900px) {
    .project-item {
        width: calc(50% - 20px);
    }
    .section-title h2 {
        font-size: 36px;
        padding-left: 0.7%;
    }
    
    .section-title {
        padding-left: -2%;
    }
}

@media (max-width: 700px) {
    .project-item {
        width: calc(50% - 20px);
    }
    .section-title h2 {
        font-size: 36px;
        padding-left: 1.5%;
    }
    
    .section-title {
        padding-left: -2%;
    }
}

@media (max-width: 600px) {
    .project-item {
        width: calc(100% - 20px);
        min-width: 200px;
    }
    
    nav {
        padding: 15px 10px;
    }
    
    .section-title h2 {
        font-size: 36px;
        text-align: center;
        padding-left: 20%;
    }
    
    .section-title {
        padding-left: 2%;
    }
    
    .project-grid {
        padding: 20px 20px;
    }
    
    footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .name {
        font-size: 18px;
        margin: 0 10px;
    }
    
    .timer {
        min-width: 100px;
        font-size: 11px;
        font-weight: 600;
    }
    
    .hamburger-menu {
        min-width: 28px;
    }
}

/* Make sure all other elements have lower z-index */
.projects, .section-title, main, footer, .content-wrapper {
    z-index: 1;
    position: relative;
}

.language-switch {
    background: transparent !important;
    border: 1px solid #fff !important;
    color: #fff !important;
    padding: 5px 15px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    margin-left: 15px !important;
    font-family: Arial, sans-serif !important;
    outline: none !important;
}

.language-switch:hover {
    background: #fff !important;
    color: #000 !important;
    transform: none !important;
}

.language-switch.mobile {
    margin: 20px 0 0 0 !important;
    display: block !important;
    width: fit-content !important;
    align-self: flex-start !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    font-family: Arial, sans-serif !important;
    outline: none !important;
}

.language-switch.mobile:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    transform: none !important;
}

@media (max-width: 768px) {
    .language-switch:not(.mobile) {
        display: none;
    }
}

