:root {
    --bg-dark: #1a1a1f; 
    --bg-darker: #121215;
    --bg-card: #24242b;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --sunrise-purple: #5F236B;
    --sunrise-berry: #BE375F;
    --sunrise-orange: #ED8554;
    --sunrise-yellow: #F5EB6D;
    --gradient-sunrise: linear-gradient(90deg, var(--sunrise-purple), var(--sunrise-berry), var(--sunrise-orange), var(--sunrise-yellow));
    --wave-rgb: 255, 255, 255; 
    --wave-hex: #2dc4ff;     
}

/* --- Resets & Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    cursor: none !important;
}

::selection {
    background: var(--sunrise-berry);
    color: var(--text-main);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; 
    z-index: 9999; 
    opacity: 0.04; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Centered Hero Section --- */
.hero-centered {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, var(--bg-card) 0%, var(--bg-dark) 100%);
    padding: 0 5%;
    position: relative;
    z-index: 1;
    overflow: visible; 
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    z-index: 2;
}

.pfp-wrapper {
    margin-bottom: 2rem;
    position: relative;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-sunrise);
    animation: float 6s ease-in-out infinite;
}

.pfp-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg-dark);
    display: block;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.main-name {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    text-transform: uppercase;
    text-shadow: 1.5px 0px 0px rgba(255, 0, 0, 0.7), -1.5px 0px 0px rgba(0, 255, 98, 0.7);  /* (0, 255, 255, 0.7);  */
}

.dynamic-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.typing-text {
    color: var(--sunrise-orange);
    font-weight: 600;
}

.cursor {
    animation: blink 1s infinite;
    background-color: var(--sunrise-berry);
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.short-bio {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* NEW: Hero Skill Tags */
.hero-skill-tags {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-skill-tags span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--sunrise-orange);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, text-shadow 0.3s ease;
}

.btn:hover {
    background: var(--sunrise-yellow);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(237, 133, 84, 0.2);
    text-shadow: 1px 0px 0px rgba(255, 0, 0, 0.6), -1px 0px 0px rgba(0, 255, 255, 0.6); 
}

.btn-outline {
    background: transparent;
    color: var(--sunrise-orange);
    border: 2px solid var(--sunrise-orange);
}

.btn-outline:hover {
    background: var(--sunrise-orange);
    color: #fff;
}

/* --- Minimalist Animated Waves --- */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25vh;
    min-height: 150px;
    z-index: 1; 
    pointer-events: none; 
}

.waves {
    position: relative;
    width: 100%;
    height: 100%;
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}

.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 12s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 18s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 25s; }

@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

.wave-layer-1 { fill: rgba(var(--wave-rgb), 0.05); }
.wave-layer-2 { fill: rgba(var(--wave-rgb), 0.1); }
.wave-layer-3 { fill: transparent; stroke: var(--wave-hex); stroke-width: 0.3; }

/* --- Cinematic Scroll Showcase --- */
.scroll-showcase {
    min-height: 60vh; 
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    padding: 80px 10%;
    position: relative; 
    z-index: 10; 
    overflow: visible; 
}

.showcase-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.showcase-text {
    flex: 1;
    z-index: 10;
}

.showcase-visual {
    flex: 1;
    position: relative;
    height: 450px; 
    display: flex;
    justify-content: flex-end;
    align-items: flex-end; 
    perspective: 1000px;
    overflow: visible;
}

.stack-card {
    position: absolute;
    width: 320px;
    height: 450px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: -10px 10px 30px rgba(0,0,0,0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-origin: center center;
    transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
    right: 5%; 
}

@media (max-width: 900px) {
    .showcase-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .showcase-visual {
        width: 100%;
        justify-content: center;
        margin-top: 3rem;
    }
    .stack-card {
        right: auto;
    }
}

/* --- Sections & Portfolio Grid --- */
section {
    padding: 100px 10%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    text-shadow: 1px 0px 0px rgba(255, 0, 0, 0.5), -1px 0px 0px rgba(0, 255, 255, 0.5); 
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 4px;
    background: var(--gradient-sunrise);
    border-radius: 2px;
}

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

.card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: none; 
    border-bottom: 3px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    border-bottom: 3px solid var(--sunrise-berry);
}

.card-img {
    height: 250px;
    width: 100%;
    opacity: 0.9;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-info {
    padding: 1.5rem;
}

.card-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Contact & Footer --- */
.contact {
    text-align: center;
    background: var(--bg-darker);
}

.contact .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.contact p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

footer {
    text-align: center;
    padding: 2rem;
    background: #0d0d11;
    color: #555;
    font-size: 0.9rem;
}

/* --- JS Animation Classes --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

/* --- Modals Common --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-darker);
    overflow-y: auto; 
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    padding: 80px 5%;
    max-width: 1200px;
    margin: auto;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn, .close-app-btn, .close-web-btn, .close-media-btn {
    position: absolute;
    top: 20px;
    right: 5%;
    color: var(--text-muted);
    font-size: 3rem;
    font-weight: 300;
    transition: color 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.close-btn:hover, .close-app-btn:hover, .close-web-btn:hover, .close-media-btn:hover {
    color: var(--sunrise-orange);
}

.modal-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.modal-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* --- Graphic Design Modal (Masonry) --- */
.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.masonry-item {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.8);
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(18, 18, 21, 0.9), transparent);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none; 
}

.item-overlay h4 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.item-overlay p {
    color: var(--sunrise-orange);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.masonry-item:hover img {
    transform: scale(1.03);
    filter: brightness(1);
}

.masonry-item:hover .item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.no-scroll { overflow: hidden; }

/* --- Web Design Modal (Scrolling Browsers) --- */
.web-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.web-item {
    display: flex;
    flex-direction: column;
}

.browser-window {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.browser-window:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.browser-header {
    height: 30px;
    background: #1a1a1f;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: #ff5f56; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #27c93f; }

.browser-content {
    height: 350px; 
    overflow: hidden; 
    position: relative;
}

.browser-content img {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 4s ease-in-out; 
}

.browser-window:hover .browser-content img {
    transform: translateY(calc(-100% + 350px)); 
}

.web-info {
    padding-top: 1.5rem;
}

.web-info h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.web-info p {
    color: var(--sunrise-orange);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.web-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.web-link:hover {
    color: var(--text-main);
    border-bottom: 1px solid var(--text-main);
}

/* --- Dedicated App Showcase Modal (Real Aliens) --- */
.app-showcase-content {
    max-width: 1000px;
    padding: 0; 
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5vh;
}

.close-app-btn {
    right: 25px; 
}

.app-split-layout {
    display: flex;
    flex-wrap: wrap;
}

.app-visual {
    flex: 1;
    min-width: 300px;
    background: radial-gradient(circle at center, #2a2a35 0%, var(--bg-card) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.phone-mockup {
    max-height: 60vh;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: translateY(-10px);
}

.app-details {
    flex: 1;
    min-width: 300px;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pre-title {
    color: var(--sunrise-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.app-title {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.tech-tag {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.app-description {
    color: #bbb;
    line-height: 1.8;
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

.app-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .masonry-grid { column-count: 2; }
}
@media (max-width: 768px) {
    .pfp-image { width: 150px; height: 150px; }
    .app-details { padding: 3rem 2rem; }
    .app-title { font-size: 2.5rem; }
}
@media (max-width: 600px) {
    .masonry-grid { column-count: 1; }
    .web-grid { grid-template-columns: 1fr; }
}

/* --- Photo & Video Modal (Film Strip) --- */
.media-content {
    max-width: 1400px; 
}

.film-strip {
    display: flex;
    gap: 3rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    padding-top: 1rem;
    scroll-snap-type: x mandatory; 
    scrollbar-width: thin;
    scrollbar-color: var(--sunrise-orange) var(--bg-card);
}

.film-strip::-webkit-scrollbar {
    height: 8px;
}
.film-strip::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 10px;
}
.film-strip::-webkit-scrollbar-thumb {
    background: var(--sunrise-orange);
    border-radius: 10px;
}

.media-item {
    flex: 0 0 85%; 
    max-width: 1000px;
    scroll-snap-align: center; 
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.media-item img, .media-item video {
    width: 100%;
    height: 650px; 
    object-fit: cover; 
    display: block;
}

.media-item-title {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(18, 18, 21, 0.85);
    backdrop-filter: blur(10px);
    padding: 10px 25px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1.2rem;
    border-left: 4px solid var(--sunrise-orange);
}

@media (max-width: 768px) {
    .media-item { flex: 0 0 95%; }
    .media-item img, .media-item video { height: 400px; }
    .media-item-title { bottom: 15px; left: 15px; font-size: 1rem; }
}

/* --- Custom Blend-Mode Cursor --- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: #ffee00;
    border-radius: 50%; 
    pointer-events: none; 
    z-index: 99999; 
    transform: translate(-50%, -50%); 
    mix-blend-mode: difference; 
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                height 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                background-color 0.3s ease;
}

.custom-cursor.hovering {
    width: 50px; 
    height: 50px;
    background-color: #ffffff;
    transform: translate(-50%, -50%);
}

.pfp-wrapper {
    transition: transform 0.3s ease, filter 0.3s ease;
}
.pfp-wrapper:hover {
    transform: scale(1.05) translateY(-10px);
    filter: brightness(1.2);
}

/* --- Story Modal Styles --- */
.story-content {
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 0;
    margin: 0;
    max-width: 100%;
}

.story-container {
    position: relative;
    max-width: 450px; 
    width: 90%;
    height: 75vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    background: var(--bg-darker);
}

.story-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.close-story-btn {
    position: absolute;
    top: 20px;
    right: 5%;
    color: var(--text-main);
    font-size: 3rem;
    z-index: 10001;
}

.close-story-btn:hover {
    color: var(--sunrise-orange);
}

.story-hint {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.story-progress-container {
    position: absolute;
    top: 10px;
    left: 5%;
    width: 90%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 10002;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    border-radius: 2px;
    transform-origin: left;
}

.story-progress-fill.active {
    animation: storyProgress 5s linear forwards;
}

.story-progress-fill.paused {
    animation-play-state: paused;
}

@keyframes storyProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
    * {
        cursor: auto !important;
    }
    a, button, .pfp-wrapper, .card, .close-btn, .close-app-btn, .close-web-btn, .close-media-btn, .close-story-btn, .story-container {
        cursor: pointer !important;
    }
}

/* Optional: Keep the recording pulse for your Photo/Video card */
.record-pulse {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 15px;
    height: 15px;
    background: var(--sunrise-orange);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--sunrise-orange);
    animation: pulseLight 2s infinite;
}

@keyframes pulseLight {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(237, 133, 84, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(237, 133, 84, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(237, 133, 84, 0); }
}

/* --- Custom Entire Page Scrollbar --- */
::-webkit-scrollbar {
    width: 12px; /* Width of the vertical scrollbar */
}

::-webkit-scrollbar-track {
    background: var(--bg-dark); 
}

::-webkit-scrollbar-thumb {
    background: var(--sunrise-orange);
    border-radius: 10px;
    border: 3px solid var(--bg-dark); /* Creates a nice padded effect around the thumb */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sunrise-yellow);
}

/* --- 3D Showcase Section --- */
#three-d-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.model-container {
    width: 100%;
    height: 500px;
    max-width: 900px;
    /* Uses your existing colors for a seamless backdrop */
    background: radial-gradient(circle at center, var(--bg-card) 0%, var(--bg-darker) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    position: relative;
}

/* Treat the custom element just like a standard block element */
model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent; /* Removes default gray loading flash */
    outline: none; /* Removes focus outline when user clicks to drag */
}

/* --- Bokeh Intro Overlay --- */
#bokeh-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark); /* Matches your site background perfectly */
    z-index: 100000; /* Sits on top of EVERYTHING including the cursor */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 1s ease-in-out;
}

.bokeh-bubble {
    position: absolute;
    bottom: -150px; /* Start hidden below the screen */
    border-radius: 50%;
    mix-blend-mode: screen; /* Gives them that glowing, overlapping light effect */
    animation: floatUp ease-in forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    20% {
        opacity: 0.8; /* Fade in as they rise */
    }
    100% {
        transform: translateY(-120vh) scale(1.5); /* Float way past the top of the screen */
        opacity: 0; /* Fade out at the top */
    }
}

.hide-overlay {
    opacity: 0 !important;
    pointer-events: none; /* Allows clicks to pass through as it fades */
}
/* Individual cartoon smoke puffs */
.smoke-puff {
    position: absolute;
    border-radius: 50%;
    /* Flat comic colors instead of gradients/blur */
    background-color: #f4f4f5; 
    border: 6px solid #121215; /* Thick comic outline */
    box-shadow: -10px 10px 0px var(--sunrise-orange); /* Hard pop-art shadow */
    transform: translate(-50%, -50%) scale(0);
    /* Snappy cubic-bezier curve for a bouncy cartoon feel */
    animation: cartoonSmoke 3s forwards cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Bouncy pop, then expands to fill the screen */
@keyframes cartoonSmoke {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); }
    15% { transform: translate(-50%, -50%) scale(1.5) rotate(5deg); } /* Snappy pop */
    100% { transform: translate(-50%, -50%) scale(20) rotate(20deg); } /* Slow fill */
}

/* ZERO OPACITY: We use a cartoon circle close (like Looney Tunes) to vanish! */
.fade-out-screen {
    animation: cartoonClose 1s forwards cubic-bezier(0.5, 0, 0.1, 1);
}

@keyframes cartoonClose {
    0% { clip-path: circle(150% at 50% 50%); }
    100% { clip-path: circle(0% at 50% 50%); }
}

/* --- Rocket & Smoke Launch Sequence Base --- */
#rocket-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; 
    z-index: 100000;
    display: none; /* Keeps it invisible until you click the astronaut */
    overflow: hidden;
}

#rocket-model {
    position: absolute;
    left: 50%;
    bottom: -300px; /* Starts hidden below the screen */
    transform: translateX(-50%);
    width: 200px;
    height: 400px;
    /* The flight speed! 2 seconds to reach the top */
    transition: bottom 2s cubic-bezier(0.4, 0, 0.8, 1); 
}

/* Individual cartoon smoke puffs */
.smoke-puff {
    position: absolute;
    border-radius: 50%;
    
    /* 1. FRONT LAYER: Beige/White */
    background-color: #f5f5dc; 
    
    /* Optional: A thick outline keeps the cartoon style sharp */
    border: 5px solid #121215; 
    
    /* 2 & 3. MULTIPLE SHADOW LAYERS */
    box-shadow: 
        -10px 10px 0px #4a4a52, /* MIDDLE LAYER: Dark Gray */
        -20px 20px 0px #e62e2e; /* BACK LAYER: Red */
        
    transform: translate(-50%, -50%) scale(0);
    animation: cartoonSmoke 3s forwards cubic-bezier(0.1, 0.8, 0.2, 1);
}
/* Individual cartoon smoke puffs (Clean 3-Layer Style) */
.smoke-puff {
    position: absolute;
    border-radius: 50%;
    
    /* 1. FRONT: Beige/White */
    background-color: #f5f5dc; 
    
    /* Removed the black border! */
    border: none;
    
    /* 2 & 3. BACK LAYERS: Dark Gray and Red */
    box-shadow: 
        -15px 15px 0px #333333, /* Dark Gray */
        -30px 30px 0px #e62e2e; /* Red */
        
    transform: translate(-50%, -50%) scale(0);
    animation: cartoonSmoke 3s forwards cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* --- Desert Scene Transition --- */
#desert-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background-color: #f5f5dc; /* Matches the front smoke layer exactly */
    z-index: 100001; /* Sits above the rocket overlay */
    display: none; /* Hidden until triggered */
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* The text that gets revealed */
.desert-text {
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 800;
    color: #121215; /* Dark color to contrast with the beige */
    text-transform: uppercase;
    letter-spacing: 2px;
    /* This completely hides the text by clipping it to the left edge */
    clip-path: inset(0 100% 0 0); 
}

/* The class we add with JS to trigger the wipe effect */
.reveal-text {
    /* 1s to wipe across, delayed by 1.2s so it waits for the tumbleweed to reach it */
    animation: textWipe 1s linear forwards;
    animation-delay: 1.2s; 
}

@keyframes textWipe {
    to { clip-path: inset(0 0 0 0); } /* Fully un-clips the text */
}

/* The Tumbleweed */
.tumbleweed {
    position: absolute;
    bottom: 20%;
    left: -250px; /* Start way off screen to the left */
    width: 180px;
    height: auto;
    filter: drop-shadow(-10px 10px 0px rgba(0,0,0,0.1)); /* Soft shadow for depth */
}

/* The rolling and bouncing animation */
.roll {
    animation: 
        rollAcross 3.5s linear forwards, 
        bounce 0.6s infinite alternate cubic-bezier(0.5, 0.05, 1, 0.5);
}

@keyframes rollAcross {
    0% { left: -250px; transform: rotate(0deg); }
    100% { left: 110vw; transform: rotate(1080deg); } /* Spins 3 times as it crosses */
}

@keyframes bounce {
    0% { bottom: 20%; }
    100% { bottom: 26%; } /* Creates the hopping effect */
}

/* Final fade back to your portfolio */
.fade-out-desert {
    animation: fadeScreen 1.5s forwards ease-in-out;
}
@keyframes fadeScreen {
    0% { opacity: 1; }
    100% { opacity: 0; }
}