/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Helvetica', 'Verdana', sans-serif;
    background-color: #f8f8f8;
    margin: 0;
    padding: 1em;
}

.resume {
    max-width: 1200px;
    margin: 0 auto;
}

/* Top Section (Headshot and Contact Info) */
.top-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2em;
}

.headshot-container {
    flex: 0 0 auto;
    margin-right: 1.5em;
}

.resume-headshot {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #4CAF50;
    object-fit: cover;
}

.contact-info {
    flex: 1;
    text-align: left;
}

.contact-info h1 {
    font-size: 2em;
    margin-bottom: 0.2em;
}

.contact-info p {
    margin: 0.5em 0;
}

.contact-info a {
    margin: 0 10px;
    color: #4CAF50;
    font-size: 1.5em;
    text-decoration: none;
}

.contact-info a:hover {
    color: #333;
}

/* Resume Sections */
.resume-section {
    margin-bottom: 2em;
    padding: 1em;
    border-radius: 5px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
    background-color: white;
    text-align: left; /* Default alignment */
}

.resume-section h2 {
    background-color: #4CAF50;
    color: white;
    padding: 5px 10px;
    display: inline-block;
    margin-bottom: 1em;
    font-size: 1.5em;
}

/* List Styles */
ul {
    list-style: none;
    padding: 0;
}

li {
    margin-bottom: 0.8em;
    line-height: 1.5;
    font-weight: 400;
}

.degree {
    font-weight: bold;
}

.school {
    display: block;
    margin-bottom: 0.3em;
}

#education p {
    font-style: italic;
    margin-top: 0.5em;
}

/* Certifications Section */
#certifications div {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 1em;
}

#certifications div > div {
    flex: 0 0 150px;
    height: 270px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

#projects ul {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1em;
}

/* Timeline Styles */
.timeline {
    border-left: 3px solid #4CAF50;
    padding-left: 20px;
    margin-left: 10px;
}

.timeline-entry {
    margin-top: 1em;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-content h3 {
    margin-bottom: 0.3em;
    color: #333;
}

.timeline-content p {
    margin: 0.5em 0;
    color: #555;
    transition: all 0.3s ease-in-out;
}

/* Media Queries for Responsive Design */
@media (max-width: 1024px) {
    .top-section {
        flex-direction: row;
        align-items: center;
    }

    .resume-headshot {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .top-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .headshot-container {
        margin-right: 0;
        margin-bottom: 1em;
    }

    .contact-info a {
        font-size: 1.3em;
    }

    .resume-section {
        padding: 0.8em;
    }

    .resume-section h2 {
        font-size: 1.3em;
    }
}

/* Mobile Styles: Center Top Section and Resume Content */
@media (max-width: 480px) {
    body {
        padding: 0.5em;
    }

    /* Center the top section content */
    .top-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-info {
        display: contents;
    }

    .contact-info h1 {
        font-size: 1.6em;
        margin-bottom: 0.5em;
    }

    .resume-headshot {
        width: 80px;
        height: 80px;
    }

    .timeline {
        padding-left: 10px;
    }

    .timeline-content h3 {
        font-size: 1.1em;
    }

    .timeline-content p {
        font-size: 0.9em;
    }

    /* Center content inside resume sections */
    .resume-section {
        text-align: center;
    }

    .resume-section h2 {
        display: block;
        margin: 0 auto 1em;
    }

    #certifications div {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}
