/* ABOUTME: Main stylesheet for PenguinboiSoftware landing page */
/* ABOUTME: Provides playful gaming aesthetic with animations and responsive design */

@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/press-start-2p.woff2') format('woff2');
}

@font-face {
    font-family: 'VT323';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/vt323.woff2') format('woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a3e;
    --accent-blue: #4da6ff;
    --accent-purple: #b366ff;
    --accent-pink: #ff6bff;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d4;
    --card-bg: rgba(26, 26, 62, 0.8);
    --shadow: 0 8px 32px rgba(77, 166, 255, 0.2);
}

body {
    font-family: 'VT323', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Skip to main content link for keyboard accessibility */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: var(--accent-blue);
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 1em;
}

/* Animated starfield background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(2px 2px at 75% 90%, white, transparent);
    background-size: 200% 200%;
    animation: twinkle 8s ease-in-out infinite;
}

.stars::after {
    background-image:
        radial-gradient(1px 1px at 40% 20%, var(--accent-blue), transparent),
        radial-gradient(1px 1px at 70% 80%, var(--accent-purple), transparent),
        radial-gradient(1px 1px at 10% 60%, var(--accent-pink), transparent);
    animation: twinkle 10s ease-in-out infinite reverse;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.penguin-emoji {
    font-size: 4rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(77, 166, 255, 0.5);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.tagline {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-top: 15px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.project-card {
    background: var(--card-bg);
    border: 2px solid var(--accent-blue);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.project-card:nth-child(1) { animation-delay: 0.2s; }
.project-card:nth-child(2) { animation-delay: 0.4s; }
.project-card:nth-child(3) { animation-delay: 0.6s; }

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

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow);
}

.card-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.game-preview {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid var(--accent-blue);
    box-shadow: 0 4px 15px rgba(77, 166, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover .game-preview {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(77, 166, 255, 0.5);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

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

.project-card h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-blue);
}

.project-card p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.play-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(77, 166, 255, 0.4);
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(77, 166, 255, 0.6);
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
}

.play-button:active {
    transform: scale(0.98);
}

.play-button:focus {
    outline: 3px solid var(--accent-pink);
    outline-offset: 4px;
}

/* Enhanced focus states for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

*:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 1.3rem;
    border-top: 1px solid var(--bg-secondary);
}

.footer p {
    margin: 5px 0;
}

.privacy-link {
    color: var(--accent-purple);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-purple);
    transition: all 0.3s ease;
}

.privacy-link:hover {
    color: var(--accent-pink);
    border-bottom-color: var(--accent-pink);
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }

    .penguin-emoji {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1.4rem;
    }

    .projects {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-card h2 {
        font-size: 1.2rem;
    }

    .play-button {
        font-size: 0.9rem;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.2rem;
    }

    .logo {
        flex-direction: column;
        gap: 10px;
    }

    .container {
        padding: 20px 15px;
    }
}
