/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #888;
    --bg-primary: #fff;
    --bg-secondary: #f9f9f9;
    --border-color: #e0e0e0;
    --link-color: #0066cc;
    --link-hover: #004499;
    --max-width: 680px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #e8e8e8;
        --text-secondary: #b0b0b0;
        --text-muted: #808080;
        --bg-primary: #1a1a1a;
        --bg-secondary: #252525;
        --border-color: #333;
        --link-color: #6db3f2;
        --link-hover: #9dcbf7;
    }
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* Typography */
h1, h2, h3 {
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: 2.25rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

ul {
    list-style: none;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 3px solid var(--border-color);
}

.tagline {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.social-links a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.social-links svg {
    display: block;
}

/* Sections */
section {
    margin-bottom: 2rem;
}

.about p {
    text-align: center;
    max-width: 540px;
    margin: 0 auto;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.year {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.company-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-secondary);
    padding: 4px;
}

.timeline-content h3 {
    color: var(--text-primary);
}

.timeline-content .company {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-content p:last-child {
    margin-bottom: 0;
}

/* Projects */
.project-grid {
    display: grid;
    gap: 1.5rem;
}

.project {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.project h3 {
    margin-bottom: 0.5rem;
}

.project p {
    margin-bottom: 0;
    font-size: 0.9375rem;
}

/* Writing */
.writing ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.writing li {
    color: var(--text-secondary);
}

/* Footer */
footer {
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
}

.footer-note {
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
    main {
        padding: 2.5rem 1.25rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .profile-photo {
        width: 100px;
        height: 100px;
    }

    .timeline-item {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }

    .company-logo {
        width: 40px;
        height: 40px;
    }

    .year {
        font-size: 0.8125rem;
    }
}

@media (max-width: 400px) {
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .timeline-marker {
        flex-direction: row;
        justify-content: flex-start;
    }

    .company-logo {
        order: -1;
    }
}
