/* ====================
   TUFTE RESEARCHER STYLE
   ==================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

:root {
    --bg-color: #fffff8;
    --text-color: #111;
    --link-color: #111;
    --gray-light: #f5f5f5;
    --gray-medium: #666;
    --max-width: 1100px;
    --sidebar-width: 250px;
    --font-serif: "et-book", "Palatino Linotype", "Palatino", "Palladio", "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    background-color: var(--bg-color);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    min-height: 100vh;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: italic;
    line-height: 1.2;
    margin: 2rem 0 1rem 0;
}

h1 { font-size: 2.2rem; margin-top: 0; }
h2 { font-size: 1.7rem; border-bottom: 1px solid #ccc; padding-bottom: 0.5rem; }
h3 { font-size: 1.3rem; }

p {
    margin-bottom: 1.4rem;
    font-size: 1.1rem;
    max-width: 100%;
}

a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.7;
}

/* SIDEBAR */
.site-sidebar {
    width: var(--sidebar-width);
    padding: 3rem 2rem;
    background: #111; /* Black sidebar */
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: none;
}

.sidebar-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem auto;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid #333;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 2rem;
    text-align: center;
}

.sidebar-brand a {
    text-decoration: none;
    color: #fff;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    text-align: center;
}

.sidebar-nav li {
    margin-bottom: 1.2rem;
}

.sidebar-nav a {
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    color: #ccc;
    transition: color 0.2s;
}

.sidebar-nav a:hover {
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 2rem;
    text-align: center;
}

.social-links a {
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    color: #888;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #fff;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    padding: 3rem 4rem;
    max-width: var(--max-width);
    display: flex;
    justify-content: center;
}

.content-wrapper {
    max-width: 55rem;
    width: 100%;
}

/* RESEARCH SECTIONS */
.research-section {
    margin-bottom: 4rem;
}

.publication-item {
    background: var(--gray-light);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 3px solid #111;
    transition: box-shadow 0.2s ease;
}

.publication-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.publication-title {
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.publication-authors {
    font-size: 0.95rem;
    color: var(--gray-medium);
    display: block;
    margin-bottom: 0.3rem;
}

.publication-venue {
    font-style: italic;
    font-size: 0.95rem;
}

/* CV */
.cv-section {
    margin-bottom: 3rem;
}

.cv-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cv-date {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--gray-medium);
}

/* SIDENOTES (Classic Tufte) */
.sidenote {
    background: var(--gray-light);
    border-left: 3px solid #999;
    padding: 1.2rem;
    margin: 2rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--gray-medium);
    border-radius: 2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* RESEARCH DETAIL */
.research-header {
    margin-bottom: 2rem;
}

.research-header .meta {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--gray-medium);
}

.research-hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: 2rem;
}

.research-content h2 {
    margin-top: 2rem;
}

.research-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #efefef;
}

/* TIMELINE SECTION */
.timeline-section {
    margin: 3rem 0;
}

.timeline-container {
    position: relative;
    padding: 1rem 0 1rem 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ccc;
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #111;
    border: 2px solid #fff;
    border-radius: 50%;
    left: -2.4rem;
    top: 0.5rem;
}

.timeline-date {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.3rem;
}

.timeline-content {
    background: var(--gray-light);
    padding: 1.2rem;
    border-radius: 2px;
    border-left: 3px solid #111;
}

.timeline-content p {
    margin: 0;
    font-size: 1rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    body {
        flex-direction: column;
    }

    .site-sidebar {
        width: 100%;
        height: auto;
        padding: 2rem 1.5rem;
        position: relative;
        border-bottom: none;
    }

    .sidebar-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .sidebar-brand {
        margin-bottom: 1rem;
    }

    .sidebar-nav {
        display: flex;
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .sidebar-nav li {
        margin-bottom: 0;
    }

    .social-links {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 1rem;
    }

    .main-content {
        padding: 2rem 1.5rem;
    }

    .sidenote {
        margin: 1.5rem 0;
        padding: 1rem;
        border-left: 3px solid #999;
    }

    .timeline-container {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -1.9rem;
    }
}
