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

:root {
    --bg-primary: #f4f1e8;
    --bg-secondary: #faf8f3;
    --bg-tertiary: #f0ede4;
    --bg-quaternary: #f7f5ef;
    --text-primary: #2c2c2c;
    --text-secondary: #5a5a5a;
    --text-tertiary: #4a4a4a;
    --border-color: #d4d0c4;
    --border-dark: #2c2c2c;
}

body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #242424;
    --bg-quaternary: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #c0c0c0;
    --border-color: #404040;
    --border-dark: #e0e0e0;
}

body {
    font-family: 'Times New Roman', serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

header {
    text-align: center;
    padding: 10px 20px;
    background-color: var(--bg-primary);
}

.tagline {
    font-size: 12px;
    letter-spacing: 4px;
    margin-bottom: 8px;
    font-weight: normal;
}

.main-title {
    font-size: 42px;
    font-weight: normal;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.main-nav {
    display: flex;
    border-top: 2px solid var(--border-dark);
    border-bottom: 2px solid var(--border-dark);
    background-color: var(--bg-primary);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px;
    text-decoration: none;
    color: var(--text-primary);
    border-right: 1px solid var(--border-dark);
    font-size: 14px;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--bg-tertiary);
}

.dark-mode-toggle {
    padding: 8px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-primary);
}

.social-icons {
    display: flex;
    padding: 8px;
}

.social {
    margin: 0 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
}

/* Hero Card */
.hero-card {
    text-align: center;
    padding: 40px;
    background: var(--bg-tertiary);
}

.hero-title {
    font-size: 42px;
    font-weight: normal;
    margin-bottom: 15px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-style: italic;
}

.hero-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-tertiary);
    margin-bottom: 25px;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-tag {
    background: var(--border-dark);
    color: var(--bg-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.content {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Modern Post Card Styles */
.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 20px;
    padding: 15px;
    position: relative;
}

.post-title {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 8px;
    line-height: 1.3;
}

.post-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.post-link:hover {
    transform: translateY(-2px);
}

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

/* Blog Grid Layout */
.blog-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-header h2 {
    font-size: 36px;
    font-weight: normal;
    margin-bottom: 15px;
}

.blog-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.posts-grid .post-card {
    margin-bottom: 0;
}

.posts-grid .post-title {
    font-size: 20px;
}

/* About Page Styles */
.about-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 30px;
    margin-bottom: 20px;
}

.about-header {
    margin-bottom: 50px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

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

.profile-info h1 {
    font-size: 36px;
    font-weight: normal;
    margin-bottom: 10px;
}

.profile-info .title {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.profile-info .location {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.about-card:first-child {
    padding-bottom: 5px;
}

.about-content section {
    margin-bottom: 50px;
}

.about-content h2 {
    font-size: 32px;
    font-weight: normal;
    margin-bottom: 25px;
}

.about-content h3 {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 25px;
}

.about-content h4 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.about-content p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* About Me Section Styling */
.about-me-title {
    font-size: 28px;
    font-weight: normal;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.about-paragraph {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
    color: var(--text-tertiary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.expertise-item {
    padding: 25px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-quaternary);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-dark);
}

.timeline-date {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: bold;
}

.timeline-content h4 {
    margin-bottom: 5px;
}

.timeline-content p {
    margin-bottom: 10px;
}

.publication-list {
    margin-bottom: 30px;
}

.publication-item {
    padding: 20px;
    border-left: 3px solid var(--border-color);
    margin-bottom: 20px;
    background-color: var(--bg-quaternary);
}

.publication-item h4 {
    margin-bottom: 8px;
}

.view-all-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid var(--text-primary);
}

.view-all-link:hover {
    background-color: var(--border-dark);
    color: var(--bg-primary);
    padding: 2px 4px;
}

/* Search Functionality */
.search-container {
    margin: 30px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    outline: none;
    transition: border-color 0.2s;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.search-input:focus {
    border-color: var(--border-dark);
}

/* Tag Filter */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 20px auto;
    max-width: 700px;
}

.filter-tag {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag:hover {
    background-color: var(--border-dark);
    color: var(--bg-primary);
    border-color: var(--border-dark);
}

/* Tags */
.post-tags {
    margin: 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: normal;
}

/* Contact page styles */
.contact-hero {
    text-align: center;
    background: var(--bg-secondary);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    padding: 15px;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--border-dark);
}

.contact-method strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.contact-method p {
    margin: 0;
    font-size: 14px;
}

.contact-method a {
    color: var(--text-primary);
    text-decoration: none;
}

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

/* Research Highlights */
.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.highlight-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.highlight-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.highlight-item h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.highlight-item p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.post-actions {
    text-align: center;
    margin-top: 25px;
}

.read-more {
    display: inline-block;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid var(--border-dark);
    transition: all 0.2s;
}

.read-more:hover {
    background-color: var(--border-dark);
    color: var(--bg-primary);
}

.research-title {
    font-size: 28px;
    font-weight: normal;
    letter-spacing: -1px;
    text-align: center;
    margin-bottom: 20px;
}

/* Paper section styles */
.paper-section {
    margin: 20px 0;
}

.paper-section h3 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}

.paper-section p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.pdf-download-btn {
    display: inline-block;
    background-color: var(--border-dark);
    color: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    transition: all 0.2s;
    margin-left: 10px;
}

.pdf-download-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .main-title {
        font-size: 60px;
    }
    
    .tagline {
        letter-spacing: 4px;
        font-size: 12px;
    }
    
    .hero-card {
        padding: 25px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-description {
        font-size: 15px;
    }
    
    .hero-tags {
        gap: 8px;
    }
    
    .hero-tag {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .main-nav {
        flex-wrap: wrap;
    }
    
    .social-icons {
        order: -1;
        width: 100%;
        justify-content: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card, .about-card {
        padding: 25px;
    }
    
    .post-title {
        font-size: 24px;
    }

    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .search-container {
        margin: 20px 0;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .tag-filter {
        margin: 15px 0;
    }
}