/* Post-Human Engineering — editorial modernism.
   Paper/ink surfaces, terracotta accent, ochre secondary.
   Fraunces display + Inter body + JetBrains Mono data. */

:root {
    --bg: #f4eee1;
    --surface: #faf6ea;
    --ink: #20242e;
    --ink-soft: #494e5c;
    --muted: #78715f;
    --accent: #b0512b;
    --accent-hover: #8f3f1e;
    --ochre: #a5762a;
    --hairline: #ddd3bd;
    --rule: #20242e;

    --font-serif: 'Fraunces', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
    --bg: #14161d;
    --surface: #1a1d26;
    --ink: #eae5d6;
    --ink-soft: #c2bcab;
    --muted: #8f8a79;
    --accent: #d97950;
    --accent-hover: #e89570;
    --ochre: #cf9c45;
    --hairline: #2d3140;
    --rule: #eae5d6;
}

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

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    transition: background 0.25s ease, color 0.25s ease;
}

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

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 28px 1.5rem 4rem;
    position: relative;
}

/* Top bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 4rem;
}

.kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* Header */
.profile-header {
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-pic {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--hairline);
    margin-bottom: 1.5rem;
}

.name {
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}

/* Sections */
.section-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 1.25rem;
}

.brand-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.featured-section {
    margin-bottom: 3.5rem;
}

.card-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Cards */
.card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 4px;
    padding: 1.4rem;
    color: inherit;
    transition: border-color 0.2s ease;
}

.card:hover { border-color: var(--accent); color: inherit; }

/* Blog card */
.blog-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--hairline);
}

.blog-logo {
    width: 22px;
    height: 22px;
    border-radius: 3px;
}

.blog-name {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}

.post-layout {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.post-thumbnail-wrapper {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: var(--hairline);
}

.post-text {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card:hover .post-title { color: var(--accent); }

.post-desc {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.loader {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
}

.post-error {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
}

/* Project (briefing) card */
.project-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.project-layout {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.project-logo-wrapper {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Pop culture card: a fan of real covers instead of a logo, since the site
   has no mark of its own and the artwork says what it is faster than words.
   Sized to match .project-logo-wrapper so all three cards line up. */
.poster-fan {
    flex-shrink: 0;
    display: flex;
    height: 64px;
    padding-right: 6px;
}

.poster-fan img {
    width: 43px;
    height: 64px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--hairline);
    background: var(--surface);
    transition: transform 0.28s cubic-bezier(.22, 1, .36, 1);
}

/* Overlap leaves ~23px of each cover showing. Tighter than this and they
   read as slivers rather than as covers. */
.poster-fan img:not(:first-child) { margin-left: -20px; }

/* On narrow screens the fan competes with the description, so drop the last
   cover and tighten the rest. */
@media (max-width: 480px) {
    .poster-fan img:last-child { display: none; }
    .poster-fan img:not(:first-child) { margin-left: -24px; }
}

/* Splay on hover. Each card shifts a little further than the one before it,
   so the stack opens rather than sliding as a block. */
.project-card:hover .poster-fan img:nth-child(2) { transform: translateX(5px); }
.project-card:hover .poster-fan img:nth-child(3) { transform: translateX(10px); }
.project-card:hover .poster-fan img:nth-child(4) { transform: translateX(15px); }

@media (prefers-reduced-motion: reduce) {
    .poster-fan img { transition: none; }
    .project-card:hover .poster-fan img { transform: none; }
}

.project-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
    color: var(--ink);
}

.card:hover .project-title { color: var(--accent); }

.project-desc {
    font-size: 0.85rem;
    color: var(--muted);
}

.project-arrow {
    color: var(--muted);
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.project-card:hover .project-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

/* Timeline (Experience & Education) */
.experience, .education {
    margin-bottom: 3.5rem;
}

.experience .section-title, .education .section-title {
    display: block;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 1.25rem;
}

.timeline {
    position: relative;
    padding-left: 1.25rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--hairline);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

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

.timeline-marker {
    position: absolute;
    left: -1.25rem;
    top: 7px;
    width: 7px;
    height: 7px;
    background: var(--accent);
}

.job-header {
    margin-bottom: 1rem;
}

.job-header h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.2rem;
}

.duration {
    font-family: var(--font-mono);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

.roles {
    list-style: none;
}

.roles li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
}

.roles li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 1px;
    background: var(--muted);
}

.roles li:last-child {
    margin-bottom: 0;
}

.roles h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 0.15rem;
}

.date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.degree h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.2rem;
}

.degree p {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hairline);
    display: flex;
    justify-content: center;
}

.link-item {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

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

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 20px 1.25rem 2.5rem;
    }

    .name {
        font-size: 2.1rem;
    }

    .post-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .post-thumbnail-wrapper {
        width: 100%;
        height: 140px;
    }
}
