/* ============================================================ */
/* Homepage: "the scroll is the playhead"                        */
/* Layout works without JS; home.js layers the motion on top.    */
/* ============================================================ */

:root {
    --scrubber-h: 0px;
}

@media (min-width: 768px) {
    :root {
        --scrubber-h: 44px;
    }
}

body.home {
    padding-bottom: var(--scrubber-h);
}

/* Hidden until the intro timeline reveals it. The delayed animation
   is a failsafe so content never stays hidden if a script fails. */
.js [data-intro] {
    visibility: hidden;
    animation: intro-failsafe 0s linear 4s forwards;
}

@keyframes intro-failsafe {
    to {
        visibility: visible;
    }
}

/* ------------------------------------------------------------ */
/* Nav                                                           */
/* ------------------------------------------------------------ */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 var(--gutter);
    border-bottom: 1px solid transparent;
    transition: transform 0.6s var(--ease-out), background-color 0.4s ease, border-color 0.4s ease;
}

.site-nav.is-solid {
    background: rgba(11, 11, 12, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom-color: var(--line);
}

.site-nav.is-hidden:not(:focus-within) {
    transform: translateY(-100%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-mark {
    width: 11px;
    height: 11px;
    border-radius: 1px;
    background: var(--accent);
    transform: rotate(45deg);
    transition: transform 0.9s var(--ease-out);
}

.brand:hover .brand-mark {
    transform: rotate(225deg);
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 32px;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 400 0.78rem var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    transform: rotate(45deg) scale(0);
    transition: transform 0.4s var(--ease-out);
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
    color: var(--text);
}

.nav-links a[aria-current="true"]::before {
    transform: rotate(45deg) scale(1);
}

@media (max-width: 767px) {
    .nav-links {
        display: none;
    }
}

/* ------------------------------------------------------------ */
/* Hero                                                          */
/* ------------------------------------------------------------ */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
}

.hero-inner {
    min-height: inherit;
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + clamp(24px, 5vh, 56px)) var(--gutter) calc(clamp(20px, 4vh, 36px) + var(--scrubber-h));
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 5vh, 56px);
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.rec-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5a4e;
    animation: rec-pulse 1.6s ease-in-out infinite;
}

@keyframes rec-pulse {
    50% {
        opacity: 0.25;
    }
}

.hero-main {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 40px;
}

.hero-title {
    font-size: clamp(3.3rem, 13vw, 11.5rem);
    font-weight: 700;
    line-height: 0.84;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.hero-title .line {
    display: block;
    /* Masks the rising letters at the baseline, lets them overflow sideways */
    clip-path: inset(-0.25em -0.5em 0 -0.5em);
}

.hero-title .line--code {
    clip-path: none;
    margin-top: 0.35em;
    font-size: 0.3em;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--accent);
}

.prompt {
    color: var(--text-faint);
}

.caret {
    display: inline-block;
    width: 0.5em;
    height: 0.95em;
    margin-left: 0.1em;
    vertical-align: -0.14em;
    background: var(--accent);
    animation: caret-blink 1.1s steps(1) infinite;
}

.is-typing .caret {
    animation: none;
}

@keyframes caret-blink {
    50% {
        opacity: 0;
    }
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 420px;
}

.hero-lede {
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    line-height: 1.5;
    color: var(--text-dim);
}

.hero-lede strong {
    color: var(--text);
    font-weight: 500;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 600px) {
    .hero-title .line--code {
        font-size: 0.42em;
    }
}

@media (min-width: 1280px) {
    .hero-side {
        position: absolute;
        right: 0;
        bottom: 0;
        width: clamp(320px, 26vw, 380px);
    }
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
}

.scroll-cue-line {
    position: relative;
    width: 40px;
    height: 1px;
    background: var(--line-strong);
    overflow: hidden;
}

.scroll-cue-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    animation: cue-sweep 2.2s var(--ease-in-out) infinite;
}

@keyframes cue-sweep {
    0% {
        transform: translateX(-100%);
    }

    60%,
    100% {
        transform: translateX(100%);
    }
}

/* ------------------------------------------------------------ */
/* Showreel                                                      */
/* ------------------------------------------------------------ */

.reel-pin {
    position: relative;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
}

.reel-frame {
    --ix: 0px;
    --iy: 0px;
    --r: 0px;
    position: absolute;
    inset: 0;
    background: #000;
    clip-path: inset(var(--iy) var(--ix) round var(--r));
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-hud {
    position: absolute;
    top: calc(var(--iy) + 18px);
    bottom: calc(var(--iy) + 18px);
    left: calc(var(--ix) + 20px);
    right: calc(var(--ix) + 20px);
    pointer-events: none;
    font-size: 0.72rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.reel-hud > * {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.reel-hud-tl {
    top: 0;
    left: 0;
}

.reel-hud-tr {
    top: 0;
    right: 0;
    font-variant-numeric: tabular-nums;
}

.reel-hud-bl {
    bottom: 0;
    left: 0;
}

.reel-sound {
    pointer-events: auto;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(11, 11, 12, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font: inherit;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.reel-sound:hover {
    background: rgba(11, 11, 12, 0.85);
}

.reel-sound-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 10px;
}

.reel-sound-bars i {
    width: 2px;
    height: 3px;
    background: currentColor;
}

.reel-sound[aria-pressed="true"] .reel-sound-bars i {
    animation: eq 0.9s ease-in-out infinite;
}

.reel-sound[aria-pressed="true"] .reel-sound-bars i:nth-child(2) {
    animation-delay: 0.25s;
}

.reel-sound[aria-pressed="true"] .reel-sound-bars i:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes eq {
    50% {
        height: 10px;
    }
}

@media (max-width: 767px) {
    .reel-pin {
        height: auto;
        padding: 0 var(--gutter);
    }

    .reel-frame {
        --r: 14px;
        position: relative;
        aspect-ratio: 16 / 9;
    }

    .reel-hud {
        top: 12px;
        bottom: 12px;
        left: 12px;
        right: 12px;
        font-size: 0.65rem;
    }
}

/* ------------------------------------------------------------ */
/* Proof strip                                                   */
/* ------------------------------------------------------------ */

.proof {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(64px, 12vh, 128px) var(--gutter) 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.stat {
    --draw: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stat::before {
    content: '';
    display: block;
    height: 1px;
    margin-bottom: 10px;
    background: var(--line-strong);
    transform: scaleX(var(--draw));
    transform-origin: left;
}

.stat-num {
    font-size: clamp(2.6rem, 6vw, 5.5rem);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 900px) {
    .proof {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 40px;
    }
}

/* ------------------------------------------------------------ */
/* Section heads                                                 */
/* ------------------------------------------------------------ */

.section-head {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
    align-items: end;
    gap: 20px 48px;
}

.section-index {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-index .kf-mark {
    width: 7px;
    height: 7px;
}

.section-title {
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    font-weight: 650;
    line-height: 0.95;
    letter-spacing: -0.05em;
}

/* SplitText line masks: leave room for descenders */
.rl-mask {
    padding-bottom: 0.14em;
    margin-bottom: -0.14em;
}

.section-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-sub {
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--text-dim);
}

@media (max-width: 900px) {
    .section-head {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ------------------------------------------------------------ */
/* Work: horizontal rail                                         */
/* ------------------------------------------------------------ */

.work {
    position: relative;
    padding-top: clamp(96px, 16vh, 180px);
}

.work-pin {
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 5vh, 56px);
}

.work.is-horizontal .work-pin {
    height: 100vh;
    justify-content: center;
    padding: var(--nav-h) 0 var(--scrubber-h);
    overflow: hidden;
}

.work-rail {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

@media (hover: none) {
    .work-rail {
        scrollbar-width: none;
    }

    .work-rail::-webkit-scrollbar {
        display: none;
    }
}

.work.is-horizontal .work-rail {
    overflow: visible;
}

.work-track {
    --card-h: min(52vh, 560px);
    position: relative;
    display: flex;
    gap: clamp(16px, 2vw, 28px);
    width: max-content;
    padding: 28px var(--gutter) 16px;
    will-change: transform;
}

.work-ruler {
    position: absolute;
    top: 0;
    left: var(--gutter);
    right: var(--gutter);
    height: 12px;
    background-image:
        repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px 120px),
        repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 24px);
    background-size: 100% 12px, 100% 6px;
    background-repeat: no-repeat;
}

.work-card {
    flex: 0 0 auto;
    width: calc(var(--card-h) * 0.8);
    text-decoration: none;
    scroll-snap-align: start;
    scroll-margin-left: var(--gutter);
}

.work-media {
    position: relative;
    height: var(--card-h);
    border-radius: 14px;
    overflow: hidden;
    background: var(--panel);
    isolation: isolate;
}

.work-media-inner {
    position: absolute;
    inset: 0 -5%;
}

.work-media img,
.work-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.1s var(--ease-out), opacity 0.5s ease;
}

.work-media video {
    opacity: 0;
}

.work-card.is-playing.video-ready video {
    opacity: 1;
}

.work-card:hover .work-media img,
.work-card:hover .work-media video {
    transform: scale(1.04);
}

.work-play {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(11, 11, 12, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s ease, transform 0.5s var(--ease-out);
}

.work-play .kf-mark {
    width: 6px;
    height: 6px;
    color: var(--accent);
}

.work-card.is-playing.video-ready .work-play {
    opacity: 1;
    transform: none;
}

.work-caption {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 4px;
    padding-top: 16px;
}

.work-idx {
    grid-row: 1 / span 3;
    padding-top: 0.4em;
    font-size: 0.72rem;
    color: var(--text-faint);
    transition: color 0.3s ease;
}

.work-card.is-center .work-idx,
.work-card:hover .work-idx {
    color: var(--accent);
}

.work-caption h3 {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.work-caption p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-dim);
}

.work-tags {
    margin-top: 6px;
    font-size: 0.68rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.work-counter {
    font-size: 0.8rem;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.work-counter-now {
    color: var(--text);
}

.work:not(.is-horizontal) .work-counter {
    display: none;
}

@media (max-height: 760px) {
    .work-track {
        --card-h: 46vh;
    }
}

@media (max-width: 899px) {
    .work-track {
        --card-h: min(90vw, 500px);
    }
}

/* ------------------------------------------------------------ */
/* Tools: composition viewer + layer timeline                    */
/* ------------------------------------------------------------ */

.tools {
    position: relative;
    padding-top: clamp(96px, 14vh, 160px);
}

.tools-pin {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 4vh, 40px);
}

.tools.is-scrub .tools-pin {
    height: 100vh;
    padding: calc(var(--nav-h) + 8px) 0 calc(var(--scrubber-h) + 20px);
}

.comp {
    width: min(100% - 2 * var(--gutter), var(--max) - 2 * var(--gutter));
    margin-inline: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    overflow: hidden;
}

.tools.is-scrub .comp {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.panel-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    font-size: 0.68rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.panel-bar .kf-mark {
    width: 6px;
    height: 6px;
    margin-right: 6px;
    color: var(--accent);
}

.viewer-layer {
    color: var(--text);
}

.viewer-stage {
    position: relative;
    display: grid;
    gap: 1px;
    background: var(--line);
}

.tool-slide {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(20px, 3vw, 48px);
    padding: clamp(16px, 2.5vw, 32px);
    background: var(--panel);
}

.tool-media {
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.tool-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tool-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    max-width: 48ch;
}

.tool-tags {
    font-size: 0.7rem;
    color: var(--label, var(--accent));
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tool-info h3 {
    font-size: clamp(2rem, 3.6vw, 3.4rem);
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.045em;
}

.tool-info p {
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--text-dim);
}

.tool-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin: 4px 0;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.tool-metric-num {
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.tool-metric-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Stacked fallback (mobile / reduced motion / no JS) */
.tools:not(.is-scrub) .panel-bar,
.tools:not(.is-scrub) .timeline,
.tools:not(.is-scrub) .scrub-hint {
    display: none;
}

@media (max-width: 899px) {
    .tool-slide {
        grid-template-columns: minmax(0, 1fr);
    }

    .tool-media {
        max-width: 300px;
    }
}

/* Scrub mode: one slide at a time, driven by the playhead */
.tools.is-scrub .viewer {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
}

.tools.is-scrub .viewer-stage {
    display: block;
    min-height: 0;
    background: none;
}

.tools.is-scrub .tool-slide {
    position: absolute;
    inset: 0;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s var(--ease-out), visibility 0s linear 0.5s;
}

.tools.is-scrub .tool-slide.is-active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s var(--ease-out), visibility 0s;
}

.tools.is-scrub .tool-media {
    height: 100%;
    clip-path: inset(100% 0 0 0 round 10px);
    transition: clip-path 0.9s var(--ease-out);
}

.tools.is-scrub .tool-slide.is-active .tool-media {
    clip-path: inset(0 0 0 0 round 10px);
}

.tools.is-scrub .tool-info > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s var(--ease-out), transform 0.8s var(--ease-out);
}

.tools.is-scrub .tool-slide.is-active .tool-info > * {
    opacity: 1;
    transform: none;
}

.tools.is-scrub .tool-slide.is-active .tool-info > :nth-child(2) { transition-delay: 0.06s; }
.tools.is-scrub .tool-slide.is-active .tool-info > :nth-child(3) { transition-delay: 0.12s; }
.tools.is-scrub .tool-slide.is-active .tool-info > :nth-child(4) { transition-delay: 0.18s; }
.tools.is-scrub .tool-slide.is-active .tool-info > :nth-child(5) { transition-delay: 0.24s; }

/* Timeline panel */
.timeline {
    --name-w: clamp(150px, 15vw, 210px);
    --p: 0;
    position: relative;
    border-top: 1px solid var(--line-strong);
    background: var(--bg-raised);
}

.tl-head {
    display: grid;
    grid-template-columns: var(--name-w) minmax(0, 1fr);
    height: 30px;
    border-bottom: 1px solid var(--line);
}

.tl-tc {
    display: flex;
    align-items: center;
    padding-left: 14px;
    border-right: 1px solid var(--line);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.tl-ruler {
    position: relative;
    background-image:
        repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px 10%),
        repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 2%);
    background-size: 100% 10px, 100% 5px;
    background-position: 0 100%, 0 100%;
    background-repeat: no-repeat;
}

.tl-ruler span {
    position: absolute;
    top: 4px;
    left: calc(var(--at) * 100%);
    padding-left: 5px;
    font-size: 0.6rem;
    color: var(--text-faint);
}

.tl-layers {
    display: flex;
    flex-direction: column;
}

.tl-layer {
    display: grid;
    grid-template-columns: var(--name-w) minmax(0, 1fr);
    width: 100%;
    height: 30px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    text-align: left;
    cursor: pointer;
}

.tl-layer:last-child {
    border-bottom: 0;
}

.tl-name {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-right: 1px solid var(--line);
    font-size: 0.7rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.tl-num {
    width: 12px;
    color: var(--text-faint);
}

.tl-swatch {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 2px;
    background: var(--label);
}

.tl-layer:hover .tl-name,
.tl-layer.is-live .tl-name {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.tl-track {
    position: relative;
    display: block;
    height: 100%;
}

.tl-bar {
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: calc(var(--in) * 100%);
    width: calc((var(--out) - var(--in)) * 100%);
    border-radius: 3px;
    border: 1px solid color-mix(in srgb, var(--label) 45%, transparent);
    background: color-mix(in srgb, var(--label) 18%, transparent);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.tl-layer.is-past .tl-bar {
    background: color-mix(in srgb, var(--label) 38%, transparent);
}

.tl-layer.is-live .tl-bar {
    background: var(--label);
    border-color: var(--label);
}

.kf {
    position: absolute;
    top: 50%;
    left: calc(var(--at) * 100%);
    z-index: 1;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border: 1px solid var(--text-dim);
    background: var(--bg-raised);
    transform: rotate(45deg);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kf.is-hit {
    border-color: var(--text);
    background: var(--text);
    animation: kf-pop 0.45s var(--ease-out);
}

@keyframes kf-pop {
    40% {
        transform: rotate(45deg) scale(1.9);
    }
}

.tl-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--name-w) + (100% - var(--name-w)) * var(--p));
    z-index: 2;
    width: 1px;
    background: var(--accent);
    pointer-events: none;
}

.tl-playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 11px;
    height: 14px;
    transform: translateX(-50%);
    background: var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%);
}

@media (max-height: 780px) {
    .tl-layer,
    .tl-head {
        height: 24px;
    }

    .tl-bar {
        top: 5px;
        bottom: 5px;
    }
}

/* ------------------------------------------------------------ */
/* About                                                         */
/* ------------------------------------------------------------ */

.about {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(96px, 14vh, 180px) var(--gutter) clamp(80px, 12vh, 140px);
}

.about-statement {
    max-width: 17ch;
    margin: 8px 0 clamp(48px, 8vh, 96px);
    font-size: clamp(2.2rem, 5.4vw, 5rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.about-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
}

.about-text {
    max-width: 52ch;
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--text-dim);
}

.skill-col h3 {
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.skill-col ul {
    list-style: none;
}

.skill-col li {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

@media (max-width: 1000px) {
    .about-body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-text {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .about-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ------------------------------------------------------------ */
/* Contact & footer                                              */
/* ------------------------------------------------------------ */

.contact {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(80px, 14vh, 160px) var(--gutter) clamp(80px, 12vh, 140px);
}

.contact-title {
    max-width: 12ch;
    margin: 8px 0 clamp(40px, 6vh, 64px);
    font-size: clamp(3rem, 10vw, 9.5rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.contact-title .move {
    display: inline-block;
    white-space: nowrap;
    color: var(--accent);
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-strong);
    font-size: clamp(1.1rem, 2.6vw, 2.2rem);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.contact-email:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
}

.site-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    max-width: var(--max);
    margin: 0 auto;
    text-align: left;
}

/* ------------------------------------------------------------ */
/* Scrubber: the page's own timeline                             */
/* ------------------------------------------------------------ */

.scrubber {
    --p: 0;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: var(--scrubber-h);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 0 var(--gutter);
    border-top: 1px solid var(--line);
    background: rgba(11, 11, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.scrubber[hidden] {
    display: none;
}

.scrubber-tc {
    min-width: 11ch;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.scrubber-track {
    position: relative;
    height: 100%;
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
}

.scrubber-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--line-strong);
}

.scrubber-fill {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(var(--p));
    transform-origin: left;
    pointer-events: none;
}

.scrubber-head {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: calc(var(--p) * 100%);
    width: 2px;
    margin-left: -1px;
    border-radius: 1px;
    background: var(--accent);
    pointer-events: none;
}

.scrubber-track.is-dragging .scrubber-head {
    box-shadow: 0 0 0 4px rgba(158, 158, 255, 0.2);
}

.scrubber-marker {
    --at: 0;
    position: absolute;
    top: 50%;
    left: calc(var(--at) * 100%);
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 0;
    background: none;
    color: var(--text-faint);
    cursor: pointer;
}

.scrubber-marker i {
    width: 7px;
    height: 7px;
    border: 1px solid currentColor;
    background: var(--bg);
    transform: rotate(45deg);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease-out);
}

.scrubber-marker span {
    position: absolute;
    bottom: calc(100% - 3px);
    left: 50%;
    transform: translateX(-50%);
    font: 400 0.58rem var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.scrubber-marker.is-passed i {
    border-color: var(--accent);
    background: var(--accent);
}

.scrubber-marker.is-current,
.scrubber-marker:hover {
    color: var(--text);
}

.scrubber-marker:hover i {
    transform: rotate(45deg) scale(1.4);
}

@media (max-width: 1100px) {
    .scrubber-marker span {
        display: none;
    }
}

@media (max-width: 767px) {
    .scrubber {
        display: none !important;
    }
}
