/* Simple Academic Personal Website Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #333;
    background-color: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Navigation */
nav {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
}

nav a:hover,
nav a.active {
    color: #0066cc;
}

/* Header */
header {
    margin-bottom: 40px;
}

h1 {
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.3rem;
    font-weight: normal;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

h3 {
    font-size: 1.1rem;
    font-weight: normal;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #555;
}

/* Main content */
main {
    margin-bottom: 60px;
}

p {
    margin-bottom: 15px;
}

/* Home page: avoid mid-paragraph width change from floated photo */
.home main > p:nth-of-type(3) {
    clear: left;
}

a {
    color: #0066cc;
}

a:hover {
    text-decoration: underline;
}

/* Photo placeholder */
.photo-placeholder {
    /* ~1/3 of content width (body max-width is 800px) */
    width: min(33%, 280px);
    aspect-ratio: 9 / 11;
    background-color: #f0f0f0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 25px;
    float: left;
    margin-right: 30px;
    margin-left: 0;
    overflow: hidden;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Crop top/bottom 25% and keep aspect ratio by cropping sides equally (25% each side) */
    clip-path: inset(25% 25% 25% 25%);
    transform: scale(2);
    transform-origin: center;
}

/* Affiliation logos */
.affiliations {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.affiliation-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.datafirst-logo {
    background-color: #003865;
    padding: 8px 14px;
    border-radius: 4px;
}

/* Contact section */
.contact {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.contact p {
    margin-bottom: 5px;
}

/* Lists */
ul, ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 12px;
}

/* Research page specific */
.publication {
    margin-bottom: 15px;
    padding-left: 0;
}

.publication-list {
    list-style: none;
    margin-left: 0;
}

.publication-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    text-indent: -25px;
}

.publication-list li::before {
    content: "";
}

/* Current projects */
.project {
    margin-bottom: 30px;
}

.project-blurb {
    background-color: #f9f9f9;
    padding: 15px;
    margin-top: 10px;
    font-style: italic;
    color: #666;
    border-left: 3px solid #ddd;
}

/* CV page */
.cv-download {
    margin-bottom: 30px;
}

.cv-download a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 3px;
}

.cv-download a:hover {
    background-color: #0055aa;
}

.cv-embed {
    width: 100%;
    height: 800px;
    border: 1px solid #ddd;
}

/* Footer */
footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 0.85rem;
    color: #666;
}

/* Clear floats */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 20px 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .photo-placeholder {
        float: none;
        margin: 0 auto 25px auto;
        width: min(70%, 320px);
    }
    
    h1 {
        font-size: 1.6rem;
    }
}
