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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background: #fff;
    color: #222;
    -webkit-font-smoothing: antialiased;
}

/* ── Hero ── */
.hero {
    height: 50vh;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 0;
}

.hero-caption {
    font-size: 13px;
    font-weight: 500;
    color: #999;
    padding: 8px 0 0 56px;
    letter-spacing: 0.02em;
}

/* ── Headshot ticker ── */
.headshot-carousel {
    width: 100%;
    height: 50vh;
    overflow: hidden;
}

.headshot-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    animation: scroll-strip 4s linear infinite;
}

.headshot-strip > div {
    position: relative;
    overflow: hidden;
}

.headshot-strip img {
    width: 100%;
    height: 50vh;
    object-fit: cover;
    display: block;
}

@keyframes scroll-strip {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* ── Content wrapper (slides over hero) ── */
.content-wrapper {
    position: relative;
    z-index: 1;
    background-color: #fff;
}

/* ── Site nav ── */
.site-nav {
    display: flex;
    justify-content: center;
    gap: 22px;
    padding: 18px 0 0;
}

.site-nav a {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #bbb;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
    color: #444;
}

.site-nav a.active {
    color: #111;
    border-bottom-color: #111;
}

/* ── Projects ── */
.projects-section {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px 40px 80px;
    position: relative;
}

.section-label {
    font-size: 16px;
    color: #888;
    margin-bottom: 44px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.card-row {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.card-row--has-metric {
    padding-bottom: 16px;
}

.project-card {
    display: flex;
    flex: 1;
    gap: 32px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    padding: 18px 16px;
    position: relative;
    overflow: hidden;
}

.card-burn-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: inherit;
    z-index: 1;
}

.card-season-label {
    position: absolute;
    top: 20px;
    right: 0px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    opacity: 0;
    transition: opacity 0.3s ease 0.25s;
    pointer-events: none;
    z-index: 5;
}

.project-card.burn-active .card-season-label {
    opacity: 1;
}

.project-thumb {
    position: relative;
    z-index: 5;
}

.project-text {
    position: relative;
    z-index: 3;
}

.project-card:last-child {
    border-bottom: none;
}


.project-card--linked {
    cursor: pointer;
}

.project-card--linked:hover .project-thumb {
    opacity: 0.88;
}

.project-thumb {
    width: 220px;
    height: 122px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    margin-left: -16px;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 350ms ease;
}

.project-thumb img.revealed {
    filter: grayscale(0%);
}

.project-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    letter-spacing: -1px;
}

.project-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: center;
}

.project-name {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.project-headline {
    font-size: 21px;
    font-weight: 700;
    color: #111;
    line-height: 1.55;
}

.project-subtitle {
    font-size: 16px;
    color: #666;
    font-weight: 400;
    line-height: 1.5;
    margin-top: 2px;
}

.project-metric {
    position: absolute;
    bottom: 10px;
    right: 0;
    display: flex;
    align-items: baseline;
    gap: 5px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease 0.25s;
    pointer-events: none;
}

.card-row:has(.project-card.burn-active) .project-metric {
    opacity: 1;
}

.project-metric-group {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.project-metric-value {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.project-metric-unit {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Books footer ── */
.books-footer {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 40px 72px;
    border-top: 1px solid #f0f0f0;
}
.books-footer-inner {
    padding-top: 36px;
}
.books-label {
    font-size: 21px;
    font-weight: 700;
    color: #111;
    letter-spacing: 0;
    margin-bottom: 4px;
}
.books-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.book-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-decoration: none;
    color: #888;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.55;
}
.book-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.book-date {
    opacity: 0;
    transition: opacity 0.15s ease;
    color: #bbb;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    letter-spacing: 0.03em;
}
.book-author {
    opacity: 0;
    transition: opacity 0.15s ease;
    color: #bbb;
    font-size: 18px;
    font-weight: 400;
    text-align: right;
    flex-shrink: 0;
    margin-left: 24px;
}
.book-row:hover .book-title {
    color: #6aabf7;
}
.book-row:hover .book-date,
.book-row:hover .book-author {
    opacity: 1;
}
@media (max-width: 600px) {
    .books-footer { padding: 0 20px 52px; }
}

.card-view-btn {
    display: none;
}

.card-view-bar {
    display: none;
}

.project-tags {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 8px;
    flex-wrap: wrap;
}

.project-tag {
    position: relative;
    display: inline-block;
}

.project-tag + .project-tag::before {
    content: ' · ';
    color: #bbb;
    font-size: 13px;
    padding: 0 2px;
}

.project-tag-label {
    font-size: 13px;
    font-weight: 400;
    color: #bbb;
    cursor: default;
    transition: color 0.15s;
    display: inline-block;
}

.project-tag:hover .project-tag-label {
    color: #444;
}

.project-tag-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 4px;
    z-index: 100;
}

.project-tag:hover .project-tag-dropdown {
    display: block;
}

.project-tag-dropdown-inner {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    min-width: 180px;
    padding: 4px 0;
}

.project-tag-dropdown a {
    display: block;
    padding: 7px 14px;
    font-size: 13px;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
}

.project-tag-dropdown a:hover {
    background: #f5f5f5;
}

/* ── Edit mode ── */
.edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
}
.edit-row a {
    flex: 1;
}
.edit-btn {
    flex-shrink: 0;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    color: #999;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1.4;
}
.edit-btn:hover { border-color: #aaa; color: #333; }

.edit-form {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-top: 1px solid #eee;
}
.edit-form input {
    font-size: 12px;
    padding: 4px 7px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.edit-form input:focus { border-color: #aaa; }
.edit-form-actions {
    display: flex;
    gap: 5px;
}
.edit-form-actions button {
    flex: 1;
    font-size: 11px;
    padding: 3px 0;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}
.edit-form-actions button.save { background: #111; color: #fff; border-color: #111; }
.edit-form-actions button.del  { color: #c00; border-color: #f5c0c0; }

.add-link-plus {
    font-size: 11px;
    font-weight: 500;
    color: #999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 8px;
    line-height: 1.6;
    margin-left: auto;
}
.add-link-plus:hover { border-color: #aaa; color: #333; }

.add-link-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    padding: 10px;
    width: 220px;
    z-index: 200;
}

.platform-hint {
    font-size: 10px;
    color: #aaa;
    padding: 0 14px 4px;
}

/* ── Local bar ── */
.local-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 36px;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    font-size: 12px;
    color: #999;
}

.local-bar-edit {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.local-bar-edit:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ── Card edit overlays ── */
.card-edit-wrap { position: relative; }
.card-delete-btn {
    position: absolute;
    top: -8px; right: -8px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 14px; line-height: 1;
    color: #999; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}
.card-delete-btn:hover { background: #fee; border-color: #f99; color: #c00; }
.card-edit-thumb-btn {
    display: block;
    width: 100%;
    margin-top: 4px;
    font-size: 11px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px 0;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    position: relative;
    z-index: 10;
}
.card-edit-thumb-btn:hover { border-color: #aaa; color: #111; }

/* ── Add project card ── */
.add-project-card {
    display: flex; gap: 18px; align-items: flex-start; cursor: pointer;
}
.add-project-thumb {
    width: 180px; height: 122px; border-radius: 10px; flex-shrink: 0;
    border: 2px dashed #ddd;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #ccc;
    transition: border-color 0.15s, color 0.15s;
}
.add-project-card:hover .add-project-thumb { border-color: #aaa; color: #888; }
.add-project-label { padding-top: 40px; font-size: 14px; color: #ccc; }
.add-project-card:hover .add-project-label { color: #888; }

/* ── Project modal ── */
.project-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.project-modal {
    background: #fff; border-radius: 10px; padding: 24px; width: 340px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    display: flex; flex-direction: column; gap: 10px;
}
.project-modal h3 { font-size: 15px; font-weight: 600; color: #111; margin: 0 0 4px; }
.project-modal input:not([type="file"]), .project-modal textarea {
    font-size: 13px; padding: 6px 9px;
    border: 1px solid #ddd; border-radius: 6px;
    outline: none; width: 100%; box-sizing: border-box; font-family: inherit;
}
.project-modal input:not([type="file"]):focus,
.project-modal textarea:focus { border-color: #aaa; }
.project-modal textarea { resize: none; height: 60px; }
.project-modal input[type="file"] { font-size: 12px; color: #666; }
.modal-char-count { font-size: 11px; color: #bbb; text-align: right; margin-top: -6px; }
.modal-char-count.over { color: #c00; }
.modal-image-preview {
    width: 100%; height: 80px; border-radius: 6px; object-fit: cover; display: none;
}
.modal-actions { display: flex; gap: 8px; margin-top: 4px; }
.modal-actions button {
    flex: 1; font-size: 13px; padding: 7px 0;
    border-radius: 6px; cursor: pointer;
    border: 1px solid #ddd; background: #fff; color: #333;
}
.modal-actions button.save { background: #111; color: #fff; border-color: #111; }

/* ── Blog ── */
.blog-section {
    margin-top: 72px;
}

.blog-heading {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.5px;
    margin-bottom: 28px;
}

.blog-list {
    list-style: none;
    padding: 0;
}

.blog-list li {
    padding: 10px 0;
}

.blog-list a {
    font-size: 21px;
    color: #222;
    text-decoration: none;
}

.blog-list a:hover {
    text-decoration: underline;
}

/* ── Year dividers ── */
.year-divider {
    grid-column: 1 / -1;
    padding: 16px 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.year-divider-line {
    flex: 1;
    height: 1px;
    background: #555;
}

.year-divider-label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.08em;
}

.year-divider-count {
    font-size: 11px;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    font-variant: small-caps;
}

.card-stroke-el {
    top: 16px !important;
    bottom: 16px !important;
}

/* ── Video playing badge ── */
.project-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.project-name-row .project-name {
    margin-bottom: 0;
}

.video-playing-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    color: #22c55e;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.project-card:hover .video-playing-badge {
    opacity: 1;
}

.video-blink-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: blink-dot 1s ease-in-out infinite;
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.1; }
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .hero {
        height: 50vh;
    }
    .headshot-carousel {
        height: 50vh;
    }
    .headshot-strip img {
        height: 50vh;
    }
    .hero-caption {
        padding-left: 24px;
    }
    .projects-section {
        padding: 40px 20px 60px;
    }
    .projects-grid {
        gap: 20px;
    }
    .project-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        box-shadow: 0 0 0 1px #e8e8e8, 0 2px 8px rgba(0,0,0,0.06);
    }
    .card-row--has-metric {
        flex-direction: column;
        align-items: stretch;
        border-radius: 12px;
        box-shadow: 0 0 0 1px #e8e8e8, 0 2px 8px rgba(0,0,0,0.06);
        overflow: hidden;
        padding-bottom: 0;
    }
    .card-row--has-metric .project-card {
        box-shadow: none;
        border-radius: 0;
    }
    .card-row--has-metric .project-metric {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px 12px;
        z-index: 6;
    }
    .card-row--has-metric .project-text {
        padding-bottom: 48px;
    }

    .card-row:has(.card-view-bar) {
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        box-shadow: 0 0 0 1px #e8e8e8, 0 2px 8px rgba(0,0,0,0.06);
    }
    .card-row:has(.card-view-bar) .project-card {
        box-shadow: none;
        border-radius: 12px;
    }
    .card-row:has(.card-view-bar) .project-text {
        padding-bottom: 48px;
    }

    .card-view-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 5px 16px;
        border-radius: 20px;
        border: 1.5px solid rgba(0,0,0,0.2);
        background: rgba(255,255,255,0.9);
        font-size: 13px;
        font-weight: 600;
        color: #333;
        cursor: pointer;
        opacity: 0;
        transition: opacity 0.3s ease 0.25s;
        pointer-events: none;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        flex-shrink: 0;
    }

    .card-row:has(.project-card.burn-active) .card-view-btn {
        opacity: 1;
        pointer-events: auto;
    }

    .card-view-bar {
        display: flex;
        justify-content: flex-end;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px 16px 12px;
        z-index: 6;
        opacity: 0;
        transition: opacity 0.3s ease 0.25s;
        pointer-events: none;
    }

    .card-row:has(.project-card.burn-active) .card-view-bar {
        opacity: 1;
        pointer-events: auto;
    }
    .project-thumb {
        width: 100%;
        height: 130px;
        border-radius: 12px 12px 0 0;
        margin-left: 0;
        box-shadow: none;
        order: -1;
    }
    .project-text {
        padding: 16px 16px 12px;
    }
    .card-stroke-el {
        top: 138px !important;
        bottom: 0 !important;
    }
    .card-row--has-metric .card-stroke-el,
    .card-row:has(.card-view-bar) .card-stroke-el {
        bottom: 46px !important;
    }
    .card-season-label {
        top: 142px;
        right: 12px;
    }
    .project-headline {
        font-size: 20px;
    }
}
