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

html, body {
    background: #000 !important;
    color: #00ff66 !important;
    font-family: 'Courier New', Courier, monospace !important;
    width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
}

/* === CRT SCANLINES OVERLAY === */
body::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 102, 0.03) 2px,
        rgba(0, 255, 102, 0.03) 4px
    ) !important;
    pointer-events: none !important;
    z-index: 1000 !important;
}

/* === SITE WRAPPER === */
.site-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* === CRT GLOW EFFECT === */
.crt {
    text-shadow: 0 0 1px #00ff66, 0 0 3px #00ff66, 0 0 6px #00ff66 !important;
    animation: flicker 2.5s infinite alternate !important;
}

@keyframes flicker {
    0% { opacity: 1 !important; }
    97% { opacity: 0.97 !important; }
    98% { opacity: 0.4 !important; }
    100% { opacity: 1 !important; }
}

/* === HEADER TITLE === */
.site-title {
    font-size: clamp(18px, 4vw, 28px);
    text-align: center;
    padding: 15px;
    background: linear-gradient(45deg, #258714, #0a2d03, #258714);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: #00ff66;
    text-shadow: 0 0 10px #00ff66;
    margin-bottom: 20px;
    border: 3px solid #00ff66;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.3);
    position: relative;
    overflow: hidden;
}

.site-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: scan 2s infinite;
}

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

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

/* === NAVIGATION === */
nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

nav a {
    color: #00ff66;
    text-decoration: none;
    border: 2px solid #0a2d03;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
    text-transform: lowercase;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 102, 0.2), transparent);
    transition: left 0.5s ease;
}

nav a:hover::before {
    left: 100%;
}

nav a:hover {
    background: #0a2d03;
    color: #00ff66;
    border-color: #00ff66;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.5);
    text-shadow: 0 0 8px #00ff66;
}

/* === KAOMOJI === */
.kaomoji {
    font-size: clamp(24px, 6vw, 36px);
    text-align: center;
    margin: 20px 0;
    animation: pulse 2s infinite;
    color: #ACE8B1;
    text-shadow: 0 0 10px #ACE8B1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* === SUBHEADER === */
.subheader {
    font-size: clamp(16px, 3vw, 22px);
    background: linear-gradient(45deg, #258714, #0a2d03, #258714);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    padding: 15px;
    text-align: center;
    color: #00ff66;
    border: 2px solid #00ff66;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.3);
    margin-bottom: 30px;
    text-shadow: 0 0 8px #00ff66;
}

/* === PROFILE SECTION === */
#section1 {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #0a2d03;
    background: rgba(0, 255, 102, 0.02);
    border-radius: 5px;
}

.profile-pic {
    width: min(200px, 80vw);
    border: 3px solid #00ff66;
    margin: 0 auto 15px;
    display: block;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.3);
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 102, 0.5);
}

/* === BLINKIES === */
.blinkies {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.blinkies img {
    width: min(120px, 25vw);
    height: auto;
    border: 2px solid #0a2d03;
    transition: all 0.3s ease;
}

.blinkies img:hover {
    border-color: #00ff66;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}

/* === CONTENT SECTIONS === */
#section2 {
    padding: 20px;
    border: 1px solid #0a2d03;
    background: rgba(0, 255, 102, 0.02);
    border-radius: 5px;
}

#section1 h3, #section2 h3 {
    color: #53bc36;
    font-size: clamp(18px, 4vw, 24px);
    margin: 25px 0 15px;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-shadow: 0 0 8px #53bc36;
}

#section1 h3 {
    margin: 20px 0 15px;
}

#section1 p, #section2 p {
    margin: 12px 0;
    line-height: 1.7;
}

#section1 p {
    margin: 8px 0;
    line-height: 1.6;
}

#section2 p {
    text-align: left;
}

#section1 hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #00ff66, transparent);
    margin: 20px 0;
}

/* === PROJECTS PAGE STYLES === */
#projects-intro {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #0a2d03;
    background: rgba(0, 255, 102, 0.02);
    border-radius: 5px;
}

#projects-intro h3 {
    color: #53bc36;
    font-size: clamp(18px, 4vw, 24px);
    margin: 0 0 15px;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-shadow: 0 0 8px #53bc36;
}

.project-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    padding: 25px;
    border: 2px solid #00ff66;
    background: rgba(0, 255, 102, 0.02);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.1);
    transition: all 0.3s ease;
}

.project-container:hover {
    box-shadow: 0 0 25px rgba(0, 255, 102, 0.2);
    border-color: #53bc36;
}

.project-text {
    flex: 1;
}

.project-text h3 {
    color: #53bc36;
    font-size: clamp(18px, 4vw, 24px);
    margin: 0 0 15px;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-shadow: 0 0 8px #53bc36;
}

.project-text p {
    margin: 10px 0;
    line-height: 1.7;
    text-align: left;
}

.project-text p strong {
    color: #00ff66;
    text-shadow: 0 0 5px #00ff66;
}

/* === HOMELAB PAGE STYLES === */
.lab-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lab-info {
    flex: 1;
}

/* === LINKS === */
a {
    color: #00ff66;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:visited {
    color: #00ff66;
}

a:hover {
    color: #ff6b9d;
    text-shadow: 0 0 8px #ff6b9d;
    text-decoration: underline;
}

/* === 404 PAGE STYLES === */
.error-container {
    text-align: center;
    padding: 60px 20px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-code {
    font-size: clamp(64px, 12vw, 128px);
    font-weight: bold;
    color: #ff0040;
    text-shadow: 0 0 20px #ff0040, 0 0 40px #ff0040;
    margin-bottom: 20px;
    animation: glitchError 2s infinite;
}

@keyframes glitchError {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-2px, 2px); }
    20% { transform: translate(2px, -2px); }
    30% { transform: translate(-2px, -2px); }
    40% { transform: translate(2px, 2px); }
    50% { transform: translate(-2px, 2px); }
    60% { transform: translate(2px, -2px); }
    70% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
    90% { transform: translate(-2px, -2px); }
}

.error-message {
    font-size: clamp(18px, 4vw, 24px);
    margin-bottom: 30px;
    color: #00ff66;
    text-shadow: 0 0 10px #00ff66;
}

.error-subtitle {
    font-size: clamp(14px, 3vw, 18px);
    margin-bottom: 40px;
    color: #53bc36;
    max-width: 600px;
}

/* === RESPONSIVE DESIGN === */
@media (min-width: 1024px) {
    .site-wrapper {
        padding: 30px;
    }

    main {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 40px;
        align-items: start;
    }

    #section1 {
        margin-bottom: 0;
        position: sticky;
        top: 20px;
    }

    .project-container {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .project-text {
        flex: 2;
        padding-right: 30px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .site-wrapper {
        padding: 25px;
    }

    #section2 p {
        text-align: left;
        padding: 0 20px;
    }
}

@media (max-width: 767px) {
    .site-wrapper {
        padding: 15px;
    }

    nav {
        gap: 8px;
    }

    nav a {
        padding: 6px 12px;
        font-size: 14px;
    }

    #section1, #section2 {
        padding: 15px;
    }

    #section2 p {
        text-align: center;
        padding: 0 10px;
    }

    .project-container {
        padding: 20px 15px;
        margin-bottom: 30px;
    }
    
    .project-text p {
        text-align: left;
        padding: 0 5px;
    }
}
