html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #f0f0f0;
    margin: 0;
    cursor: none; /* Hide the default cursor */
    background-color: #0a0a0a; /* Dark background */
}

header {
    /* Minimalist transparent header */
    background: transparent;
    position: fixed; /* Make header sticky */
    width: 100%;
    z-index: 10;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-branding {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #f0f0f0; /* Light text for contrast */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6),
                 0 0 10px rgba(255, 255, 255, 0.4),
                 0 0 15px rgba(103, 23, 213, 0.3);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.nav-menu a {
    position: relative; /* Required for positioning the pseudo-element */
    text-decoration: none;
    color: #f0f0f0;
    transition: color 0.3s ease;
    padding-bottom: 5px; /* Add space for the underline */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6),
                 0 0 10px rgba(255, 255, 255, 0.4),
                 0 0 15px rgba(103, 23, 213, 0.3);
}

.nav-menu a:hover {
    color: #6717d5;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0); /* Start with no width */
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #6717d5;
    transform-origin: center; /* Animate from the center */
    transition: transform 0.3s ease-out;
}

.nav-menu a:hover::after {
    transform: scaleX(1); /* Scale to full width on hover */
}

.nav-menu li {
    display: inline-block;
}

/* === Custom Cursor === */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #00ffff; /* Neon Cyan */
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s ease, height 0.2s ease;
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

body:hover .custom-cursor {
    width: 25px;
    height: 25px;
}

/* === 3D Background Container === */
#three-js-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

.content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 0 20px;
    z-index: 2;
}

.content h1 {
    font-size: 6vw; /* Responsive font size based on viewport width */
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

/* === Glass Card & Modal Styles === */
.glass-card {
    background: rgba(25, 25, 40, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 40px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

/* === Projects Grid === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.project-card h3 {
    margin-top: 0;
}

.project-card a {
    color: #6717d5;
    text-decoration: none;
    font-weight: bold;
}

/* === Experience Section in Modal === */
.experience-section {
    margin-top: 40px;
    text-align: left;
}

.experience-section h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-weight: 400;
}

.experience-item {
    margin-bottom: 30px;
}

.experience-item h4 {
    margin: 0 0 5px 0;
    color: #00ffff; /* Neon Cyan to match 3D object */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.experience-item h4 .date {
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
}

.experience-item h5 {
    margin: 0 0 15px 0;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

.experience-item ul {
    padding-left: 20px;
    margin: 0;
}

.experience-item li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.project-link {
    font-size: 0.8rem;
    font-weight: 400;
    color: #f0f0f0;
    background-color: rgba(103, 23, 213, 0.5);
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.project-link:hover {
    background-color: rgba(103, 23, 213, 1);
}

/* === Light Stream Animation === */
body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; /* Thickness of the light stream */
    background: linear-gradient(90deg, 
        transparent, 
        rgba(103, 23, 213, 0.1), 
        rgba(103, 23, 213, 0.8), /* Accent color */
        rgba(103, 23, 213, 0.1), 
        transparent
    );
    background-size: 50% 100%;
    background-repeat: no-repeat;
    animation: stream-animation 15s linear infinite;
    z-index: 6; /* Above footer, below modals */
    pointer-events: none; /* Make it non-interactive */
}

.sound-btn .icon-sound-off {
    display: none;
}

.contact-info {
    margin: 30px 0;
    text-align: center;
}

@keyframes stream-animation {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.ui-btn {
    background: rgba(25, 25, 40, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.ui-btn:hover {
    color: #f0f0f0;
    background: rgba(25, 25, 40, 0.6);
    transform: scale(1.1);
}

.ui-btn.active {
    color: #00ffff; /* Neon cyan to indicate active state */
    box-shadow: 0 0 8px #00ffff;
}

/* === UI Tooltips === */
.ui-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    
    background: rgba(25, 25, 40, 0.85); /* Dark glass background */
    color: #f0f0f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap; /* Prevent text wrapping */
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* So the tooltip doesn't interfere with mouse events */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 20;
}

.ui-btn[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* === Audio Controls Container === */
#audio-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 15;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

#audio-controls:hover .volume-slider {
    opacity: 1;
    visibility: visible;
}

/* Volume Slider Thumb (the handle) */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px #00ffff;
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px #00ffff;
}

/* Reposition individual buttons now that they are in a flex container */
.ui-btn {
    position: relative;
}

#fullscreen-btn {
    position: fixed; /* Keep this one separate */
    display: none; /* Hidden by default, shown on mobile */
}

.sound-btn .icon-sound-off {
    display: none;
}

.contact-info p {
    margin: 10px 0;
}

.contact-info a {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #00ffff;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #00ffff;
    transform: scale(1.2);
}

.btn-resume {
    display: block; /* Make it a block to control margin */
    width: fit-content;
    margin: 30px auto 0; /* Center the button */
    padding: 12px 25px;
    background-color: #6717d5;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-resume:hover {
    background-color: #5314a7;
}
/* === Hamburger Menu Styles (Hidden on Desktop) === */
.hamburger {
    display: none;
    position: relative; /* Needed for z-index to apply */
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: #f0f0f0; /* Light bars for contrast */
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .hamburger {
        z-index: 21; /* Ensure it's above the nav-menu overlay */
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        z-index: -1; /* Place it behind the hamburger icon */
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        padding-top: 60px; /* Push links down */
        background: #0a0a0a;
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 16px 0;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }

    .content h1 {
        font-size: 10vw; /* Larger font size on mobile */
    }

    .nav-menu.active {
        z-index: 20; /* Ensure mobile menu is on top of content */
    }

    .modal-content {
        width: 95%;
    }

    #fullscreen-btn {
        display: flex; /* Use flex to align icon */
        left: 30px;
        bottom: 30px;
    }

    #audio-controls {
        right: 20px;
        bottom: 20px;
        gap: 10px;
    }
}

/* === Welcome Screen === */
#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10000;
    transition: opacity 1s ease, visibility 1s ease;
}

#welcome-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-content {
    animation: fadeIn 2s ease-in-out forwards;
    opacity: 0;
}

.welcome-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin: 0;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 15px rgba(103, 23, 213, 0.4);
}

.welcome-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin: 10px 0 40px 0;
    color: rgba(255, 255, 255, 0.8);
}

.btn-enter {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #f0f0f0;
    background: transparent;
    border: 2px solid #00ffff;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px #00ffff;
}

.btn-enter:hover {
    background: #00ffff;
    color: #0a0a0a;
    box-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff;
}

#site-wrapper {
    opacity: 0;
    transition: opacity 1s ease 0.5s; /* Delay the fade-in */
}

#site-wrapper.loaded {
    opacity: 1;
}

@keyframes fadeIn {
  to { opacity: 1; }
}