/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d4af37;
    --secondary-color: #ffd700;
    --dark-bg: #0a0a0a;
    --dark-gray: #1a1a1a;
    --light-gray: #2a2a2a;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --overlay-dark: rgba(0, 0, 0, 0.85);
}

html {
    scroll-behavior: smooth;
    background-attachment: scroll;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('images/stone_texture_tileable.png') repeat;
    background-attachment: scroll;
    background-size: 170px;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Banner Overlay Navigation */
.banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Hero Section with Parallax */
.hero {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: url('images/cropped-header-1024x261_Overlay.png') center top/auto 42% no-repeat;
    /* background-attachment: fixed;*/
    overflow: visible;
    z-index: 100;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 101;
}

.hero-content {
    position: relative;
    z-index: 102;
    padding: 1rem 2rem;
    background: url('images/wood_texture_horizontal_256.png') repeat;
    background-size: 334px;
    border-radius: 8px;
    box-shadow: 
        inset 0px -8px 0px rgba(80, 50, 30, 0.8),
        inset 0px 8px 0px rgba(200, 150, 100, 0.6),
        inset -8px 0px 0px rgba(120, 80, 50, 0.7),
        inset 8px 0px 0px rgba(120, 80, 50, 0.7),
        0px 24px 36px rgba(0, 0, 0, 0.6);
    margin-top: 40vh;
}

.hero-content::before {
    content: '';
    position: absolute;
    left: 14px;
    top: -5000px;
    width: 56px;
    height: 5000px;
    background: url('images/Chains_left_side_256.png') repeat-y bottom;
    background-size: 56px auto;
    pointer-events: none;
    z-index: -10;
}

.hero-content::after {
    content: '';
    position: absolute;
    right: 14px;
    top: -5000px;
    width: 56px;
    height: 5000px;
    background: url('images/Chains_right_side_256.png') repeat-y bottom;
    background-size: 56px auto;
    pointer-events: none;
    z-index: -10;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: url('images/Metal_Texture_tileable.png') repeat;
    background-size: 150px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.6)
            drop-shadow(0px -3px 0px rgba(200, 200, 210, 1)) 
            drop-shadow(0px 3px 0px rgba(60, 60, 70, 1))
            drop-shadow(0px 5px 3px rgba(0, 0, 0, 0.8));
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: url('images/Metal_Texture_tileable.png') repeat;
    background-size: 150px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.6)
            drop-shadow(0px -2px 0px rgba(200, 200, 210, 1)) 
            drop-shadow(0px 2px 0px rgba(60, 60, 70, 1))
            drop-shadow(0px 4px 2px rgba(0, 0, 0, 0.8));
    position: relative;
    z-index: 1;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: url('images/banner_texture_256_white_papyrus_tileable.png') repeat;
    background-size: 150px;
    color: var(--dark-bg);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--primary-color);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.7);
    border-color: var(--secondary-color);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* About Section */
.about-section {
    padding: 10rem 0 8rem 0;
    background: transparent;
}

.about-section .container {
    position: relative;
}

.about-content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    background: url('images/wood_texture_horizontal_256.png') repeat;
    background-size: 200px;
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 
        inset 0px -6px 0px rgba(80, 50, 30, 0.8),
        inset 0px 6px 0px rgba(200, 150, 100, 0.6),
        inset -6px 0px 0px rgba(120, 80, 50, 0.7),
        inset 6px 0px 0px rgba(120, 80, 50, 0.7),
        0px 21px 33px rgba(0, 0, 0, 0.6);
}

.about-content::before {
    content: '';
    position: absolute;
    left: 10px;
    top: -5000px;
    width: 40px;
    height: 5010px;
    background: url('images/Chains_left_side_256.png') repeat-y bottom;
    background-size: 40px auto;
    pointer-events: none;
    z-index: -10;
}

.about-content::after {
    content: '';
    position: absolute;
    right: 10px;
    top: -5000px;
    width: 40px;
    height: 5010px;
    background: url('images/Chains_right_side_256.png') repeat-y bottom;
    background-size: 40px auto;
    pointer-events: none;
    z-index: -10;
}

.profile-image-container {
    position: relative;
    z-index: 10;
}

.profile-image {
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    border: 3px solid var(--primary-color);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.5);
}

.about-text {
    position: relative;
    z-index: 10;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: url('images/Metal_Texture_tileable.png') repeat;
    background-size: 150px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.6)
            drop-shadow(0px -3px 0px rgba(200, 200, 210, 1)) 
            drop-shadow(0px 3px 0px rgba(60, 60, 70, 1))
            drop-shadow(0px 5px 3px rgba(0, 0, 0, 0.8));
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Skills */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.skill-tag {
    padding: 0.7rem 1.5rem;
    background: var(--light-gray);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.6);
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Flying Arrow */
.flying-arrow {
    position: absolute;
    right: 30px;
    top: 30px;
    width: 120px;
    height: auto;
    transform-origin: bottom left;
    visibility: hidden;
    opacity: 1;
    transform: translateX(600px) translateY(-200px) scale(1.5) rotate(-20deg);
    pointer-events: none;
    z-index: 999;
    transition: none;
}

.flying-arrow.fly-in {
    visibility: visible;
    animation: arrowFlyIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.flying-arrow.wiggle {
    visibility: visible;
    animation: arrowWiggle 0.6s ease-in-out forwards;
}

.flying-arrow.stuck {
    /* Final stuck state is maintained by animation-fill-mode: forwards */
    visibility: visible;
    opacity: 1;
}

.flying-arrow.fly-out {
    visibility: visible;
    animation: arrowFlyOut .3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes arrowFlyIn {
    0% {
        opacity: 1;
        transform: translateX(600px) translateY(-200px) scale(1.5) rotate(-20deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1) rotate(-5deg);
    }
}

@keyframes arrowWiggle {
    0%, 100% {
        transform: translateX(0) translateY(0) scale(1) rotate(-5deg);
    }
    25% {
        transform: translateX(0) translateY(0) scale(1) rotate(-10deg);
    }
    50% {
        transform: translateX(0) translateY(0) scale(1) rotate(0deg);
    }
    75% {
        transform: translateX(0) translateY(0) scale(1) rotate(-8deg);
    }
}

@keyframes arrowFlyOut {
    0% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1) rotate(-5deg);
    }
    99% {
        opacity: 1;
        transform: translateX(600px) translateY(-200px) scale(1.5) rotate(-20deg);
    }
    100% {
        opacity: 0;
        visibility: hidden;
        transform: translateX(600px) translateY(-200px) scale(1.5) rotate(-20deg);
    }
}

/* Hero Sign Parallax - maintains custom background-size */
.hero-sign-parallax {
    position: relative;
}

/* Wooden Beam Separator */
.wooden-separator {
    width: 100%;
    height: 120px;
    background: url('images/wooden_beam_separator.png') repeat-x top;
    background-size: auto 150%;
    position: relative;
    z-index: 10;
    margin-bottom: -60px;
}

/* Projects Section */
.projects-section {
    padding: 1.5rem 0 0.5rem 0;
    background: url('images/wood_texture_horizontal_256.png') repeat;
    background-size: 170px;
    background-attachment: scroll;
    position: relative;
}

.projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.projects-section .container {
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: url('images/Metal_Texture_tileable.png') repeat;
    background-size: 150px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.6)
            drop-shadow(0px -3px 0px rgba(200, 200, 210, 1)) 
            drop-shadow(0px 3px 0px rgba(60, 60, 70, 1))
            drop-shadow(0px 5px 3px rgba(0, 0, 0, 0.8));
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: url('images/banner_texture_256_white_papyrus_tileable.png') repeat;
    background-size: 200px;
    border: 3px solid var(--light-gray);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.project-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, var(--overlay-dark) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-overlay p {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tags span {
    padding: 0.4rem 1rem;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.view-project {
    margin-top: 1rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.project-card:hover .view-project {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.6);
}

/* Project Subsections */
.project-subsection {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    /* Background defined inline on each element for flexibility */
}

.project-subsection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Cave section gets a lighter overlay since it's already dark */
.brighterBG-section::before {
    background: rgba(0, 0, 0, 0.2);
}

.project-subsection .container {
    position: relative;
    z-index: 1;
}

/* Default: Metal texture variant */
.project-subsection-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: url('images/Metal_Texture_tileable.png') repeat;
    background-size: 150px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.6)
            drop-shadow(0px -3px 0px rgba(200, 200, 210, 1)) 
            drop-shadow(0px 3px 0px rgba(60, 60, 70, 1))
            drop-shadow(0px 5px 3px rgba(0, 0, 0, 0.8));
}

/* Sand texture variant - use as override class */
.project-subsection-title.sand-texture {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: url('images/sand.png') repeat;
    background-size: 170px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.4) contrast(1.1)
            drop-shadow(0px -2px 0px rgba(220, 200, 160, 1)) 
            drop-shadow(0px 2px 0px rgba(100, 80, 50, 1))
            drop-shadow(0px 4px 3px rgba(0, 0, 0, 0.7));
}

/* 80s Neon variant - cyberpunk/vaporwave style */
.project-subsection-title.neon-style {
    background: #ff00ff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: neonBreathe 4s ease-in-out infinite;
}

/* Blue Chalk on Chalkboard variant */
.project-subsection-title.chalk-style {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: url('images/chalk.png') repeat;
    color: #6eb5ff;
    background-size: 170px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', cursive;
    filter: contrast(1.1) brightness(0.9);
}

/* Optional: Add slight texture/grain effect with pseudo-element */
.project-subsection-title.chalk-style::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: rgba(110, 181, 255, 0.15);
    text-shadow: 
        1px 1px 0px rgba(110, 181, 255, 0.2),
        -1px -1px 0px rgba(110, 181, 255, 0.2);
    z-index: -1;
}

@keyframes neonBreathe {
    0%, 100% {
        filter: brightness(0.8) contrast(1)
                drop-shadow(0px 0px 8px rgba(255, 0, 255, 0.3)) 
                drop-shadow(0px 0px 16px rgba(255, 0, 255, 0.2))
                drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.8));
    }
    50% {
        filter: brightness(1.3) contrast(1.1)
                drop-shadow(0px 0px 15px rgba(255, 0, 255, 0.6)) 
                drop-shadow(0px 0px 30px rgba(255, 0, 255, 0.4))
                drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.8));
    }
}

.project-content {
    min-height: 300px;
    position: relative;
    padding-bottom: 4rem;
}

/* Project Info Grid - Text and Media Blocks */
.project-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
    align-items: start;
}

@media (min-width: 768px) {
    .project-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;
    }
}

.project-text-block {
    background: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-radius: 15px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(5px);
}

.project-text-block h4 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.project-text-block p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.project-features {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.project-features li {
    color: var(--text-light);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.project-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.project-gif {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
    display: block;
}

/* Float image variant - sits beside text like in Word */
.project-gif.float-right {
    width: 50%;
    max-width: 400px;
    float: right;
    margin: 0 0 1.5rem 1.5rem;
}

.project-gif.float-left {
    width: 50%;
    max-width: 400px;
    float: left;
    margin: 0 1.5rem 1.5rem 0;
}

/* Clear floats after text blocks */
.project-text-block::after {
    content: '';
    display: table;
    clear: both;
}

.project-link-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.7rem 1.5rem;
    background: var(--light-gray);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link-button:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.6);
}

.project-media-block {
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 15px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(5px);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* TURTLE Scene Animations */
.scene-container {
    position: relative;
    overflow: visible;
}

.turtle-water {
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center top;
    z-index: 1;
}

.turtle-island {
    position: absolute;
    bottom: -0px;
    right: -10%;
    height: 350px;
    width: auto;
    z-index: 6;
}

.turtle-boat {
    position: absolute;
    bottom: 50px;
    left: 0;
    height: 80px;
    width: auto;
    z-index: 2;
}

/* Responsive adjustments for TURTLE scene */
@media (max-width: 1350px) {
    .turtle-scene {
        min-height: 400px;
    }
    
    .turtle-water {
        height: 125px;
        bottom: 0px;
    }
    
    .turtle-island {
        height: 200px;
        right: -100px;
        bottom: 15px;
    }
    
    .turtle-boat {
        left: -40px;
        height: 50px;
        bottom: 45px;
    }
}
@media (max-width: 480px) {
    .turtle-scene {
        min-height: 300px;
    }
    
    .turtle-water {
        height: 85px;
        bottom: 0px;
    }
    
    .turtle-island {
        height: 145px;
        right: -100px;
        bottom: 25px;
    }
    
    .turtle-boat {
        left: 80px;
        height: 40px;
        bottom: 40px;
    }
}

/* Cave Environment Section - Echo Chambers Background */
.cave-section {
    position: relative;
    min-height: 75vh;
    overflow: hidden;
}

.cave-section .falling-rabbit {
    position: absolute;
    right: 10px;
    top: 0;
    width: 250px;
    height: auto;
    z-index: 5;
    will-change: transform;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8));
    transform: translateY(-10vh);
}

.computer-guide {
    position: absolute;
    right: 10px;
    top: 0x;
    width: 200px;
    height: auto;
    z-index: 10;
    pointer-events: none;
}

.guide-speech-bubble {
    position: absolute;
    right: 10px;
    top: 220px;
    width: 320px;
    height: auto;
    z-index: 11;
    pointer-events: none;
    opacity: 0;
    transform: scale(0) translateY(20px);
    transform-origin: top right;
    visibility: hidden;
    transition: none;
}

/* Speech bubble visible state */
.guide-speech-bubble.show {
    visibility: visible;
    animation: bubbleBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Speech bubble hide state */
.guide-speech-bubble.hide {
    animation: bubbleBounceOut 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

@keyframes bubbleBounceIn {
    0% {
        opacity: 0;
        transform: scale(0) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(-5px);
    }
    70% {
        transform: scale(0.95) translateY(2px);
    }
    85% {
        transform: scale(1.02) translateY(-1px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes bubbleBounceOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.05) translateY(-3px);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(15px);
        visibility: hidden;
    }
}

/* Responsive adjustments for cave section */
@media (max-width: 968px) {
    .falling-rabbit {
        width: 160px;
        right: 10px;
    }
    
    .cave-section {
        min-height: 70vh;
    }
}

@media (max-width: 768px) {
    .falling-rabbit {
        width: 120px;
        right: 10px;
    }
    
    .cave-section {
        min-height: 65vh;
    }
}

@media (max-width: 480px) {
    .falling-rabbit {
        width: 80px;
        right: 10px;
    }
    
    .cave-section {
        min-height: 60vh;
    }
    
    .cave-background {
        background-position: 70% center;
    }
}

/* Wooden Beam Separator */
.wooden-separator {
    width: 100%;
    height: 80px;
    background: url('images/wooden_beam_separator.png') repeat-x center;
    background-size: auto 100%;
    position: relative;
    z-index: 10;
}

/* Parallax Archer */
.parallax-archer {
    position: fixed;
    right: 0%;
    top: -300px;
    width: 200px;
    height: auto;
    z-index: 50;
    pointer-events: none;
    transform-origin: center;
}

.parallax-archer img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    will-change: transform;
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
    background: url('images/grass_flowers_texture_tileable_1024-768x768.png') repeat;
    background-size: 320px;
    text-align: center;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
}

.contact-section .container {
    position: relative;
    z-index: 1;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-button {
    padding: 1rem 2rem;
    background: url('images/banner_texture_256_white_papyrus_tileable.png') repeat;
    background-size: 150px;
    color: var(--dark-bg);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.7);
    border-color: var(--secondary-color);
    filter: brightness(1.1);
}

/* Footer */
.footer {
    padding: 2rem 0;
    background: var(--dark-bg);
    text-align: center;
    color: var(--text-gray);
    border-top: 1px solid var(--light-gray);
}

/* Responsive Design */
@media (max-width: 968px) {
    .computer-guide {
        width: 150px;
        right: 3%;
        top: 80px;
    }
    
    .guide-speech-bubble {
        width: 240px;
        right: 3%;
        top: 220px;
    }
    
    .parallax-archer {
        width: 120px;
        right: 2%;
        bottom: 10%;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-image {
        margin: 0 auto;
    }
    
    .skills {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .computer-guide {
        width: 100px;
        right: 2%;
        top: 60px;
    }
    
    .guide-speech-bubble {
        width: 180px;
        right: 2%;
        top: 155px;
    }
    
    .parallax-archer {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Only enable fixed on larger screens */
@media (min-width: 1024px) {
    html, body, .contact-section {
        background-attachment: fixed;
    }
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}