:root {
    /* Colors */
    --bg-color: #f9fafb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent-color: #2563eb;
    /* A refined blue */
    --card-bg: #ffffff;
    --border-color: #e5e7eb;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: 'Merriweather', serif;
    /* Optional for headings if desired, but sticking to sans for clean look */
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #111827;
        --text-main: #f9fafb;
        --text-muted: #9ca3af;
        --card-bg: #1f2937;
        --border-color: #374151;
        --accent-color: #60a5fa;
    }
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    width: 100%;
}

header {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 2rem;
}

/* Language Switcher */
.lang-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.lang-link:hover,
.lang-link-is-active {
    color: var(--text-main);
}

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: 4rem;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
    /* Subtle border */
    background-color: var(--card-bg);
    /* Clean background if transparent */
}

.headline {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.bio {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 540px;
    margin: 0 auto 2rem auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.social-link:hover {
    border-color: var(--text-main);
}

/* Projects Section */
.projects {
    margin-top: 4rem;
    text-align: center;
    /* Centering as requested/implied */
}

.project-item {
    margin-bottom: 2.5rem;
    display: block;
    text-decoration: none;
    color: inherit;
    /* For hover effects if needed */
}

.project-item:hover .project-title {
    color: var(--accent-color);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.project-desc {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    /* Center the description block if text wraps */
}

/* Writing Section */
.writing {
    margin-top: 4rem;
    text-align: center;
}

.writing-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

.writing-text a {
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-color: var(--border-color);
    text-underline-offset: 2px;
    transition: all 0.2s;
}

.writing-text a:hover {
    color: var(--text-main);
    text-decoration-color: var(--accent-color);
}

/* Footer & Legal */
footer {
    margin-top: auto;
    padding-top: 4rem;
    padding-bottom: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--text-main);
}

/* Simple Animation */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}