/* Additional styles for enhanced features */

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    mix-blend-mode: difference;
}

.custom-cursor-follower {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: 0.1s;
    mix-blend-mode: difference;
}

/* Hover states for cursor */
a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor,
.project-card:hover ~ .custom-cursor {
    width: 40px;
    height: 40px;
    border-color: var(--green);
    background-color: rgba(100, 255, 218, 0.1);
}

/* Loading Animation */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--navy);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid var(--lightest-navy);
    border-top: 5px solid var(--green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Scroll-triggered animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Mobile Menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
    backdrop-filter: blur(5px);
    z-index: 8;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mobile-nav-links li {
    margin: 15px 0;
    text-align: center;
}

.mobile-nav-links a {
    display: block;
    padding: 15px;
    font-size: var(--fz-lg);
}

.hamburger.active .line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.no-scroll {
    overflow: hidden;
}


/* Side Bars - Social and Email */
.social-sidebar,
.email-sidebar {
    position: fixed;
    bottom: 0;
    width: 40px;
    z-index: 10;
}

/* Social Sidebar (Left) */
.social-sidebar {
    left: 40px;
}

.social-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-icons li {
    margin-bottom: 20px;
}

.social-icons a {
    color: #8892b0;
    font-size: 20px;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.social-icons a:hover,
.social-icons a:focus {
    color: #64ffda;
    transform: translateY(-3px);
    display: inline-block;
}

/* Email Sidebar (Right) */
.email-sidebar {
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.email-link {
    color: #8892b0;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    margin-bottom: 20px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.email-link:hover,
.email-link:focus {
    color: #64ffda;
    transform: translateY(-3px);
}

/* Shared Line Styling */
.sidebar-line {
    width: 1px;
    height: 90px;
    background-color: #8892b0;
    margin: 0 auto;
}

/* Media Query for Mobile */
@media (max-width: 768px) {
    .social-sidebar,
    .email-sidebar {
        display: none;
    }
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0a192f;
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    width: 100px;
    height: 100px;
    stroke: #64ffda;
    stroke-width: 2px;
    fill: none;
    animation: logoAnimation 2.5s ease-in-out forwards;
}

@keyframes logoAnimation {
    0% {
        opacity: 0;
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
    }
    70% {
        stroke-dashoffset: 0;
        fill: transparent;
    }
    90% {
        fill: rgba(100, 255, 218, 0.2);
        transform: scale(1);
    }
    100% {
        fill: rgba(100, 255, 218, 0.9);
        stroke-dashoffset: 0;
        transform: scale(1.1);
    }
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(100, 255, 218, 0.3);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    width: 50px;
    height: 50px;
    background-color: rgba(100, 255, 218, 0.2);
}

/* Full-screen Loader (Brittany Chiang style) */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0a192f;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    width: 200px;
    height: 100px;
    margin-bottom: 20px;
    cursor: pointer;
}

.logo-text {
    fill: none;
    stroke: #64ffda;
    stroke-width: 1px;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: logoTextAnimation 2s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

/* Logo hover animation */
.loader-logo:hover .logo-text {
    animation: logoHoverAnimation 0.5s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

@keyframes logoTextAnimation {
    0% {
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    70% {
        stroke-dashoffset: 0;
        fill: transparent;
    }
    100% {
        stroke-dashoffset: 0;
        fill: rgba(100, 255, 218, 0.7);
    }
}

@keyframes logoHoverAnimation {
    0% {
        fill: rgba(100, 255, 218, 0.7);
        transform: translateY(0);
    }
    50% {
        fill: rgba(100, 255, 218, 1);
        transform: translateY(-5px);
    }
    100% {
        fill: rgba(100, 255, 218, 0.9);
        transform: translateY(0);
    }
}

/* Also add this animation to the header logo */
/* Update the logo styling to remove the circle */
.logo {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 24px;
    color: #64ffda;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    /* Remove any border-radius, background, or border properties */
    border: none;
    background: none;
    border-radius: 0;
    padding: 0;
}

.logo:hover {
    color: #64ffda;
    transform: translateY(-3px);
    /* Ensure no background or border appears on hover */
    background: none;
    border: none;
    box-shadow: none;
}

/* If there's a ::before pseudo-element with a circle */
.logo::before {
    content: "Edree0x";
    /* Remove any styling that creates a circle */
    background: none;
    border-radius: 0;
    border: none;
    padding-left: 60px;
}

.loader-details {
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
    color: #64ffda;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
    animation-delay: 1.8s;
}

.loader-progress {
    width: 200px;
    height: 2px;
    background-color: rgba(100, 255, 218, 0.2);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.loader-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: #64ffda;
    animation: progressAnimation 2s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressAnimation {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* Hide loader after animation */
.loader-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}