* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.7;
    color: #2c2c2c;
    background-color: #fafafa;
}

/* Skip to main content link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1a1a1a;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Header */
header {
    background-color: #1a3a52;
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    font-style: italic;
    opacity: 0.9;
}

header a {
    color: #fff;
    text-decoration: underline;
}

header a:hover {
    color: #4a90c4;
}

/* Navigation */
nav {
    background-color: #2c5677;
    padding: 0;
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 0;
    z-index: 10;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hide checkbox and label by default (desktop) */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
}

nav ul {
    list-style: none;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Fallback for old browsers that don't support flexbox */
.no-flexbox nav ul {
    text-align: center;
}

.no-flexbox nav li {
    display: inline-block;
    *display: inline; /* IE7 */
    *zoom: 1; /* IE7 */
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    -webkit-transition: background-color 0.3s ease;
    -moz-transition: background-color 0.3s ease;
    -o-transition: background-color 0.3s ease;
    transition: background-color 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a:focus {
    background-color: #1a3a52;
    border-bottom-color: #4a90c4;
    outline: none;
}

/* Main content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1rem;
    background-color: #fff;
    min-height: 60vh;
}

section {
    margin-bottom: 4rem;
    padding-top: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1a3a52;
    border-bottom: 3px solid #4a90c4;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #2c5677;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    text-align: justify;
}

.indented {
    margin-left: 2rem;
}

/* Lists for publications, courses */
.content-list {
    list-style-position: inside;
    margin-bottom: 1.5rem;
}

.content-list li {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    padding-left: 0.5rem;
}

/* Contact info styling */
.contact-info {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-left: 4px solid #4a90c4;
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    text-align: left;
}

/* Footer */
footer {
    background-color: #1a3a52;
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

/* Responsive design - Mobile/Tablet Hamburger Menu */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    /* Show hamburger icon on mobile */
    .menu-icon {
        display: block;
        cursor: pointer;
        padding: 1rem;
        text-align: right;
        font-size: 1.5rem;
        color: #fff;
        background-color: #2c5677;
    }

    .menu-icon span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #fff;
        margin: 5px auto;
        transition: 0.3s;
    }

    /* Hide menu by default on mobile */
    nav ul {
        display: none;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        width: 100%;
    }

    /* Show menu when checkbox is checked */
    .menu-toggle:checked ~ ul {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
    }

    /* Animate hamburger icon when open */
    .menu-toggle:checked ~ .menu-icon span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle:checked ~ .menu-icon span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked ~ .menu-icon span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Fallback for old browsers */
    .no-flexbox nav ul {
        display: block;
    }
    
    .no-flexbox nav li {
        display: block;
    }

    nav li {
        width: 100%;
    }

    nav a {
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }

    h2 {
        font-size: 1.6rem;
    }

    main {
        padding: 2rem 1rem;
    }

    p {
        text-align: left;
    }
}

/* Focus visible for better keyboard navigation */
*:focus-visible {
    outline: 2px solid #4a90c4;
    outline-offset: 2px;
}