@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

html, body {
    height: 100vh;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    font-family: 'Press Start 2P', monospace;
    box-sizing: border-box;
    background: #4b8bbe;
}

body {
    min-height: 100vh;
    min-width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    color: #fff;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

#bg-canvas {
    position: fixed;
    z-index: 0;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-width: 100vw;
    display: block;
    pointer-events: none;
    image-rendering: pixelated;
    background: #4b8bbe;
}

header, main, footer {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.logo-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0 1rem 0;
}

.logo {
    display: block;
    margin: 0 auto 1rem auto;
    width: 210px;
    max-width: 52vw;
    min-width: 135px;
    image-rendering: pixelated;
}

h1 {
    font-size: 2.2rem;
    margin: 0.5rem 0 1.2rem 0;
    letter-spacing: 2px;
    text-align: center;
    width: 100%;
    max-width: 100vw;
    background: rgba(34,34,34,0.5);
    border-radius: 8px;
    display: block;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
    padding: 0.25em 0.7em;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1 0 auto;
    margin-bottom: 2rem;
}

.portfolio-panels {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2.5rem;
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto;
}

.portfolio-panel {
    background: rgba(20, 20, 20, 0.7);
    border: 2px solid #4b8bbe;
    border-radius: 14px;
    box-shadow: 0 2px 0 #888;
    color: #fff;
    padding: 1.5rem 1.2rem 1.5rem 1.2rem;
    width: 300px;
    min-width: 220px;
    max-width: 300px;
    min-height: 320px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    transition: box-shadow 0.2s;
}

.portfolio-panel h2 {
    font-size: 1.2rem;
    margin: 0.6em 0 0.3em 0;
    text-align: center;
    background: rgba(34,34,34,0.5);
    border-radius: 7px;
    padding: 0.2em 0.4em;
    width: 100%;
}

.panel-icon {
    display: block;
    margin: 0 auto 1rem auto;
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
}

.icon-content, .icon-app, .icon-book {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-content {
    background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><rect x="18" y="30" width="12" height="6" fill="%23ffd800" stroke="%23222" stroke-width="2"/><rect x="14" y="14" width="20" height="16" fill="%23fff" stroke="%23222" stroke-width="2"/><rect x="20" y="18" width="8" height="8" fill="%234b8bbe"/><rect x="28" y="18" width="4" height="8" fill="%23b97a56"/><rect x="12" y="34" width="24" height="4" fill="%234b8bbe"/></svg>');
}
.icon-app {
    background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><rect x="14" y="8" width="20" height="32" rx="4" fill="%234b8bbe" stroke="%23222" stroke-width="2"/><rect x="20" y="14" width="8" height="14" fill="%23fff"/><rect x="22" y="32" width="4" height="4" fill="%23ffd800"/><rect x="18" y="10" width="12" height="2" fill="%23fff"/></svg>');
}
.icon-book {
    background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><rect x="10" y="10" width="28" height="28" rx="4" fill="%23ffd800" stroke="%23222" stroke-width="2"/><rect x="18" y="14" width="12" height="20" fill="%23fff"/><rect x="20" y="16" width="8" height="16" fill="%234b8bbe"/></svg>');
}

.email-link {
    display: inline-block;
    font-size: 1rem;
    color: #ffd800;
    background: #181818;
    border: 2px solid #ffd800;
    border-radius: 8px;
    padding: 0.7rem 1.2rem;
    margin: 2rem 0 0 0;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}
.email-link:hover {
    background: #ffd800;
    color: #181818;
    text-decoration: none;
}

h1, h2, h3, .tagline, .portfolio-panel p, .footer-info, .contact-email {
    color: #fff;
    background: rgba(34,34,34,0.5);
    padding: 0.25em 0.7em;
    border-radius: 7px;
    display: inline-block;
}

footer {
    margin: 2.5rem 0 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
    width: 100%;
}

.footer-info {
    margin-top: 0.5rem;
}

.privacy-link {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
    background: none;
    font-size: 1em;
    padding: 0.1em 0.2em;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}
.privacy-link:hover {
    color: #111;
    background: #fff;
    text-decoration: none;
}

body.privacy-page main {
    background: #fff;
    color: #111;
    border-radius: 12px;
    box-shadow: 0 2px 16px #2223;
    padding: 2.5rem 1.5rem;
    font-family: Arial, sans-serif;
    margin: 2rem auto;
    max-width: 800px;
    text-align: left;
    display: block;
}

label {
    display: block;
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

input, textarea {
    width: 100%;
    background: #181818;
    border: 2px solid #4b8bbe;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
    padding: 0.6rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.3rem;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
}

input:focus, textarea:focus {
    border-color: #ffd800;
}

.start-btn {
    display: block;
    margin: 1.2rem auto 0 auto;
    background: #ffd800;
    color: #222;
    border: 3px solid #222;
    border-radius: 6px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.1rem;
    padding: 0.7rem 2.5rem;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 2px 0 #4b8bbe;
    transition: background 0.15s, box-shadow 0.15s;
    animation: btn-blink 1.5s steps(2) infinite;
}

@keyframes fade-in {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes btn-blink {
    0%, 100% { background: #ffd800; }
    50% { background: #ffb800; }
}

#form-status {
    display: block;
    margin-top: 1rem;
    min-height: 1.2em;
    font-size: 0.8rem;
    color: #ffd800;
    text-align: center;
}

@media (max-width: 900px) {
    .portfolio-panels {
        gap: 1.2rem;
    }
    .portfolio-panel {
        width: 90vw;
        max-width: 400px;
        min-width: 0;
    }
}

@media (max-width: 700px) {
    .logo {
        width: 150px;
        max-width: 80vw;
        min-width: 90px;
    }
    .panel-icon {
        width: 90px;
        height: 90px;
    }
    .portfolio-panels {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .portfolio-panel {
        width: 95vw;
        max-width: 99vw;
        min-width: 0;
        min-height: 0;
    }
    h1 {
        font-size: 1.1rem;
        letter-spacing: 1px;
        max-width: 100vw;
        word-break: break-word;
        white-space: normal;
        overflow-wrap: anywhere;
        box-sizing: border-box;
        padding: 0.15em 0.1em;
    }
}

.contact-section { display: none !important; }

footer nav {
    margin-bottom: 0.5rem;
}

footer a {
    color: #4b8bbe;
    text-decoration: none;
    border-bottom: 1px dotted #4b8bbe;
}

footer a:hover {
    color: #ffd800;
    border-bottom: 1px solid #ffd800;
}
