body {
    margin: 0;
    padding: 0;
    background-color: #000000;
    font-family: "Lucida Sans Typewriter", "Lucida Console", monospace;
    color: white;
    /* Static background image */
    background-image: url('assets/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Layer for scrolling backdrop */
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/backdrop.png');
    background-size: cover;
    background-position: center;
    /* Infinite scrolling animation */
    animation: scrollBackdrop 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

.pipes {
    position: absolute;
    top: -400;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
    opacity: 0.2;
}

.hand {
    position: absolute;
    top: 200px;
    left: -465px;
    opacity: 1;
    transition: transform 0.9s ease;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
    transform: translateY(-100%);
    animation: slideDown 0.45s ease forwards;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.topbar.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.topbar-inner {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 14px 20px;
}

.topbar-button {
    color: rgb(62, 226, 29);
    text-decoration: none;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.topbar-button:hover {
    background-color: rgb(23, 107, 15);
    transform: translateY(-1px);
}

.page-content {
    padding: 100px 40px 40px;
    width: 100%;
    margin: 0;
    background-image: url('assets/portbg.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 40px;
}

.text-content {
    flex: 1;
}

.portrait {
    max-width: 300px;
    width: 100%;
    height: auto;
}

.creator {
    color: white;
    text-align: left;
}

.box {
    display: block;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    font-size: 20px;
    margin: 20px 0;
    border-radius: 12px;
    background: transparent;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
    stroke: black;
    stroke-color: black;
    stroke-width: 25px;
    color: #ffffff;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scrollBackdrop {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .page-content {
        flex-direction: column;
        padding: 100px 20px 40px;
        gap: 20px;
    }
    
    .portrait {
        max-width: 250px;
        order: -1; /* Move portrait above text on mobile */
    }
}

.main-content {
    position: relative;
    padding: 120px 0 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 24px;
    padding: 0 40px;
    box-sizing: border-box;
    overflow: visible;
}

@media (max-width: 760px) {
    .project-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .project-card {
        min-width: auto;
    }
}

.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    margin: 0 0 10px;
    font-size: 3rem;
}

.page-header p {
    margin: 0;
    color: #d4d4d4;
    max-width: 700px;
    line-height: 1.6;
}

.project-card {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    min-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, border-color 0.25s ease;
    opacity: 0;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

.project-card:nth-of-type(odd) {
    transform: translateX(-18px);
    animation-name: cardFadeInLeft;
}

.project-card:nth-of-type(even) {
    transform: translateX(18px);
    animation-name: cardFadeInRight;
}

.project-card:nth-of-type(odd):hover {
    transform: translateX(-18px) translateY(-6px);
    border-color: rgba(62, 226, 29, 0.5);
}

.project-card:nth-of-type(even):hover {
    transform: translateX(18px) translateY(-6px);
    border-color: rgba(62, 226, 29, 0.5);
}

.project-card img {
    width: 100%;
    display: block;
    object-fit: cover;
    height: 200px;
}

.project-info {
    padding: 24px;
}

.project-info h2 {
    margin: 0 0 10px;
    font-size: 1.6rem;
}

.project-info p {
    margin: 0 0 18px;
    color: #cccccc;
    line-height: 1.5;
}

.project-link {
    display: inline-block;
    color: rgb(62, 226, 29);
    text-decoration: none;
    border: 1px solid rgba(62, 226, 29, 0.8);
    padding: 10px 16px;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.project-link:hover {
    background-color: rgb(62, 226, 29);
    color: #0a0a0a;
}

@keyframes cardFadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-120px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateX(-18px) scale(1);
    }
}

@keyframes cardFadeInRight {
    0% {
        opacity: 0;
        transform: translateX(120px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateX(18px) scale(1);
    }
}

/* Collaborative Cursor Styles */
#remote-cursors {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.remote-cursor {
    position: absolute;
    pointer-events: none;
    transition: all 0.1s ease-out;
    display: none;
}

.cursor-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.cursor-label {
    display: none; /* Hide user labels */
}

.cursor-active {
    animation: cursorPulse 0.2s ease-out;
}

@keyframes cursorPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Hide cursors on mobile for performance */
@media (max-width: 768px) {
    #remote-cursors {
        display: none;
    }
}
.bf {
    position: absolute;
    top: 1155px;
    left: 1100px;
    transform: translateX(-50%);
    width: 80%;
    max-width: 300px;
}