/* Karpathy-inspired minimal design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: #000;
    background-color: #fff;
    max-width: 970px;
    margin: 0 auto;
    padding: 40px 15px;
    font-size: 17px;
    line-height: 23.8px;
}

/* Typography */
h1 {
    font-size: 34px;
    font-weight: 700;
    line-height: 47.6px;
    margin: 0;
}

h2 {
    font-size: 36px;
    font-weight: 400;
    line-height: 50.4px;
    margin: 40px 0 20px 0;
}

a {
    color: #00e;
    text-decoration: underline;
    cursor: pointer;
}

a:hover {
    opacity: 0.8;
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 40px 0;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
    align-items: start;
    padding-bottom: 0;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.hero-content {
    padding-left: 20px;
    padding-top: 0;
}

.tagline {
    font-size: 18px;
    font-style: italic;
    color: #999;
    line-height: 25.2px;
    margin: 5px 0 10px 0;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.social-links a {
    display: inline-block;
}

.social-links img {
    width: 40px;
    height: 40px;
}

/* Bio Section */
.bio {
    margin: 0;
}

.bio h2 {
    margin-top: 20px;
}

/* Timeline Section */
.experience {
    margin: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: 80px 40px 80px 1fr;
    margin-bottom: 0;
}

.timeline-year {
    text-align: right;
    padding-right: 10px;
    font-size: 14px;
    line-height: 19.6px;
    color: #bbb;
}

.timeline-line {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 3px;
}

.timeline-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #cfcfcf;
    transform: translateX(-50%);
}

.timeline-dot {
    position: relative;
    width: 12px;
    height: 12px;
    background-color: #cfcfcf;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 1;
    flex-shrink: 0;
}

.company-logo {
    max-width: 56px;
    max-height: 56px;
    border-radius: 5px;
    object-fit: contain;
}

.timeline-content {
    padding-left: 20px;
    padding-bottom: 20px;
    font-size: 17px;
    line-height: 23.8px;
}

.timeline-content p {
    margin: 0;
}

/* Projects Section */
.projects {
    margin: 0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 6px 14px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    border-color: #999;
}

.filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.project-card {
    margin-bottom: 20px;
}

.project-card p {
    margin: 0 0 6px 0;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #555;
    background-color: #f0f0f0;
    border-radius: 3px;
}

/* Writing & Talks */
.writing,
.talks {
    margin: 0;
}

.placeholder-text {
    color: #888;
    font-style: italic;
}

/* Footer */
footer {
    margin-top: 40px;
}

.footer-note {
    color: #888;
    font-size: 14px;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .hero-content {
        padding-left: 0;
        padding-top: 20px;
    }

    .tagline {
        max-width: none;
    }

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

    .social-links {
        justify-content: center;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 28px;
    }

    .timeline-item {
        display: block;
        margin-bottom: 25px;
    }

    .timeline-year {
        display: inline;
        text-align: left;
        padding-right: 0;
    }

    .timeline-line {
        display: none;
    }

    .timeline-dot {
        display: none;
    }

    .company-logo {
        display: inline;
        margin-left: 10px;
        max-width: 24px;
        max-height: 24px;
        vertical-align: middle;
        border-radius: 3px;
    }

    .timeline-content {
        display: block;
        padding-left: 0;
        padding-top: 10px;
        padding-bottom: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 24px;
    }

    .tagline {
        font-size: 16px;
    }

    .social-links img {
        width: 36px;
        height: 36px;
    }

}
