html {
    height: 100%; /* Ensure html takes full viewport height */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    overflow-y: auto; /* Allow vertical scrolling */
}

body {
    margin: 0;
    font-family: 'Press Start 2P', cursive; /* Hotline Miami font */
    color: #00FFFF; /* Neon Cyan */
    background-color: #610084; /* Even darker purple */
    display: flex;
    justify-content: flex-start; /* Align content to the top */
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
}

#parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('resources/standard.png');
    background-size: 100% 200%; /* Make the image twice as tall as the viewport */
    background-position: top center; /* Start from the top center */
    background-repeat: no-repeat;
    filter: brightness(0.6);
    filter: saturate(1.1);
    z-index: -1; /* Ensure it's behind other content */
}

#content-wrapper {
    position: relative;
    width: 100%;
    min-height: 100%; /* Changed from height to min-height */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    margin-top: 155px; /* Increased to push content further down */
}

.main-container {
    display: flex;
    justify-content: flex-start; /* Ensures items are pushed to ends */
    align-items: stretch; /* Ensures items are pushed to ends */
    width: 90%; /* Wider container for better separation */
    max-width: 1200px; /* Max width for larger screens */
    padding: 20px;
    background-color: rgba(255, 0, 255, 0.1); /* More transparent Neon Pink */
    border-radius: 10px;
    box-shadow: -5px 0 25px rgba(255, 0, 255, 0.7), 5px 0 25px rgba(0, 255, 255, 0.7); /* RGB Shift Shadow */
    gap: 10px; /* Space between the two main sections */
    z-index: 1; /* Ensure content is above VHS overlay */
    position: relative; /* Ensure z-index works */
    margin-bottom: 20px; /* Reduced space below main-container */
    margin-top: 20px; /* Reduced space above main-container */
}

#scroll-box {
    width: 90%; /* Wider container for better separation */
    max-width: 1200px; /* Max width for larger screens */
    padding: 20px;
    background-color: rgba(255, 0, 255, 0.1); /* More transparent Neon Pink */
    border-radius: 10px;
    box-shadow: -5px 0 25px rgba(255, 0, 255, 0.7), 5px 0 25px rgba(0, 255, 255, 0.7); /* RGB Shift Shadow */
    z-index: 1; /* Ensure content is above VHS overlay */
    position: relative; /* Ensure z-index works */
    margin-bottom: 20px; /* Reduced space below scroll-box */
    margin-top: 20px; /* Reduced space above scroll-box */
    height: auto;
    text-align: center;
    color: white;
}

.profile-section {
    flex: 0 0 300px; /* Fixed width for profile section */
    padding: 20px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly more transparent */
    border-radius: 8px;
    box-shadow: -3px 0 15px rgba(255, 0, 255, 0.7), 3px 0 15px rgba(0, 255, 255, 0.7); /* RGB Shift Shadow */
}

.profile-pic-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden; /* This is the key for clipping */
    margin: 0 auto 10px auto; /* Center and provide margin below */
    border: 3px solid #fff; /* Keep the white border here */
}

.profile-pic {
    width: 100%; /* Fill the wrapper */
    height: 100%; /* Fill the wrapper */
    object-fit: cover; /* Ensure image covers the area */
    /* Removed border, border-radius, margin-bottom from here */
}

.username {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    margin-bottom: 0;
}

.social-media-section {
    flex-grow: 0; /* Prevent it from growing */
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Changed to center to align icons vertically */
    background-color: rgba(0, 0, 0, 0.6); /* Slightly more transparent */
    border-radius: 8px;
    box-shadow: -3px 0 15px rgba(255, 0, 255, 0.7), 3px 0 15px rgba(0, 255, 255, 0.7); /* RGB Shift Shadow */
}

.navigation-section {
    flex-grow: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    box-shadow: -3px 0 15px rgba(255, 0, 255, 0.7), 3px 0 15px rgba(0, 255, 255, 0.7); /* RGB Shift Shadow */
    gap: 15px; /* Space between buttons */
}

.nav-button {
    display: block;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    box-shadow: -2px 0 10px rgba(255, 0, 255, 0.6), 2px 0 10px rgba(0, 255, 255, 0.6); /* RGB Shift Shadow */
    color: #00FFFF; /* Neon Cyan */
    text-decoration: none;
    font-size: 1.2em;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box; /* Include padding in width */
}

.nav-button:hover {
    background-color: rgba(0, 255, 255, 0.2); /* Lighter neon cyan on hover */
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8); /* Stronger glow on hover */
    transform: translateY(-3px);
}

.social-media-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.social-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 1.2em;
    padding: 5px; /* Added padding for clickable area */
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    color: #00bcd4;
    transform: translateY(-3px);
}

.social-icon img {
    height: 32px;
    width: 32px;
    margin-bottom: 5px; /* Space between icon and text */
}

h1 {
    display: none;
}

/* About Me Section Styles */
.about-me-section {
    flex-grow: 1; /* Allow it to take up remaining space */
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly more transparent */
    border-radius: 8px;
    box-shadow: -3px 0 15px rgba(255, 0, 0, 0.7), 3px 0 15px rgba(0, 255, 0, 0.7); /* RGB Shift Shadow */
    text-align: center; /* Align text to the center */
}

.scroll-box-section {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly more transparent */
    border-radius: 8px;
    box-shadow: -3px 0 15px rgba(255, 0, 0, 0.7), 3px 0 15px rgba(0, 255, 0, 0.7); /* RGB Shift Shadow */
}

.scroll-box-heading-container {
    padding: 10px 20px;
    display: inline-block;
    margin-bottom: 10px;
}

.computer-info-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.system-specs-container {
    flex: 1;
    min-width: 300px;
    margin: 10px;
    text-align: left;
}

.skills-container {
    margin-top: 20px;
}

.about-me-section h2 {
    margin-top: 0;
    color: #00FFFF; /* Neon Cyan */
    font-size: 1.8em;
    margin-bottom: 15px;
}

.about-me-section p {
    color: #FF00FF; /* Neon Pink */
    line-height: 1.6;
}

/* VHS Overlay Styles */
#vhs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 9999; /* High z-index to be on top */
    opacity: 0.5;
    filter: saturate(2.0) contrast(2.0);
    animation: static-noise 0.15s infinite linear;
}

#vhs-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        #000 0px,
        #000 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.8;
}

#vhs-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(255, 0, 0, 0.1),
        rgba(0, 255, 0, 0.1),
        rgba(0, 0, 255, 0.1)
    );
    mix-blend-mode: screen;
    opacity: 0.7;
    animation: rgb-shift-aggressive 0.4s infinite linear;
}

@keyframes static-noise {
    0%, 100% { opacity: 0.5; transform: translate(0, 0); }
    20% { opacity: 0.52; transform: translate(-1px, 1px); }
    40% { opacity: 0.48; transform: translate(1px, -1px); }
    60% { opacity: 0.51; transform: translate(-1px, -1px); }
    80% { opacity: 0.49; transform: translate(1px, 1px); }
}

@keyframes rgb-shift-aggressive {
    0%   { transform: translate(0, 0); }
    10%  { transform: translate(8px, -4px); }
    20%  { transform: translate(-10px, 10px); }
    30%  { transform: translate(12px, -8px); }
    40%  { transform: translate(-8px, -6px); }
    50%  { transform: translate(10px, 4px); }
    60%  { transform: translate(-12px, 8px); }
    70%  { transform: translate(8px, -10px); }
    80%  { transform: translate(-10px, 6px); }
    90%  { transform: translate(12px, -4px); }
    100% { transform: translate(0, 0); }
}

.animated-computer-image {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.animated-computer-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8); /* Neon Cyan Glow on hover */
}

.glitch-header {
    position: relative;
    display: inline-block; /* or block, depending on desired layout */
    color: #00FFFF; /* Default neon cyan */
    text-shadow: 0 0 5px #00FFFF; /* Initial subtle glow */
    /* Add transition for smoother non-animated changes if any */
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        align-items: center;
        width: 95%;
        padding: 15px;
    }

    .profile-section {
        flex: 1;
        width: 100%;
        margin-bottom: 20px;
        padding: 15px;
    }

    .profile-pic-wrapper {
        width: 120px;
        height: 120px;
    }

    .username {
        font-size: 1.3em;
    }

    .social-media-section,
    .navigation-section,
    .about-me-section {
        width: 100%;
        margin-bottom: 20px;
        padding: 15px;
    }

    .nav-button {
        font-size: 1em;
    }

    .about-me-section h2 {
        font-size: 1.5em;
    }

    #scroll-box {
        width: 95%;
        height: auto;
        padding: 15px;
    }

    .computer-info-container {
        flex-direction: column;
    }

    .system-specs-container {
        text-align: center;
    }

    .system-specs-container ul {
        padding-left: 0;
        list-style-position: inside;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .profile-pic-wrapper {
        width: 100px;
        height: 100px;
    }

    .username {
        font-size: 1.2em;
    }

    .about-me-section h2 {
        font-size: 1.3em;
    }

    .nav-button {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

/* Projects Section Styles */
.projects-container {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    box-shadow: -3px 0 15px rgba(255, 0, 0, 0.7), 3px 0 15px rgba(0, 255, 0, 0.7);
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.project-card {
    background-color: rgba(255, 0, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.project-image {
    width: 350px; /* Fixed width */
    height: 150px; /* Fixed height */
    object-fit: cover; /* Ensures image covers the area without distortion */
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #00FFFF;
}

.project-card h3 {
    color: #00FFFF;
    font-size: 1.3em;
    margin-top: 10px;
    margin-bottom: 5px;
}

.project-card p {
    color: #FF00FF;
    font-size: 0.9em;
    line-height: 1.5;
    flex-grow: 1; /* Allows description to take available space */
}

.project-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.project-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    box-shadow: -2px 0 8px rgba(255, 0, 255, 0.5), 2px 0 8px rgba(0, 255, 255, 0.5);
    color: #00FFFF;
    text-decoration: none;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.project-link:hover {
    background-color: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
    transform: translateY(-2px);
}

/* Responsive adjustments for projects section */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr; /* Stack projects on small screens */
    }
}