:root {
    --bg-color: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #a86c6b;
    --card-bg: #1c1c1c;
    --transition-speed: 0.4s;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(17, 17, 17, 0.9), rgba(17, 17, 17, 0));
    pointer-events: none;
}

.nav-links {
    pointer-events: auto;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: capitalize;
    transition: color var(--transition-speed) ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

/* Main Layout */
main {
    padding-top: 8rem;
    padding-bottom: 4rem;
}

/* Work Section (Slider) */
.section-work {
    padding: 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.projects-slider {
    display: flex;
    gap: 4rem;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 2rem calc(50vw - 30vw); /* Centers a 60vw card */
    scrollbar-width: none; /* Firefox */
}

.projects-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.project-card {
    flex-shrink: 0;
    width: 60vw;
    aspect-ratio: 16 / 9;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: center;
    background-color: var(--card-bg);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
    transform: scale(0.7);
    opacity: 0.4;
    cursor: grab;
}

.project-card:active {
    cursor: grabbing;
}

.project-card.active {
    transform: scale(1);
    opacity: 1;
    cursor: pointer;
}

.media-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none; /* Prevent video interfering with scroll drag if any */
}

.project-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Removed the hover scale effect for the video since the card itself scales */
}

.project-info {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 1;
    transform: translateY(0);
}

a.project-card .project-info::after {
    content: "Play on Itch.io →";
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

a.project-card.active .project-info::after {
    opacity: 1;
    transform: translateY(0);
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.desc-container {
    max-height: 4.2em; /* ~3 lines of text */
    overflow: hidden;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.desc-container p {
    font-size: 0.9rem;
    color: #cccccc;
    margin: 0;
    padding-bottom: 1rem; /* space at the bottom for looping smoothly */
}

/* Added dynamically by JS if text overflows */
.desc-container p.needs-scroll {
    animation: scroll-text 10s linear infinite;
}

@keyframes scroll-text {
    0%, 15% { transform: translateY(0); }
    85%, 100% { transform: translateY(calc(-100% + 4.2em - 1rem)); } /* Scrolls exactly to the bottom */
}

/* Swipe Indicator */
.swipe-indicator {
    display: none;
}

/* About Section */
.section-about {
    padding: 8rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
}

.about-image-wrapper {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    max-width: 600px;
}

.about-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.about-content .subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.about-content .bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

a.project-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Footer Section */
.site-footer {
    padding: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .about-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .projects-slider {
        display: grid;
        grid-template-rows: 1fr 1fr;
        grid-auto-flow: column;
        grid-auto-columns: 80vw;
        gap: 1.5rem;
        padding: 2rem calc(50vw - 40vw);
        align-items: center;
    }
    
    .project-card {
        width: 100%;
    }

    .project-info {
        padding: 1rem;
    }

    .project-info h3 {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }

    .desc-container p {
        font-size: 0.8rem;
        padding-bottom: 0.5rem;
    }

    .desc-container {
        max-height: 3.8em;
    }

    a.project-card .project-info::after {
        margin-top: 0.4rem;
        font-size: 0.75rem;
    }

    .swipe-indicator {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1.5rem;
        font-size: 0.85rem;
        color: var(--text-secondary);
        opacity: 0.7;
        animation: pulse-swipe 2s infinite;
    }

    @keyframes pulse-swipe {
        0%, 100% { opacity: 0.4; transform: translateX(0); }
        50% { opacity: 1; transform: translateX(5px); }
    }

    .section-about {
        padding: 4rem 2rem;
    }
}
