:root {
    --bg-color: #f4f1e8;
    --text-color: black;
    --accent: #dbd7cc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor to use custom web cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    line-height: 1;
}

::selection {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Custom Cursor */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--text-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s, border-color 0.3s;
}

.cursor-follower.active {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #FF0055, #FF9900, #00FF66, #00CCFF, #9900FF);
    background-size: 300% 300%;
    animation: rainbowCursor 3s ease infinite;
    mix-blend-mode: difference;
    border-color: transparent;
}

@keyframes rainbowCursor {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Nav */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 5vw;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(244, 241, 232, 0.8);
}

.logo-container {
    position: relative;
    width: 250px;
    height: 50px;
}

.logo-text-1, .logo-text-2 {
    position: absolute;
    left: 0;
    display: flex;
}

.logo-text-1 {
    top: 0;
}

.logo-text-2 {
    top: 32px;
}

.logo-text-1 span, .logo-text-2 span {
    display: inline-block;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: calc(var(--i) * 0.03s);
}

.logo-text-1 span {
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: var(--text-color);
}

.logo-text-2 span {
    font-size: 0.9rem;
    font-weight: 400;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Swapped state styles applied to spans via transform */
.logo-container.swapped .logo-text-1 span {
    font-size: 0.9rem;
    font-weight: 400;
    color: #888;
    letter-spacing: 0.05em;
    transform: translateY(32px);
}

.logo-container.swapped .logo-text-2 span {
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--text-color);
    letter-spacing: -0.05em;
    transform: translateY(-32px);
}

.status {
    font-weight: 400;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #a0a0a0;
}

.status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #00FF66;
    /* Vibrant Green */
    box-shadow: 0 0 10px #00FF66;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}


/* Hero */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 5vw;
    position: relative;
}

.hero-text {
    font-size: clamp(4rem, 15vw, 14rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
    position: relative;
    color: rgba(0, 0, 0, 0.15);
    /* Clean, faded solid color instead of outline */
    transform-origin: left center;
    transition: color 0.4s ease, transform 0.4s ease;
}

.hero-text:hover {
    color: var(--text-color);
    transform: scale(1.05);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 5vh;
    left: 5vw;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-text {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scroll-line {
    width: 2px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--text-color);
    animation: scrollAnimation 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollAnimation {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    50.1% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Work Interaction */
.work {
    padding: 10rem 5vw;
    display: flex;
    flex-direction: column;
}

.project {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.project:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.project h2 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), color 0.3s;
}

.project span {
    font-size: clamp(1rem, 2vw, 1.8rem);
    color: #666;
    font-weight: 400;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), color 0.3s;
}

/* Hover effects */
.project:hover h2 {
    transform: translateX(3rem);
    color: var(--text-color);
}

.project:hover span {
    transform: translateX(-3rem);
    color: var(--text-color);
}

/* Hover Image Reveal (The magic part) */
.hover-image-reveal {
    position: fixed;
    top: 0;
    left: 0;
    width: 20vw;
    height: 30vh;
    pointer-events: none;
    opacity: 0;
    z-index: 5;
    transition: opacity 0.4s ease;
}

.stack-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
}

.stack-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease;
}

/* Contact Marquee */
.contact {
    padding: 8rem 0 12rem;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-link {
    text-decoration: none;
    color: var(--text-color);
}

.marquee {
    display: inline-block;
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
    animation: scroll 25s linear infinite;
    color: rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.marquee:hover {
    color: var(--accent);
    /* Highlight cleanly on hover */
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Mobile Fallbacks */
@media (max-width: 900px) {
    * {
        cursor: auto;
    }

    /* Revert to normal cursor on touch/mobile */
    .cursor,
    .cursor-follower {
        display: none;
    }

    nav {
        padding: 1.5rem 5vw;
    }

    .project {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 3rem 0;
    }

    .project:hover h2 {
        transform: translateX(0);
    }

    .project:hover span {
        transform: translateX(0);
    }

    /* Reveal images inline for mobile instead of cursor-following */
    .hover-image-reveal {
        display: none;
    }
}