/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Smooth scrolling with Safari support */
    -webkit-box-sizing: border-box;
}

/* Cross-browser flexbox gap fallback for older Safari */
@supports not (gap: 1px) {
    .contact-info > *,
    .menu-tabs > *,
    .project-tech > *,
    .project-links > * {
        margin: 4px;
    }
}

html {
    height: 100%;
    overflow-x: hidden;
}

html, body {
    min-height: 100vh;
    width: 100%;
}

body {
    font-family: 'Press Start 2P', cursive;
    /* Fallback solid color */
    background-color: #87CEEB;
    /* Main background image */
    background-image: url('assets/images/stardewbackground.png');
    background-repeat: repeat;
    background-size: auto;
    min-height: 100vh;
    color: #2F1B14;
    overflow-x: hidden;
    position: relative;
    /* Pixelated rendering with Safari support */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    pointer-events: none;
    z-index: -1;
}

/* Floating clouds and subtle farm elements */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 120%;
    height: 100%;
    background-image: 
        /* Clouds */
        radial-gradient(ellipse 80px 40px at 20% 15%, rgba(255,255,255,0.2) 0%, transparent 50%),
        radial-gradient(ellipse 100px 50px at 80% 8%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60px 30px at 60% 25%, rgba(255,255,255,0.12) 0%, transparent 50%),
        radial-gradient(ellipse 90px 45px at 30% 12%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(ellipse 70px 35px at 90% 18%, rgba(255,255,255,0.14) 0%, transparent 50%),
        /* Subtle flowers in grass */
        radial-gradient(circle 3px at 15% 85%, rgba(255,182,193,0.3) 0%, transparent 50%),
        radial-gradient(circle 2px at 85% 90%, rgba(255,255,0,0.2) 0%, transparent 50%),
        radial-gradient(circle 3px at 45% 88%, rgba(138,43,226,0.25) 0%, transparent 50%),
        radial-gradient(circle 2px at 75% 86%, rgba(255,182,193,0.2) 0%, transparent 50%);
    animation: cloudFloat 60s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes cloudFloat {
    0% { transform: translateX(-20%); }
    100% { transform: translateX(0%); }
}

/* Music Player Widget */
.music-player {
    position: fixed;
    top: 15px;
    left: 20px;
    z-index: 9999;
    pointer-events: auto;
}

.music-toggle {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 3px solid #8B4513;
    background: linear-gradient(145deg, #E6C08A, #F0D2A0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow:
        inset 1px 1px 0px #F4E1BB,
        inset -1px -1px 0px #D4A574,
        0 4px 8px rgba(0,0,0,0.3);
    pointer-events: auto;
    position: relative;
}

.music-toggle:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 1px 1px 0px #F4E1BB,
        inset -1px -1px 0px #D4A574,
        0 6px 12px rgba(0,0,0,0.4),
        0 0 15px rgba(218, 165, 32, 0.3);
}

.music-toggle:active {
    transform: translateY(1px);
    box-shadow:
        inset 2px 2px 4px rgba(0,0,0,0.3);
}

.music-toggle.playing {
    background: linear-gradient(145deg, #228B22, #32CD32);
    border-color: #006400;
}

.music-icon {
    font-size: 20px;
    line-height: 1;
}

/* Stardew Valley Clock Widget */
.stardew-clock {
    position: fixed;
    top: 15px;
    /* Safari fallback */
    right: 60px;
    right: clamp(20px, 5vw, 100px);
    z-index: 1000;
}

.stardew-clock img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    width: auto;
    height: auto;
    transform: scale(1.4);
    transform-origin: top left;
}


/* Live date text overlay */
.clock-date {
    position: absolute;
    top: 29px;
    left: 135px;
    width: 120px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #2F1B14;
    z-index: 1002;
}

/* Live time text overlay */
.clock-time {
    position: absolute;
    top: 125px;
    left: 135px;
    width: 120px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 15px;
    color: #2F1B14;
    z-index: 1002;
}

/* Clock Hand */
.clock-hand {
    position: absolute;
    top: 6px;
    left: 17px;
    width: 20px;
    height: 40px;
    transform-origin: 50% calc(50% + 2px) !important;
    image-rendering: pixelated !important;
    image-rendering: -moz-crisp-edges !important;
    image-rendering: crisp-edges !important;
    z-index: 1001;
    animation: clockHandRotation 18s infinite linear;
}

/* Season Indicator */
.season-indicator {
    position: absolute;
    top: 68px;
    left: 123px;
    width: 32px;
    height: 32px;
    transform: scale(1.065) !important;
    transform-origin: center !important;
    image-rendering: pixelated !important;
    image-rendering: -moz-crisp-edges !important;
    image-rendering: crisp-edges !important;
    z-index: 1000;
}

/* Weather Indicator */
.weather-indicator {
    position: absolute;
    top: 69px;
    left: 227px;
    width: 32px;
    height: 32px;
    transform: scale(1.4) !important;
    transform-origin: center !important;
    image-rendering: pixelated !important;
    image-rendering: -moz-crisp-edges !important;
    image-rendering: crisp-edges !important;
    z-index: 1000;
}

@keyframes clockHandRotation {
    0% {
        transform: rotate(0deg) scale(1);
    }
    33.33% {
        transform: rotate(90deg) scale(1);
    }
    66.66% {
        transform: rotate(180deg) scale(1);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}

/* Floating Butterflies */
.butterflies {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.butterfly {
    position: absolute;
    width: 32px;
    height: 32px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Individual butterfly animations */
.butterfly-1 {
    top: 20%;
    left: 50px;
    animation: hoverLeft1 4s infinite ease-in-out;
}

.butterfly-2 {
    top: 40%;
    right: 50px;
    animation: hoverRight1 3.5s infinite ease-in-out;
    animation-delay: -1s;
}

.butterfly-3 {
    top: 60%;
    left: 30px;
    animation: hoverLeft2 5s infinite ease-in-out;
    animation-delay: -2s;
    filter: hue-rotate(280deg) saturate(1.5) brightness(1.1);
    cursor: pointer;
    pointer-events: auto;
    transition: filter 0.3s ease;
    z-index: 100;
}

.butterfly-3.color-1 { filter: hue-rotate(280deg) saturate(1.5) brightness(1.1) !important; } /* Pink */
.butterfly-3.color-2 { filter: hue-rotate(120deg) saturate(1.3) brightness(1.1) !important; } /* Green */
.butterfly-3.color-3 { filter: hue-rotate(200deg) saturate(1.4) brightness(1.0) !important; } /* Blue */
.butterfly-3.color-4 { filter: hue-rotate(60deg) saturate(1.6) brightness(1.2) !important; } /* Yellow */
.butterfly-3.color-5 { filter: hue-rotate(300deg) saturate(1.2) brightness(0.9) !important; } /* Purple */
.butterfly-3.color-6 { filter: none !important; } /* Original red */

.butterfly-4 {
    top: 80%;
    right: 30px;
    animation: hoverRight2 4.5s infinite ease-in-out;
    animation-delay: -0.5s;
}

.butterfly-5 {
    top: 15%;
    right: 70px;
    animation: hoverRight3 3.8s infinite ease-in-out;
    animation-delay: -1.5s;
}

.butterfly-6 {
    top: 70%;
    left: 60px;
    animation: hoverLeft3 4.2s infinite ease-in-out;
    animation-delay: -3s;
}

/* Butterfly hover animations */
@keyframes hoverLeft1 {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-15px) translateY(-20px); }
    50% { transform: translateX(10px) translateY(15px); }
    75% { transform: translateX(-10px) translateY(-10px); }
}

@keyframes hoverRight1 {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(15px) translateY(18px); }
    50% { transform: translateX(-8px) translateY(-12px); }
    75% { transform: translateX(12px) translateY(8px); }
}

@keyframes hoverLeft2 {
    0%, 100% { transform: translateX(0) translateY(0); }
    30% { transform: translateX(-20px) translateY(25px); }
    60% { transform: translateX(15px) translateY(-18px); }
    80% { transform: translateX(-12px) translateY(10px); }
}

@keyframes hoverRight2 {
    0%, 100% { transform: translateX(0) translateY(0); }
    40% { transform: translateX(18px) translateY(-15px); }
    70% { transform: translateX(-10px) translateY(20px); }
}

@keyframes hoverLeft3 {
    0%, 100% { transform: translateX(0) translateY(0); }
    20% { transform: translateX(-12px) translateY(-25px); }
    50% { transform: translateX(8px) translateY(12px); }
    80% { transform: translateX(-15px) translateY(-8px); }
}

@keyframes hoverRight3 {
    0%, 100% { transform: translateX(0) translateY(0); }
    35% { transform: translateX(20px) translateY(22px); }
    65% { transform: translateX(-15px) translateY(-16px); }
}


/* Game Container */
.game-container {
    /* Safari fallback - fixed width */
    max-width: 1200px;
    /* Modern browsers: ensure container never overlaps with clock */
    max-width: min(1200px, calc(100vw - 380px));
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%);
}

/* Character Section */
.character-section {
    background: 
        linear-gradient(145deg, rgba(230, 192, 138, 0.95), rgba(240, 210, 160, 0.95)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="20" height="20" fill="%23F4E4BC"/><rect width="10" height="10" fill="%23E6D3A3"/><rect x="10" y="10" width="10" height="10" fill="%23E6D3A3"/></svg>');
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 
        /* Multi-layered border effect */
        0 0 0 2px #2F1B14,
        0 0 0 4px #8B4513,
        0 0 0 6px #CD853F,
        0 0 0 8px #FFD700,
        0 0 0 10px #8B4513,
        /* Inset shadows */
        inset 3px 3px 0px rgba(255, 248, 220, 0.6),
        inset -3px -3px 0px rgba(139, 69, 19, 0.6),
        /* Drop shadow */
        0 12px 25px rgba(0,0,0,0.5);
    position: relative;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.character-section::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid #CD853F;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

.character-portrait {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

/* Fallback for older Safari that doesn't support gap in flexbox */
@supports not (gap: 30px) {
    .character-portrait > * {
        margin-right: 30px;
    }
    .character-portrait > *:last-child {
        margin-right: 0;
    }
}

.pixel-avatar {
    width: 80px;
    height: 80px;
    border: 3px solid #2F1B14;
    border-radius: 8px;
    position: relative;
    flex-shrink: 0;
    background-image: url('assets/images/Portrait1.webp');
    background-size: cover;
    background-position: center;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pixel-avatar:hover {
    transform: scale(1.05) rotate(2deg);
    border-color: #DAA520;
    box-shadow: 
        0 0 20px rgba(218, 165, 32, 0.6),
        inset 1px 1px 0px rgba(255,255,255,0.2);
    animation: avatarGlow 0.5s ease-in-out;
}

@keyframes avatarGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(218, 165, 32, 0.6); }
    50% { box-shadow: 0 0 30px rgba(218, 165, 32, 0.8); }
}

.character-info {
    flex: 1;
}

.character-name {
    color: #FFF8DC;
    font-size: 20px;
    margin-bottom: 8px;
    text-shadow: 2px 2px 0px #2F1B14;
}

.character-title {
    color: #FFE4B5;
    font-size: 14px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 0px #2F1B14;
}

.contact-info {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #2F1B14;
    font-size: 10px;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.contact-item:hover {
    background: rgba(47, 27, 20, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.contact-item .icon {
    display: none;
}

.contact-item a {
    color: #2F1B14;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-item a:hover {
    color: #8B4513;
    text-shadow: none;
}

.contact-item span:not(.icon) {
    color: #2F1B14;
    font-weight: 500;
}

/* Copy to clipboard button */
.copy-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 14px;
    padding: 0;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.copy-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

.copy-btn:active {
    transform: scale(1.1);
}

.download-link {
    cursor: pointer;
    color: #FFE4B5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.download-link:hover {
    color: #87CEEB;
}

/* Copy notification */
.copy-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-50px);
    background: linear-gradient(145deg, #228B22, #32CD32);
    color: #F0FFF0;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 10px;
    font-family: 'Press Start 2P', cursive;
    box-shadow: 
        inset 1px 1px 0px rgba(255,255,255,0.2),
        0 4px 12px rgba(0,0,0,0.3);
    border: 2px solid #006400;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Menu Tabs */
.menu-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px;
    background: 
        linear-gradient(145deg, rgba(230, 192, 138, 0.4), rgba(240, 210, 160, 0.4)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><rect width="32" height="32" fill="%23F4E4BC" opacity="0.1"/><circle cx="8" cy="8" r="2" fill="%23F0D2A0" opacity="0.2"/><circle cx="24" cy="8" r="2" fill="%23F0D2A0" opacity="0.2"/><circle cx="8" cy="24" r="2" fill="%23F0D2A0" opacity="0.2"/><circle cx="24" cy="24" r="2" fill="%23F0D2A0" opacity="0.2"/></svg>');
    border-radius: 12px;
    border: 2px solid rgba(200, 151, 109, 0.4);
}

.tab {
    background: linear-gradient(145deg, #E6C08A, #F0D2A0);
    border: 3px solid #C8976D;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 10px;
    color: #2F1B14;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow:
        inset 1px 1px 0px #F4E1BB,
        inset -1px -1px 0px #D4A574;
    width: 160px;
    justify-content: flex-start;
}

.tab:hover {
    transform: translateY(-3px);
    box-shadow: 
        inset 1px 1px 0px #F4E1BB,
        inset -1px -1px 0px #D4A574,
        0 6px 12px rgba(0,0,0,0.4),
        0 0 20px rgba(218, 165, 32, 0.3);
    background: linear-gradient(145deg, #DEB887, #F4A460);
    animation: tabGlow 0.3s ease-in-out;
}

.tab:active {
    transform: translateY(1px);
    box-shadow: 
        inset 2px 2px 4px rgba(0,0,0,0.3),
        inset 1px 1px 0px #D4A574,
        inset -1px -1px 0px #F4E1BB;
    background: linear-gradient(145deg, #CD853F, #DEB887);
}

@keyframes tabGlow {
    0% { box-shadow: inset 1px 1px 0px #F4E1BB, inset -1px -1px 0px #D4A574, 0 2px 4px rgba(0,0,0,0.2); }
    50% { box-shadow: inset 1px 1px 0px #F4E1BB, inset -1px -1px 0px #D4A574, 0 8px 16px rgba(0,0,0,0.5), 0 0 25px rgba(218, 165, 32, 0.4); }
    100% { box-shadow: inset 1px 1px 0px #F4E1BB, inset -1px -1px 0px #D4A574, 0 6px 12px rgba(0,0,0,0.4), 0 0 20px rgba(218, 165, 32, 0.3); }
}

.tab.active {
    background: linear-gradient(145deg, #228B22, #32CD32);
    border-color: #006400;
    color: #F0FFF0;
    transform: translateY(-2px);
}

.tab-icon {
    font-size: 14px;
}

.tab-icon-img {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Content Container */
.content-container {
    background: 
        linear-gradient(145deg, rgba(230, 192, 138, 0.95), rgba(240, 210, 160, 0.95)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="16" height="16" fill="%23F0D2A0"/><rect width="8" height="8" fill="%23E6C08A"/><rect x="8" y="8" width="8" height="8" fill="%23E6C08A"/><rect x="2" y="2" width="12" height="12" fill="none" stroke="%23F0D2A0" stroke-width="0.5" opacity="0.3"/></svg>');
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 
        /* Multi-layered border effect */
        0 0 0 2px #2F1B14,
        0 0 0 4px #8B4513,
        0 0 0 6px #CD853F,
        0 0 0 8px #FFD700,
        0 0 0 10px #8B4513,
        /* Inset shadows */
        inset 3px 3px 0px rgba(255, 248, 220, 0.6),
        inset -3px -3px 0px rgba(139, 69, 19, 0.6),
        /* Drop shadow */
        0 12px 25px rgba(0,0,0,0.5);
    position: relative;
    min-height: 400px;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.content-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid #CD853F;
    border-radius: 8px;
    pointer-events: none;
}

/* Leaf attached to content box - always at top-right corner */
.content-leaf {
    position: absolute;
    top: -48px;
    right: -48px;
    z-index: 100;
}

.content-panel {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    text-align: center;
    margin-bottom: 30px;
}

.panel-header h2 {
    color: #FFF8DC;
    font-size: 16px;
    text-shadow: 2px 2px 0px #2F1B14;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header-icon {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Skills Styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.skill-item {
    background: linear-gradient(145deg, #654321, #8B4513);
    border: 2px solid #5D4037;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: inset 1px 1px 0px #CD853F;
}

/* Stardew Valley Skill Icons */
.skill-icon {
    width: 32px;
    height: 32px;
    border: 2px solid #2F1B14;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transition: all 0.3s ease;
    cursor: pointer;
    object-fit: cover;
}

.skill-icon:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.4),
        inset 1px 1px 0px rgba(255,255,255,0.3);
    animation: skillBounce 0.6s ease-in-out;
}

@keyframes skillBounce {
    0%, 100% { transform: translateY(-4px) scale(1.1); }
    25% { transform: translateY(-6px) scale(1.15); }
    50% { transform: translateY(-2px) scale(1.08); }
    75% { transform: translateY(-5px) scale(1.12); }
}

/* Frontend Development - Pickaxe Icon */
.skill-icon.frontend {
    background: linear-gradient(135deg, #B8860B, #DAA520);
}
.skill-icon.frontend::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 6px;
    width: 20px;
    height: 24px;
    background: 
        linear-gradient(45deg, #8B4513 0%, #8B4513 30%, #D2691E 30%, #D2691E 60%, #8B4513 60%);
    clip-path: polygon(20% 0%, 80% 0%, 90% 20%, 90% 50%, 70% 80%, 30% 80%, 10% 50%, 10% 20%);
}

/* Backend Development - Axe Icon */
.skill-icon.backend {
    background: linear-gradient(135deg, #8B4513, #A0522D);
}
.skill-icon.backend::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 8px;
    width: 16px;
    height: 28px;
    background: 
        linear-gradient(180deg, #654321 0%, #654321 20%, #B8860B 20%, #B8860B 40%, #654321 40%);
}

/* Database - Fishing Rod Icon */
.skill-icon.database {
    background: linear-gradient(135deg, #4682B4, #87CEEB);
}
.skill-icon.database::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: 
        radial-gradient(circle at center, #D2691E 20%, #8B4513 40%, transparent 60%),
        linear-gradient(90deg, #8B4513 45%, #8B4513 55%, transparent 55%);
}

/* DevOps - Watering Can Icon */
.skill-icon.devops {
    background: linear-gradient(135deg, #32CD32, #228B22);
}
.skill-icon.devops::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 4px;
    width: 24px;
    height: 20px;
    background: 
        linear-gradient(45deg, #4169E1 0%, #4169E1 30%, #87CEEB 30%, #87CEEB 70%, #4169E1 70%);
    border-radius: 50% 20% 50% 20%;
}

/* Algorithms & Math - Brain/Scroll Icon */
.skill-icon.algorithms {
    background: linear-gradient(135deg, #9370DB, #8A2BE2);
}
.skill-icon.algorithms::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 6px;
    width: 20px;
    height: 24px;
    background: 
        radial-gradient(ellipse 8px 6px at center 8px, #FFF8DC 0%, #FFF8DC 80%, transparent 80%),
        linear-gradient(180deg, #8B4513 0%, #8B4513 15%, #FFF8DC 15%, #FFF8DC 85%, #8B4513 85%);
    border-radius: 2px;
}

/* C++ Programming - Code Icon */
.skill-icon.cpp {
    background: linear-gradient(135deg, #FF6347, #DC143C);
}
.skill-icon.cpp::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 20px;
    height: 20px;
    background: 
        linear-gradient(45deg, #FFF8DC 0%, #FFF8DC 30%, transparent 30%, transparent 40%, #FFF8DC 40%, #FFF8DC 60%, transparent 60%, transparent 70%, #FFF8DC 70%);
    clip-path: polygon(10% 20%, 90% 20%, 90% 30%, 20% 30%, 20% 50%, 80% 50%, 80% 60%, 10% 60%, 10% 80%, 90% 80%, 90% 90%, 10% 90%);
}

.skill-info {
    flex: 1;
}

.skill-info h3 {
    color: #FFF8DC;
    font-size: 10px;
    margin-bottom: 8px;
}

.skill-bar {
    background: #2F1B14;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
    border: 1px solid #1a1a1a;
}

.skill-progress {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

/* Green gradient for levels 8-10 (Expert) */
.skill-progress[data-level="10"] { 
    width: 100%; 
    background: linear-gradient(90deg, #32CD32, #00FF00, #228B22);
    box-shadow: 0 0 8px rgba(50, 205, 50, 0.6);
}
.skill-progress[data-level="9"] { 
    width: 90%; 
    background: linear-gradient(90deg, #32CD32, #00FF00, #228B22);
    box-shadow: 0 0 6px rgba(50, 205, 50, 0.5);
}
.skill-progress[data-level="8"] { 
    width: 80%; 
    background: linear-gradient(90deg, #228B22, #32CD32, #00FF32);
    box-shadow: 0 0 4px rgba(50, 205, 50, 0.4);
}

/* Yellow gradient for levels 5-7 (Intermediate) */
.skill-progress[data-level="7"] { 
    width: 70%; 
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF8C00);
    box-shadow: 0 0 4px rgba(255, 215, 0, 0.4);
}
.skill-progress[data-level="6"] { 
    width: 60%; 
    background: linear-gradient(90deg, #FFA500, #FFD700, #FFFF00);
    box-shadow: 0 0 4px rgba(255, 165, 0, 0.4);
}
.skill-progress[data-level="5"] { 
    width: 50%; 
    background: linear-gradient(90deg, #FF8C00, #FFA500, #FFD700);
    box-shadow: 0 0 4px rgba(255, 140, 0, 0.4);
}

/* Red gradient for levels 1-4 (Beginner) */
.skill-progress[data-level="4"] { 
    width: 40%; 
    background: linear-gradient(90deg, #FF6347, #FF4500, #DC143C);
    box-shadow: 0 0 4px rgba(255, 99, 71, 0.4);
}
.skill-progress[data-level="3"] { 
    width: 30%; 
    background: linear-gradient(90deg, #FF4500, #FF6347, #FF0000);
    box-shadow: 0 0 4px rgba(255, 69, 0, 0.4);
}
.skill-progress[data-level="2"] { 
    width: 20%; 
    background: linear-gradient(90deg, #DC143C, #FF4500, #FF6347);
    box-shadow: 0 0 4px rgba(220, 20, 60, 0.4);
}
.skill-progress[data-level="1"] { 
    width: 10%; 
    background: linear-gradient(90deg, #8B0000, #DC143C, #FF4500);
    box-shadow: 0 0 4px rgba(139, 0, 0, 0.4);
}

/* Animated shimmer effect for all skill bars */
.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: skillShimmer 2s ease-in-out infinite;
}

@keyframes skillShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.skill-level {
    color: #FFE4B5;
    font-size: 8px;
}

/* Experience Styles */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.experience-item {
    background: linear-gradient(145deg, #654321, #8B4513);
    border: 2px solid #5D4037;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 15px;
    box-shadow: inset 1px 1px 0px #CD853F;
}

/* Stardew Valley Quest Markers */
.quest-marker {
    width: 32px;
    height: 32px;
    border: 2px solid #2F1B14;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    image-rendering: pixelated;
}

/* Senior Position - Gold Star */
.quest-marker.senior {
    background: radial-gradient(circle, #FFD700 30%, #FFA500 70%);
    box-shadow: 
        inset 2px 2px 0px rgba(255,255,255,0.5),
        inset -2px -2px 0px rgba(0,0,0,0.3);
}
.quest-marker.senior::after {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #8B4513;
    font-size: 18px;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}

/* Regular Position - Silver Star */
.quest-marker.regular {
    background: radial-gradient(circle, #C0C0C0 30%, #A9A9A9 70%);
    box-shadow: 
        inset 2px 2px 0px rgba(255,255,255,0.5),
        inset -2px -2px 0px rgba(0,0,0,0.3);
}
.quest-marker.regular::after {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #2F1B14;
    font-size: 18px;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}

.experience-content h3 {
    color: #FFF8DC;
    font-size: 14px;
    margin-bottom: 5px;
}

.company {
    color: #87CEEB;
    font-size: 10px;
    margin-bottom: 3px;
}

.duration {
    color: #FFE4B5;
    font-size: 9px;
    margin-bottom: 12px;
}

.achievements {
    list-style: none;
}

.achievements li {
    color: #FFF8DC;
    font-size: 9px;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.achievements li::before {
    content: '⚔️';
    position: absolute;
    left: 0;
    font-size: 8px;
}

/* Education Styles */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-item {
    background: linear-gradient(145deg, #654321, #8B4513);
    border: 2px solid #5D4037;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 15px;
    box-shadow: inset 1px 1px 0px #CD853F;
}

.book-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.education-content h3 {
    color: #FFF8DC;
    font-size: 11px;
    margin-bottom: 5px;
}

.school {
    color: #87CEEB;
    font-size: 10px;
    margin-bottom: 3px;
}

.year {
    color: #FFE4B5;
    font-size: 9px;
    margin-bottom: 8px;
}

.details {
    color: #FFF8DC;
    font-size: 9px;
}

.cert-list {
    list-style: none;
}

.cert-list li {
    color: #FFF8DC;
    font-size: 9px;
    margin-bottom: 5px;
    position: relative;
    padding-left: 15px;
}

.cert-list li::before {
    content: '🏆';
    position: absolute;
    left: 0;
    font-size: 8px;
}

/* Projects Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-item {
    background: linear-gradient(145deg, #654321, #8B4513);
    border: 2px solid #5D4037;
    border-radius: 8px;
    padding: 20px;
    box-shadow: inset 1px 1px 0px #CD853F;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF6347, #32CD32, #87CEEB, #DDA0DD);
    background-size: 400% 400%;
    border-radius: 10px;
    opacity: 0;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
    transition: opacity 0.4s ease;
}

.project-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        inset 1px 1px 0px #CD853F,
        0 8px 25px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.2);
}

.project-item:hover::before {
    opacity: 1;
}

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

/* Stardew Valley Project Icons */
.project-icon {
    width: 48px;
    height: 48px;
    border: 2px solid #2F1B14;
    border-radius: 6px;
    position: relative;
    margin: 0 auto 12px auto;
    image-rendering: pixelated;
    object-fit: cover;
    object-position: center;
}

/* Quirk - Complex Task Icon */
.project-icon.quirk {
    background: linear-gradient(135deg, #9370DB, #8A2BE2);
}
.project-icon.quirk::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 36px;
    height: 36px;
    background: 
        linear-gradient(45deg, #FFF8DC 0%, #FFF8DC 30%, transparent 30%, transparent 70%, #FFF8DC 70%),
        linear-gradient(-45deg, #FFF8DC 0%, #FFF8DC 30%, transparent 30%, transparent 70%, #FFF8DC 70%);
    border-radius: 4px;
}

/* Portfolio Website - Pixel Art Icon */
.project-icon.portfolio {
    background: linear-gradient(135deg, #FFD700, #FF6347);
}
.project-icon.portfolio::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    background: 
        repeating-linear-gradient(0deg, #FFF8DC 0px, #FFF8DC 4px, transparent 4px, transparent 8px),
        repeating-linear-gradient(90deg, #FFF8DC 0px, #FFF8DC 4px, transparent 4px, transparent 8px);
    border-radius: 2px;
}

/* Algorithms - Scroll/Code Icon (reusing from skills) */
.project-icon.algorithms {
    background: linear-gradient(135deg, #DC143C, #B22222);
}
.project-icon.algorithms::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 8px;
    width: 32px;
    height: 36px;
    background: 
        linear-gradient(45deg, #FFF8DC 0%, #FFF8DC 25%, transparent 25%, transparent 50%, #FFF8DC 50%, #FFF8DC 75%, transparent 75%),
        linear-gradient(90deg, #654321 0%, #654321 15%, #FFF8DC 15%, #FFF8DC 85%, #654321 85%);
    border-radius: 2px;
    box-shadow: 
        inset -2px -2px 0px rgba(0,0,0,0.2),
        inset 2px 2px 0px rgba(255,255,255,0.3);
}

.project-content h3 {
    color: #FFF8DC;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: center;
}

.project-description {
    color: #FFE4B5;
    font-size: 9px;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.4;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
    justify-content: center;
}

.tech-tag {
    background: linear-gradient(145deg, #228B22, #32CD32);
    color: #F0FFF0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 8px;
    border: 1px solid #006400;
}

.project-links {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.project-link {
    color: #87CEEB;
    text-decoration: none;
    font-size: 8px;
    padding: 6px 12px;
    border: 1px solid #87CEEB;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(135, 206, 235, 0.4), transparent);
    transition: left 0.5s ease;
}

.project-link:hover {
    background: #87CEEB;
    color: #2F1B14;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.4);
    border-color: #B0E0E6;
}

.project-link:hover::before {
    left: 100%;
}

/* Other/Collectibles Styles */
.other-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.collectible-item {
    background: linear-gradient(145deg, #654321, #8B4513);
    border: 2px solid #5D4037;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: inset 1px 1px 0px #CD853F;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.collectible-item:hover {
    transform: translateY(-4px) rotate(1deg);
    box-shadow: 
        inset 1px 1px 0px #CD853F,
        0 8px 20px rgba(0,0,0,0.3),
        0 0 30px rgba(255, 215, 0, 0.2);
    background: linear-gradient(145deg, #8B4513, #A0522D);
    border-color: #DAA520;
}

.collectible-item:hover .collectible-icon {
    transform: scale(1.1);
    animation: collectiblePulse 0.6s ease-in-out;
}

@keyframes collectiblePulse {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.2); }
}

/* Stardew Valley Collectible Icons */
.collectible-icon {
    width: 40px;
    height: 40px;
    border: 2px solid #2F1B14;
    border-radius: 6px;
    position: relative;
    margin: 0 auto 10px auto;
    image-rendering: pixelated;
    transition: all 0.3s ease;
    object-fit: cover;
}

/* Gaming - Controller/Joystick Icon */
.collectible-icon.gaming {
    background: linear-gradient(135deg, #8A2BE2, #9932CC);
}
.collectible-icon.gaming::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: 
        linear-gradient(45deg, #4B0082 0%, #4B0082 40%, #8A2BE2 40%, #8A2BE2 60%, #4B0082 60%);
    border-radius: 40% 40% 60% 60%;
}

/* Drawing - Pencil Icon */
.collectible-icon.drawing {
    background: linear-gradient(135deg, #FF69B4, #FF1493);
}
.collectible-icon.drawing::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 10px;
    width: 20px;
    height: 32px;
    background: 
        linear-gradient(0deg, #8B4513 0%, #8B4513 70%, #FFD700 70%, #FFD700 85%, #C0C0C0 85%);
    border-radius: 2px 2px 8px 8px;
}

/* Calisthenics - Muscle/Strength Icon */
.collectible-icon.calisthenics {
    background: linear-gradient(135deg, #20B2AA, #008B8B);
}
.collectible-icon.calisthenics::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: 
        radial-gradient(circle at 30% 30%, #2F4F4F 25%, transparent 25%),
        radial-gradient(circle at 70% 30%, #2F4F4F 25%, transparent 25%),
        linear-gradient(45deg, #2F4F4F 30%, transparent 30%, transparent 70%, #2F4F4F 70%);
    border-radius: 2px;
}

/* D&D - Dice Icon */
.collectible-icon.dnd {
    background: linear-gradient(135deg, #8B4513, #A0522D);
}
.collectible-icon.dnd::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: 
        radial-gradient(circle at 33% 33%, #FFF8DC 12%, transparent 12%),
        radial-gradient(circle at 67% 67%, #FFF8DC 12%, transparent 12%),
        radial-gradient(circle at 50% 50%, #FFF8DC 12%, transparent 12%),
        linear-gradient(135deg, #654321, #8B4513);
    border-radius: 3px;
}

.collectible-item h3 {
    color: #FFF8DC;
    font-size: 11px;
    margin-bottom: 8px;
}

.collectible-item p {
    color: #FFE4B5;
    font-size: 8px;
    line-height: 1.4;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #2F1B14;
    position: relative;
    background: 
        linear-gradient(145deg, rgba(230, 192, 138, 0.3), rgba(240, 210, 160, 0.3)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect width="24" height="24" fill="%23228B22" opacity="0.1"/><rect x="2" y="20" width="20" height="4" fill="%23D4A574" opacity="0.3"/><circle cx="6" cy="18" r="1" fill="%23FFD700" opacity="0.4"/><circle cx="12" cy="18" r="1" fill="%23FFD700" opacity="0.4"/><circle cx="18" cy="18" r="1" fill="%23FFD700" opacity="0.4"/></svg>');
    border-radius: 12px;
    border: 2px solid rgba(200, 151, 109, 0.3);
    margin-top: 20px;
}

.sparkles {
    font-size: 20px;
    animation: sparkle 2s infinite;
}

.spinning-star {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer p {
    font-size: 8px;
    margin-top: 10px;
}

/* Enhanced Responsive Design */

/* Medium screens (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .game-container {
        max-width: 95%;
        padding: 25px;
    }

    .menu-tabs {
        gap: 8px;
    }

    .tab {
        width: 145px;
        padding: 10px 14px;
        font-size: 9px;
    }

    /* Scale clock on medium screens */
    .stardew-clock {
        transform: scale(0.9);
        transform-origin: top right;
    }
}

/* Small-Medium screens (900px - 1023px) */
@media (min-width: 900px) and (max-width: 1023px) {
    .game-container {
        max-width: 96%;
        padding: 20px;
    }

    .menu-tabs {
        gap: 6px;
        padding: 15px;
    }

    .tab {
        width: 130px;
        padding: 10px 12px;
        font-size: 9px;
    }

    .tab-icon-img {
        width: 14px;
        height: 14px;
    }

    /* Scale clock on smaller screens */
    .stardew-clock {
        transform: scale(0.8);
        transform-origin: top right;
    }

    /* Reduce butterfly visibility */
    .butterfly {
        opacity: 0.7;
        width: 28px;
        height: 28px;
    }
}

/* Small screens (769px - 899px) */
@media (min-width: 769px) and (max-width: 899px) {
    .game-container {
        max-width: 98%;
        padding: 15px;
    }

    .character-name {
        font-size: 18px;
    }

    .menu-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 12px;
    }

    .tab {
        width: 120px;
        padding: 10px 10px;
        font-size: 8px;
    }

    .tab-icon-img {
        width: 12px;
        height: 12px;
    }

    /* Scale clock on small screens */
    .stardew-clock {
        transform: scale(0.7);
        transform-origin: top right;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hide some butterflies on smaller screens */
    .butterfly {
        opacity: 0.5;
        width: 24px;
        height: 24px;
    }

    .butterfly-4,
    .butterfly-5,
    .butterfly-6 {
        display: none;
    }

    /* Music player smaller */
    .music-toggle {
        width: 42px;
        height: 42px;
    }

    .music-icon {
        font-size: 18px;
    }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .game-container {
        padding: 20px 15px;
        max-width: 100%;
    }
    
    /* Clock widget - hide on tablets for better layout */
    .stardew-clock {
        display: none;
    }

    /* Music player adjustments for tablet */
    .music-player {
        top: 10px;
        left: 10px;
    }

    .music-toggle {
        width: 40px;
        height: 40px;
    }

    .music-icon {
        font-size: 16px;
    }
    
    /* Character section improvements */
    .character-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .character-portrait {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .pixel-avatar {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .character-name {
        font-size: 18px;
    }
    
    .character-title {
        font-size: 12px;
    }
    
    .contact-info {
        gap: 15px;
        justify-content: center;
    }
    
    .contact-item {
        font-size: 9px;
        padding: 6px;
        gap: 6px;
    }
    
    /* Menu tabs - stack vertically */
    .menu-tabs {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 20px;
    }
    
    .tab {
        width: 100%;
        max-width: 240px;
        justify-content: center;
        padding: 14px 18px;
        font-size: 10px;
    }
    
    /* Content container adjustments */
    .content-container {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .panel-header h2 {
        font-size: 15px;
    }
    
    /* Skills grid */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .skill-item {
        padding: 12px;
        gap: 12px;
    }
    
    .skill-info h3 {
        font-size: 11px;
    }
    
    .skill-level {
        font-size: 9px;
    }
    
    /* Experience and education */
    .experience-item,
    .education-item {
        padding: 15px;
        gap: 12px;
    }
    
    .experience-content h3,
    .education-content h3 {
        font-size: 12px;
    }
    
    .company, .school {
        font-size: 10px;
    }
    
    .duration, .year {
        font-size: 9px;
    }
    
    .achievements li,
    .cert-list li {
        font-size: 9px;
    }
    
    /* Projects grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .project-item {
        padding: 15px;
    }
    
    .project-content h3 {
        font-size: 12px;
    }
    
    .project-description {
        font-size: 9px;
    }
    
    /* Other section */
    .other-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .collectible-item {
        padding: 15px;
    }
    
    .collectible-item h3 {
        font-size: 10px;
    }
    
    .collectible-item p {
        font-size: 8px;
    }
    
    /* Footer adjustments */
    .footer {
        padding: 15px;
    }

    .footer p {
        font-size: 8px;
    }

    /* Hide butterflies on tablets */
    .butterflies {
        display: none;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .game-container {
        padding: 15px 10px;
    }

    /* Clock widget - hide on mobile */
    .stardew-clock {
        display: none;
    }

    /* Character section mobile */
    .character-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .pixel-avatar {
        width: 80px;
        height: 80px;
    }

    .character-name {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .character-title {
        font-size: 10px;
        margin-bottom: 15px;
    }

    .contact-info {
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        font-size: 8px;
        padding: 5px;
        gap: 6px;
    }

    .contact-item .icon {
        display: none;
    }

    /* Menu tabs - full mobile stack */
    .menu-tabs {
        padding: 15px;
        gap: 6px;
    }

    .tab {
        width: 100%;
        max-width: 200px;
        padding: 10px 14px;
        font-size: 8px;
    }

    .tab-icon-img {
        width: 12px;
        height: 12px;
    }

    /* Content adjustments */
    .content-container {
        padding: 15px;
        min-height: 300px;
    }

    .panel-header h2 {
        font-size: 12px;
    }

    .header-icon {
        width: 16px;
        height: 16px;
    }

    /* Skills mobile layout */
    .skill-item {
        flex-direction: column;
        text-align: center;
        padding: 10px;
        gap: 8px;
    }

    .skill-icon {
        width: 28px;
        height: 28px;
        align-self: center;
    }

    .skill-info h3 {
        font-size: 9px;
        margin-bottom: 6px;
    }

    .skill-bar {
        height: 6px;
        margin-bottom: 4px;
    }

    .skill-level {
        font-size: 7px;
    }

    /* Experience mobile layout */
    .experience-item,
    .education-item {
        flex-direction: column;
        text-align: center;
        padding: 12px;
        gap: 10px;
    }

    .quest-marker {
        width: 28px;
        height: 28px;
        align-self: center;
    }

    .book-icon {
        font-size: 20px;
        align-self: center;
    }

    .experience-content h3,
    .education-content h3 {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .company, .school {
        font-size: 8px;
        margin-bottom: 2px;
    }

    .duration, .year {
        font-size: 7px;
        margin-bottom: 8px;
    }

    .achievements li,
    .cert-list li {
        font-size: 7px;
        margin-bottom: 5px;
        padding-left: 12px;
    }

    .achievements li::before {
        font-size: 6px;
    }

    .cert-list li::before {
        font-size: 6px;
    }

    /* Projects mobile layout */
    .project-item {
        padding: 12px;
    }

    .project-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
    }

    .project-content h3 {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .project-description {
        font-size: 7px;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .tech-tag {
        font-size: 6px;
        padding: 2px 6px;
    }

    .project-link {
        font-size: 6px;
        padding: 4px 8px;
    }

    /* Other section mobile */
    .other-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .collectible-item {
        padding: 12px;
    }

    .collectible-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
    }

    .hobby-icon {
        width: 24px;
        height: 24px;
        margin: 4px auto;
    }

    .collectible-item h3 {
        font-size: 9px;
        margin-bottom: 6px;
    }

    .collectible-item p {
        font-size: 7px;
        line-height: 1.3;
    }

    /* Footer mobile */
    .footer {
        padding: 12px;
    }

    .sparkles {
        font-size: 16px;
    }

    .footer p {
        font-size: 7px;
        margin-top: 8px;
    }

    /* Copy notification mobile */
    .copy-notification {
        font-size: 8px;
        padding: 8px 16px;
    }

    /* Butterfly adjustments for mobile */
    .butterfly {
        width: 24px;
        height: 24px;
    }

    /* Leaf system mobile optimization */
    .leaf {
        width: 64px;
        height: 64px;
    }

    .petal {
        width: 16px;
        height: 16px;
    }
}

/* Interactive Leaves System */
.interactive-leaves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

.leaf {
    position: absolute;
    width: 96px;
    height: 96px;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease;
    animation: leafSway 4s ease-in-out infinite;
}

.leaf:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.leaf.clicked {
    animation: leafShake 0.3s ease-out;
}

/* Real leaf image - perfect pixel art size */
.leaf::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: url('assets/images/leaf1.png') no-repeat center center;
    background-size: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transform: rotate(-15deg);
}

.leaf.type2::before {
    transform: rotate(25deg);
}

.leaf.type3::before {
    transform: rotate(-35deg);
}

/* Petal particles - using real falling leaf images */
.petal {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 600;
}

.petal::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.petal.type1::before {
    background-image: url('assets/images/FallingLeaf1.png');
}

.petal.type2::before {
    background-image: url('assets/images/FallingLeaf2.png');
}

.petal.type3::before {
    background-image: url('assets/images/FallingLeaf3.png');
}

.petal.type4::before {
    background-image: url('assets/images/FallingLeaf4.png');
}

/* Animations */
@keyframes leafSway {
    0%, 100% { 
        transform: rotate(-2deg) translateY(0px); 
    }
    25% { 
        transform: rotate(1deg) translateY(-2px); 
    }
    50% { 
        transform: rotate(2deg) translateY(0px); 
    }
    75% { 
        transform: rotate(-1deg) translateY(-1px); 
    }
}

@keyframes leafShake {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(-3deg); }
    50% { transform: scale(1.1) rotate(2deg); }
    75% { transform: scale(1.05) rotate(-1deg); }
}

@keyframes petalFallVariable {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 1;
        scale: 1;
    }
    100% {
        transform: translateY(var(--fall-distance)) translateX(var(--drift)) rotate(var(--rotation));
        opacity: 0;
        scale: 0.3;
    }
}

@keyframes petalWindFallVariable {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 1;
        scale: 1;
    }
    5% {
        transform: translateY(calc(var(--fall-distance) * 0.02)) translateX(calc(var(--drift) * 0.05)) rotate(calc(var(--rotation) * 0.05));
        opacity: 1;
        scale: 0.99;
    }
    15% {
        transform: translateY(calc(var(--fall-distance) * 0.08)) translateX(calc(var(--drift) * 0.12)) rotate(calc(var(--rotation) * 0.15));
        opacity: 1;
        scale: 0.97;
    }
    30% {
        transform: translateY(calc(var(--fall-distance) * 0.20)) translateX(calc(var(--drift) * 0.25)) rotate(calc(var(--rotation) * 0.30));
        opacity: 0.95;
        scale: 0.94;
    }
    45% {
        transform: translateY(calc(var(--fall-distance) * 0.35)) translateX(calc(var(--drift) * 0.42)) rotate(calc(var(--rotation) * 0.45));
        opacity: 0.92;
        scale: 0.90;
    }
    60% {
        transform: translateY(calc(var(--fall-distance) * 0.52)) translateX(calc(var(--drift) * 0.60)) rotate(calc(var(--rotation) * 0.60));
        opacity: 0.85;
        scale: 0.85;
    }
    75% {
        transform: translateY(calc(var(--fall-distance) * 0.70)) translateX(calc(var(--drift) * 0.78)) rotate(calc(var(--rotation) * 0.75));
        opacity: 0.70;
        scale: 0.75;
    }
    90% {
        transform: translateY(calc(var(--fall-distance) * 0.88)) translateX(calc(var(--drift) * 0.92)) rotate(calc(var(--rotation) * 0.90));
        opacity: 0.40;
        scale: 0.55;
    }
    100% {
        transform: translateY(var(--fall-distance)) translateX(var(--drift)) rotate(var(--rotation));
        opacity: 0;
        scale: 0.3;
    }
}

/* Reduced motion accessibility support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .butterfly,
    .butterflies,
    .leaf,
    .petal {
        display: none !important;
    }

    body::after {
        animation: none;
    }

    .sparkles {
        animation: none;
    }

    .clock-hand {
        animation: none;
    }

    .skill-progress::after {
        animation: none;
    }
}






