body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Roboto', sans-serif;
    color: #f0f0f0; /* Lighter gray for better contrast */
    background-color: #000;
    overflow-x: hidden;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

nav {
    background-color: rgba(0, 0, 20, 0.8);
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 2;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0.5rem;
}

nav ul li a {
    color: #7dd87d; /* Softer green for better contrast */
    text-decoration: none;
    font-weight: bold;
    font-size: 1vw; 
    transition: color 0.3s ease, text-shadow 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    white-space: nowrap;
}

nav ul li a:hover {
    color: #cfc; /* Lighter green for hover */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7); /* Softer shadow */
    background-color: rgba(100, 100, 255, 0.2);
}

.content {
    max-width: 100%;
    margin: 0 auto;
    padding: 5rem 2rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

h1 {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-size: 3em;
    margin-bottom: 20px;
}

h2, h3 {
    color: #aff; /* Softer green for headings */
    text-shadow: 0 0 10px rgba(200, 255, 200, 0.5);
}

a {
    color: #66b2ff; /* Softer blue for general links */
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

p {
    font-size: 1.1em;
    line-height: 1;

}

.button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.2em;
    color: #333; /* Darker text color for better contrast */
    background-color: #7c99f3; /* Softer blue for buttons */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1.5rem;
}

.button:hover {
    background-color: #ffffff;
    box-shadow: 0 0 15px #fff;
}

#boxes {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.box {
    flex-basis: calc(31% - 0.4rem);
    background-color: rgba(30, 30, 70, 0.5); /* Softer background */
    padding: 1rem;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.box:hover {
    background-color: rgba(50, 50, 100, 0.5);
}

#pboxes {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.pbox {
    position: relative;
    width: 25%; /* Width controls the size of the square */
    padding-bottom: 25%; /* Padding-bottom ensures square shape */
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    overflow: hidden;
    margin-top: 1rem;
}

.pbox:hover{
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(24, 255, 255, 0.8), 
                 0 0 15px rgba(24, 255, 255, 0.6),
                 0 0 20px rgba(24, 255, 255, 0.5);
}

/* Background images for each box */
.pbox:nth-child(1) {
    background-image: url('./img/ai_free_gpt_bot.jpg');
}

.pbox:nth-child(2) {
    background-image: url('./img/math_t.jpg');
}

.pbox:nth-child(3) {
    background-image: url('./img/horus.jpg');
}

/* Content inside the box */
.pbox-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 25%; /* Set height of content to 25% of the pbox */
    background-color: rgba(0, 0, 0, 0.5); /* Light blue with transparency */
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: top;
    padding: 10px;
    box-sizing: border-box; /* Ensure padding is included in the height calculation */
}

.pbox-content p {
    margin: 0.4rem;
    padding: 0;
    font-size: 1.1rem;
}

.pbox-content a {
    color: #00e5ff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.pbox-content a:hover {
    color: #18ffff;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(24, 255, 255, 0.8), 
                 0 0 15px rgba(24, 255, 255, 0.6),
                 0 0 20px rgba(24, 255, 255, 0.5);
}


#portfolio {
    flex-basis: calc(31% - 1rem);
    background-color: rgba(30, 30, 70, 0.5);
    padding: 1rem;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
}

#portfolio:hover {
    background-color: rgba(50, 50, 100, 0.5);
}

#portfolio ul {
    text-align: left;
    max-width: 600px;
    margin: 1rem auto;
}

#portfolio li {
    margin-bottom: 0.5rem;
}

footer {
    background-color: rgba(0, 0, 20, 0.8);
    text-align: center;
    padding: 1rem 0;
    position: relative;
    width: 100%;
    z-index: 1;
}

footer a {
    color: #66b2ff; /* Softer footer link color */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    nav {
        padding: 0.25rem 0;
    }

    nav ul {
        display: flex;
        align-items: stretch;
    }

    nav ul li {
        margin: 0.25rem 0;
    }

    nav ul li a {
        font-size: 4vw; 
        display: block;
        padding: 0.75rem 1rem;
        text-align: center;
    }

    .box {
        flex-basis: 100%;
    }

    #chatbot-container {
        max-width: 90%;
    }

    .content {
        padding-top: 8rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .box {
        flex-basis: calc(30% - 0.6rem);
    }
    nav ul li a {
        font-size: 1.5vw;
    }
}

@media (min-width: 1025px) {
    .box {
        flex-basis: calc(30% - 0.6rem);
    }
    nav ul li a {
        font-size: 16px;
    }
}


@media (max-width: 768px) {
    .pbox {
        width: 100%;
        padding-bottom: 100%; /* Full width squares on mobile */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .pbox {
        width: 45%; /* Two squares per row on tablets */
        padding-bottom: 45%;
    }
}