/* Custom Terminal Styles */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Fira Code', 'ui-monospace', 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    line-height: 1.6;
    background: 
        radial-gradient(ellipse at top, rgba(29, 78, 216, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(139, 69, 19, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 25%, #16213e 50%, #0f0f0f 100%);
    color: #00ff00;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Galaxy Background */
.galaxy-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    background: 
        /* Distant stars layer */
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(200,230,255,0.8), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(180,200,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 200px 90px, rgba(220,240,255,0.7), transparent),
        radial-gradient(1px 1px at 240px 50px, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 280px 10px, rgba(190,210,255,0.6), transparent),
        radial-gradient(1px 1px at 320px 120px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 360px 60px, rgba(210,230,255,0.7), transparent),
        
        /* Galaxy spiral arms */
        conic-gradient(from 45deg at 30% 70%, 
            transparent 0deg, 
            rgba(74, 158, 255, 0.1) 60deg, 
            rgba(120, 119, 198, 0.15) 120deg,
            transparent 180deg,
            rgba(255, 119, 198, 0.08) 240deg,
            transparent 300deg,
            rgba(74, 158, 255, 0.1) 360deg),
            
        /* Deep space gradient */
        linear-gradient(45deg, 
            rgba(16, 35, 70, 0.4) 0%, 
            rgba(42, 82, 152, 0.2) 25%, 
            rgba(30, 60, 114, 0.3) 50%, 
            rgba(16, 35, 70, 0.4) 75%, 
            rgba(8, 20, 40, 0.5) 100%);
    background-size: 
        300px 200px, 350px 250px, 280px 180px, 320px 220px, 290px 190px,
        310px 210px, 270px 170px, 330px 230px, 300px 200px, 280px 180px,
        100% 100%, 100% 100%;
    animation: galaxy-drift 200s linear infinite;
}

@keyframes galaxy-drift {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-50px) translateY(-25px); }
    50% { transform: translateX(0) translateY(-50px); }
    75% { transform: translateX(50px) translateY(-25px); }
    100% { transform: translateX(0) translateY(0); }
}

/* Moving Stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9;
}

.star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 3s infinite alternate;
}

.star.small {
    width: 1px;
    height: 1px;
    animation-duration: 2s;
}

.star.medium {
    width: 2px;
    height: 2px;
    animation-duration: 3s;
    box-shadow: 0 0 6px #ffffff;
}

.star.large {
    width: 3px;
    height: 3px;
    animation-duration: 4s;
    box-shadow: 0 0 10px #ffffff, 0 0 20px #4a9eff;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Shooting Stars */
.shooting-star {
    position: fixed;
    z-index: -8;
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 0 0 8px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(255, 255, 255, 1);
    animation: shooting 3s linear infinite;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, #ffffff, transparent);
    border-radius: 999px;
    right: 0;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, rgba(74, 158, 255, 0.8), transparent);
    border-radius: 999px;
    right: 0;
}

@keyframes shooting {
    0% {
        opacity: 1;
        transform: translateX(300px) translateY(-300px);
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(-300px) translateY(300px);
    }
}

.shooting-star:nth-child(1) {
    top: 10%;
    right: 0;
    animation-delay: 0s;
    animation-duration: 4s;
}

.shooting-star:nth-child(2) {
    top: 30%;
    right: 80px;
    animation-delay: 2s;
    animation-duration: 3s;
}

.shooting-star:nth-child(3) {
    top: 50%;
    right: 0;
    animation-delay: 5s;
    animation-duration: 3.5s;
}

.shooting-star:nth-child(4) {
    top: 70%;
    right: 150px;
    animation-delay: 8s;
    animation-duration: 4.5s;
}

.shooting-star:nth-child(5) {
    top: 20%;
    right: 200px;
    animation-delay: 12s;
    animation-duration: 3s;
}

/* Enhanced Nebula Effect */
.nebula {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -11;
    background: 
        /* Primary nebula clouds */
        radial-gradient(ellipse 800px 600px at 25% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse 600px 400px at 75% 70%, rgba(255, 20, 147, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse 700px 500px at 60% 20%, rgba(0, 191, 255, 0.08) 0%, transparent 50%),
        
        /* Secondary nebula wisps */
        radial-gradient(ellipse 400px 300px at 10% 80%, rgba(75, 0, 130, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 500px 350px at 90% 40%, rgba(30, 144, 255, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 300px 200px at 40% 60%, rgba(186, 85, 211, 0.1) 0%, transparent 50%),
        
        /* Dust lanes */
        linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.02) 30%, transparent 70%),
        linear-gradient(60deg, transparent 20%, rgba(138, 43, 226, 0.05) 50%, transparent 80%);
    animation: nebula-drift 80s ease-in-out infinite alternate;
}

@keyframes nebula-drift {
    0% { 
        transform: translateX(0) translateY(0) scale(1);
        filter: hue-rotate(0deg);
    }
    100% { 
        transform: translateX(50px) translateY(-30px) scale(1.1);
        filter: hue-rotate(20deg);
    }
}

/* Terminal enhancements for better visibility */
.container {
    position: relative;
    z-index: 1;
}

/* Terminal window backdrop with galaxy integration */
.bg-gray-800, .bg-terminal-bg {
    background-color: rgba(5, 5, 15, 0.75) !important;
    backdrop-filter: blur(15px) saturate(1.2);
    border: 1px solid rgba(74, 158, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#content-panel {
    background-color: rgba(8, 8, 20, 0.8) !important;
    backdrop-filter: blur(12px) saturate(1.1);
    border: 1px solid rgba(120, 119, 198, 0.2);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Terminal header enhancements */
.bg-gray-800.rounded-t-lg {
    background: linear-gradient(135deg, 
        rgba(20, 20, 40, 0.9) 0%, 
        rgba(30, 30, 60, 0.8) 100%) !important;
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
}

/* Enhanced Social Links */
.social-link {
    position: relative;
    display: block;
    transition: all 0.3s ease;
}

.social-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.social-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-left: 6px solid rgba(0, 0, 0, 0.9);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.github-link .social-icon-wrapper {
    color: #f0f6fc;
}

.github-link:hover .social-icon-wrapper {
    background: rgba(36, 41, 47, 0.9);
    border-color: #f0f6fc;
    color: #ffffff;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(240, 246, 252, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.linkedin-link .social-icon-wrapper {
    color: #0a66c2;
}

.linkedin-link:hover .social-icon-wrapper {
    background: rgba(10, 102, 194, 0.2);
    border-color: #0a66c2;
    color: #0a66c2;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(10, 102, 194, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.social-link:hover .social-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* Glowing effect for social links */
.social-link::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 17px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-link:hover::before {
    opacity: 1;
    animation: social-glow 2s ease-in-out infinite alternate;
}

@keyframes social-glow {
    0% { 
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    }
    100% { 
        background: linear-gradient(45deg, transparent, rgba(74, 158, 255, 0.3), transparent);
    }
}

/* Cosmic Elements */

/* Planets */
.planets {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9;
    pointer-events: none;
}

.planet {
    position: absolute;
    border-radius: 50%;
    animation: planet-orbit 120s linear infinite;
}

.planet.jupiter {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #d4a574, #a67c52, #8b5a2b);
    box-shadow: 
        inset -10px -10px 20px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(212, 165, 116, 0.3);
    top: 15%;
    left: 5%;
}

.planet.saturn {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #f4e4a6, #d4c68a, #b8a472);
    box-shadow: 
        inset -8px -8px 15px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(244, 228, 166, 0.3);
    top: 70%;
    right: 10%;
    animation-duration: 150s;
}

.planet.saturn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: none;
    border-bottom: none;
}

.planet.mars {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #ff6b47, #e94a2a, #d63619);
    box-shadow: 
        inset -6px -6px 12px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 107, 71, 0.3);
    top: 40%;
    left: 15%;
    animation-duration: 90s;
}

/* Distant Galaxies */
.distant-galaxies {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
}

.distant-galaxy {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: galaxy-rotation 200s linear infinite;
}

.galaxy-spiral {
    width: 120px;
    height: 60px;
    background: 
        radial-gradient(ellipse at center, 
            rgba(255, 255, 255, 0.1) 0%, 
            rgba(138, 43, 226, 0.08) 30%, 
            transparent 70%);
    top: 25%;
    right: 15%;
    transform: rotate(45deg);
}

.galaxy-elliptical {
    width: 80px;
    height: 80px;
    background: 
        radial-gradient(circle at center, 
            rgba(255, 200, 100, 0.1) 0%, 
            rgba(255, 150, 50, 0.06) 40%, 
            transparent 70%);
    top: 60%;
    left: 20%;
}

/* Asteroid Belt */
.asteroid-belt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -8;
    pointer-events: none;
}

.asteroid {
    position: absolute;
    background: #8b7355;
    border-radius: 40% 60% 70% 30%;
    opacity: 0.6;
    animation: asteroid-drift 60s linear infinite;
}

.asteroid.small {
    width: 3px;
    height: 3px;
}

.asteroid.medium {
    width: 5px;
    height: 5px;
}

.asteroid.large {
    width: 8px;
    height: 8px;
}

/* Cosmic Dust */
.cosmic-dust {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -12;
    pointer-events: none;
    background: 
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 25% 40%, rgba(200, 200, 255, 0.08), transparent),
        radial-gradient(1px 1px at 45% 10%, rgba(255, 255, 255, 0.06), transparent),
        radial-gradient(1px 1px at 65% 70%, rgba(255, 200, 200, 0.05), transparent),
        radial-gradient(1px 1px at 80% 30%, rgba(200, 255, 200, 0.04), transparent),
        radial-gradient(1px 1px at 15% 80%, rgba(255, 255, 255, 0.07), transparent),
        radial-gradient(1px 1px at 35% 60%, rgba(200, 200, 255, 0.05), transparent),
        radial-gradient(1px 1px at 55% 85%, rgba(255, 255, 255, 0.06), transparent),
        radial-gradient(1px 1px at 75% 15%, rgba(255, 200, 200, 0.04), transparent),
        radial-gradient(1px 1px at 90% 50%, rgba(200, 255, 200, 0.05), transparent);
    background-size: 
        100px 100px, 150px 150px, 120px 120px, 180px 180px, 140px 140px,
        110px 110px, 160px 160px, 130px 130px, 170px 170px, 190px 190px;
    animation: cosmic-drift 300s linear infinite;
}

/* Pulsars */
.pulsar {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    animation: pulsar-pulse 2s ease-in-out infinite;
}

.pulsar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulsar-glow 2s ease-in-out infinite;
}

/* Enhanced Shooting Stars */
.shooting-star:nth-child(6) {
    top: 25%;
    right: 200px;
    animation-delay: 15s;
    animation-duration: 2.5s;
}

.shooting-star:nth-child(7) {
    top: 85%;
    right: 100px;
    animation-delay: 18s;
    animation-duration: 4s;
}

/* Animations */
@keyframes planet-orbit {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(20px) translateY(-10px); }
    50% { transform: translateX(0) translateY(-20px); }
    75% { transform: translateX(-20px) translateY(-10px); }
    100% { transform: translateX(0) translateY(0); }
}

@keyframes galaxy-rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes asteroid-drift {
    0% { 
        transform: translateX(-100px) translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { 
        transform: translateX(calc(100vw + 100px)) translateY(-50px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes cosmic-drift {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-30px) translateY(-20px); }
    100% { transform: translateX(0) translateY(0); }
}

@keyframes pulsar-pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.3;
        transform: scale(1.5);
    }
}

@keyframes pulsar-glow {
    0%, 100% { 
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(2);
    }
}

/* Enhanced Terminal Glow Effect */
.terminal-glow {
    text-shadow: 
        0 0 5px #00ff00,
        0 0 10px #00ff00,
        0 0 15px #00ff00,
        0 0 20px #00ff00;
    animation: terminal-pulse 2s ease-in-out infinite alternate;
}

@keyframes terminal-pulse {
    0% {
        text-shadow: 
            0 0 5px #00ff00,
            0 0 10px #00ff00,
            0 0 15px #00ff00,
            0 0 20px #00ff00;
    }
    100% {
        text-shadow: 
            0 0 10px #00ff00,
            0 0 20px #00ff00,
            0 0 30px #00ff00,
            0 0 40px #00ff00;
    }
}

/* Theme Title Styling - Eye-friendly */
.theme-title {
    color: #a0e7a0; /* Soft mint green - much easier on eyes */
    text-shadow: 
        0 0 5px rgba(160, 231, 160, 0.4),
        0 0 10px rgba(160, 231, 160, 0.2),
        0 0 15px rgba(160, 231, 160, 0.1);
    animation: gentle-glow 3s ease-in-out infinite alternate;
}

@keyframes gentle-glow {
    0% {
        text-shadow: 
            0 0 5px rgba(160, 231, 160, 0.4),
            0 0 10px rgba(160, 231, 160, 0.2),
            0 0 15px rgba(160, 231, 160, 0.1);
    }
    100% {
        text-shadow: 
            0 0 8px rgba(160, 231, 160, 0.5),
            0 0 15px rgba(160, 231, 160, 0.3),
            0 0 20px rgba(160, 231, 160, 0.15);
    }
}

/* Footer Styling */
footer {
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, 0.6);
    border-top: 1px solid rgba(0, 255, 0, 0.4);
}

/* Responsive Design Improvements */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .terminal-container {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    /* Social Links */
    .fixed.top-6.right-6 {
        top: 0.5rem;
        right: 0.5rem;
        flex-direction: row;
        space-y: 0;
        gap: 0.5rem;
    }
    
    .social-icon-wrapper {
        width: 45px;
        height: 45px;
    }
    
    .social-tooltip {
        right: 55px;
        font-size: 11px;
        padding: 4px 8px;
    }
    
    /* Terminal Container */
    .container {
        padding: 0.5rem;
        max-width: 100%;
    }
    
    .bg-terminal-bg {
        min-height: 70vh;
        padding: 1rem;
        overflow-x: hidden;
    }
    
    /* Terminal Header Mobile */
    .bg-gray-800 {
        border-radius: 8px 8px 0 0;
    }
    
    .bg-gray-800 .text-sm {
        font-size: 0.75rem;
    }
    
    /* Theme and Quote */
    .text-center h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .text-center p {
        font-size: 0.875rem;
        line-height: 1.4;
        padding: 0 0.5rem;
    }
    
    /* Content Panel Responsive */
    #content-panel {
        padding: 1rem;
        font-size: 0.875rem;
        line-height: 1.5;
        overflow-x: auto;
    }
    
    /* Make tables responsive */
    #content-panel table {
        width: 100%;
        min-width: 280px;
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    #content-panel th,
    #content-panel td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
        word-break: break-word;
        white-space: pre-wrap;
    }
    
    /* ASCII Art Mobile Responsive */
    .ascii-art {
        font-size: 0.6rem;
        line-height: 1.2;
        overflow-x: auto;
        white-space: pre;
        padding: 0.5rem;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 4px;
        margin-bottom: 1rem;
    }
    
    /* Skills Grid Mobile */
    .skills-grid {
        display: block;
    }
    
    .skill-category {
        margin-bottom: 1.5rem;
    }
    
    .skill-category h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    /* Command Input Container */
    .command-input-container {
        padding: 0.75rem 0;
        min-height: 60px;
        align-items: center;
    }
    
    .prompt-text {
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .mobile-prompt {
        display: none;
    }
    
    .desktop-prompt {
        display: inline;
    }
    
    /* Command Input */
    #command-input {
        font-size: 16px;
        padding: 0.5rem 0.25rem;
        min-height: 44px;
        line-height: 1.4;
    }
    
    #command-input::placeholder {
        font-size: 16px !important;
        opacity: 1 !important;
        color: rgba(0, 255, 0, 0.8) !important;
        font-weight: 500;
        text-shadow: 0 0 3px rgba(0, 255, 0, 0.2);
    }
    
    /* Cursor */
    #cursor {
        font-size: 16px;
        margin-left: 2px;
    }
    
    /* Mobile Command Buttons */
    .mobile-cmd-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    /* Content Panel */
    #content-panel {
        padding: 1rem;
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    /* Scale down cosmic elements on mobile */
    .planet.jupiter { width: 50px; height: 50px; }
    .planet.saturn { width: 40px; height: 40px; }
    .planet.mars { width: 25px; height: 25px; }
    .galaxy-spiral { width: 70px; height: 35px; }
    .galaxy-elliptical { width: 50px; height: 50px; }
    
    /* Reduce shooting stars on mobile */
    .shooting-star:nth-child(n+4) {
        display: none;
    }
    
    /* Footer */
    footer {
        background: rgba(0, 0, 0, 0.6) !important;
        border-top: 1px solid rgba(0, 255, 0, 0.4) !important;
    }
    
    footer p {
        font-size: 0.85rem;
        padding: 0 1rem;
        color: rgba(0, 255, 0, 0.8);
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .text-center h2 {
        font-size: 1.25rem;
    }
    
    .text-center p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .container {
        padding: 0.25rem;
    }
    
    .bg-terminal-bg {
        padding: 0.75rem;
        min-height: 60vh;
    }
    
    #mobile-commands {
        gap: 0.5rem;
    }
    
    .mobile-cmd-btn {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    /* Enhanced command input for very small screens */
    .command-input-container {
        min-height: 70px;
        padding: 1rem 0;
        flex-wrap: nowrap;
    }
    
    .prompt-text {
        font-size: 12px;
        margin-right: 0.5rem;
    }
    
    /* Mobile prompt switching */
    .desktop-prompt {
        display: none;
    }
    
    .mobile-prompt {
        display: inline !important;
        font-size: 14px;
        font-weight: 700;
        color: rgba(0, 255, 0, 1);
    }
    
    #command-input {
        font-size: 16px !important;
        min-height: 50px;
        padding: 0.75rem 0.5rem;
        border: 1px solid rgba(0, 255, 0, 0.3);
        border-radius: 4px;
        background: rgba(0, 0, 0, 0.2);
    }
    
    #command-input::placeholder {
        font-size: 16px !important;
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
        font-weight: 600;
        text-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
    }
    
    #cursor {
        font-size: 16px;
        margin-left: 4px;
    }
    
    /* Better table handling */
    #content-panel table {
        font-size: 0.7rem;
        min-width: 250px;
    }
    
    #content-panel th,
    #content-panel td {
        padding: 0.4rem 0.2rem;
        font-size: 0.7rem;
    }
    
    /* Enhanced ASCII Art for very small screens */
    .ascii-art {
        font-size: 0.5rem !important;
        line-height: 1.1;
        padding: 0.4rem;
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(0, 255, 0, 0.2);
    }
    
    /* Footer improvements */
    footer p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* Further reduce cosmic elements */
    .planet.jupiter { width: 35px; height: 35px; }
    .planet.saturn { width: 30px; height: 30px; }
    .planet.mars { width: 20px; height: 20px; }
    .galaxy-spiral { width: 50px; height: 25px; }
    .galaxy-elliptical { width: 35px; height: 35px; }
    
    /* Hide some visual effects on very small screens */
    .cosmic-dust {
        opacity: 0.3;
    }
    
    .aurora {
        opacity: 0.2;
    }
}

/* iPhone and Android specific fixes */
@media (max-width: 430px) {
    /* iPhone 14 Pro Max, iPhone 15 Pro Max, etc. */
    .command-input-container {
        padding: 1.2rem 0;
        min-height: 80px;
        background: rgba(0, 0, 0, 0.4);
        border-radius: 8px;
        margin: 1rem 0;
    }
    
    .prompt-text {
        font-size: 11px;
        color: rgba(0, 255, 0, 0.8);
    }
    
    /* Ultra mobile prompt optimization */
    .desktop-prompt {
        display: none;
    }
    
    .mobile-prompt {
        display: inline !important;
        font-size: 16px;
        font-weight: 800;
        color: rgba(0, 255, 0, 1);
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
        margin-right: 0.75rem;
    }
    
    #command-input {
        font-size: 16px !important;
        min-height: 55px;
        padding: 1rem 0.75rem;
        border: 2px solid rgba(0, 255, 0, 0.4);
        border-radius: 6px;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(5px);
    }
    
    #command-input::placeholder {
        font-size: 15px !important;
        font-weight: 600;
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
    }
    
    #command-input:focus {
        border-color: rgba(0, 255, 0, 0.8);
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    }
    
    /* Mobile Command Buttons Enhanced */
    #mobile-commands {
        margin-top: 1.5rem;
        gap: 0.5rem;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
        border: 1px solid rgba(0, 255, 0, 0.2);
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mobile-cmd-btn {
        padding: 0.75rem 0.25rem;
        font-size: 0.85rem;
        min-height: 44px;
        border: 2px solid rgba(0, 255, 0, 0.3);
        background: rgba(0, 0, 0, 0.4);
        border-radius: 6px;
        font-weight: 600;
        transition: all 0.3s ease;
        text-align: center;
        white-space: nowrap;
    }
    
    .mobile-cmd-btn:hover,
    .mobile-cmd-btn:active {
        border-color: rgba(0, 255, 0, 0.8);
        background: rgba(0, 255, 0, 0.1);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 255, 0, 0.2);
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .bg-terminal-bg {
        min-height: 80vh;
    }
    
    .text-center {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .text-center h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .text-center p {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .command-input-container {
        min-height: 60px;
        padding: 0.75rem 0;
    }
    
    #mobile-commands {
        margin-top: 1rem;
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Touch and Focus States for Mobile */
@media (max-width: 768px) {
    /* Enhanced touch targets */
    button, input, [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better focus visibility */
    #command-input:focus {
        outline: 2px solid rgba(0, 255, 0, 0.6);
        outline-offset: 2px;
        border-color: rgba(0, 255, 0, 0.8);
        box-shadow: 
            0 0 0 3px rgba(0, 255, 0, 0.2),
            0 0 10px rgba(0, 255, 0, 0.3);
    }
    
    /* Prevent text selection on buttons */
    .mobile-cmd-btn {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Better scrolling */
    .bg-terminal-bg {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
    
    /* Content scaling */
    #content-panel {
        font-size: 0.9rem;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Ensure text doesn't overflow */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .terminal-glow {
        text-shadow: 
            0 0 3px #00ff00,
            0 0 6px #00ff00,
            0 0 9px #00ff00,
            0 0 12px #00ff00;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    #command-input {
        /* Prevent zoom on input focus in iOS */
        font-size: 16px !important;
        -webkit-appearance: none;
        border-radius: 6px;
    }
    
    #command-input::placeholder {
        /* iOS placeholder fixes */
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
        -webkit-text-fill-color: rgba(0, 255, 0, 0.9) !important;
        font-size: 16px !important;
        font-weight: 600;
    }
    
    #command-input::-webkit-input-placeholder {
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
        -webkit-text-fill-color: rgba(0, 255, 0, 0.9) !important;
    }
    
    .command-input-container {
        /* Prevent iOS button styling */
        -webkit-appearance: none;
        background-clip: padding-box;
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) {
    #command-input {
        /* Better rendering on Android */
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
    }
    
    #command-input::placeholder {
        /* Android placeholder fixes */
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
        font-size: 16px !important;
        font-weight: 600;
    }
    
    #command-input::-webkit-input-placeholder {
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
    }
    
    #command-input::-moz-placeholder {
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
    }
    
    #command-input:-ms-input-placeholder {
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
    }
}

/* Universal Mobile Placeholder Fix */
@media (max-width: 768px) {
    /* Force visible placeholder on all mobile browsers */
    #command-input::placeholder,
    #command-input::-webkit-input-placeholder,
    #command-input::-moz-placeholder,
    #command-input:-ms-input-placeholder {
        color: rgba(0, 255, 0, 0.9) !important;
        opacity: 1 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        -webkit-text-fill-color: rgba(0, 255, 0, 0.9) !important;
        text-shadow: 0 0 8px rgba(0, 255, 0, 0.4) !important;
    }
    
    /* Additional mobile input enhancements */
    #command-input {
        color: rgba(0, 255, 0, 1) !important;
        -webkit-text-fill-color: rgba(0, 255, 0, 1) !important;
        background: rgba(0, 0, 0, 0.5) !important;
        border: 2px solid rgba(0, 255, 0, 0.5) !important;
        flex: 1;
        max-width: calc(100% - 60px); /* Account for shorter prompt */
    }
    
    #command-input:focus {
        background: rgba(0, 0, 0, 0.7) !important;
        border-color: rgba(0, 255, 0, 0.9) !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a9eff;
}

/* Terminal Input Focus */
#command-input:focus {
    outline: none;
    background: transparent;
}

/* Command History Animations */
.command-entry {
    opacity: 0;
    transform: translateY(10px);
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Panel Animations */
.content-show {
    display: block !important;
    animation: fadeInUp 0.5s ease-out forwards;
}

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

/* Typing Effect */
.typing::after {
    content: '▋';
    animation: blink 1s infinite;
    color: #00ff00;
}

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

/* Mobile Command Buttons */
.mobile-cmd-btn {
    background: #1a1a1a;
    border: 1px solid #333333;
    color: #00d4aa;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-cmd-btn:hover {
    background: #333333;
    color: #4a9eff;
    border-color: #4a9eff;
}

.mobile-cmd-btn:active {
    transform: scale(0.95);
}

/* Project Cards */
.project-card {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: #4a9eff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.1);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.skill-category {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 16px;
}

.skill-category h4 {
    color: #4a9eff;
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-category li {
    color: #00d4aa;
    margin-bottom: 4px;
    position: relative;
    padding-left: 12px;
}

.skill-category li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #666666;
}

/* Contact Links */
.contact-link {
    display: inline-block;
    color: #4a9eff;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #4a9eff;
    border-radius: 4px;
    margin: 4px 8px 4px 0;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: #4a9eff;
    color: #0a0a0a;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px 8px;
    }
    
    #content-panel {
        padding: 16px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        position: static;
        margin-bottom: 16px;
        text-align: center;
    }
}

/* Loading Screen */
#loading-screen {
    background: #0a0a0a;
    transition: opacity 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ASCII Art Styling */
.ascii-art {
    font-family: 'Courier New', monospace;
    white-space: pre;
    color: #00d4aa;
    font-size: 12px;
    line-height: 1.2;
    margin: 16px 0;
}

/* Command Suggestions */
.command-suggestion {
    color: #666666;
    font-style: italic;
    margin-left: 16px;
}

/* Error Messages */
.error-message {
    color: #ff6b6b;
    font-weight: 500;
}

/* Success Messages */
.success-message {
    color: #4ecdc4;
    font-weight: 500;
}

/* Highlight Text */
.highlight {
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Terminal Prompt */
.terminal-prompt {
    color: #00d4aa;
    font-weight: 500;
}

/* Content Sections */
.content-section {
    margin-bottom: 24px;
}

.content-section h3 {
    color: #4a9eff;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.content-section p {
    color: #cccccc;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* List Styling */
.terminal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terminal-list li {
    color: #00d4aa;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.terminal-list li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: #4a9eff;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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