/* Base Styles */
html, body {
    height: 100%;
    margin: 0;
}

main {
    flex-grow: 1; /* Ensures the content takes up available space */
    padding: 2rem 0;
    text-align: center;
}

body {
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), url('picodeTeide.jpg') no-repeat center left fixed;
    background-size: cover; /* Ensures the background covers the whole screen without repeating */
    font-family: Jost, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Ensures the body takes up at least 100% of the viewport height */
    display: flex;
    flex-direction: column;
}


/* Header and Navigation */
header {
    background: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}

header nav ul {
    list-style: none;
    padding: 1vw;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Ensure items wrap on smaller screens */
}

header nav ul li {
    margin: 0 1rem;
}

header nav ul li a {
    display: inline-block;
    position: relative;
    color: darkorange;
    font-size: 1.5vw;
    text-decoration: none;
}

header nav ul li {
    a:after {
        content: '';
        position: absolute;
        width: 100%;
        transform: scaleX(0);
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: darkorange;
        transition: transform 0.25s ease-out;
    }

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

    a::after {
        transform-origin: bottom right;
    }

    a:hover::after {
        transform-origin: bottom left;
    }

    a:active {
        color: #333;
    }
}

section {
    padding: 1rem 2rem;
    text-align: center;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto; /* Pushes footer to the bottom */
    width: 100%;
    position: relative;
}

footer p {
    color: darkorange;
}

/* Contact Section */
.contact {
    padding-left: 2rem;
    color: white;
}

/*text in white*/
main h1, h3, p {
    color: #ffffff;
}

/* Flexbox Layout for Profile (About Me Section) */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.photo {
    text-align: center;
    padding: 2rem;
    max-width: 25%;
}

.photo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.aboutme, .portfolio {
    background-color: rgba(0, 0, 0, 0.7); /* Dark background with transparency */
    color: white;
    max-width: 40rem; /* Adjust the width for better readability */
    padding: 1.5rem;
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    margin: 0 1rem; /* Center the container */
    text-align: left;
}

.peptalk {
    background-color: rgba(0, 0, 0, 0.7); /* Same dark background */
    color: white;
    max-width: 50rem;
    padding: 1.5rem;
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 2rem auto;
    text-align: left;
}

.peptalk {
    a:link {
        color: greenyellow;
        background-color: transparent;
        text-decoration: none;
    }

    a:visited {
        color: darkorange;
        background-color: transparent;
        text-decoration: none;
    }

    a:hover {
        color: red;
        background-color: transparent;
        text-decoration: underline;
    }

    a:active {
        color: yellow;
        background-color: transparent;
        text-decoration: underline;
    }
}

.peptalk p {
    color: white;
    text-align: left;
}

/* Portfolio Section */
.portfolio {
    color: white;
    margin: 2rem auto;
}

.portfolio p {
    color: lightgray;
}

.portfolio img {
    max-width: 100%; /* Ensure the image never exceeds the container width */
    height: auto; /* Maintain the aspect ratio of the image */
    border-radius: 8px; /* Optional: add rounded corners to the image */
    margin-top: 1rem; /* Space between text and image */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.btn:hover {
    background-color: #555;
}

/*CV site*/
.cv-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.cv-container iframe {
    max-width: 100%;
    min-height: auto;
    border: none;
}


/*Responsive background on smaller devices*/
/* Media query for smaller devices */
@media (max-width: 600px) {
    body {
        background-size: cover; /* Adjusts the background size for smaller screens to prevent repeating */
        background-position: left; /* Keeps the image centered but closer to the top */
    }
}

/* Responsive Design */
@media (max-width: 768px) {

    .aboutme, .peptalk {
        max-width: 90%; /* Make the container narrower on smaller screens */
        padding: 1rem;
    }

    header nav ul li {
        margin: 5px;
    }

    header nav ul li a {
        font-size: 2.5vw;
    }

    .contact {
        padding: 1rem;
    }

    .aboutme, .peptalk {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .peptalk {
        max-width: 100%;
        text-align: center;
    }

}

@media (max-width: 414px) {

    .aboutme, .peptalk {
        max-width: 100%;
        padding: 1rem;
    }

    header nav ul {
        flex-direction: column;
    }

    header nav ul li a {
        font-size: 4.5vw;
    }

    .container {
        flex-direction: column;
        text-align: center;
    }

    .cv-container iframe {
        max-height: 55vh;
    }

    .photo, .aboutme {
        max-width: 100%;
    }

    .contact {
        padding: 1rem;
        text-align: center;
    }

    .peptalk {
        text-align: center;
    }

    .portfolio p {
        font-size: 0.9rem;
    }
}


