@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&family=IBM+Plex+Mono:wght@400;700&display=swap');

.contact-nav {
    display: flex;
    align-items: center;
    margin-top: 2.5em;
    margin-bottom: 2em;
    gap: 1.2em;
    font-size: 1em;
}

.nav-ssh {
    color: #666663;
    font-family: 'IBM Plex Mono', monospace;
    margin-right: 0.7em;
    cursor: default;
    user-select: none;
    font-size: 1em;
}

.nav-contact {
    font-family: 'IBM Plex Mono', monospace;
    color: #000;
    text-decoration: none;
    position: relative;
    font-size: 1em;
    margin-right: 1em;
    transition: color 0.3s ease;
}

.nav-contact::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #CC785C;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-contact:hover {
    color: #CC785C;
}

.nav-contact:hover::after {
    width: 100%;
}


.nav-contact:last-child {
    margin-right: 0;
}



body {
    font-family: 'Space Grotesk', 'IBM Plex Mono', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #222;
}

.header-text nav {
    display: flex;
    gap: 1em;
    margin-bottom: 1rem;
}

.header-text nav a:last-child {
    margin-right: -1em;
}

.nav-cd {
    color: #666663;
    font-family: 'IBM Plex Mono', monospace;
    margin-right: 1em;
    cursor: default;
    user-select: none;
    font-size: 1em;
}

.nav-dir {
    font-family: 'IBM Plex Mono', monospace;
    color: #000;
    margin-right: 1em;
    font-size: 1em;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-dir:last-child {
    margin-right: 0;
}

.nav-dir::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #CC785C;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dir:hover::after {
    width: 100%;
}

.nav-dir:hover {
    color: #CC785C;
}



.header-flex {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-direction: row-reverse;
}


header nav a {
    color: inherit;
    position: relative;
    text-decoration: none;
}

header nav a:visited {
    color: inherit;
}



header nav a:hover::after {
    width: 100%;

}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

header nav li {
    display: inline;
}

main {
    max-width: 700px;
    margin: 0rem auto;
    /* padding: 2rem; */
    border-radius: 5px;
}

h1 {
    margin-top: 0;
    font-family: 'Space Grotesk';
    font-weight: 600;
    font-size: 2.5rem;
}

.social {
    margin-top: 1rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    margin: 0;
    padding: 60px 40px 40px;
    background-color: #ffffff;
    color: #111;
    line-height: 1.6;
    font-size: 1em;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.header-text {
    flex: 1;
    margin-right: 40px;
}

header h1,
h2 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

header h1 {
    font-size: 2.5em;
    font-weight: 600;
    margin: 0 0 15px;
}

main p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.image-caption {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    text-align: center;
    color: #666663;
    margin-bottom: 1em;
}

.bibliography p {
    font-size: 1em;
}

header p {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 1em;
    margin: 0;
    line-height: 1.6;
    color: #111;
}

.profile-picture {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    object-fit: cover;

}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 2em;
    font-weight: 600;
    margin: 0 0 20px;
    color: #000;
}

h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

li {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.experience-item {
    display: flex;
    margin-bottom: 15px;
}

.experience-item .date {
    flex: 0 0 120px;
    font-size: 1em;
    font-family: 'Space Grotesk', sans-serif;
    color: #666663;
    line-height: 1.5;
    padding-right: 10px;
}

.experience-item .description {
    flex: 1;
    line-height: 1.5;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1em
}

.experience-item .description p {
    margin: 0;
    padding-bottom: 5px;
}

a {
    color: #000;
    text-decoration: underline;
}

.contact-links a {
    margin-right: 20px;
    font-size: 1em;
}

.contact-links a:last-child {
    margin-right: 0;
}

footer {
    text-align: center;
    color: #91918D;
    margin: 2rem 0 1rem 0;
    font-size: 0.9rem;
}

.underlined {
    color: #000;
    position: relative;
    text-decoration-color: #e2ca9e;
    text-decoration-thickness: 5px;
    text-decoration: none;
}

.underlined::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2.5px;
    background: #e2ca9e;
    width: 100%;
    border-radius: 2px;
}

.writing h3 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 600;
    font-size: 1.3em;
    line-height: 1.5;
    margin: 0 0 5px;
    color: #000;
    position: relative;
    display: inline-block;
}

.writing h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 4px;
    background: #e2ca9e;
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.writing h3:hover::after {
    width: 100%;
}

.writing p {
    font-family: 'Space Grotesk', sans-serif;
    margin: 10px 0px;
    margin-bottom: 20px;
}

/* .underlined:hover { */
/* color: #000; */
/* background-color: #f1e5d0; */
/* transition: background-color 0.4s; */
/* } */

.tagged {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-weight: 600;
    font-size: 1.3em;
    line-height: 1.5;
    margin: 0 0 5px;
    color: #000;
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.tagged::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 4px;
    background: #e2ca9e;
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tagged:hover::after {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 650px) {
    body {
        padding: 20px;
    }

    header {
        flex-direction: row;
        align-items: center;
    }

    .header-text {
        margin-right: 0.2em;
        flex: 1 1 0;
        min-width: 0;
        /* Allows text to shrink */
        max-width: 85vw;
    }

    .profile-picture {
        width: 160px;
        /* Smaller image for mobile */
        height: 160px;
        min-width: 0;
        max-width: 30vw;
        /* Responsive max width */
        max-height: 30vw;
    }

    .header-text nav {
        flex-wrap: wrap;
        margin-bottom: 10px;
        gap: 0.7em !important;
        /* max-width: 100px; This makes it a column*/
    }

    .nav-dir {
        margin-right: 0.7em;
    }

    .nav-dir:last-child {
        margin-right: 0;
    }

    header h1 {
        font-size: 2em;
        margin-bottom: 0.5em;
    }

    header p {
        font-size: 1em;
    }

    .experience-item {
        flex-direction: column;
    }

    .experience-item .date {
        flex-basis: auto;
        margin-bottom: 8px;
        padding-right: 0;
    }

    h2 {
        font-size: 1.8em;
    }

    .contact-nav {
        flex-wrap: wrap;
        gap: 0.7em !important;
    }

}

/* ============================================
   Distill-style Authors & Affiliations
   ============================================ */

.distill-byline {
    border-top: 1px solid #ddd;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 3rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.distill-byline-item {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.distill-byline-label {
    /* font-family: 'IBM Plex Mono', monospace; */
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 0.4rem;
}

.distill-byline-content {
    /* font-family: 'Space Grotesk', sans-serif; */
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; */
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

.distill-byline-content a {
    color: #333;
    text-decoration: none;
}

.distill-byline-content a:hover {
    text-decoration: underline;
}

/* For multiple authors/affiliations stacked vertically */
.distill-byline-content p {
    margin: 0;
    margin-bottom: 0.em;
    padding: 0;
}

@media (max-width: 650px) {
    .distill-byline {
        gap: 1.2rem 2rem;
    }

    .distill-byline-item {
        min-width: 100px;
    }
}