/* === WELCOME SCREEN === */
#welcome-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.2s;
    opacity: 1;
}
#welcome-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}
.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}
.welcome-gif {
    width: 180px;
    max-width: 60vw;
    margin-bottom: 20px;
    image-rendering: pixelated;
    opacity: .5;
}
.welcome-text {
    text-align: center;
}
.welcome-title {
    font-size: 2.5rem;
    font-family: 'Agency Regular', sans-serif;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px #222;
}
.welcome-sub {
    font-size: 1.3rem;
    color: #aaa;
    margin-top: 8px;
    letter-spacing: 1px;
}
/* Ensure bike-video stays above background but below overlay */
.bike-video {
    z-index: 6;
    image-rendering: smooth;
}
#welcome-screen .welcome-gif {
    z-index: 1010;
    opacity: 1;
}

@font-face {
    font-family: 'Urbanist';
    src: url('Urbanist-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Agency Regular';
    src: url('agency.otf') format('opentype');
}

@font-face {
    font-family: 'Didact Gothic';
    src: url('DidactGothic-Regular.ttf') format('truetype');
}
body {
    margin: 0;
    font-family: 'Urbanist', Arial, sans-serif;
    color: #222;
    opacity: 1;
    overflow-x: hidden;
}
/* Project card styles for new look */
.project-card {
    background: rgba(176, 174, 174, 0.85);
    border-radius: 0;
    box-shadow: 0 1px 4px #0004;
    padding: 1em;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow 0.2s;
    font-family: 'Urbanist', Arial, sans-serif;
    position: relative;
}
.project-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25em;
}

.project-genre {
    color: #bbbbbb;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.6em;
}

.project-desc {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.6;
}
.project-thumb {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 1em;
    border-radius: 0;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(200, 200, 200, 0.133);
}
.play-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: #222;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px #0006;
    cursor: pointer;
    transition: background 0.2s;
}
.play-btn:hover {
    background: #444;
}
.play-btn svg {
    width: 22px;
    height: 22px;
    fill: #8fd6ff;
}

:root {
    --fg-speed: 40s;
    --mid-speed: 80s;
    --fg-direction: -1;
    --mid-direction: -1;
    --bg-offset: 0px;
    --mid-offset: 0px;
    --fg-offset: 0px;
}

header {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 10;
}
.name {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}
nav a {
    color: #444;
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
    background-position: center bottom;
    background-size: auto 100%;
}
.sky {
    background-image: url('sky.png');
    transform: translateY(var(--bg-offset));
}
.midground {
    background-image: url('midground.png');
    animation: drift var(--mid-speed) linear infinite;
    animation-direction: var(--mid-direction, -1) == -1 ? reverse : normal;
    transform: translateY(var(--mid-offset));
}
.foreground {
    background-image: url('foreground.png');
    animation: drift var(--fg-speed) linear infinite;
    animation-direction: var(--fg-direction, -1) == -1 ? reverse : normal;
    transform: translateY(var(--fg-offset));
}

@keyframes drift {
    0% { transform: translateX(0) translateY(var(--mid-offset, var(--fg-offset, var(--bg-offset)))); }
    100% { transform: translateX(-50%) translateY(var(--mid-offset, var(--fg-offset, var(--bg-offset)))); }
}

.text-overlay {
    position: relative;
    z-index: 5;
    font-size: 10rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    letter-spacing: 0px;
    pointer-events: none;
    font-family: 'Agency Regular', Arial, sans-serif;
}
.text-cycle {
    position: relative;
    width: max-content;
    margin: 0 auto;
}
.text-cycle span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(240px);
    opacity: 0;
    line-height: 0.8;
    animation: fadeCycle 20s infinite;
    white-space: nowrap;
    display: inline-block;
}
.text-cycle span:nth-child(1) { animation-delay: 0s; }
.text-cycle span:nth-child(2) { animation-delay: 4s; }
.text-cycle span:nth-child(3) { animation-delay: 8s; }
.text-cycle span:nth-child(4) { animation-delay: 12s; }
.text-cycle span:nth-child(5) { animation-delay: 16s; }
@keyframes fadeCycle {
    0% { opacity: 0; }
    5% { opacity: 1; }
    20% { opacity: 1; }
    25% { opacity: 0; }
    100% { opacity: 0; }
}

.bike-video {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    max-width: 150px;
    opacity: 0.9;
    pointer-events: none;
    image-rendering: pixelated;
}

.portfolio {
    background: #000;
    padding: 80px 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

@media (max-width: 768px) {
    .text-overlay { font-size: 4.5rem; }
    header { flex-direction: column; align-items: center; }
    nav ul { flex-direction: column; gap: 10px; }
    .bike-video { max-width: 150px; bottom: 10%; }
}
