/* Top navigation bar */
.topnav {
    background-color: #fff;
    position: fixed;
    z-index: 999;
    width: 100%;
    box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}

/* Inner container aligned with the 1080px content wrapper */
.topnav-inner {
    width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

/* Home link (name) — sized to the sidebar column (180px) so it
   sits directly above the photo/name */
.topnav .home {
    width: 200px;
    flex-shrink: 0;
    box-sizing: border-box;
    text-align: left;
    color: #13294B;
    text-decoration: none;
    padding: 11px 10px;
    font-size: 16px;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
}

.topnav .home:hover {
    color: #0055a5;
}

/* The About / Publications / Experience group — offset by the sidebar/content
   gap (40px) so it lines up with the content column where the titles start */
.topnav .nav-group {
    display: flex;
    margin-left: 30px;
}

.topnav a.normal {
    color: #13294B;
    text-align: center;
    padding: 11px 10px;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    letter-spacing: 0.03em;
    position: relative;
    transition: color 0.2s ease;
}

.topnav a.normal::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #FF5F05;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.topnav a.normal:hover {
    background-color: transparent;
    color: #13294B;
}

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

.topnav a.icon {
    display: none;
}

/* ─── Responsive: mobile (hamburger menu) ─── */
@media print, screen and (max-width: 960px) {

    .topnav-inner {
        width: auto;
        display: block;
        position: relative;
    }

    .topnav .home {
        width: auto;
        display: inline-block;
        padding: 14px 16px;
    }

    .topnav a.normal::after { display: none; }

    .topnav #myLinks {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease-in-out;
    }

    .topnav #myLinks.open {
        max-height: 600px;
    }

    .topnav a.normal {
        color: #13294B;
        padding: 14px 16px;
        text-decoration: none;
        font-size: 16px;
        display: block;
    }

    .topnav a.icon {
        color: #13294B;
        display: block;
        padding: 10px 16px;
        font-size: 17px;
        position: absolute;
        right: 0;
        top: 0;
        margin-right: 5%;
    }

    .topnav a.icon .icon-wrap {
        position: relative;
        display: inline-block;
        width: 1em;
        height: 1em;
    }

    .topnav a.icon .icon-bars,
    .topnav a.icon .icon-xmark {
        position: absolute;
        top: 0;
        left: 0;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .topnav a.icon .icon-bars  { opacity: 1; transform: rotate(0deg); }
    .topnav a.icon .icon-xmark { opacity: 0; transform: rotate(-90deg); }

    .topnav a.icon.active .icon-bars  { opacity: 0; transform: rotate(90deg); }
    .topnav a.icon.active .icon-xmark { opacity: 1; transform: rotate(0deg); }
}
