/* style.css */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #000;
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

article {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.container {
    padding: 20px;
}

header {
    margin-bottom: 40px;
}

.header-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin: 40px 0;
}

.header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 150px;  /* Same as image height */
}

.profile {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

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

.social-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    transition: all 0.2s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    background: #eee;
}

h1 {
    font-size: 32px;
    font-weight: 300;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
    text-align: left;
}

.subtitle {
    font-size: 16px;
    color: #000;
    margin: 0 0 20px 0;
    font-weight: 300;
    text-align: left;
}

nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 20px;
}

nav a {
    text-decoration: none;
    color: #000;
    font-weight: 400;
}

nav a:hover {
    color: #666;
}

nav .divider {
    color: #ccc;
    font-weight: 300;
    margin: 0 10px;
}

section {
    margin-bottom: 50px;
}

h2 {
    font-size: 24px;
    font-weight: 400;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #444;
}

.publication-item, .talk-item, .blog-post {
    margin-bottom: 30px;
}

h3 {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
}

a {
    color: #0366d6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.divider {
    border-top: 1px solid #eee;
    margin: 40px 0;
}

/* Timeline styling - Karpathy style */
.timeline {
    margin-bottom: 40px;
}

.entry {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.time {
    flex: 0 0 120px;
    color: #000;
    text-align: right;
    padding-right: 20px;
    position: relative;
    font-weight: 300;
    align-self: flex-start;
}

.time::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 50%;
    width: 1px;
    height: 100%;
    background-color: #eee;
    transform: translateY(-50%);
}

.description {
    flex: 1;
    padding-left: 20px;
    border-left: 1px solid #e1e1e1;
    position: relative;
    text-align: left;
}

.description::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #eee;
}

strong {
    font-weight: 400;
    color: #000;
}

/* Responsive design */
@media (max-width: 600px) {
    body {
        font-size: 15px;
        padding: 0 15px;
        margin: 20px auto;
    }

    h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 18px;
    }

    .entry {
        flex-direction: column;
        gap: 5px;
    }

    .time {
        text-align: left;
        padding-right: 0;
    }

    .time::after {
        display: none;
    }

    .description {
        padding-left: 15px;
    }
}

/* Print styles */
@media print {
    body {
        max-width: none;
        margin: 20px;
        color: #000;
    }

    .divider {
        border-top-color: #999;
    }

    .description::before {
        background-color: #999;
    }

    .time::after {
        background-color: #999;
    }
}

/* Blog specific styles */
.blog-posts {
    margin-top: 40px;
}

.blog-post {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.post-excerpt {
    color: #444;
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    color: #0366d6;
    text-decoration: none;
    font-size: 14px;
}

.read-more:hover {
    text-decoration: underline;
}

nav .active {
    color: #0366d6;
    font-weight: 600;
}

/* Individual blog post styling */
.blog-post-content {
    max-width: 700px;  /* Match the body max-width */
    margin: 0 auto;
    padding: 0 20px;  /* Match the body padding */
}

.blog-post-content h1 {
    font-size: 32px;  /* Match the h1 size from finding-my-pace */
    font-weight: 300;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.blog-post-content header {
    margin-bottom: 40px;
}

.blog-post-content .post-meta {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px 0;
    font-weight: 300;
}

.blog-post-content h2 {
    font-size: 24px;
    font-weight: 400;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #444;
}

.blog-post-content h3 {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
}

.blog-post-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    font-weight: 300;
}

/* Improved reading experience for blog posts */
@media (min-width: 768px) {
    .blog-post-content {
        font-size: 15px;
        line-height: 1.8;
    }
}

.project-links {
    text-align: right;
    margin-top: 20px;
    font-size: 14px;
}

.project-links a {
    color: #0366d6;
    text-decoration: none;
}

.project-links a:hover {
    text-decoration: underline;
}

.contact-links {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 300;
}

.contact-link:hover {
    color: #0366d6;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.icon {
    width: 24px;
    height: 24px;
}

.contact-link:hover .icon {
    opacity: 1;
}

/* Running visualization styles */
.chart-container {
    margin: 40px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.chart-controls {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.chart-controls select {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 500;
    color: #0366d6;
    margin: 10px 0;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* Plotly chart containers */
div[id$="Chart"] {
    margin: 20px 0;
    border-radius: 4px;
    height: 400px !important;
    width: 100% !important;
}

.alert {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    margin: 40px 0;
    text-align: center;
}

.alert a {
    color: #533f03;
    text-decoration: underline;
}

.alert strong {
    color: #533f03;
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* Add Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

/* Running PRs styling */
.pr-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 40px 0;
    max-width: 600px;
    margin: 40px auto;
}

.pr-card {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.2s ease;
}

.pr-card:hover {
    transform: translateY(-2px);
    border-color: #ddd;
}

.pr-card .distance {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 5px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pr-card .race-time {
    font-size: 18px;
    font-weight: 300;
    color: #000;
    margin-bottom: 5px;
}

.pr-card .race {
    color: #000;
    text-decoration: none;
    font-weight: 400;
}

.pr-card .race:hover {
    text-decoration: underline;
}

.pr-card .meta {
    font-size: 14px;
    color: #666;
}

.strava-cta {
    text-align: center;
    margin: 40px 0;
    font-size: 16px;
}

.strava-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #000;
    text-decoration: none;
    font-weight: 400;
}

.strava-link:hover {
    text-decoration: underline;
}

.icon {
    width: 24px;
    height: 24px;
}

.company-logo {
    height: 32px;
    width: auto;
    margin-top: 0;
    vertical-align: middle;
    display: inline-block;
    opacity: 0.9;
}

.description ul {
    margin-top: 10px;
    padding-left: 20px;
}

.description li {
    margin-bottom: 5px;
    color: #444;
}

.description p {
    color: #444;
    margin-top: 5px;
}

.description strong:first-of-type {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.quote {
    max-width: 650px;
    margin: 60px auto 40px;
    text-align: center;
    padding: 0 20px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 40px;
}

.quote blockquote {
    font-size: 15px;
    line-height: 1.6;
    color: #000;
    font-weight: 300;
    margin: 0 0 15px 0;
    font-style: italic;
}

.quote cite {
    font-size: 14px;
    color: #666;
    font-style: normal;
}

.thesis-link {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.thesis-link a {
    color: #0366d6;
    text-decoration: none;
}

.thesis-link a:hover {
    text-decoration: underline;
}

.publication-list {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.publication {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
}

.publication a {
    color: #0366d6;
    text-decoration: none;
}

.publication a:hover {
    text-decoration: underline;
}

footer nav a {
    font-size: 15px;
    color: #000;
    text-decoration: none;
}

footer nav a:hover {
    text-decoration: underline;
}

.download-resume {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    color: #333;
    text-decoration: none;
    font-weight: 400;
    font-size: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    height: 20px;
    line-height: normal;
}

.download-resume:hover {
    background-color: #f5f5f5;
    color: #000;
}