/* Base styling */
body {
    font-family: 'Arial', sans-serif;
    color: #333;
    background-color: #f4f4f4;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Container */
.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

/* Header */
header {
    background: #333;
    color: #fff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #3e9cbf 3px solid;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header ul {
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: hidden;
}

header li {
    float: left;
    display: inline;
    padding: 0 20px 0 20px;
}

header #branding {
    float: left;
}

header #branding h1 {
    margin: 0;
}

header nav {
    float: right;
    margin-top: 10px;
}

header .highlight, header .current a {
    color: #3e9cbf;
    font-weight: bold;
}

/* Showcase */
#showcase {
    min-height: 400px;
    background: url('http://127.0.0.1:5000/static/css/centaur.jpg') no-repeat 0 -400px;
    text-align: center;
    color: #fff;
}

#showcase h1 {
    margin-top: 100px;
    font-size: 55px;
    margin-bottom: 10px;
}

#showcase p {
    font-size: 20px;
}

/* Newsletter */
#newsletter {
    padding: 15px;
    color: #fff;
    background: #3e9cbf;
}

#newsletter h1 {
    float: left;
}

#newsletter form {
    float: right;
    margin-top: 15px;
}

#newsletter input[type="email"] {
    padding: 4px;
    height: 25px;
    width: 250px;
}

/* Boxes */
#boxes .box {
    float: left;
    text-align: center;
    width: 30%;
    padding: 10px;
    border: 1px solid #3e9cbf;
    margin: 10px;
    background: #fff;
}

#boxes .box img {
    width: 90px;
}

/* Sidebar */
aside#sidebar {
    float: right;
    width: 30%;
    margin-top: 10px;
    padding: 20px;
    background: #3e9cbf;
    color: #fff;
}

aside#sidebar .quote {
    font-style: italic;
}

/* Footer */
footer {
    padding: 20px;
    margin-top: 20px;
    color: #fff;
    background-color: #333;
    text-align: center;
}

footer p {
    margin: 0;
}

/* Parallax Sections */
.parallax {
    min-height: 500px;
    background-attachment: fixed;
    background-position: center center; /* Adjust this as needed */
    background-repeat: no-repeat;
    background-size: contain; /* or 'contain' to see the whole image */
    text-align: center;
    color: #fff;
    width: 80%; /* Adjust the width as needed */
    max-width: 1000px; /* Prevents the container from getting too wide on large screens */
    margin: auto; /* Center the container */
    padding: 15px; /* Adds some padding inside the container */
}

.parallax0 {
    background-image: url('../images/wizard_centaur0.png');
    min-height: 700px;
    background-attachment: fixed;
    background-position: center; /* Adjust this as needed */
    background-repeat: no-repeat;
    background-size: contain; /* or 'contain' to see the whole image */
    text-align: center;
    color: #fff;
    padding-bottom: 10px;
}

.parallax1 {
    background-image: url('../images/nuclear_snake_centaur0.png');
    background-size: contain;
    padding-bottom: 10px;
}

.parallax2 {
    background-image: url('../images/lab_centaur_red_0.png');
    padding-bottom: 10px;
}

.parallax3 {
    background-image: url('../images/nuclear_snake_centaur1.png');
    background-size: contain;
    background-position: center center;
    min-height: 700px; /* Adjust this value as needed */
    padding-bottom: 10px;
}

/* Default parallax text color for home page */
.parallax-text {
    color: #fff;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 20px;
}

.portfolio-item img {
    max-width: 200px; /* Adjust as needed */
    max-height: 200px; /* Adjust as needed */
    border: 2px solid #3e9cbf; /* Add a solid border */
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.6); /* Add shadow for depth */
    transition: transform 0.3s ease-in-out;
}

.portfolio-item a:hover img {
    transform: scale(1.05); /* Slightly scale up on hover */
}

@keyframes float-tetrahedron {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(100px, -173px); } /* Move up and right */
    66% { transform: translate(-100px, 0); } /* Move left */
}

.bubble {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    color: #333;
    text-align: center;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -15px); }
    50% { transform: translate(-15px, 10px); }
    75% { transform: translate(20px, -5px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-20px, 10px); }
    40% { transform: translate(15px, -20px); }
    60% { transform: translate(-10px, 15px); }
    80% { transform: translate(25px, -10px); }
}
@keyframes float3 {
    0%, 100% { transform: translate(0, 0); }
    15% { transform: translate(15px, -20px); }
    30% { transform: translate(-10px, 15px); }
    45% { transform: translate(25px, -10px); }
    60% { transform: translate(-20px, 10px); }
    75% { transform: translate(15px, -20px); }
}
@keyframes float4 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, -20px); }
    50% { transform: translate(0, 40px); }
    75% { transform: translate(-20px, -20px); }
}

@keyframes float5 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(20px, -20px); }
    40% { transform: translate(0, 20px); }
    60% { transform: translate(-20px, -20px); }
    80% { transform: translate(0, -20px); }
}

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

@keyframes orbit {
    0%, 100% {
        transform: translate(-50%, -50%) translate(300px, 0);
    }
    25% {
        transform: translate(-50%, -50%) translate(0, 300px);
    }
    50% {
        transform: translate(-50%, -50%) translate(-300px, 0);
    }
    75% {
        transform: translate(-50%, -50%) translate(0, -300px);
    }
}

@keyframes float-tetrahedron {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(100px, -173px); } /* Move up and right */
    66% { transform: translate(-100px, 0); } /* Move left */
}
@keyframes float-cube {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(100px, 0); } /* Move right */
    50% { transform: translate(100px, 100px); } /* Move down */
    75% { transform: translate(0, 100px); } /* Move left */
}
@keyframes float-octahedron {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(0, -100px); } /* Move up */
    50% { transform: translate(100px, 0); } /* Move right */
    75% { transform: translate(0, 100px); } /* Move down */
    100% { transform: translate(-100px, 0); } /* Move left */
}
@keyframes float-dodecahedron {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(50px, -80px); } /* Move up and right */
    40% { transform: translate(100px, 0); } /* Move right */
    60% { transform: translate(50px, 80px); } /* Move down and right */
    80% { transform: translate(-50px, 80px); } /* Move down and left */
}
@keyframes float-icosahedron {
    0%, 100% { transform: translate(0, 0); }
    17% { transform: translate(50px, 0); } /* Move right */
    33% { transform: translate(75px, -50px); } /* Move up and right */
    50% { transform: translate(50px, -100px); } /* Move up */
    67% { transform: translate(-25px, -50px); } /* Move up and left */
    83% { transform: translate(-50px, 0); } /* Move left */
}
@keyframes float-star {
    0% { transform: translate(0, 0); }
    10% { transform: translate(100px, -100px); } /* Move up and right */
    20% { transform: translate(200px, 0); } /* Move right */
    30% { transform: translate(100px, 100px); } /* Move down and right */
    40% { transform: translate(0, 200px); } /* Move down */
    50% { transform: translate(-100px, 100px); } /* Move down and left */
    60% { transform: translate(-200px, 0); } /* Move left */
    70% { transform: translate(-100px, -100px); } /* Move up and left */
    80% { transform: translate(0, -200px); } /* Move up */
    90% { transform: translate(100px, -100px); } /* Move up and right */
    100% { transform: translate(0, 0); } /* Return to start */
}
.bubble#starBubble {
    animation: float-star 30s linear infinite;
    /* Your existing bubble styling here */
}
/* Set the initial position for the starBubble */
#starBubble {
    left: 50%; 
    top: 50%; 
    transform: translate(-50%, -50%);
}

.bubble p {
    margin: 0;
    line-height: normal;
}

/* Individual bubble animations */
#bubble1 {
    animation: float-tetrahedron 30s ease-in-out infinite;
    left: 50%; /* Adjust as necessary */
    top: 50%; /* Adjust as necessary */
    transform: translate(-50%, -50%);
}
#bubble2 {
    animation: float-cube 30s ease-in-out infinite;
    left: 60%; /* Adjust as necessary */
    top: 60%; /* Adjust as necessary */
    transform: translate(-50%, -50%);
}
#bubble3 {
    animation: float-octahedron 30s ease-in-out infinite;
    left: 70%; /* Adjust as necessary */
    top: 70%; /* Adjust as necessary */
    transform: translate(-50%, -50%);
}
#bubble4 {
    animation: float-dodecahedron 36s ease-in-out infinite;
    left: 60%; /* Adjust as necessary */
    top: 60%; /* Adjust as necessary */
    transform: translate(-50%, -50%);
}
#bubble5 {
    animation: float-icosahedron 52s ease-in-out infinite;
    left: 70%; /* Adjust as necessary */
    top: 70%; /* Adjust as necessary */
    transform: translate(-50%, -50%);
}
#bubble6 { animation: float6 60s ease-in-out infinite; }
#bubble7 { animation: orbit 75s linear infinite; } /* New bubble with orbit animation */

/* Bubble positions */
#bubble1 { left: 30%; top: 1350px; }
#bubble2 { left: 40%; top: 1450px; }
#bubble3 { left: 30%; top: 1550px; }
#bubble4 { left: 40%; top: 1650px; }
#bubble5 { left: 30%; top: 1750px; }
#bubble6 { left: 40%; top: 1850px; }
#bubble7 { left: 50%; top: 1500px; transform: translate(-50%, -50%); } /* Center the new bubble */

.game-area {
    background-image: url('../images/green_vs_blue_snake.png');
    background-repeat: no-repeat;
    background-size: contain; /* Ensure the image covers the area without being cut off */
    background-position: center center;
    width: 100%;
    height: 100vh; /* Set a fixed height */
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#gameCanvas {
    background-color: rgba(0, 0, 0, 0.80); /* Semi-transparent black background */
    border: 3px solid #e8491d; /* Red border */
    display: block;
    margin: 20px auto; /* Center the canvas */
    max-width: 100%;
}

.button-style {
    display: inline-block;
    margin: 20px;
    padding: 10px 15px;
    background-color: #4CAF50; /* The green background color */
    color: white;
    text-decoration: none;
    font-size: 16px;
    border-radius: 8px;
    text-align: center;
}

/* Back to Home button */
.back-to-home {
    margin: 20px;
}
.email-me {
    margin: 20px;
}


@media screen and (max-width: 600px) {
    .game-area {
        background-size: contain; /* Fit the whole image */
        background-position: center center;
        width: 100%; /* Use full width */
        height: auto; /* Adjust height dynamically */
        padding-bottom: 20%; /* Provide extra space for image */
    }

    #gameCanvas {
        width: 90%; /* Adjust the width of the canvas */
        /* Additional adjustments if needed */
    }

    .back-to-home {
        padding: 8px 12px;
        font-size: 14px;
    }
}



/* Algorithm Visualizer Styles */
#algorithm-visualizer .visualization-area {
    background-color: #fff; /* Background color for the visualization area */
    border: 2px solid #3e9cbf; /* Border to match your theme */
    min-height: 400px; /* Adjust as needed */
    margin: 20px 0; /* Spacing */
    position: relative;
    margin-top: 0; 
    padding-top: 0;
}

#algorithm-visualizer {
    margin-top: 0; /* Reducing top margin */
    padding-top: 0; /* Reducing top padding */
}


/* Specific parallax text color for algorithm visualizer page */
.algorithm-visualizer .parallax-text {
    color: #333;
}

#algorithm-visualizer .controls {
    text-align: center; /* Center the buttons */
    margin-bottom: 20px; /* Spacing after the controls */
}

#algorithm-visualizer button {
    background-color: #3e9cbf; /* Button color to match your theme */
    color: white; /* Text color */
    border: none; /* No border */
    padding: 10px 15px; /* Padding */
    margin: 0 5px; /* Spacing between buttons */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Cursor to indicate it's clickable */
    font-size: 16px; /* Font size */
}

#algorithm-visualizer button:hover {
    background-color: #333; /* Darker color on hover */
}

.algorithm-visualizer .parallax {
    margin-top: 0;
    padding-top: 0;
    min-height: 150px; 
}

.algorithm-visualizer .container {
    padding-top: 0;
    margin-top: 0;
}

/* Media Query for screens with max width of 600px */
@media screen and (max-width: 600px) {
    /* This sets the background for the whole page */
    /* Header adjustments */
    header nav {
        display: none;
    }

    /* Header adjustments */
    header .container {
        display: flex; /* Use flexbox for positioning */
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center-align items */
        padding: 0; /* Remove padding to allow full-width usage */
    }
    
    header #branding img {
        width: 150px; /* Adjust logo width as needed */
        height: 150px;
    }

    .parallax0 {
        /* This will move the background image down to start just below the header */
        background-position: center 100px; /* Adjust '100px' to the height of your header */
        padding-top: 100px; /* This padding-top should be equal to the height of your header */
        min-height: calc(100vh - 100px); /* This subtracts the header height from the viewport height */
     }

    /* Adjustments for the homepage content */
    .homepage .container {
        padding: 0 5px; /* Adjust padding as needed */
    }

    /* Responsive images */
    .homepage img {
        max-width: 50%;
        height: auto;
    }

    body.homepage {
        background-image: url('../images/wizard_centaur0.png');
        background-size: cover;
        background-position: top center;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }

    /* Remove backgrounds from all parallax sections */
    .homepage .parallax {
        background: none;
    }

    /* Adjust the content within the parallax sections if needed */
    .homepage .parallax h1, 
    .homepage .parallax p {
        font-size: 18px; /* Adjust font size as needed */
    }

    /* Make sure images within the content are responsive */
    .homepage img {
        max-width: 100%;
        height: auto;
    }

    .bubble {
        display: none;
    }

    @keyframes colorChange {
        0% { color: #3498db; } /* Starting color */
        25% { color: #9b59b6; } /* Second color */
        50% { color: #2ecc71; } /* Third color */
        75% { color: #f1c40f; } /* Fourth color */
        100% { color: #e74c3c; } /* Ending color */
    }

    .parallax2 .container {
        animation: colorChange 10s infinite alternate;
    }

    .parallax2 .container::after {
        content: "I'm based in San Diego and I do Devops!"
                 "Lately, I’ve been having lots of fun casting the ‘parallax’ spell on my site here. "
                 "If you like my Web1.0 style and have a fun/cool project in mind, let me know! "
                 "This Holiday my son and I built a snake game. Check it out! "
                 "He wants me to make more powerups for the snake game. So those are on the way.";
        /* Add styles for the paragraph text here */
        /* Example: */
        white-space: pre-line; /* To ensure line breaks are respected */
        text-align: left;
        padding: 10px;
    }
    
    /* Any other specific adjustments for mobile view of homepage */
}

