:root {
    --bg: #000000;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-dim: #b0b0b0;
    --accent: #00ffd5;
    --accent-glow: rgba(0, 255, 213, 0.3);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 1);
    --glass-blur: blur(12px);

    /* Fluid Typography Variables */
    --h1-size: clamp(2.2rem, 10vw, 4rem);
    --h2-size: clamp(1.6rem, 6vw, 2.8rem);
    --h3-size: clamp(1.2rem, 4vw, 1.8rem);
    --nav-size: 0.85rem;
    --body-size: clamp(0.9rem, 2vw, 1.1rem);
    --section-padding: clamp(3rem, 8vw, 8rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    cursor: none !important;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #000000;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* STARS BACKGROUND */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: #000000;
    overflow: hidden;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    animation: float var(--duration) infinite ease-in-out;
    filter: blur(1px);
    box-shadow: 0 0 10px white;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) translateX(10px);
        opacity: 1;
    }
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

/* NAVBAR */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    max-width: 100%;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    text-transform: uppercase;
    flex-grow: 1;
}

.brand span {
    color: var(--accent);
    font-weight: 500;
    opacity: 0.8;
}

nav ul {
    display: flex;
    list-style: none;
}

nav a {
    color: var(--text-dim);
    margin-left: 32px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent);
}

/* MOBILE MENU TOGGLE */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* HERO */
#hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
    background: transparent;
    /* Changed from #000 to show video */
}

#hero video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

#hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Refined bottom overlap to black - reduced intensity */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, transparent 60%),
        linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 5%, transparent 40%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 0 40px 60px;
    /* Moved down to 40px */
    /* Anchored to bottom */
    max-width: 900px;
}

.hero-content h1 {
    font-weight: 900;
    font-size: var(--h1-size);
    line-height: 1.1;
    margin-bottom: 0.6rem;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.catchphrase {
    color: #ffffff;
    /* Pure white */
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
    /* Reduced space */
    text-transform: uppercase;
    white-space: nowrap;
    /* Single line */
    font-weight: 600;
}

.hero-content h2 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    height: 2rem;
    line-height: 2rem;
    color: var(--accent);
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 2rem;
}

/* BUTTONS */
.btn {
    padding: 14px 35px;
    border-radius: 50px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn.outline {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    backdrop-filter: blur(5px);
}

.btn.outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* SECTIONS */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-title {
    font-size: var(--h2-size);
    font-weight: 900;
    margin-bottom: 3.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.section-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* GLASS CARD */
.glass-card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

/* ABOUT */
.about-flex {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image img {
    width: 450px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--surface-border);
}

.about-text p {
    font-size: var(--body-size);
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    max-width: 40.625rem;
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tags span {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.skill-tags span:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text);
}

.project-content p {
    color: var(--text-dim);
    margin-bottom: 25px;
}

.btn-text {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

/* EDUCATION */
.education-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.institution {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 5px;
}

.year {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ACCOMPLISHMENTS */
.accomplishments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.accomplishment-item h3 {
    color: var(--accent);
    margin-bottom: 15px;
}

/* REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* CURSOR */
/* CURSOR */
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 15px cyan;
    mix-blend-mode: difference;
    pointer-events: none;
    border-radius: 50%;
    z-index: 9999;
    will-change: transform;
    /* Remove default cursor interactions */
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
}

/* Ensure no default cursor on interactive items */
a,
button,
select,
input,
.close-modal {
    cursor: none !important;
}

/* MOBILE RESPONSIVENESS IMPROVEMENTS */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }

    .music-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 12vw, 2.8rem);
        max-width: 10ch;
    }

    .hero-content {
        padding: 0 1.5rem 4rem;
    }

    .hero-content .catchphrase {
        white-space: normal;
        font-size: 0.8rem;
        letter-spacing: 0.1em;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }

    .hero-content h2 {
        font-size: 1.1rem;
        height: 1.4rem;
        line-height: 1.4rem;
    }

    .brand {
        font-size: 0.8rem;
    }

    .brand span {
        display: none;
    }

    .buttons {
        gap: 10px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.8rem;
        flex: 1;
        text-align: center;
        min-width: 140px;
    }

    .about-flex {
        flex-direction: column;
        gap: 2.5rem;
    }

    .about-image img {
        width: 100%;
        max-width: 18.75rem;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* MOBILE NAV STYLES */
    .mobile-menu-toggle {
        display: flex;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--surface-border);
    }

    nav ul.active {
        right: 0;
    }

    nav a {
        margin: 0;
        font-size: 1.2rem;
    }

    /* Hide custom cursor on mobile touch */
    .cursor-outline {
        display: none;
    }

    * {
        cursor: auto !important;
    }
}

/* CONTACT */
.contact-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 14px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.contact-form .btn {
    width: 100%;
}

/* MUSIC ENGINE */
.music-intro {
    color: var(--text-dim);
    margin-bottom: 30px;
    text-align: center;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
}

.input-group select,
.input-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 14px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: 100%;
}

.input-group select option {
    background: #000;
    /* Dark background for options */
    color: #fff;
    padding: 10px;
}

.input-group select:focus,
.input-group input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px var(--accent-glow);
}

.music-action-btn {
    grid-column: 1 / -1;
    margin-top: 15px;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    letter-spacing: 2px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.music-action-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 30px var(--accent-glow),
        0 0 60px var(--accent-glow);
    transform: translateY(-3px) scale(1.02);
}

.music-action-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.music-action-btn::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.5s;
}

.music-action-btn:hover::before {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.music-action-btn:hover .btn-text {
    color: #000;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: inherit;
    animation: pulse 2s infinite;
    pointer-events: none;
    z-index: 0;
}

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

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.track-card {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 15px;
}

.track-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.track-info p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.track-meta {
    margin-top: 8px;
    font-size: 0.75rem;
    display: flex;
    gap: 15px;
    color: var(--accent);
}

.spotify-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* MODAL SYSTEM */
.modal {
    display: none;
    position: fixed;
    z-index: 9000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    animation: modalIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: var(--accent);
    letter-spacing: 2px;
}

@keyframes modalIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-dim);
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--accent);
}

#modal-recommendation .track-card {
    border: none;
    background: none;
    margin: 0;
    padding: 0;
}

#modal-recommendation .spotify-link {
    margin-top: 1.5rem;
    display: inline-block;
}

/* MOBILE */
@media (max-width: 992px) {
    .about-flex {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-content h1 {
        font-size: 3.2rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 14px 20px;
    }

    nav ul {
        display: none;
        /* Add hamburger later if needed */
    }

    .hero-content {
        padding-left: 20px;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-left-col {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .section {
        padding: 80px 0;
    }
}