@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

:root {
    --bg: #FAF9F7;
    --text: #1C1917;
    --text-secondary: #78716C;
    --text-tertiary: #A8A29E;
    --accent: #DC2626;
    --border: #E7E5E4;
    --surface: #FFFFFF;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
    font-family: 'Source Serif 4', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--text); color: var(--bg); }
a { color: inherit; text-decoration: none; }

/* Navigation */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
    border-color: var(--border);
    background: rgba(250, 249, 247, 0.9);
    backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-name {
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.nav-links { display: flex; gap: 2rem; }

.nav-link {
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    transition: color 0.2s;
}

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

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero */
.hero {
    padding: 12rem 0 6rem;
    border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-eyebrow::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: var(--text-tertiary);
}

.hero-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.hero-title em { font-style: italic; }

.hero-intro {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 540px;
    line-height: 1.7;
}

.hero-intro a {
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s;
}

.hero-intro a:hover { border-color: var(--text); }

/* Section */
section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.section-link {
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    color: var(--text-tertiary);
    transition: color 0.2s;
}

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

/* Featured Project */
.featured-project { margin-bottom: 2rem; }

.featured-link {
    display: block;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.featured-link:hover {
    border-color: var(--text-tertiary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.featured-label {
    font-family: 'Geist Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 0.75rem;
}

.featured-title {
    font-family: 'Instrument Serif', serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.featured-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.25rem;
    max-width: 480px;
}

.featured-cta {
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.2s;
}

.featured-link:hover .featured-cta { gap: 0.5rem; }

/* Project List */
.project-list { display: flex; flex-direction: column; }

.project-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    transition: background 0.2s;
}

.project-item:hover {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.01), transparent);
}

.project-content { min-width: 0; }

.project-label {
    font-family: 'Geist Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.project-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-meta {
    font-family: 'Geist Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
    white-space: nowrap;
    padding-top: 0.25rem;
}

/* Writing */
.writing-list { display: flex; flex-direction: column; }

.writing-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    align-items: baseline;
}

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

.writing-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.35;
    transition: color 0.2s;
}

.writing-date {
    font-family: 'Geist Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* Work Section */
.work-section {
    background: linear-gradient(180deg, var(--bg) 0%, rgba(231, 229, 228, 0.2) 100%);
}

.work-list { display: flex; flex-direction: column; gap: 3rem; }

.work-company {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.35rem;
}

.work-company-name {
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
}

.work-company-period {
    font-family: 'Geist Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
}

.work-role {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.work-projects { display: flex; flex-direction: column; }

.work-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: start;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.work-item:hover {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.01), transparent);
}

.work-content { min-width: 0; }

.work-label {
    font-family: 'Geist Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.work-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.work-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.work-meta {
    font-family: 'Geist Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
    text-align: right;
    white-space: nowrap;
    padding-top: 0.2rem;
}

/* About */
.about-content { max-width: 540px; }

.about-text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text:last-of-type { margin-bottom: 2.5rem; }

.about-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.about-link {
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.about-link:hover {
    border-color: var(--text);
    color: var(--text);
    background: var(--surface);
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    border-bottom: none;
}

footer p {
    font-family: 'Geist Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

/* ========================================
   ARTICLES PAGE
   ======================================== */

.page-header {
    padding: 12rem 0 4rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.page-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.65;
}

.articles-page { padding: 4rem 0 6rem; }

.article-full {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.article-full:first-child { padding-top: 0; }

.article-date {
    font-family: 'Geist Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.article-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-content {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.article-content p { margin-bottom: 1rem; }
.article-content p:last-child { margin-bottom: 0; }
.article-content strong { color: var(--text); font-weight: 600; }
.article-content em { font-style: italic; }
.article-content ul { margin: 1rem 0; padding-left: 1.25rem; }
.article-content li { margin-bottom: 0.5rem; }

.article-content a {
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s;
}

.article-content a:hover { border-color: var(--text); }

.article-content h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.35rem;
    font-weight: 400;
    margin-top: 3rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.article-content h2:first-child { margin-top: 0; }

.article-content pre {
    font-family: 'Geist Mono', monospace;
    font-size: 0.72rem;
    line-height: 1.55;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    color: var(--text);
    white-space: pre;
}

.article-content blockquote {
    border-left: 2px solid var(--border);
    padding-left: 1.25rem;
    margin: 1rem 0;
}

.article-content blockquote p {
    color: var(--text-secondary);
    font-style: italic;
}

.article-content ol {
    margin: 1rem 0;
    padding-left: 1.25rem;
}

.article-content ol li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-style: italic;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
    border-radius: 6px;
    background: var(--border);
}

.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover { color: var(--text); }
.back-link::before { content: '←'; }

/* ========================================
   PROJECT DETAIL PAGES
   ======================================== */

.project-detail { padding: 10rem 0 6rem; }

.project-detail__title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.project-detail__subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.project-detail__image {
    margin-bottom: 2.5rem;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--border);
}

.project-detail__image img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.project-detail__content h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.35rem;
    font-weight: 400;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.project-detail__content h2:first-child { margin-top: 0; }

.project-detail__content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-detail__content ul {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.project-detail__content li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.project-detail__content li strong { color: var(--text); }

.project-status {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.project-status p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.project-status p strong { color: var(--text); }

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.75rem 1.5rem;
    background: var(--text);
    color: var(--bg);
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    border-radius: 4px;
    transition: all 0.2s;
}

.project-cta:hover { background: var(--text-secondary); }

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow, .hero-title, .hero-intro {
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-eyebrow { animation-delay: 0s; }
.hero-title { animation-delay: 0.1s; }
.hero-intro { animation-delay: 0.2s; }

/* Responsive */
@media (max-width: 640px) {
    html { font-size: 16px; }
    .nav-inner, .container { padding: 0 1.5rem; }
    .hero { padding: 10rem 0 4rem; }
    .page-header { padding: 10rem 0 3rem; }
    section { padding: 4rem 0; }
    .nav-links { gap: 1.25rem; }
    .featured-link { padding: 1.5rem; }
    .featured-title { font-size: 1.5rem; }

    .project-item, .writing-item, .work-item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .project-meta, .writing-date, .work-meta { order: -1; }

    .work-company {
        flex-direction: column;
        gap: 0.15rem;
    }

    .about-links { flex-direction: column; }
    .about-link { text-align: center; }
    .project-detail { padding: 8rem 0 4rem; }
}
