/* 2026 visual refresh. Kept separate so the original presentation remains intact. */
:root {
    --bg: #131512;
    --panel: #1d201c;
    --panel-2: #2a2d28;
    --text: #d9d6ce;
    --muted: #94968e;
    --line: #3e423c;
    --accent: #d9d6ce;
    --accent-soft: rgba(217, 214, 206, 0.08);
    --accent-silver: #94968e;
    --signal-accent: #d2cfc6;
    --accent-metal: none;
    --accent-metal-text: none;
    --font-body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    --font-display: var(--font-body);
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(240, 237, 229, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240, 237, 229, 0.035) 1px, transparent 1px),
        var(--bg);
    background-size: 4rem 4rem;
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
}

#dna-helix,
#particles-js,
#postfx-canvas,
.postfx-hud,
.card-backdrop,
.hero-panel-backdrop,
.project-detail-backdrop {
    display: none !important;
}

button:focus-visible,
a:focus-visible,
.card:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 4px;
}

.eyebrow,
.crumb:hover,
.crumb.active,
.site-footer p,
.year span {
    color: var(--text);
    background: none;
    -webkit-text-fill-color: currentColor;
}

.hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.55fr);
    grid-template-rows: auto auto auto;
    gap: 2.5rem 4rem;
    align-items: end;
    width: min(100% - 4rem, 88rem);
    max-width: none;
    min-height: min(51rem, 88vh);
    padding: 6rem 0 3.5rem;
}

.hero-copy {
    align-self: start;
}

.hero-copy .eyebrow {
    max-width: 34rem;
    margin-bottom: 2.25rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.hero-copy .eyebrow::before {
    content: "01 / ";
    color: var(--muted);
}

.hero-copy h1 {
    max-width: 52rem;
    margin-bottom: 2rem;
    font-size: clamp(4.8rem, 10vw, 9.4rem);
    font-weight: 600;
    line-height: 0.78;
    letter-spacing: -0.085em;
}

.hero-copy h1 b {
    font-weight: 600;
}

.hero-copy h1 i {
    display: block;
    margin-left: 0.42em;
    font-weight: 400;
}

.hero-copy .intro {
    max-width: 37rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.35;
}

.hero-copy > p:last-child {
    max-width: 41rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.hero-copy > p:last-child br:first-of-type,
.hero-copy > p:last-child br:nth-of-type(2) {
    display: none;
}

.hero-panel {
    --project-accent: var(--signal-accent) !important;
    grid-row: 1 / span 2;
    align-self: start;
    width: 100%;
    height: auto;
    min-height: 26rem;
    padding: 1.25rem;
    border: 1px solid var(--project-accent);
    border-radius: 6px;
    background: #20211e;
    color: var(--text);
    box-shadow: 0.6rem 0.6rem 0 rgba(0, 0, 0, 0.42);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-panel::after,
.card::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -0.75rem;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    filter: none;
    opacity: 0;
    mask: none;
    -webkit-mask: none;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.card:not(.career-card):hover::after {
    opacity: 1;
}

.hero-panel:hover,
.hero-panel:focus-visible {
    border-color: var(--project-accent);
    transform: translate(-0.2rem, -0.2rem);
    box-shadow: 0.4rem 0.4rem 0 var(--project-accent);
}

.hero-panel img:not(.hero-panel-backdrop) {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 3px;
    background: #383936;
    box-shadow: none;
}

.hero-panel small {
    order: -1;
    color: #aaa99f;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.hero-panel small::before {
    content: "↗ ";
}

.hero-panel span {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-panel em {
    color: #aaa99f;
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.hero-contact {
    align-self: end;
}

.hero-contact .intro {
    margin-bottom: 0.75rem;
    color: var(--text);
    font-size: 0.95rem;
}

.contact-action {
    gap: 0.45rem;
}

.contact-button,
.contact-button.social-button {
    min-height: 2.55rem;
    margin: 0;
    padding: 0.62rem 0.8rem;
    border: 1px solid var(--text);
    border-radius: 3px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    box-shadow: none;
}

.contact-button.social-button {
    width: 2.55rem;
    border-color: var(--line);
}

.contact-button img,
.contact-button.social-button img {
    filter: brightness(0) invert(1);
}

.contact-button:hover,
.contact-button:focus-visible,
.contact-button.social-button:hover,
.contact-button.social-button:focus-visible {
    transform: translateY(-2px);
    border-color: var(--text);
    background: var(--text);
    color: var(--panel);
}

.contact-button:hover img,
.contact-button:focus-visible img,
.contact-button.social-button:hover img,
.contact-button.social-button:focus-visible img {
    filter: brightness(0);
}

.contact-divider {
    height: 2.55rem;
    margin: 0 0.25rem;
    background: var(--line);
}

.social-hover-label {
    min-width: 12rem;
    min-height: 2.55rem;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

.copy-toast {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

.craft-hours {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.craft-hours-total {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.03em;
}

.craft-hours-rail {
    height: 3rem;
}

.craft-hours-line {
    top: 1.45rem;
    height: 4px;
    border-radius: 0;
    background: var(--line);
}

.craft-hours-labels {
    font-family: var(--font-mono);
    font-size: 0.58rem;
}

.craft-hours-labels b,
.craft-hours-total b {
    font-weight: 500;
}

.timeline-divider {
    width: min(100% - 4rem, 88rem);
    max-width: none;
    background: var(--text);
}

.year-nav {
    max-width: 88rem;
    padding-inline: 2rem;
}

.year-nav a {
    min-height: 1.85rem;
    padding: 0.28rem 0.55rem;
    border-radius: 3px;
    background: var(--panel);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.year-nav a:hover {
    border-color: var(--text);
    color: var(--text);
}

.timeline {
    max-width: 88rem;
    padding: 4.5rem 2rem 9rem;
}

.timeline::before {
    left: calc(2rem + 9.5rem);
    background: var(--line);
}

.outbound-connector-overlay {
    opacity: 0.28;
    filter: grayscale(1);
}

.year-block {
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 3rem;
    margin-bottom: 7rem;
}

.year-block + .year-block {
    padding-top: 3rem;
}

.year-block + .year-block::before {
    background: linear-gradient(90deg, transparent 0 11rem, var(--line) 11rem 100%);
}

.year {
    top: 2rem;
}

.year span {
    font-size: clamp(2.6rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 0.85;
    letter-spacing: -0.075em;
}

.year p {
    max-width: 7rem;
    font-family: var(--font-mono);
    font-size: 0.63rem;
    line-height: 1.45;
}

.project-list {
    gap: calc(0.85rem + 5px);
}

.card,
body.compact-view .card,
body.compact-view .card.featured {
    --project-accent: var(--signal-accent) !important;
    grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr);
    gap: 1.35rem;
    min-height: 12rem;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--project-accent);
    border-radius: 6px;
    background: rgba(24, 25, 23, 0.94);
    box-shadow: none;
    overflow: visible;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card::before {
    display: none;
}

.card::after {
    display: none;
}

.card:hover,
.card.featured:hover {
    border-color: var(--text);
    background: var(--panel);
    box-shadow: 0.225rem 0.225rem 0 var(--project-accent);
}

.card.featured {
    padding: 1.1rem;
    border: 1px solid var(--text);
    border-left: 8px solid var(--project-accent);
    background: var(--panel);
    box-shadow: none;
}

.card.career-card {
    min-height: 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--project-accent);
    border-radius: 6px;
    background: transparent;
}

.card.career-card:hover,
.card.timeline-only:hover {
    transform: none;
    border-color: var(--line);
    border-left-color: var(--project-accent);
    background: transparent;
    box-shadow: none;
}

.thumb {
    min-height: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 3px;
    background: var(--panel-2);
    box-shadow: 0.5rem 0.6rem 0 rgba(0, 0, 0, 0.32);
    transform: translateX(-0.65rem);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.card:not(.career-card) .thumb {
    width: calc(100% + 0.85rem);
    transform: translate(-1.35rem, -0.45rem) rotate(-0.7deg);
    box-shadow:
        0.75rem 0.85rem 0 rgba(0, 0, 0, 0.42),
        0 0 0 1px color-mix(in srgb, var(--project-accent), transparent 35%);
}

.card:not(.career-card):hover .thumb {
    transform: translate(calc(-1.35rem - 35px), calc(-0.65rem + 10px)) rotate(-1.15deg) scale(1.35);
}

@media (hover: hover) and (pointer: fine) {
    .timeline::after {
        content: "";
        position: fixed;
        z-index: 10;
        inset: 0;
        display: block;
        background: rgba(0, 0, 0, 0.8);
        opacity: 0;
        pointer-events: none;
        transition: opacity 450ms ease;
    }

    .timeline:has(.card:not(.career-card):hover)::after {
        opacity: 1;
        transition-duration: 800ms;
    }

    .card:not(.career-card):hover {
        z-index: 20;
        transform: scale(1.03);
    }

    body:has(.card:not(.career-card):hover) .site-footer {
        filter: brightness(0.2);
    }
}

.meta {
    margin: 0 0 0.65rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.type {
    color: color-mix(in srgb, var(--project-accent), white 28%);
}

.card h2,
body.compact-view .card h2 {
    max-width: 46rem;
    margin-bottom: 0.5rem;
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.card p {
    max-width: 50rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.screenshot-count {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.62rem;
}

.timeline-type-badge,
.card.career-card .timeline-type-badge,
.card.featured .featured-badge {
    right: 0.65rem;
    top: 0.65rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid color-mix(in srgb, var(--project-accent), var(--line) 45%);
    border-radius: 2px;
    background: var(--panel);
    color: color-mix(in srgb, var(--project-accent), white 24%);
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.06em;
}

.card.featured .featured-badge {
    border-color: var(--project-accent);
    color: var(--text);
}

.tool-row {
    gap: 0.3rem;
    margin-top: 0.8rem;
}

.tag,
.tool-row span,
.tool-row.large span {
    padding: 0.2rem 0.38rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.59rem;
    line-height: 1.2;
}

.card:hover p,
.card:hover .meta,
.card:hover .screenshot-count,
.card:hover .tool-row span {
    color: var(--muted);
}

.site-footer {
    max-width: 88rem;
    padding: 0 2rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.64rem;
}

.site-footer p {
    color: var(--text);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

dialog {
    border: 1px solid var(--text);
    border-radius: 6px;
    background: var(--panel);
    box-shadow: 1rem 1rem 0 rgba(0, 0, 0, 0.22);
}

dialog::backdrop {
    background: rgba(24, 25, 22, 0.7);
    backdrop-filter: blur(2px);
}

.close-button,
.dialog-nav-button,
#project-dialog .close-button {
    border: 1px solid var(--text);
    border-radius: 3px;
    background: var(--panel);
    color: var(--text);
    font-family: var(--font-mono);
}

.project-detail {
    padding: 1.5rem;
}

.detail-grid {
    grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr);
    gap: 2rem;
}

.detail-icon-frame {
    border-radius: 3px;
    background: var(--panel-2);
    box-shadow: none;
}

.project-detail h2 {
    font-size: clamp(2.75rem, 7vw, 6.5rem);
    font-weight: 600;
    line-height: 0.86;
    letter-spacing: -0.075em;
}

.project-detail .one-liner {
    color: var(--text);
    font-size: 1.1rem;
}

.project-detail blockquote {
    border-left-width: 3px;
    background: #20211e;
    color: var(--text);
}

.detail-mode-toggle {
    border-radius: 3px;
    background: transparent;
    font-family: var(--font-mono);
}

.detail-mode-option {
    border-radius: 2px;
}

.detail-mode-toggle:not(.active) .story,
.detail-mode-toggle.active .tech {
    background: var(--text);
    color: var(--panel);
}

.detail-body .tech-section h3 {
    color: var(--text);
}

.screens {
    gap: 1.25rem;
    margin-top: 2rem;
}

.screenshot-frame {
    border-radius: 3px;
}

.screens figcaption {
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.rich-project-link {
    color: var(--text);
}

.video-open-button {
    border: 1px solid var(--text);
    border-radius: 3px;
    background: var(--text);
    color: var(--panel);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

#image-dialog,
#video-dialog {
    background: rgba(24, 25, 22, 0.96);
    box-shadow: none;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) 16rem;
        gap: 2.5rem 2rem;
    }

    .hero-copy h1 {
        font-size: clamp(4.5rem, 11vw, 7rem);
    }

    .year-block {
        grid-template-columns: 6rem minmax(0, 1fr);
        gap: 2rem;
    }

    .timeline::before {
        left: calc(2rem + 7rem);
    }

    .card::before {
        left: -2.5rem;
    }
}

@media (max-width: 760px) {
    body {
        background-size: 2rem 2rem;
    }

    .hero {
        display: grid;
        grid-template-columns: 1fr;
        width: min(100% - 2rem, 42rem);
        min-height: 0;
        padding: 3.5rem 0 2.25rem;
    }

    .hero-copy,
    .hero-contact,
    .craft-hours,
    .hero-panel {
        grid-column: 1;
    }

    .hero-panel {
        grid-row: auto;
        grid-template-columns: minmax(0, 1fr) 8rem;
        grid-template-rows: auto auto auto;
        width: min(100%, 32rem);
        min-height: 0;
        padding: 1rem;
    }

    .hero-panel img:not(.hero-panel-backdrop) {
        grid-column: 2;
        grid-row: 1 / span 3;
        width: 8rem;
        aspect-ratio: 1;
        border: 0;
        box-shadow: none;
    }

    .hero-panel small,
    .hero-panel span,
    .hero-panel em {
        grid-column: 1;
    }

    .hero-panel span {
        white-space: normal;
    }

    .hero-copy h1 {
        font-size: clamp(4.2rem, 22vw, 7rem);
    }

    .hero-copy h1 i {
        margin-left: 0;
    }

    .social-hover-label {
        display: none;
    }

    .craft-hours {
        overflow: hidden;
    }

    .craft-hours-labels {
        font-size: 0.52rem;
    }

    .timeline-divider {
        width: calc(100% - 2rem);
    }

    .timeline {
        padding: 3rem 1rem 6rem;
    }

    .timeline::before,
    .outbound-connector-overlay {
        display: none;
    }

    .year-block {
        display: block;
        margin-bottom: 5rem;
    }

    .year {
        position: static;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--line);
    }

    .year span {
        font-size: 3.75rem;
    }

    .year p {
        max-width: 18rem;
    }

    .year-block + .year-block::before {
        display: none;
    }

    .card,
    .card.featured,
    body.compact-view .card,
    body.compact-view .card.featured {
        grid-template-columns: 7.25rem minmax(0, 1fr);
        gap: 0.9rem;
        min-height: 0;
        padding: 0.8rem;
    }

    .card::before {
        display: none;
    }

    .thumb,
    .card:not(.career-card) .thumb {
        width: calc(100% + 0.4rem);
        transform: translate(-0.4rem, -0.15rem);
        box-shadow: 0.35rem 0.4rem 0 rgba(0, 0, 0, 0.32);
    }

    .card:hover .thumb,
    .card:not(.career-card):hover .thumb {
        transform: translate(calc(-0.4rem - 10px), -0.15rem);
    }

    .card h2,
    body.compact-view .card h2 {
        font-size: clamp(1.25rem, 7vw, 1.8rem);
    }

    .card p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        font-size: 0.82rem;
    }

    .timeline-type-badge {
        position: static;
        margin-bottom: 0.35rem;
    }

    .tool-row {
        display: none;
    }

    dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .project-detail {
        padding: 1rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-icon-frame {
        max-width: 13rem;
        aspect-ratio: 1;
    }

    .screens {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-panel,
    .card,
    .contact-button {
        transition: none;
    }
}
