/* ========================================
   Academic Economics Website - Sidebar Layout
   Inspired by maxkasy.github.io/home/
   ======================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background-color: #ffffff;
}

/* Two-Column Layout */
.site-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Fixed Left Sidebar */
.sidebar {
    width: 280px;
    min-width: 280px;
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-content {
    padding: 2.5rem 1.5rem;
    text-align: center;
}

/* Profile Photo in Sidebar */
.sidebar .profile-photo {
    margin-bottom: 1.5rem;
}

.sidebar .profile-photo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

/* Sidebar Name & Title */
.sidebar-name {
    font-size: 1.5rem;
    font-weight: 400;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.sidebar-title {
    font-size: 0.95rem;
    color: #555;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.2rem;
}

.sidebar-affiliation {
    font-size: 0.9rem;
    color: #777;
    font-family: 'Lato', sans-serif;
    margin-bottom: 1.5rem;
}

/* Sidebar Navigation */
.sidebar-nav {
    margin: 1.5rem 0;
    text-align: left;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 0.8rem;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background-color: #e9ecef;
    color: #3498db;
}

.sidebar-nav a.active {
    background-color: #3498db;
    color: #ffffff;
    font-weight: 500;
}

/* Sidebar Contact Info */
.sidebar-contact {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    text-align: left;
    font-size: 0.85rem;
}

.sidebar-contact p {
    margin-bottom: 0.6rem;
    color: #555;
    font-family: 'Lato', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-contact i {
    color: #777;
    width: 16px;
    text-align: center;
}

.sidebar-contact a {
    color: #3498db;
    text-decoration: none;
}

.sidebar-contact a:hover {
    text-decoration: underline;
}

/* Social Links in Sidebar */
.sidebar-links {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: flex-start;
}

.sidebar-links a {
    color: #555;
    font-size: 1.3rem;
    transition: color 0.2s ease;
}

.sidebar-links a:hover {
    color: #3498db;
}

/* CV Link in Sidebar */
.cv-link {
    margin-top: 1rem;
}

.cv-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #3498db;
    font-weight: 500;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem 4rem;
    max-width: 900px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h2 {
    font-size: 2rem;
    font-weight: 400;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #34495e;
}

p {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #555;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

strong {
    font-weight: 600;
    color: #2c3e50;
}

/* Section Styling */
.section {
    margin-bottom: 3rem;
}

/* Bio Section */
.bio p {
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

/* Research Section */
.paper-section {
    margin-bottom: 3rem;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.paper {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.paper:last-child {
    border-bottom: none;
}

.paper-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.paper-authors {
    font-size: 0.95rem;
    color: #666;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.5rem;
}

.paper-status {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.8rem;
}

.paper-journal {
    font-size: 0.95rem;
    color: #555;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.8rem;
}

.paper-abstract {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 1rem;
}

.paper-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.8rem;
}

.paper-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: #f8f8f8;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
}

.paper-link:hover {
    background-color: #3498db;
    color: #ffffff;
    border-color: #3498db;
    text-decoration: none;
}

/* Work in Progress List */
.wip-list {
    list-style-position: outside;
    margin-left: 1.5rem;
    line-height: 2;
}

.wip-list li {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}

/* CV Items */
.cv-item {
    margin-bottom: 1.5rem;
}

.cv-degree {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.3rem;
}

.cv-institution {
    font-size: 0.95rem;
    color: #555;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.3rem;
}

.cv-details {
    font-size: 0.9rem;
    color: #777;
    font-family: 'Lato', sans-serif;
}

.cv-list {
    list-style-position: outside;
    margin-left: 1.5rem;
    line-height: 1.9;
}

.cv-list li {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

footer p {
    font-size: 0.85rem;
    color: #999;
    font-family: 'Lato', sans-serif;
}

/* Responsive Design */
@media (max-width: 900px) {
    .main-content {
        padding: 2rem 2rem;
    }
}

@media (max-width: 768px) {
    .site-wrapper {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .sidebar-content {
        padding: 1.5rem;
    }

    .sidebar .profile-photo img {
        width: 120px;
        height: 120px;
    }

    .sidebar-nav {
        text-align: center;
    }

    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .sidebar-nav li {
        margin-bottom: 0;
    }

    .sidebar-nav a {
        padding: 0.4rem 0.8rem;
    }

    .sidebar-contact {
        text-align: center;
    }

    .sidebar-contact p {
        justify-content: center;
    }

    .sidebar-links {
        justify-content: center;
    }

    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .sidebar-content {
        padding: 1rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .paper-title {
        font-size: 1rem;
    }
}

/* ========================================
   Visualizations Page Styles
   ======================================== */

.section-intro {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.viz-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.viz-item:last-child {
    border-bottom: none;
}

.viz-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.5rem;
}

.viz-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.viz-container {
    margin: 1rem 0;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.viz-image {
    width: 100%;
    height: auto;
    display: block;
}

.viz-iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
}

.viz-tools {
    font-size: 0.85rem;
    color: #888;
    font-family: 'Lato', sans-serif;
    font-style: italic;
    margin-top: 0.5rem;
}

.viz-links {
    margin-top: 0.8rem;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
}

.viz-links a {
    color: #3498db;
}

.coming-soon {
    font-style: italic;
    color: #888;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

/* Visualization grid layout for multiple items */
.viz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.viz-grid .viz-item {
    border-bottom: none;
    padding-bottom: 0;
}

.viz-grid .viz-container {
    height: 250px;
    overflow: hidden;
}

.viz-grid .viz-image {
    height: 100%;
    object-fit: cover;
}

/* Responsive adjustments for visualizations */
@media (max-width: 768px) {
    .viz-iframe {
        height: 350px;
    }

    .viz-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
