/* General styles */
body {
    font-family: 'Arial', sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

/* Skip-to-content link (hidden until focused) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: #444;
    color: #fff;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s ease;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* Header styles */
header {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    position: relative;
}

/* Home link in header */
header .home-link {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    text-decoration: none;
    font-weight: bold;
}
header .home-link:hover {
    text-decoration: underline;
}

header .headshot {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
}

header h1 {
    font-size: 2.5em;
    margin: 0;
    padding-top: 180px; /* Adjusted to accommodate the headshot */
}

header p {
    font-size: 1.2em;
    margin: 10px 0;
}

/* Navigation menu styles */
nav {
    background-color: #444;
}

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

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease; /* smooth hover transition */
}

nav ul li a:hover {
    background-color: #555;
}

/* Main spacing (below nav) */
main {
    margin-top: 10px;
}

/* Section styles */
section {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

section h2 {
    font-size: 2em;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* Ensure consistent heading hierarchy in Education */
section#education h3 {
    font-size: 1.3em;
    color: #555;
    margin-top: 15px;
}

section h3 {
    font-size: 1.5em;
    color: #555;
    margin-top: 20px;
}

ul {
    list-style-type: none;
    padding-left: 0;
}

ul li {
    margin-bottom: 10px;
}

ul li a {
    text-decoration: none;
    color: #0066cc;
    font-weight: bold;
}

ul li a:hover {
    text-decoration: underline;
}

/* Skills section styles */
#skills h3 {
    margin-top: 0;
}

#skills ul li {
    margin-bottom: 5px;
}

/* Publications keywords styling */
.keywords {
    margin-top: 5px;
    font-size: 0.9em;
    color: #555;
}

/* Contact section styles */
#contact p {
    margin: 5px 0;
}

#contact a {
    color: #0066cc;
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

/* Footer styles */
footer {
    text-align: center;
    padding: 10px 0;
    background-color: #333;
    color: white;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    nav ul {
        flex-direction: column;
    }

    header .headshot {
        width: 100px;
        height: 100px;
        top: 10px;
    }

    header h1 {
        font-size: 2em;
        padding-top: 130px;
    }

    header p {
        font-size: 1em;
    }
}
