* {
    box-sizing: border-box;
}

:root {
    --bg: #10100f;
    --panel: #1b1a18;
    --panel-2: #24221f;
    --text: #f1eadf;
    --muted: #aaa094;
    --line: #3b3630;
    --accent: #f5b84b;
    --accent-soft: rgba(245, 184, 75, 0.13);
    --project-accent: var(--accent);
    --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: var(--font-body);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 184, 75, 0.12), transparent 32rem),
        linear-gradient(180deg, #141312 0%, var(--bg) 35%);
    color: var(--text);
    font-family: var(--font-body);
}

body.project-dialog-open {
    overflow: hidden;
}

button {
    font: inherit;
    touch-action: manipulation;
}

a, button, .card {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16rem;
    gap: 2rem;
    align-items: end;
    max-width: 76rem;
    margin: 0 auto;
    padding: 6rem 1.25rem 3rem;
}

.eyebrow {
    font-family: var(--font-display);
    color: var(--accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 700;
}

h1 {
    font-family: var(--font-display);
    max-width: 58rem;
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 0.92;
    letter-spacing: -0.07em;
}

.intro {
    max-width: 42rem;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.hero-panel {
    aspect-ratio: 1;
    display: grid;
    grid-template-rows: 1fr auto auto auto;
    align-content: stretch;
    justify-items: start;
    gap: 0.55rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--project-accent, var(--accent)), transparent 70%), transparent 10rem),
        linear-gradient(145deg, var(--panel), var(--panel-2));
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hero-panel:hover,
.hero-panel:focus-visible {
    transform: translateY(-2px);
    border-color: var(--project-accent, var(--accent));
}

.hero-panel[hidden] {
    display: none;
}

.hero-panel img {
    align-self: start;
    width: min(100%, 6.5rem);
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--panel-2);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.42);
}

.hero-panel img[hidden] {
    display: none;
}

.hero-panel span {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.65rem);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.hero-panel small {
    font-family: var(--font-display);
    color: var(--project-accent, var(--accent));
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 800;
}

.hero-panel em {
    color: var(--muted);
    font-size: 0.9rem;
    font-style: normal;
}

.controls {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 0.42rem;
    max-width: 76rem;
    margin: 0 auto;
    padding: 0.72rem 1.25rem 0.62rem;
    backdrop-filter: blur(18px);
    background: rgba(16, 16, 15, 0.78);
    border-block: 1px solid rgba(255, 255, 255, 0.05);
}

.control-row {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
}


.control-pill {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    min-height: 2.75rem;
    padding: 0.43rem 0.82rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.82rem;
}

.control-pill.active,
.control-pill:hover {
    background: var(--accent);
    color: #1a1306;
    border-color: var(--accent);
}

.timeline-type-badge {
    font-family: var(--font-display);
    position: absolute;
    right: 1rem;
    top: 1rem;
    margin: 0;
    color: var(--project-accent);
    border: 1px solid color-mix(in srgb, var(--project-accent), transparent 60%);
    background: color-mix(in srgb, var(--project-accent), transparent 88%);
    padding: 0.18rem 0.46rem;
    border-radius: 3px;
    font-size: 0.68rem;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
}

@media (max-width: 760px) {
    .timeline-type-badge {
        position: static;
        display: inline-flex;
        width: max-content;
        margin: 0 0 0.35rem;
    }

    .card.featured .featured-badge {
        position: absolute;
        top: 0.12rem;
        right: 0.12rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.25rem;
        height: 1.25rem;
        padding: 0;
        margin: 0;
        line-height: 1;
    }

    .featured-badge-label {
        display: none;
    }
}

.crumb-row {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.6;
}

.crumb-label {
    flex: 0 0 auto;
    color: color-mix(in srgb, var(--muted), transparent 24%);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.62rem;
    font-weight: 800;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.08rem 0;
    min-width: 0;
}

.crumb {
    position: relative;
    border: 0;
    color: var(--muted);
    background: transparent;
    min-height: 1.75rem;
    padding: 0.08rem 0.46rem;
    cursor: pointer;
    font-size: 0.74rem;
    line-height: 1.55;
}

.crumb + .crumb:before {
    content: "/";
    position: absolute;
    left: -0.03rem;
    color: rgba(255, 255, 255, 0.18);
}

.crumb:hover,
.crumb.active {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.22rem;
}

.year-nav {
    position: relative;
    top: auto;
    z-index: 1;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 76rem;
    margin: 0 auto;
    padding: 0.8rem 1.25rem 0;
    pointer-events: none;
}

.year-nav a {
    pointer-events: auto;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    min-height: 2rem;
    padding: 0.32rem 0.62rem;
    background: rgba(16, 16, 15, 0.7);
}

.year-nav a:hover {
    color: var(--text);
    border-color: var(--accent);
}

.timeline {
    position: relative;
    max-width: 76rem;
    margin: 0 auto;
    padding: 3rem 1.25rem 7rem;
}

.site-footer {
    display: flex;
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 76rem;
    margin: 0 auto;
    padding: 0 1.25rem 1.5rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.site-footer p,
.site-footer small {
    margin: 0;
}

.site-footer p {
    color: var(--accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
}

.timeline:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(1.25rem + 7.6rem);
    width: 1px;
    background: linear-gradient(var(--line), transparent);
}

.year-block {
    position: relative;
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
    scroll-margin-top: 10rem;
}

.year-block + .year-block {
    padding-top: 2.25rem;
}

.year-block + .year-block:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent), transparent 58%) 8rem, transparent);
}

.year {
    position: sticky;
    top: 1.25rem;
    align-self: start;
    color: var(--accent);
}

.year span {
    font-family: var(--font-display);
    display: block;
    font-size: 2rem;
    font-weight: 850;
    letter-spacing: -0.08em;
}

.year p {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.project-list {
    display: grid;
    gap: 1rem;
}

.card {
    position: relative;
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(27, 26, 24, 0.82);
    cursor: pointer;
    overflow: hidden;
    touch-action: manipulation;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.card > * {
    position: relative;
    z-index: 1;
}

.card.skill-card {
    padding: 0.65rem;
}

.card.career-card {
    padding: 0.85rem 1rem 0.85rem 1.15rem;
    border-left: 3px solid var(--project-accent);
    border-radius: 3px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--project-accent), transparent 88%), transparent 18rem),
        rgba(22, 21, 20, 0.76);
    cursor: default;
}

.card.career-card .timeline-type-badge {
    position: absolute;
    right: 0.12rem;
    top: 0.12rem;
    display: inline-flex;
    width: max-content;
    margin: 0;
    padding: 0.04rem 0.18rem;
    font-size: 0.62rem;
}

.card.featured .featured-badge {
    position: absolute;
    right: 0.12rem;
    top: 0.12rem;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    width: max-content;
    margin: 0;
    color: #fff;
    padding: 0.04rem 0.18rem;
    font-size: 0.62rem;
}

.card.career-card h2 {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    letter-spacing: -0.025em;
}

.card.career-card p {
    max-width: 62rem;
}

.card:before {
    content: "";
    position: absolute;
    left: -2.08rem;
    top: 2rem;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 3px;
    background: var(--project-accent);
    box-shadow: 0 0 0 0.5rem color-mix(in srgb, var(--project-accent), transparent 84%);
}

.card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--project-accent), white 8%);
    background: rgba(36, 34, 31, 0.95);
}

.card.career-card:hover {
    transform: none;
    border-color: var(--line);
    border-left-color: var(--project-accent);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--project-accent), transparent 88%), transparent 18rem),
        rgba(22, 21, 20, 0.76);
}

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

.card.career-card:hover p,
.card.career-card:hover .meta {
    color: var(--muted);
}

.card.featured:hover {
    border-color: color-mix(in srgb, var(--project-accent), white 18%);
    border-right-color: color-mix(in srgb, var(--project-accent), white 18%);
}

.card:not(.featured):hover .card-backdrop {
    opacity: 0.15;
    transform: rotate(12deg) scale(1.1536);
}

.card.featured:hover .card-backdrop {
    opacity: 0.4;
    transform: rotate(12deg) scale(1.1536);
}

.card.featured {
    border-color: color-mix(in srgb, var(--project-accent), var(--line) 20%);
    border-right: 3px solid var(--project-accent);
    padding: 1.25rem;
    background:
        linear-gradient(270deg, color-mix(in srgb, var(--project-accent), transparent 88%), transparent 18rem),
        rgba(27, 26, 24, 0.9);
}

.card-backdrop {
    position: absolute;
    z-index: 0;
    inset: -12%;
    width: 124%;
    height: 124%;
    object-fit: cover;
    opacity: 0.05;
    filter: blur(8px);
    transform: rotate(12deg) scale(1.12);
    transform-origin: center;
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
}

.card.featured .card-backdrop {
    opacity: 0.2;
}

.thumb {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--panel-2);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.42);
}

.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meta {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.type {
    color: var(--project-accent);
}

.card h2 {
    font-family: var(--font-display);
    margin: 0 0 0.35rem;
    font-size: clamp(1.25rem, 3vw, 2rem);
    letter-spacing: -0.04em;
}

.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.screenshot-count {
    font-size: 0.78rem;
    margin: 0 0 0.45rem;
    color: color-mix(in srgb, var(--project-accent), var(--muted) 55%);
}

.tool-row {
    display: flex;
    gap: 0.32rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.tag {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.16rem 0.36rem;
    border-radius: 3px;
    font-size: 0.68rem;
    line-height: 1.15;
}

.tool-row span {
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--project-accent), transparent 55%);
    background: color-mix(in srgb, var(--project-accent), transparent 88%);
    padding: 0.28rem 0.48rem;
    border-radius: 3px;
    font-size: 0.78rem;
}

.tool-row.large span {
    font-size: 0.9rem;
}

body.compact-view .card,
body.compact-view .card.featured {
    grid-template-columns: 11rem minmax(0, 1fr);
    padding: 0.75rem;
}

body.compact-view .card h2 {
    font-size: 1.2rem;
}

body.compact-view .card .tags,
body.compact-view .card .tool-row {
    display: none;
}

dialog {
    width: min(70rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--panel);
    color: var(--text);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

#video-dialog {
    width: min(78rem, calc(100vw - 2rem));
    background: rgba(10, 10, 10, 0.8);
}

#video-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
}

.close-button {
    position: absolute;
    top: 0.75rem;
    right: calc(0.75rem - 5px);
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(16, 16, 15, 0.8);
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
}

.dialog-nav-button {
    position: absolute;
    top: 0.75rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(16, 16, 15, 0.8);
    color: var(--text);
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}

.dialog-nav-button.prev {
    right: 4.1rem;
}

.dialog-nav-button.next {
    right: 7.45rem;
}

#project-dialog .dialog-nav-button {
    display: none;
}

#project-dialog .close-button {
    border-color: color-mix(in srgb, var(--project-accent), var(--line) 35%);
    background: color-mix(in srgb, var(--project-accent), var(--panel) 82%);
    color: var(--project-accent);
}

.project-dialog-toolbar,
.project-dialog-actions {
    display: contents;
}

.project-dialog-title {
    display: none;
}

.project-detail {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
}

.project-detail > * {
    position: relative;
    z-index: 1;
}

.project-detail-backdrop {
    position: absolute;
    z-index: 0;
    inset: -18%;
    width: 136%;
    height: 136%;
    object-fit: cover;
    opacity: 0.1;
    filter: blur(34px) saturate(0.7);
    transform: scale(1.08);
    pointer-events: none;
}

@media (min-width: 721px) {
    #project-dialog .close-button {
        transform: translateY(8px);
    }
}

.detail-grid {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 1.4rem;
    align-items: stretch;
}

.detail-icon-frame {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    background: var(--panel-2);
    box-shadow: 0 0.65rem 1.35rem rgba(0, 0, 0, 0.46);
}

.detail-icon {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
}

.detail-tech-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.detail-icon-frame.technical .detail-tech-overlay {
    opacity: 1;
}

.project-detail h2 {
    font-family: var(--font-display);
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.project-detail .one-liner {
    color: var(--project-accent);
    font-size: 1.2rem;
}

.project-detail blockquote {
    margin: 1rem 0;
    padding: 1rem;
    border-left: 0.25rem solid var(--project-accent);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.45;
}

.role {
    color: var(--muted);
}

.detail-mode-toggle {
    margin: 0.85rem 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: max-content;
    min-height: 2rem;
    padding: 0.18rem;
    border-radius: 3px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.detail-mode-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.2rem;
    padding: 0.32rem 0.7rem;
    border-radius: 3px;
    color: var(--muted);
}

.detail-mode-toggle:not(.active) .story,
.detail-mode-toggle.active .tech {
    background: var(--project-accent);
    color: #10100f;
}

.detail-mode-toggle:hover,
.detail-mode-toggle:focus-visible {
    border-color: var(--project-accent);
}

.detail-body .tech-section h3 {
    margin: 0.7rem 0 0.4rem;
    font-size: 1rem;
    color: var(--project-accent);
}

.detail-body .tech-section ul {
    margin: 0;
    padding-left: 1.1rem;
}

.detail-body .tech-section li + li {
    margin-top: 0.45rem;
}


.screens {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.screens figure {
    margin: 0;
}

.screens img {
    width: 100%;
    display: block;
}

.screenshot-frame {
    aspect-ratio: 1024 / 768;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

.screenshot-frame.has-video-frame {
    background:
        #000
        url("projects/load.gif")
        center / 6rem 6rem
        no-repeat;
}

.screenshot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.screens figcaption {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.video-open-button {
    display: inline-block;
    margin-top: 1.5rem;
    color: #1a1306;
    background: var(--project-accent);
    border: 0;
    text-decoration: none;
    min-height: 2.75rem;
    padding: 0.7rem 1rem;
    border-radius: 3px;
    font-weight: 800;
    cursor: pointer;
}


.video-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.video-button-row .video-open-button {
    margin-top: 0;
}

.video-figure {
    display: grid;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
}

.video-stage {
    position: relative;
    display: grid;
    background: #000;
    overflow: hidden;
}

.video-stage:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000 url("projects/load.gif") center / 6rem 6rem no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.video-stage.is-loading:before {
    opacity: 1;
}

.video-figure figcaption {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: center;
    padding-inline: 10px;
    padding-bottom: 10px;
}
.project-video-modal {
    display: block;
    width: 100%;
    max-height: calc(100vh - 4rem);
    background: #000;
}

.empty {
    color: var(--muted);
    padding-left: 9rem;
}

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 3rem;
    }

    .hero-panel {
        width: 12rem;
    }

    .year-nav {
        top: auto;
    }

    .timeline:before {
        left: 1.65rem;
    }

    .year-block {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .year {
        position: relative;
        top: auto;
        padding-left: 2rem;
    }

    .card,
    .card.featured,
    body.compact-view .card,
    body.compact-view .card.featured {
        grid-template-columns: 1fr;
        margin-left: 2rem;
    }

    .card:before {
        left: -2rem;
    }

    .detail-grid,
    .screens {
        grid-template-columns: 1fr;
    }

    .empty {
        padding-left: 2rem;
    }
}


/* Mobile behaviour pass */
@media (hover: none), (pointer: coarse) {
    .hero-panel,
    .control-pill,
    .crumb,
    .year-nav a,
    .card,
    .timeline-type-badge,
    .detail-mode-toggle,
    .screenshot-open-button,
    .video-open-button,
    .close-button,
    .dialog-nav-button {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .hero-panel::selection,
    .control-pill::selection,
    .crumb::selection,
    .year-nav a::selection,
    .card::selection,
    .card *::selection,
    .timeline-type-badge::selection,
    .detail-mode-toggle::selection,
    .video-open-button::selection {
        background: transparent;
    }

    .hero-panel:hover {
        transform: none;
        border-color: var(--line);
    }

    .control-pill:hover {
        border-color: var(--line);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
    }

    .crumb:hover {
        color: var(--muted);
        text-decoration: none;
    }

    .crumb.active {
        color: var(--accent);
        text-decoration: underline;
        text-underline-offset: 0.22rem;
    }

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

    .card:hover {
        transform: none;
        border-color: var(--line);
        background: rgba(27, 26, 24, 0.82);
    }

    .card:hover p {
        color: var(--muted);
    }

    .card:hover .meta {
        color: var(--muted);
    }

    .card:hover .screenshot-count {
        color: color-mix(in srgb, var(--project-accent), var(--muted) 55%);
    }

    .card.featured:hover {
        border-color: color-mix(in srgb, var(--project-accent), var(--line) 20%);
        border-right-color: var(--project-accent);
        background:
            linear-gradient(270deg, color-mix(in srgb, var(--project-accent), transparent 88%), transparent 18rem),
            rgba(27, 26, 24, 0.9);
    }

    .card:hover .card-backdrop {
        opacity: 0.05;
        transform: rotate(12deg) scale(1.12);
    }

    .card.featured:hover .card-backdrop {
        opacity: 0.2;
    }

    .card.career-card:hover {
        border-color: var(--line);
        border-left-color: var(--project-accent);
        background:
            linear-gradient(90deg, color-mix(in srgb, var(--project-accent), transparent 88%), transparent 18rem),
            rgba(22, 21, 20, 0.76);
    }

    .detail-mode-toggle:hover {
        border-color: var(--line);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *:before, *:after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 760px) {
    body {
        background:
            radial-gradient(circle at top left, rgba(245, 184, 75, 0.1), transparent 18rem),
            linear-gradient(180deg, #141312 0%, var(--bg) 28rem);
    }

    main {
        padding-bottom: calc(8.25rem + env(safe-area-inset-bottom));
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 2.25rem 1rem 1.4rem;
    }

    .eyebrow {
        font-size: 0.7rem;
    }

    h1 {
        font-size: clamp(2.15rem, 14vw, 3.6rem);
        line-height: 0.95;
        letter-spacing: -0.055em;
    }

    .intro {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero-panel {
        width: min(100%, 18rem);
        aspect-ratio: auto;
        grid-template-columns: minmax(0, 1fr) 4rem;
        grid-template-rows: auto auto auto;
        padding: 0.9rem 1rem;
    }

    .hero-panel img {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: center;
        justify-self: end;
        width: 4rem;
    }

    .hero-panel small,
    .hero-panel span,
    .hero-panel em {
        grid-column: 1;
    }

    .hero-panel span {
        font-size: 1.45rem;
    }

    .hero-panel em {
        font-size: 0.82rem;
    }

    .controls {
        position: relative;
        z-index: 12;
        max-width: none;
        gap: 0.48rem;
        padding: 0.65rem 0.85rem calc(0.7rem + env(safe-area-inset-bottom));
        border-block: 1px solid rgba(255, 255, 255, 0.08) 0;
        background: rgba(16, 16, 15, 0.92);
        box-shadow: 0 -1rem 2.5rem rgba(0, 0, 0, 0.34);
    }

    .control-row,
    .crumbs,
    .year-nav {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .control-row::-webkit-scrollbar,
    .crumbs::-webkit-scrollbar,
    .year-nav::-webkit-scrollbar {
        display: none;
    }

    .control-pill {
        flex: 0 0 auto;
        min-height: 2.75rem;
        padding-inline: 0.95rem;
        font-size: 0.88rem;
    }

    .crumb-row {
        align-items: center;
        gap: 0.35rem;
        min-width: 0;
    }

    .crumb-label {
        font-size: 0.58rem;
    }

    .crumbs {
        gap: 0.22rem;
        padding: 0.05rem 0.2rem 0.1rem 0;
    }

    .crumb {
        flex: 0 0 auto;
        min-height: 2.2rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.03);
        padding: 0.36rem 0.64rem;
        font-size: 0.75rem;
        text-decoration: none;
    }

    .crumb + .crumb:before {
        content: none;
    }

    .crumb.active {
        background: var(--accent-soft);
    }

    .year-nav {
        position: relative;
        top: auto;
        z-index: 1;
        gap: 0.42rem;
        max-width: none;
        margin: 0;
        padding: 0.7rem 1rem;
        background: rgba(16, 16, 15, 0.82);
        backdrop-filter: blur(14px);
        pointer-events: auto;
    }

    .year-nav a {
        flex: 0 0 auto;
        min-height: 2.3rem;
        display: inline-flex;
        align-items: center;
        padding-inline: 0.72rem;
    }

    .timeline {
        padding: 1.2rem 1rem 2.5rem;
    }

    .timeline:before {
        left: 1.28rem;
    }

    .year-block {
        grid-template-columns: 1fr;
        gap: 0.72rem;
        margin-bottom: 2.5rem;
        scroll-margin-top: 4.5rem;
    }

    .year {
        position: relative;
        top: auto;
        display: grid;
        gap: 0.2rem;
        padding-left: 1.65rem;
    }

    .year span {
        font-size: 1.55rem;
    }

    .year p {
        max-width: 31rem;
        font-size: 0.82rem;
    }

    .project-list {
        gap: 0.75rem;
    }

    .card,
    .card.featured,
    body.compact-view .card,
    body.compact-view .card.featured {
        grid-template-columns: 7.2rem minmax(0, 1fr);
        gap: 0.78rem;
        align-items: start;
        margin-left: 1.65rem;
        padding: 0.78rem;
        border-radius: 3px;
    }

    .card.featured,
    body.compact-view .card.featured {
        gap: 0.95rem;
        padding: 0.95rem;
    }

    .card:before {
        left: -1.68rem;
        top: 1.4rem;
        width: 0.64rem;
        height: 0.64rem;
        box-shadow: 0 0 0 0.34rem color-mix(in srgb, var(--project-accent), transparent 84%);
    }

    .meta {
        gap: 0.32rem;
        margin-bottom: 0.22rem;
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .card h2,
    body.compact-view .card h2 {
        margin-bottom: 0.2rem;
        font-size: 1.12rem;
        line-height: 1.05;
        letter-spacing: -0.035em;
    }

    .card p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        font-size: 0.9rem;
        line-height: 1.42;
    }

    .tool-row {
        gap: 0.25rem;
        margin-top: 0.55rem;
    }

    .tool-row span {
        padding: 0.22rem 0.42rem;
        font-size: 0.68rem;
    }

    body.compact-view .card p,
    body.compact-view .card .tool-row {
        display: none;
    }

    dialog {
        width: 100vw;
        max-width: none;
        height: 100dvh;
        max-height: none;
        margin: 0;
        border: 0;
        border-radius: 3px;
        overflow-y: auto;
    }

    body:has(dialog[open]) {
        overflow: hidden;
    }

    #project-dialog .project-dialog-toolbar {
        position: sticky;
        top: 0;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: calc(4.4rem + env(safe-area-inset-top));
        padding: calc(0.7rem + env(safe-area-inset-top)) calc(1.7rem - 5px) 0.7rem 1rem;
        border-bottom: 1px solid var(--line);
        background: var(--panel);
    }

    #project-dialog .project-dialog-actions {
        display: flex;
        gap: 0.6rem;
        align-items: center;
    }

    .project-dialog-title {
        display: block;
        color: var(--project-accent);
        min-width: 0;
        padding-right: 0.75rem;
        overflow-wrap: anywhere;
        font-size: clamp(1.1rem, 7vw, 2rem);
        font-weight: 850;
        line-height: 0.95;
        letter-spacing: 0;
    }

    .project-detail h2 {
        display: none;
    }

    #project-dialog .close-button {
        position: static;
        width: 2.9rem;
        height: 2.9rem;
        border-radius: 3px;
        border-color: color-mix(in srgb, var(--project-accent), var(--line) 35%);
        background: color-mix(in srgb, var(--project-accent), var(--panel) 82%);
        color: var(--project-accent);
    }

    #project-dialog .dialog-nav-button {
        position: static;
        width: 2.9rem;
        height: 2.9rem;
        border-radius: 3px;
        background: rgba(16, 16, 15, 0.92);
    }

    .close-button {
        position: fixed;
        top: max(0.7rem, env(safe-area-inset-top));
        right: 1.7rem;
        width: 2.9rem;
        height: 2.9rem;
        background: rgba(16, 16, 15, 0.92);
    }

    .dialog-nav-button {
        position: fixed;
        top: max(0.7rem, env(safe-area-inset-top));
        width: 2.9rem;
        height: 2.9rem;
        background: rgba(16, 16, 15, 0.92);
    }

    .project-detail {
        padding: 1rem 1rem 1.3rem;
    }

    .detail-grid,
    .screens {
        grid-template-columns: 1fr;
    }

    .detail-icon-frame {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: auto;
        max-height: 320px;
    }

    .detail-icon {
        flex: 0 0 auto;
        height: auto;
        max-height: none;
    }

    .project-detail h2 {
        font-size: clamp(2rem, 13vw, 3.4rem);
        line-height: 0.98;
    }

    .project-detail .one-liner {
        font-size: 1.05rem;
        line-height: 1.38;
    }

    .project-detail blockquote {
        padding: 0.82rem;
        font-size: 1rem;
    }

    .screens {
        gap: 0.85rem;
    }

    .video-open-button {
        width: 100%;
        min-height: 3rem;
    }

    #video-dialog {
        width: 100vw;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.92);
    }

    #video-dialog-content {
        display: grid;
        min-height: 100dvh;
        place-items: center;
        padding: 4rem 0.75rem 1rem;
    }

    .project-video-modal {
        max-height: calc(100dvh - 5.5rem);
    }

    .empty {
        padding-left: 1.65rem;
    }
}

@media (max-width: 410px) {
    .card,
    .card.featured,
    body.compact-view .card,
    body.compact-view .card.featured {
        grid-template-columns: 5.8rem minmax(0, 1fr);
        gap: 0.68rem;
        padding: 0.7rem;
    }

    .card.featured,
    body.compact-view .card.featured {
        gap: 0.78rem;
        padding: 0.78rem;
    }

    .card h2,
    body.compact-view .card h2 {
        font-size: 1.02rem;
    }

    .card p {
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 760px) {
    .video-button-row {
        display: grid;
        gap: 0.55rem;
    }

    .video-figure figcaption {
        padding-inline: 10px;
        padding-bottom: 10px;
        font-size: 0.9rem;
    }
}

.card.no-thumb,
.card.featured.no-thumb,
body.compact-view .card.no-thumb,
body.compact-view .card.featured.no-thumb {
    grid-template-columns: 1fr;
}

.detail-grid.no-icon {
    grid-template-columns: 1fr;
}

.video-caption[hidden] {
    display: none;
}

@media (max-width: 760px) {
    .card.no-thumb,
    .card.featured.no-thumb,
    body.compact-view .card.no-thumb,
    body.compact-view .card.featured.no-thumb {
        grid-template-columns: 1fr;
    }

    .card.career-card p {
        display: block;
        overflow: visible;
        -webkit-line-clamp: unset;
        -webkit-box-orient: initial;
    }
}


.card.timeline-only {
    cursor: default;
}

.card.timeline-only:hover {
    transform: none;
}


.youtube-video-modal {
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}

.screenshot-open-button {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
}

.screenshot-open-button img {
    display: block;
}

.clickable-screen img {
    transition: transform 160ms ease, border-color 160ms ease;
}

.clickable-screen:hover img {
    transform: translateY(-2px);
    border-color: var(--project-accent);
}

.screenshot-video-badge {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    padding: 0.24rem 0.5rem;
    border-radius: 3px;
    border: 1px solid rgba(245, 184, 75, 0.35);
    background: rgba(16, 16, 15, 0.85);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    pointer-events: none;
}

#image-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: rgba(8, 8, 8, 0.94);
}

#image-dialog::backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(14px);
}

#image-dialog-content {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: calc(4.25rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.image-figure {
    display: grid;
    gap: 0.75rem;
    width: 100%;
    height: 100%;
    margin: 0;
    place-items: center;
}

.project-image-modal {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 7rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    object-fit: contain;
    background: var(--panel-2);
}

.image-figure figcaption {
    max-width: 60rem;
    margin: 0 auto;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: center;
}

@media (hover: none) {
    .clickable-screen:hover img {
        transform: none;
    }
}

@media (max-width: 760px) {
    #image-dialog-content {
        padding: calc(4rem + env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
    }

    .project-image-modal {
        max-height: calc(100dvh - 6.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }
}
