/* 
External Style Sheet
Name: John Burch
Date: December 9, 2025
Class: CIS-130 W01
*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

/* General Styling */

* {
    /* Reset default margins/padding to 0 */
    margin: 0;
    padding: 0;
}

body {
    background-image: linear-gradient(180deg, #BBD5ED, #e3d081);
    font-family: "IBM Plex Sans", sans-serif;
    min-height: 100vh;
    text-align: center;
    margin: 2rem;
    /* Grid setup for media queries */
    display: grid;
    gap: 2rem;
    grid-template-areas:
        'header-container'
        'summary'
        'skills'
        'projects'
        'contact'
        'footer';
}

main {
    /* Allows children to participate directly to parent (grandparent)*/
    display: contents;
}

h1 {
    font-family: "Ubuntu", sans-serif;
    font-size: 2.75em;
    display: inline-block;
}

h2 {
    display: inline-block;
    font-weight: 400;
    margin-bottom: 0.25em;
}

:target {
    font-weight: 800;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
    padding: 0.5rem;
}

section {
    margin: 0 auto;
}

/* Header/Navigation/Footer */

.header-container {
    /* container to combine profile picture, tagline, and navbar for styling and grid */
    background-color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    grid-area: header-container;
}

.tagline {
    font-style: italic;
    font-size: 1.2em;
}

nav {
    padding: 1em 0;
}

.navbar {
    grid-area: navbar;
    display: grid;
    gap: 0.5em;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    align-items: center;
}

nav a {
    padding: 8px;
    font-size: 1.2em;
}

nav i {
    font-size: 14px;
}

.navbar,
footer ul {
    list-style-type: none;
}

nav a,
footer a {
    color: black;
}

footer ul {
    display: grid;
    grid-template-columns: 100%;
    gap: 0.5rem;
    justify-content: space-evenly;
}

footer {
    grid-area: footer;
    text-align: center;
}

.copyright {
    margin-top: 0.5rem;
}


/* Main Sections Styling */

/* Summary */

.summary-section {
    grid-area: summary;
}

.summary-section p {
    max-width: 330px;
    line-height: 1.5em;
    margin-bottom: 0.75em;
}

/* Skills */

.skills-section {
    grid-area: skills;
}

.skills-list-container {
    display: grid;
}

.skills-list {
    text-align: left;
    margin: 0;
    width: 100%;
    height: auto;
}

.skills-list li {
    margin-bottom: 0.5rem;
}

/* Projects */

.projects-section {
    grid-area: projects;
}

.website-showcase-container {
    margin: 1rem auto;
    max-width: 330px;
    display: grid;
    grid-template-columns: 100%;
    gap: 1rem;
}

.website-showcase a {
    color: black;
    font-weight: 400;
}

.website-showcase p {
    line-height: 1.5em;
}

.projects-showcase-img {
    max-width: 425px;
    width: 100%;
    height: auto;
    border-radius: 1em;
}

/* Contact Form */

.contact-form-section {
    grid-area: contact;
    width: 100%;
}

.form-container {
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 auto;
    border-radius: 1rem;
    width: 100%;
    max-width: 425px;
    height: auto;
}

form {
    display: grid;
    grid-template-columns: auto;
}

fieldset {
    border: none;
}

.contact-info p {
    display: grid;
    grid-template-columns: auto;
    margin: 1rem auto;
    max-width: 60%;
}

.contact-info label {
    display: inline-block;
}

.contact-info input,
.contact-info select {
    font-family: inherit;
    display: block;
    width: 90%;
    margin: 0 auto;
    padding: 0.5em;
    border: 1px solid gray;
    border-radius: 0.5em;
}

textarea {
    font-family: inherit;
    padding: 0.5rem;
    border-radius: 0.5em;
}

input[type=submit] {
    font-family: inherit;
    font-size: 1.2rem;
    width: 125px;
    height: auto;
    margin: 1rem auto;
}

input[type=submit]:hover,
input[type=submit]:focus {
    background-color: white;
    font-weight: 700;
}

/* Specific IDs */

#profile-img {
    display: block;
    margin: 0 auto;
    width: 180px;
    height: auto;
    border-radius: 50%;
    border: 3px solid black;
    margin-top: 8px;
}

/* Accessibility Features */

a:hover,
a:focus {
    font-weight: bold;
}

.hidden {
    /* used specifically to hide fieldset legends */
    position: absolute;
    left: -9999px;
}

/* Media Query for Tablets */

@media (min-width: 768px) {
    body {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto auto 90px;
        grid-template-areas:
            'header-container summary'
            'skills skills'
            'projects projects'
            'contact contact'
            'footer footer';
    }

    .header-container {
        align-self: center;
        max-width: none;
    }

    .summary-section {
        align-self: center;
    }

    .summary-section p {
        text-align: left;
    }

    .skills-list-container {
        grid-template-columns: 1fr 1fr;
    }

    .skills-list {
        margin: 0 auto;
        width: unset;
    }

    .website-showcase-container {
        width: 90%;
        max-width: none;
        grid-template-columns: repeat(2, 1fr);
    }

    .website-last {
        margin: 0 auto;
        grid-column: 1 / span 2;
        width: 65%;
    }

    .projects-showcase-img {
        max-width: 80%;
    }

    .form-container {
        max-width: 100%;
    }

    form {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-info p {
        max-width: 50%;
    }

    .contact-info label {
        text-align: left;
    }

    .contact-info input,
    .contact-info select {
        margin: unset;
        max-width: 100%;
    }

    .additional-comments {
        align-self: center;
    }

    textarea {
        width: auto;
        height: 200px;
    }

    input[type=submit] {
        grid-column: 1 / span 2;
    }

    footer ul {
        grid-template-columns: auto auto;
    }

    .address-line {
        grid-column: 1 / span 2;
    }
}

/* Media Query for Laptops */

@media (min-width: 1024px) {

    body {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto auto 90px;
        grid-template-areas:
            'header-container header-container'
            'summary skills'
            'projects projects'
            'contact contact'
            'footer footer';
    }

    .navbar {
        grid-template-columns: repeat(4, auto);
        grid-template-rows: 1fr;
    }

    .summary-section p {
        margin: 0.75em auto 0 auto;
        max-width: 90%;
    }

    .skills-list-container {
        grid-template-columns: auto;
    }

    .skills-list {
        width: 100%;
    }

    .website-showcase-container {
        grid-template-columns: repeat(3, auto);
    }

    .website-last {
        grid-column: initial;
        width: unset;
    }

    form {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-info p {
        grid-template-columns: 1fr 2fr;
        max-width: 75%;
    }

    .contact-info label {
        align-self: center;
        text-align: right;
        margin-right: 0.5rem;
    }

    .contact-info select {
        align-self: center;
        height: 35px;
    }

    .additional-comments {
        align-self: center;
    }

    textarea {
        width: 70%;
        height: 180px;
    }

}