/* --- System Reset & Core Architecture --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --bg-color: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-link-active: #000000;
    --border-color: #e8e8ed;
    --max-width: 680px;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-color: #151516;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-link-active: #ffffff;
    --border-color: #2c2c2e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.011em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* --- Navigation System --- */
.nav-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color var(--transition-speed) ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

.theme-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.theme-btn:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* --- Live Status Dot Components --- */
.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 1px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #34c759;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #34c759;
    animation: pulse-status 2s infinite ease-in-out;
}

.status-text {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

@keyframes pulse-status {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* --- Layout & Sections --- */
.content-container {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px;
}

.section-block {
    width: 100%;
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 64px 0;
    transition: background var(--transition-speed) ease;
}

/* --- Manifesto / Letter Styling --- */
.manifesto-header h1 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.2;
    margin-bottom: 48px;
    color: var(--text-primary);
}

.letter-body p {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.011em;
}

.letter-body p.signature {
    margin-top: 40px;
    font-weight: 600;
    color: var(--text-primary);
}

/* --- Structural Section Title --- */
.section-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 32px;
    color: var(--text-primary);
}

/* --- Projects Section Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-category {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.project-card h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.011em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-card p {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Shared Timeline Layout (Education & Blog Lists) --- */
.timeline-list {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    transition: border-color var(--transition-speed) ease;
}

.timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 32px;
}

.timeline-meta {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    padding-top: 2px;
}

.timeline-content {
    flex: 1;
}

.timeline-content h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.011em;
    margin-bottom: 4px;
}

.timeline-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.timeline-content h3 a:hover {
    color: var(--text-secondary);
}

.timeline-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.timeline-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Milestone Image System --- */
.timeline-image-wrapper {
    width: 100px;
    height: 100px;
    min-width: 100px;
    overflow: hidden;
    display: block;
}

.timeline-inline-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--border-color);
    transition: border-color var(--transition-speed) ease;
}

/* --- Fully Written Individual Blog Post Pages --- */
.blog-post {
    width: 100%;
}

.post-header {
    margin-bottom: 48px;
}

.post-meta {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 14px;
}

.post-header h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.2;
    color: var(--text-primary);
}

.post-body p {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 32px;
    letter-spacing: -0.011em;
    line-height: 1.65;
}

/* --- Structural Footer & Studio Colophon --- */
.footer-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 80px 24px;
    transition: border-color var(--transition-speed) ease;
}

body:has(.colophon-block) .footer-container {
    border-top: 1px solid var(--border-color);
}

.colophon-block {
    padding-top: 0;
    margin-bottom: 48px;
    max-width: 540px;
}

.colophon-block p {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-contact a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
}

.footer-contact a:hover {
    color: var(--text-secondary);
}

/* --- Responsive Adjustments --- */
@media (max-width: 560px) {
    .nav-container {
        flex-direction: row;
        align-items: center;
        padding: 32px 24px 0 24px;
    }
    
    .nav-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav-links {
        gap: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 20px 0;
    }
    
    .timeline-content-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    
    .timeline-image-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .timeline-meta {
        font-size: 12px;
    }

    .post-header h1 {
        font-size: 28px;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .manifesto-header h1 {
        font-size: 32px;
        margin-bottom: 32px;
    }
    
    .content-container {
        padding: 48px 24px;
    }
}