/* ========== BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #000000;
    background-color: #FAFAFA;
}

/* ========== TYPOGRAPHY ========== */
h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 36px;
    font-weight: normal;
    margin: 20px 0;
}

h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
    font-weight: normal;
    margin-top: 40px;
    margin-bottom: 15px;
}

h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    font-weight: normal;
    margin-top: 30px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
}

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

a:hover {
    color: #333333;
}

em {
    font-style: italic;
}

strong {
    font-weight: bold;
}

blockquote {
    margin: 20px 0;
    padding-left: 20px;
    border-left: 3px solid #ccc;
    font-style: italic;
}

ul, ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

li {
    margin-bottom: 5px;
}

/* When text is selected, use IFP purple */
::selection {
    background-color: rgba(177, 122, 218, 0.2);
}

/* ========== LAYOUT ========== */
.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
}

/* ========== MAIN PAGE STYLES ========== */

/* Header section with photo and name */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h2 {
    margin-top: 60px;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

/* Bio section */
.bio {
    margin-bottom: 40px;
}

/* Contact bar */
.contact-bar {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0 50px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
}

.contact-bar a {
    text-decoration: none;
}

.contact-bar a:hover {
    text-decoration: underline;
}

/* IFP link with smooth transition */
.ifp-link {
    transition: color 0.2s ease;
}

.ifp-link:hover {
    color: #b17ada;
}

/* Publication-style sections */
.publication-list h2 {
    margin-top: 60px;
}

.publication-list p {
    margin-bottom: 10px;
    padding-left: 25px;
    text-indent: -25px;
}

/* Media mentions section - normal indent */
#media-mentions p {
    padding-left: 0;
    text-indent: 0;
}

/* ========== IMAGE PREVIEW ========== */
.image-preview {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    max-width: 25vw;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.image-preview.visible,
.image-preview.loading {
    opacity: 1;
}

.image-preview-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    max-height: 500px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview img.loaded {
    opacity: 1;
}

/* ========== BLOG POST STYLES ========== */
.back-link {
    margin-bottom: 40px;
}

.post-header {
    margin-bottom: 40px;
}

.post-date {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 20px;
        margin-top: 40px;
    }

    h3 {
        font-size: 18px;
    }

    body {
        font-size: 15px;
    }

    .links a {
        display: inline-block;
        margin-bottom: 5px;
    }

    /* Hide image preview on mobile */
    .image-preview {
        display: none;
    }
}

@media (max-width: 1200px) {
    /* Adjust image preview size for smaller screens */
    .image-preview {
        width: 250px;
        right: 20px;
    }
}
