/* Import Google Fonts at the top of your CSS file */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
/* or */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
/* or */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

/* General style */
html, body {
    height: 100%;
    margin: 0;
}
  
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    margin-top: 59px;
    border: 0px;
    border-spacing: 0px;
    border-collapse: separate;
    font-family: 'Poppins', sans-serif;  /* Modern, friendly font */
    /* or */
    /* font-family: 'Inter', sans-serif; */  /* Clean, professional font */
    /* or */
    /* font-family: 'Outfit', sans-serif; */  /* Contemporary, stylish font */
}

/* Optional: Style headings differently */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;  /* Make headings slightly bolder */
}

#title-section {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 1em;
    padding: 1em 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: left !important;
}

#title-section .title-content {
    width: 800px;
    order: 2;
}

#title-section h1 {
    margin-top: 0;
    text-align: left !important;
    font-size: 40px;
    margin-bottom: 0.5em;
}

#title-section h2 {
    text-align: left !important;
    color: #6c757d;
    font-size: 24px;
}

#title-section .links {
    display: block !important;
    justify-content: flex-start !important;
    text-align: left !important;
    font-size: 14px;
    margin-bottom: 1em;
}

#title-section .links vline {
    height: 17px;
    width: 1px;
    background-color: black;
    margin: 0 8px;
    display: inline-block;
    vertical-align: middle;
}

#title-section .links a {
    text-decoration: none;
    color: #007bff;
    display: inline-block;
}

#title-section .profile-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    order: 1;
}
  
main {
    flex: 1;
    width: 100%;
    max-width: 800px;  /* Added width constraint */
    margin: 0 auto;
    padding: 0 20px;   /* Added padding */
    display: flex;
    flex-direction: column;
    align-items: center;
}
  
footer {
    font-size: 12px;
    padding: 0em;
    background-color: #f8f8f8;
    border-top: 1px solid #e7e7e7;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

header {
    background-color: #f8f8f8;
    border-bottom: 1px solid #e7e7e7;
    padding: 1em 0;
    width: 100%;
    align-items: left;
    position: fixed;
    top: 0;
}

header nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

header nav a {
    text-decoration: none;
    color: #007bff;
}

header nav small_vline {
    width: 1px;
    background-color: black;
    height: 24px;
    display: inline-block; 
    padding-left: 5px;
    padding-right: 5px;
}

hr.small_vline {
    height: 24px;
    margin: 0 7px;
    border: 1px solid #6c757d;
}

/* Title section styling */
#title-section {
    margin: 0em 0;
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 4em 20px;
}

#title-section h1 {
    font-size: 40px;
    margin-bottom: 0.5em;
}

#title-section h2 {
    font-size: 24px;
    margin-bottom: 1em;
    color: #6c757d;
}


/* Biography style */
.biography {
    display: flex;
    flex-direction: row; /* Ensure horizontal layout */
    align-items: flex-start;
    max-width: 800px;
    width: 100%;
    margin: 2em auto;
    padding: 0 20px;
    gap: 2em; /* Add space between text and image */
}

.biography .text {
    flex: 1; /* Allow text to take remaining space */
    text-align: left;
}

.biography .text p {
    margin-top: 0;
    margin-bottom: 20px;
}

.biography .image {
    width: 30%; /* Reduce from 40% to 30% for smaller image */
    min-width: 200px; /* Ensure image doesn't get too small */
    max-width: 300px; /* Ensure image doesn't get too large */
}

.biography .image img {
    width: 100%;
    height: auto;
    object-fit: cover; /* Ensure image maintains aspect ratio */
}

/* List of papers - keeping original styling */
#list-of-papers.martin {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 20px;
}

#list-of-papers.martin > h1:first-child {
    margin-bottom: 2rem;
}

#list-of-papers.martin > h1:not(:first-child) {
    margin-top: 3rem;
    margin-bottom: 1rem;
    width: 45%;
}

#list-of-papers.martin h1:not(:first-child) ~ *:not(h1):not(p:has(img)) {
    width: 45%;
    margin: 0.5rem 0;
    position: relative;
    z-index: 2;
}

#list-of-papers.martin p:has(img) {
    position: absolute;
    width: 35%;
    left: 35%;
    margin-top: -8rem;
    z-index: 1;
}

#list-of-papers.martin img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

#list-of-papers.martin a {
    text-decoration: none;
    color: #0366d6;
    margin-right: 1rem;
}

#list-of-papers.martin table {
    border: none;
    margin: 1rem 0;
}

#list-of-papers.martin td {
    border: none;
    padding: 0;
    padding-right: 1rem;
}

#list-of-papers.martin > h1:not(:first-child) {
    margin-top: 3rem;
    clear: both;
}

/* Teaching experience formatting */
#teaching-experience {
    text-align: left;
    display: block;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#teaching-experience h1 {
    font-size: 32px;
    font-weight: normal;
    margin-top: 0px;
    margin-bottom: 20px;
}

#teaching-experience item {
    display: block;
    margin-bottom: 20px;
}

#teaching-experience item a {
    text-decoration: none;
    color: #007bff;
}

#teaching-experience item desc {
    display: inline-block;
    font-style: italic;
    margin-left: 20px;
}

/* Miscellaneous section formatting */
#misc {
    text-align: left;
    display: block;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#misc h1 {
    font-size: 32px;
    font-weight: normal;
    margin-top: 0px;
    margin-bottom: 20px;
}

#misc item {
    display: block;
    margin-bottom: 20px;
}

#misc item a {
    text-decoration: none;
    color: #007bff;
}

#misc item desc {
    display: inline-block;
    margin-left: 20px;
}

#misc item ul {
    margin-left: 20px;
    padding-left: 20px;
    list-style-position: outside;
    list-style-type: disc;
}

/* 404 page style */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.error-content {
    text-align: center;
}

.error-content h1 {
    font-size: 2em;
    margin-bottom: 0.5em;
}

.error-content p {
    margin: 0.5em 0;
}

.error-content form {
    margin-top: 1em;
}