/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000;
    --text-color: #333;
    --text-muted: #666;
    --background: #fff;
    --border-color: #e5e5e5;
    --link-color: #0066cc;
    --link-hover: #0052a3;
    --max-width: 800px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    font-size: 16px;
}

/* Navigation */
.navbar {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: var(--background);
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Hero Section */
.hero {
    margin-bottom: 3rem;
}

.name {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
}

/* About Section */
.about {
    margin-bottom: 4rem;
}

.about p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about .intro {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.about strong {
    color: var(--primary-color);
}

.reach {
    font-style: italic;
    color: var(--text-muted);
}

/* Selected Work/Publications */
.selected-work {
    margin-bottom: 4rem;
}

.selected-work h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.publication {
    display: flex;
    margin-bottom: 2.5rem;
    gap: 1.5rem;
}

.pub-number {
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    padding-top: 0.2rem;
}

.pub-content {
    flex: 1;
}

.pub-venue {
    background: #f0f0f0;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 3px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.pub-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.pub-authors {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.pub-conference {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.pub-note {
    color: #d9534f;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pub-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.pub-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--link-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.pub-link:hover {
    background: var(--link-color);
    color: white;
}

/* Blog Page Styles */
.blog-list {
    margin-top: 2rem;
}

.blog-section {
    margin-bottom: 4rem;
}

.blog-section .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--link-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Simple blog list styles */
.blog-list-simple {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-list-simple li {
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
}

.blog-list-simple .blog-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 50px;
    margin-right: 1.5rem;
    font-family: 'Courier New', monospace;
}

.blog-list-simple a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.blog-list-simple a:hover {
    color: var(--link-color);
    text-decoration: underline;
}

/* Tooltip styling */
.blog-list-simple a[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 5px;
    padding: 0.5rem 0.75rem;
    background: #333;
    color: white;
    font-size: 0.85rem;
    border-radius: 4px;
    white-space: normal;
    max-width: 400px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.blog-post {
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.blog-title a:hover {
    text-decoration: underline;
}

.blog-excerpt {
    color: var(--text-color);
    line-height: 1.6;
}

/* Projects Page */
.projects-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-description {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.project-link:hover {
    text-decoration: underline;
}

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

.cv-section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.cv-item {
    margin-bottom: 1.5rem;
}

.cv-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.cv-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.cv-description {
    line-height: 1.6;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer a {
    color: var(--link-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--background);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .container {
        padding: 2rem 1.5rem;
    }
    
    .publication {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pub-links {
        flex-wrap: wrap;
    }
    
    .profile-photo {
        width: 150px;
        height: 150px;
    }
}

/* Profile Photo Styles */
.profile-photo-container {
    text-align: center;
    margin: 2rem 0 3rem 0;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 3px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Research/Reading Page Styles */
.research-section {
    margin-bottom: 3rem;
}

.research-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.research-list {
    list-style: none;
    padding: 0;
}

.research-list > li {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    position: relative;
}

.research-list > li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--link-color);
}

.research-list ul {
    margin-top: 0.5rem;
    margin-left: 1rem;
    list-style: none;
    padding: 0;
}

.research-list ul li {
    margin-bottom: 0.4rem;
    padding-left: 1.2rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.research-list ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--border-color);
}

.research-note {
    margin-top: 4rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid var(--link-color);
}

.research-note p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #fff;
        --text-color: #e0e0e0;
        --text-muted: #999;
        --background: #1a1a1a;
        --border-color: #333;
        --link-color: #4da6ff;
        --link-hover: #3d8fdb;
    }
    
    .pub-venue,
    .tag {
        background: #2a2a2a;
    }
    
    .project-card {
        background: #222;
        border-color: #333;
    }
    
    .pub-link {
        border-color: var(--link-color);
    }
    
    .profile-photo {
        border-color: #444;
    }
    
    .research-note {
        background: #2a2a2a;
        border-left-color: var(--link-color);
    }
}
