/* Modern Minimalist Theme */
:root {
    --bg-color: #fafafa;
    --text-color: #2d2d2d;
    --accent-color: #0066cc;
    --secondary-color: #666666;
    --subtle-color: #f5f5f5;
    --mono-font: 'JetBrains Mono', 'Fira Code', monospace;
    --serif-font: 'Crimson Pro', 'Charter', 'Georgia', serif;
    --sans-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--serif-font);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--bg-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--serif-font);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

h2 {
    font-size: 1.75rem;
    margin: 3rem 0 1.5rem;
    color: var(--accent-color);
}

h3 {
    font-size: 1.35rem;
    margin: 2rem 0 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    opacity: 0.9;
}

/* Links */
a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    padding-bottom: 1px;
}

a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Navigation */
nav {
    font-family: var(--mono-font);
    font-size: 0.9rem;
    margin: 0 0 5rem;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--secondary-color);
    border-bottom: none;
    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--text-color);
    transform: translateY(-1px);
}

nav a.active {
    color: var(--text-color);
    font-weight: 500;
}

/* Profile Section */
.profile {
    margin: 6rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

.profile-text {
    flex: 1;
}

.profile-photo {
    flex: 0 0 240px;
    display: flex;
    justify-content: flex-end;
}

.profile-photo img {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.profile h1 {
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.profile p {
    font-family: var(--mono-font);
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.profile .links {
    font-family: var(--mono-font);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Reduce top margin of the first section after profile */
.profile+section {
    margin-top: -2rem;
}

/* Research Areas */
.section-title {
    color: var(--accent-color);
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

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

.research-area h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.research-area p {
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Work Items */
.item {
    margin-bottom: 4rem;
}

.item h2 {
    font-family: var(--serif-font);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.item-meta {
    font-family: var(--mono-font);
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.item-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1rem 0;
    color: var(--text-color);
}

.item-links {
    margin-top: 1rem;
}

.item-links a {
    font-family: var(--mono-font);
    font-size: 0.85rem;
    margin-right: 1.5rem;
    color: var(--accent-color);
    border-bottom: none;
}

.item-links a:hover {
    opacity: 0.8;
}

/* Footer */
footer {
    margin-top: 8rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-family: var(--mono-font);
    font-size: 0.85rem;
    color: var(--secondary-color);
}

footer a {
    margin-right: 2rem;
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 2rem 1.5rem;
        font-size: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    nav {
        margin: 1rem 0 3rem;
        flex-wrap: wrap;
    }

    .profile {
        margin: 3rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .profile-photo {
        width: 100%;
        justify-content: flex-start;
    }

    .profile-photo img {
        max-width: 180px;
    }

    .item-description {
        max-width: 100%;
    }

    .item h2 {
        font-size: 1.75rem;
    }
}

/* Blog Styles */
.post {
    max-width: 700px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-meta {
    font-family: var(--mono-font);
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    background: var(--subtle-color);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin: 0 0.3rem;
    font-size: 0.8rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2 {
    margin: 2.5rem 0 1.5rem;
    font-size: 1.75rem;
}

.post-content h3 {
    margin: 2rem 0 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    display: block;
}

.post-content pre {
    background: var(--subtle-color);
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content code {
    font-family: var(--mono-font);
    font-size: 0.9rem;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.read-more {
    font-family: var(--mono-font);
    font-size: 0.9rem;
    color: var(--accent-color);
    border-bottom: none;
    display: inline-flex;
    align-items: center;
}

.read-more:hover {
    opacity: 0.8;
}

.date {
    font-family: var(--mono-font);
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0.5rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post {
        padding: 1rem 0;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content pre {
        padding: 1rem;
    }
}

.research-focus {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.research-focus h2 {
    font-family: 'Crimson Pro', serif;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #333;
}

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

.research-focus li {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #444;
}

.research-focus li strong {
    color: #333;
    display: block;
    margin-bottom: 0.5rem;
}