:root {
    --background-color: #000000; /* Black background */
    --text-color: #f12f12; /* Red foreground */
    --link-hover-color: #ff4d4d; /* Lighter red for hover */
    --section-spacing: 6rem;
    --accent-color: rgba(241, 47, 18, 0.1);
    --border-color: #f12f12;
}

html {
    scroll-behavior: smooth;
}

@font-face {
    font-family: 'Press Start 2P';
    src: url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
}

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

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Press Start 2P', monospace;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    image-rendering: pixelated;
}

/* Top and bottom decorative bars */
body::before,
body::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--text-color);
    z-index: 100;
}

body::before {
    top: 0;
}

body::after {
    bottom: 0;
}

/* Retro corner decorations */
.corner-decoration {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--text-color);
    z-index: 1;
}

.corner-top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.corner-top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.corner-bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.corner-bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* Retro pixel art decorations */
.pixel-art {
    position: fixed;
    width: 20px;
    height: 20px;
    background-color: var(--text-color);
    opacity: 0.8;
    z-index: 1;
}

.pixel-1 { top: 60px; left: 60px; }
.pixel-2 { top: 80px; left: 60px; }
.pixel-3 { top: 60px; left: 80px; }
.pixel-4 { top: 80px; left: 80px; }

/* Section decorative elements */
section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 20px;
    height: 20px;
    background-color: var(--text-color);
    clip-path: polygon(0 0, 100% 0, 100% 20%, 20% 20%, 20% 100%, 0 100%);
}

section::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    background-color: var(--text-color);
    clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 80% 0, 80% 80%, 0 80%);
}

/* Retro scanlines effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 2;
}

/* CRT screen effect */
.crt-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    pointer-events: none;
    z-index: 3;
}

/* Background Texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.05"/></svg>');
    pointer-events: none;
    z-index: -1;
}

/* Vignette Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: -1;
}

main {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: var(--section-spacing);
    padding: 4rem 0;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background-color: var(--text-color);
    opacity: 0.8;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    position: relative;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px #000000;
}

h1::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background-color: var(--text-color);
    opacity: 0.8;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.05em;
}

section {
    margin-bottom: var(--section-spacing);
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
    position: relative;
    padding: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: 4px 4px 0px #000000;
}

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

h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px #000000;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--text-color);
    opacity: 0.8;
}

h3 {
    font-size: 1rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-color);
    text-shadow: 1px 1px 0px #000000;
}

p {
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    max-width: 70ch;
    line-height: 1.8;
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 1px 1px 0px #000000;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.button {
    padding: 0.5rem 1rem;
    border: 2px solid var(--text-color);
    border-radius: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.7rem;
    box-shadow: 2px 2px 0px #000000;
}

.button:hover {
    background-color: var(--text-color);
    color: var(--background-color);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px #000000;
}

footer {
    margin-top: auto;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.7rem;
    opacity: 0.8;
    border-top: 2px solid var(--border-color);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--text-color);
    opacity: 0.8;
}

.main-nav {
    margin: 3rem 0;
    position: relative;
    min-height: 200px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    position: relative;
}

.main-nav li {
    margin: 0;
    transform-origin: center;
    animation: float 3s ease-in-out infinite;
}

.main-nav li:nth-child(odd) {
    animation-delay: 0.5s;
}

.main-nav li:nth-child(3n) {
    animation-delay: 1s;
}

.main-nav li:nth-child(4n) {
    animation-delay: 1.5s;
}

.main-nav li:nth-child(5n) {
    animation-delay: 2s;
}

.main-nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid var(--text-color);
    border-radius: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.7rem;
    box-shadow: 2px 2px 0px #000000;
    background-color: var(--background-color);
}

.main-nav a:hover {
    background-color: var(--text-color);
    color: var(--background-color);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px #000000;
    z-index: 2;
}

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

@media (max-width: 600px) {
    main {
        padding: 1rem;
    }

    .side-decoration {
        display: none;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 0.9rem;
    }

    .tagline {
        font-size: 0.8rem;
    }

    section {
        margin-bottom: 4rem;
        padding: 1.5rem;
    }

    .main-nav {
        margin: 2rem 0;
        min-height: auto;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .main-nav a {
        width: 100%;
        text-align: center;
    }

    .main-nav a:hover {
        transform: translate(-2px, -2px);
    }
}

/* Space Invaders */
.space-invaders {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.invader {
    position: absolute;
    color: #f12f12;
    opacity: 0.3;
    animation: float-invader-1 25s linear infinite;
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 5px rgba(241, 47, 18, 0.5));
}

.invader-2 {
    animation: float-invader-2 30s linear infinite;
    width: 90px;
    height: 90px;
}

.invader-3 {
    animation: float-invader-3 35s linear infinite;
    width: 105px;
    height: 105px;
}

@keyframes float-invader-1 {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    25% {
        transform: translate(30vw, 20vh) rotate(90deg);
    }
    50% {
        transform: translate(60vw, 50vh) rotate(180deg);
    }
    75% {
        transform: translate(20vw, 80vh) rotate(270deg);
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translate(100vw, 30vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes float-invader-2 {
    0% {
        transform: translate(0, 100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    25% {
        transform: translate(70vw, 70vh) rotate(-90deg);
    }
    50% {
        transform: translate(30vw, 30vh) rotate(-180deg);
    }
    75% {
        transform: translate(80vw, 10vh) rotate(-270deg);
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translate(10vw, 50vh) rotate(-360deg);
        opacity: 0;
    }
}

@keyframes float-invader-3 {
    0% {
        transform: translate(100vw, 50vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    25% {
        transform: translate(50vw, 80vh) rotate(90deg);
    }
    50% {
        transform: translate(10vw, 20vh) rotate(180deg);
    }
    75% {
        transform: translate(60vw, 60vh) rotate(270deg);
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translate(-10vw, 40vh) rotate(360deg);
        opacity: 0;
    }
}

.invader:nth-child(1) {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.invader:nth-child(2) {
    top: 70%;
    left: -10%;
    animation-delay: -15s;
}

.invader:nth-child(3) {
    top: 40%;
    left: -10%;
    animation-delay: -30s;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #f12f12;
    color: black;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(100px);
    z-index: 1000;
    border: 2px solid #f12f12;
    box-shadow: 0 0 10px rgba(241, 47, 18, 0.3);
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: black;
    color: #f12f12;
    transform: translateY(-5px);
}

/* For testing - uncomment to always show the button */
/* .back-to-top {
    opacity: 1;
    transform: translateY(0);
} */

/* Section Icons */
.section-icon {
    display: inline-block;
    margin-right: 10px;
    font-family: monospace;
    color: #f12f12;
    animation: blink 1.5s infinite;
    text-shadow: 0 0 5px rgba(241, 47, 18, 0.5);
}

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

/* Inverted Colors */
.inverted-colors {
    filter: invert(1) hue-rotate(180deg);
    transition: filter 0.5s ease;
} 