:root {
    --paper: #FBFAF8;
    --card: #F1EFE8;
    --card-2: #E9E6DC;
    --ink: #0E2C26;
    --teal: #1C4B42;
    --muted: #5E7A73;
    --lime: #C6F921;
    --lime-deep: #A8DB00;
    --rule: #DFDBD0;
    --rule-soft: #EBE8DF;
    --shadow: 0 1px 2px rgba(14, 44, 38, .05), 0 12px 32px -12px rgba(14, 44, 38, .14);
    --f-display: "Bricolage Grotesque", "Inter", -apple-system, Segoe UI, sans-serif;
    --f-body: "Inter", -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
    --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --pad: clamp(20px, 5vw, 48px);
    --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #0A1917;
        --card: #10251F;
        --card-2: #16302A;
        --ink: #ECF0EA;
        --teal: #BCD2CB;
        --muted: #8AA69E;
        --lime: #C6F921;
        --lime-deep: #D8FF5C;
        --rule: #203A33;
        --rule-soft: #182F29;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
    }
}

:root[data-theme="dark"] {
    --paper: #0A1917;
    --card: #10251F;
    --card-2: #16302A;
    --ink: #ECF0EA;
    --teal: #BCD2CB;
    --muted: #8AA69E;
    --lime: #C6F921;
    --lime-deep: #D8FF5C;
    --rule: #203A33;
    --rule-soft: #182F29;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
}

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

html {
    scroll-behavior: smooth
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100svh;
    display: flex;
    flex-direction: column
}

/* short pages (Work, About) would otherwise leave the footer floating mid-screen */
main {
    flex: 1 0 auto
}

img {
    max-width: 100%;
    display: block
}

a {
    color: inherit
}

:focus-visible {
    outline: 2.5px solid var(--lime-deep);
    outline-offset: 3px;
    border-radius: 4px
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }

    * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important
    }
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: var(--paper);
    padding: 12px 18px;
    border-radius: 0 0 8px 0;
    z-index: 100
}

.skip:focus {
    left: 0
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding-inline: var(--pad)
}

h1, h2, h3, h4 {
    font-family: var(--f-display);
    text-wrap: balance;
    line-height: 1.05;
    letter-spacing: -.025em
}

h2 {
    font-size: clamp(27px, 4.2vw, 48px);
    font-weight: 700;
}

h3 {
    font-size: clamp(19px, 2.4vw, 26px);
    font-weight: 700;
    line-height: 1.15
}

h4 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em
}

.eyebrow {
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    display: block
}

/* Section descriptions share one size, whether they are a single lede line
   (.lede) or several paragraphs (.body-copy). */
.lede, .body-copy {
    font-size: clamp(16px, 1.9vw, 18px);
    color: var(--teal);
    line-height: 1.6
}

.lede {
    max-width: 80ch
}

.body-copy {
    max-width: 66ch;
    display: flex;
    flex-direction: column;
    gap: 1em
}

.sec {
    padding-block: clamp(32px, 8vw, 56px);
    border-top: 1px solid var(--rule-soft)
}

.sec-head {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 44px;
}

/* ---------- nav ---------- */
.nav {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 16px var(--pad);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex: none
}

.nav-brand img {
    width: 36px;
    height: 36px
}

.nav-links {
    display: flex;
    gap: 4px;
    margin-left: auto;
    align-items: center
}

.nav-links a {
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    color: var(--teal);
    padding: 8px 13px;
    border-radius: 99px;
    transition: background .18s, color .18s;
    white-space: nowrap
}

.nav-links a:hover {
    background: var(--card);
    color: var(--ink)
}

.nav-links a[aria-current="page"] {
    background: var(--card);
    color: var(--ink)
}

/* same lime as the hero; --ink/--paper flip with the theme, the lime does not,
   so the label is pinned to the hero's dark teal */
/* set the CTA apart from the page links */
.nav-cta {
    background: var(--lime) !important;
    color: #123028 !important;
    font-weight: 600 !important;
    margin-left: clamp(10px, 2vw, 22px)
}

.nav-cta:hover {
    background: var(--lime-deep) !important;
    color: #0B231D !important
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--rule);
    border-radius: 99px;
    padding: 9px 14px;
    cursor: pointer;
    color: var(--ink);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase
}

/* ---------- hero (restored from the original site) ---------- */
.hero {
    padding: 0 var(--pad) 0
}

.hero-inner {
    background: var(--lime);
    border-radius: var(--r-xl);
    position: relative;
    overflow: hidden;
    min-height: min(66svh, 660px);
    padding: clamp(28px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(22px, 3vw, 38px);
    max-width: calc(var(--maxw) - var(--pad) * 2);
    margin: 0 auto
}

.deco {
    position: absolute;
    height: auto;
    z-index: 1
}

.deco-top {
    top: 0;
    right: 90px;
    width: 90px
}

.deco-bottom {
    bottom: 0;
    right: 69px;
    width: 130px
}

.hero-text {
    max-width: 800px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 16px
}

/* .eyebrow defaults to --muted, which is a dark-ground token; on lime it needs its own value */
.hero-text .eyebrow {
    color: #2C5B50
}

.hero-text h1 {
    font-family: var(--f-display);
    font-size: clamp(38px, 7vw, 80px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.03em;
    color: #0B231D
}

.hero-text h1 em {
    font-style: normal;
    position: relative;
    white-space: nowrap
}

.hero-text h1 em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: .07em;
    height: .09em;
    background: #0B231D;
    border-radius: 2px
}

.hero-text p {
    font-size: clamp(15px, 1.7vw, 19px);
    line-height: 1.6;
    max-width: 52ch;
    color: #1B4038;
    font-weight: 500
}

/* auto margin absorbs the free space, so the text sits up top and the chips
   settle on the bottom edge of the block. No rule between them. */
.hero-meta {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding-top: clamp(28px, 4vw, 48px)
}

.hero-meta .pill {
    border-color: rgba(28, 75, 66, .3);
    color: #1C4B42
}

/* ---------- bits ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--f-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 99px;
    border: 1px solid var(--rule);
    color: var(--muted);
    white-space: nowrap
}

.pill.lime {
    background: var(--lime);
    color: #123028;
    border-color: transparent;
    font-weight: 700
}

.pill.ghost {
    background: var(--card)
}

.pill.plat {
    text-transform: none;
    letter-spacing: .01em;
    font-family: var(--f-body);
    font-size: 11.5px;
    background: var(--card)
}

.pill.design {
    background: var(--card);
    color: var(--teal)
}

.pill.code {
    background: transparent;
    color: var(--teal);
    font-family: var(--f-mono)
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--f-body);
    font-size: 14.5px;
    font-weight: 600;
    padding: 13px 22px;
    border-radius: 99px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    transition: background .22s, transform .22s
}

.btn:hover {
    background: var(--teal);
    transform: translateY(-1px)
}

.btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule)
}

.btn.ghost:hover {
    background: var(--card-2);
    border-color: var(--muted)
}

.btn svg {
    width: 15px;
    height: 15px;
    flex: none
}

/* ---------- stats + work ---------- */
.stat-strip {
    border-block: 1px solid var(--rule-soft);
    margin-top: clamp(44px, 7vw, 80px)
}

.stat-strip-in {
    max-width: var(--maxw);
    margin: 0 auto;
    padding-inline: var(--pad);
    display: grid;
    grid-template-columns:repeat(4, 1fr)
}

.stat {
    padding: 20px 0 20px 26px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-left: 1px solid var(--rule-soft)
}

.stat:first-child {
    border-left: 0;
    padding-left: 0
}

.stat b {
    font-family: var(--f-display);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1
}

.stat span {
    font-family: var(--f-mono);
    font-size: 10.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

.work-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: clamp(16px, 2.4vw, 26px)
}

.work-grid > .feat {
    grid-column: 1 / -1
}

.proj {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--card);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.34, 1.3, .5, 1), box-shadow .3s, background .3s
}

.proj:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    background: var(--card-2)
}

.proj-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    display: grid;
    place-items: center
}

.feat .proj-cover {
    aspect-ratio: 21/9
}

.cover-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1)
}

.proj:hover .cover-bg {
    transform: scale(1.04)
}

.proj-cover .badge {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    transition: transform .5s cubic-bezier(.4, 0, .2, 1)
}

.feat .proj-cover .badge {
    width: 92px;
    height: 92px;
    border-radius: 22px
}

/* the Webink mark is transparent, so it gets a white keyline instead of a tile
   — the teal X would otherwise disappear into the teal water behind it */
.proj-cover .badge.bare {
    border-radius: 0;
    box-shadow: none;
    width: 72px;
    height: 72px;
    filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 12px 22px rgba(0, 0, 0, .45))
}

.feat .proj-cover .badge.bare {
    width: 88px;
    height: 88px
}

.proj:hover .badge {
    transform: scale(1.06)
}

.proj-body {
    padding: clamp(18px, 2.6vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1
}

.proj-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap
}

.proj-title .yr {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--muted)
}

.proj p {
    color: var(--teal);
    font-size: 14.5px;
    line-height: 1.55;
    max-width: 56ch
}

.proj-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 6px
}

.proj-arrow {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--rule);
    display: grid;
    place-items: center;
    flex: none;
    transition: background .25s, border-color .25s, color .25s
}

.proj:hover .proj-arrow {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper)
}

.proj-arrow svg {
    width: 15px;
    height: 15px
}

/* ---------- footer ---------- */
.foot {
    background: var(--card);
    padding: clamp(42px, 6vw, 70px) 0 34px;
    margin-top: clamp(44px, 7vw, 76px)
}

.foot-in {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    align-items: flex-end
}

.foot-brand {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.foot-brand img {
    width: 36px;
    height: 36px
}

.foot-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap
}

.foot-links a {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none
}

.foot-links a:hover {
    color: var(--ink)
}

.foot small {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--muted)
}

/* ---------- work index ---------- */
.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px
}

.chip {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 99px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all .2s;
    font-weight: 500
}

.chip:hover {
    border-color: var(--muted);
    color: var(--ink)
}

.chip[aria-pressed="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    font-weight: 700
}

.tbl-scroll {
    overflow-x: auto;
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad)
}

.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    min-width: 720px
}

.tbl th {
    font-family: var(--f-mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    text-align: left;
    padding: 10px 14px 10px 0;
    border-bottom: 1px solid var(--rule);
    white-space: nowrap
}

.tbl td {
    padding: 16px 14px 16px 0;
    border-bottom: 1px solid var(--rule-soft);
    vertical-align: middle;
    color: var(--teal)
}

.tbl tbody tr {
    transition: background .18s
}

.tbl tbody tr.is-link:hover {
    background: var(--card)
}

.tbl tbody tr.no-link {
    cursor: default
}

/* Whole row clickable. The link stays a real <a> and its ::after is stretched
   over the row, so cmd-click, middle-click and "open in new tab" still work —
   a JS click handler on the <tr> would lose all of those. */
.tbl tbody tr.is-link {
    position: relative;
    cursor: pointer
}

.t-name a::after {
    content: "";
    position: absolute;
    inset: 0
}

.t-yr {
    font-family: var(--f-mono);
    font-size: 12.5px;
    color: var(--muted);
    width: 1%;
    font-variant-numeric: tabular-nums
}

.t-name a, .t-name .plain {
    text-decoration: none;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -.02em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 11px
}

.t-name .plain {
    cursor: default
}

.t-name .thumb {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    flex: none;
    background: var(--card-2);
    padding: 3px
}

.t-stack {
    font-family: var(--f-mono);
    font-size: 11.5px;
    color: var(--muted)
}

.t-go {
    text-align: right;
    width: 1%
}

.t-go span {
    opacity: 0;
    transition: opacity .2s;
    font-family: var(--f-mono);
    font-size: 15px;
    color: var(--ink)
}

.tbl tbody tr:hover .t-go span {
    opacity: 1
}

/* ---------- case study ---------- */
.cs-head {
    padding-top: clamp(24px, 4vw, 44px);
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vw, 32px)
}

.cs-id {
    display: flex;
    align-items: center;
    gap: 16px
}

.cs-id img {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    flex: none;
    box-shadow: var(--shadow)
}

.cs-id h1 {
    font-size: clamp(32px, 6vw, 54px);
    font-weight: 800
}

/* Stepped reflow rather than auto-fit, so it goes 6 -> 3 -> 2 -> 1 and the
   rows always divide evenly instead of leaving an orphan cell. */
.cs-meta {
    display: grid;
    grid-template-columns:repeat(6, 1fr);
    gap: 1px;
    background: var(--rule-soft);
    border: 1px solid var(--rule-soft);
    border-radius: var(--r-md);
    overflow: hidden
}

@media (max-width: 900px) {
    .cs-meta {
        grid-template-columns:repeat(3, 1fr)
    }
}

@media (max-width: 560px) {
    .cs-meta {
        grid-template-columns:repeat(2, 1fr)
    }
}

@media (max-width: 430px) {
    .cs-meta {
        grid-template-columns:1fr
    }
}

.cs-meta div {
    background: var(--paper);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.cs-meta dt {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted)
}

.cs-meta dd {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink)
}

/* The case study reads as one continuous document — only Support is fenced off. */
.cs-page .sec {
    border-top: 0
}

.cs-page .sec.has-rule {
    border-top: 1px solid var(--rule-soft)
}

/* ---------- source picker ---------- */
/* Mirrors the in-app source filter: grey at rest, full colour on hover.
   Nothing is selectable here, so there is no selected state. */
.src-grid {
    list-style: none;
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: clamp(10px, 1.4vw, 16px)
}

.src {
    position: relative;
    aspect-ratio: 1;
    background: var(--card);
    border-radius: var(--r-md);
    overflow: hidden;
    padding: 14px;
    display: block;
    transition: background .3s, transform .3s cubic-bezier(.34, 1.3, .5, 1)
}

.src:hover {
    background: var(--card-2);
    transform: translateY(-3px)
}

.src-name {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: -.01em;
    transition: color .3s
}

.src:hover .src-name {
    color: var(--ink)
}

.src-logo {
    position: absolute;
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%);
    width: 78%;
    height: auto;
    z-index: 1;
    filter: grayscale(1) opacity(.55);
    transition: filter .35s ease, transform .45s cubic-bezier(.34, 1.3, .5, 1)
}

.src:hover .src-logo {
    filter: grayscale(0) opacity(1);
    transform: translate(-50%, -50%) scale(1.05)
}

.src-flag {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    width: 20px;
    height: auto;
    border-radius: 2px;
    filter: grayscale(1) opacity(.5);
    transition: filter .35s ease
}

.src:hover .src-flag {
    filter: grayscale(0) opacity(1)
}

@media (max-width: 900px) {
    .src-grid {
        grid-template-columns:repeat(3, 1fr)
    }
}

@media (max-width: 560px) {
    .src-grid {
        grid-template-columns:repeat(2, 1fr)
    }

    /* smaller tiles: pull the logo down and in so it clears the name */
    .src {
        padding: 12px
    }

    .src-name {
        font-size: 13px
    }

    .src-logo {
        width: 68%;
        top: 60%
    }

    .src-flag {
        left: 12px;
        bottom: 12px;
        width: 18px
    }
}

/* touch devices have no hover, so show them in colour */
@media (hover: none) {
    .src-logo, .src-flag {
        filter: none
    }

    .src-name {
        color: var(--ink)
    }
}

/* Ported from the original site's carousel: full-bleed track, the neighbouring
   slide peeking in, fixed slide height, and the pill dot with a progress fill. */
/* 60px above matches the old .project-section bottom padding */
.car-sec {
    padding: clamp(40px, 6vw, 60px) 0 clamp(40px, 8vw, 120px);
    overflow: hidden
}

.car-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto
}

.car-bleed {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    overflow: hidden
}

.car-wrap {
    position: relative;
    overflow: visible;
    max-width: 1200px;
    margin: 0 auto
}

.car-track {
    display: flex;
    transition: transform .8s cubic-bezier(.25, .46, .45, .94);
    will-change: transform
}

/* The artwork is 1280x800, so the slide matches 16:10 — a fixed height would
   crop the window edges off these desktop shots. */
.car-slide {
    min-width: calc(100% - 40px);
    margin: 0 20px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16/10;
    background: #12332C;
    cursor: pointer;
    transform-origin: center
}

.car-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .8s cubic-bezier(.25, .46, .45, .94);
    will-change: transform
}

.car-slide.active img {
    transform: scale(1)
}

.car-slide:not(.active) img {
    transform: scale(1.05);
    transform-origin: center
}

.car-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    position: relative;
    z-index: 10
}

.car-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: var(--rule);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all .4s cubic-bezier(.25, .46, .45, .94);
    position: relative;
    overflow: hidden
}

.car-dot.active {
    width: 32px;
    background: var(--rule-soft);
    border-radius: 4px
}

.car-dot.active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--ink);
    border-radius: 4px;
    animation: pill-progress 5s linear infinite
}

/* keep the fill in step with autoplay, which pauses on hover */
.car-sec:hover .car-dot.active::after {
    animation-play-state: paused
}

@keyframes pill-progress {
    0% {
        width: 0
    }
    100% {
        width: 100%
    }
}

@media (prefers-reduced-motion: reduce) {
    .car-dot.active::after {
        animation: none;
        width: 100%
    }
}

@media (max-width: 820px) {
    .car-slide {
        margin: 0 15px;
        min-width: calc(100% - 30px)
    }

    .car-container {
        padding: 0 16px
    }

    .car-dots {
        margin-top: 30px;
        gap: 6px
    }

    .car-dot.active {
        width: 28px
    }
}

.probs {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(16px, 2.4vw, 24px)
}

.prob {
    background: var(--card);
    border-radius: var(--r-md);
    padding: clamp(22px, 3vw, 30px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 3px solid var(--ink)
}

.prob .n {
    font-family: var(--f-mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    color: var(--muted)
}

.prob p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--teal)
}

.langs {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--rule-soft);
    border: 1px solid var(--rule-soft);
    border-radius: var(--r-md);
    overflow: hidden
}

.lang {
    background: var(--paper);
    padding: 20px clamp(18px, 2.5vw, 24px);
    display: grid;
    grid-template-columns:194px 1fr auto;
    gap: 20px;
    align-items: start
}

.lang-id {
    display: flex;
    gap: 11px;
    align-items: flex-start
}

.lmarks {
    display: flex;
    gap: 4px;
    flex: none;
    margin-top: 2px
}

.lmark {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-family: var(--f-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #fff
}

.lang-id > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0
}

.lang-id b {
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink)
}

.lang-id span {
    font-family: var(--f-mono);
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: .03em
}

.lang p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--teal);
    max-width: 58ch
}

.lang p em {
    font-style: normal;
    color: var(--ink);
    font-weight: 600
}

.lang-n {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap
}

.bar {
    display: flex;
    height: 9px;
    border-radius: 99px;
    overflow: hidden;
    background: var(--card-2);
    gap: 1.5px
}

.bar i {
    display: block;
    height: 100%
}

.bar-key {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-family: var(--f-mono);
    font-size: 10.5px;
    color: var(--muted)
}

.bar-key span {
    display: flex;
    align-items: center;
    gap: 6px
}

.bar-key i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    display: block
}

.rel {
    display: grid;
    grid-template-columns:120px auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px 0;
    border-top: 1px solid var(--rule-soft)
}

.rel time {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums
}

.rel-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex: none;
    object-fit: contain;
    background: var(--card);
    padding: 5px
}

.rel b {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    display: block
}

.rel .sub {
    font-size: 13px;
    color: var(--muted);
    display: block;
    margin-top: 2px
}

.rel .act {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end
}

.storelink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--teal);
    border: 1px solid var(--rule);
    padding: 7px 12px;
    border-radius: 99px;
    transition: all .2s;
    white-space: nowrap
}

.storelink:hover {
    background: var(--card-2);
    border-color: var(--muted);
    color: var(--ink)
}

.storelink svg {
    width: 13px;
    height: 13px;
    flex: none
}

.faq-item {
    border-top: 1px solid var(--rule-soft)
}

.faq-item summary {
    padding: 18px 0;
    cursor: pointer;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    list-style: none
}

.faq-item summary::-webkit-details-marker {
    display: none
}

.faq-item summary::after {
    content: "+";
    font-family: var(--f-mono);
    font-size: 19px;
    color: var(--muted);
    flex: none;
    transition: transform .2s
}

.faq-item[open] summary::after {
    transform: rotate(45deg)
}

.faq-item p {
    padding: 0 0 20px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--teal);
    max-width: 70ch
}

/* ---------- install ---------- */
.callout {
    background: var(--card);
    border-radius: var(--r-md);
    padding: clamp(20px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 3px solid var(--lime-deep)
}

.callout p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--teal);
    max-width: 66ch
}

.webink-install-card .btn {
    flex: none
}

.section-note,
.official-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    margin-top: 14px
}

.device-label,
.code-label {
    font-family: var(--f-mono);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase
}

.checkpoint {
    background: var(--card);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    color: var(--ink) !important;
    font-size: 14px !important
}

.command-block,
.url-block {
    background: var(--card);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    max-width: 66ch;
    overflow: hidden
}

.command-line,
.url-line {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-top: 8px
}

.command-line code,
.url-line code {
    background: none;
    padding: 0;
    color: var(--ink);
    white-space: nowrap;
    overflow: auto;
    min-width: 0
}

.command-block small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45
}

.copy-btn {
    flex: none;
    border: 1px solid var(--rule);
    border-radius: 99px;
    padding: 6px 10px;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--f-mono);
    font-size: 10.5px;
    cursor: pointer
}

.copy-btn:hover {
    border-color: var(--muted);
    background: var(--card-2)
}

.webink-install-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(22px, 4vw, 34px);
    border-radius: var(--r-lg);
    background: var(--lime);
    color: #0B231D
}

.webink-install-card .eyebrow {
    color: #2C5B50
}

.webink-install-card h3 {
    margin-top: 7px
}

.webink-install-card p {
    margin-top: 10px;
    max-width: 56ch;
    color: #2C5B50;
    font-size: 15px;
    line-height: 1.55
}

.webink-install-card .btn {
    background: #0B231D;
    color: var(--lime);
    border-color: #0B231D
}

.webink-install-card .btn:hover {
    background: #183A30;
    border-color: #183A30
}

.manual-source{
    margin-top: 28px;
}

.install-next {
    margin-top: 28px;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--rule);
    border-radius: var(--r-md)
}

.manual-source h3,
.install-next h3 {
    font-size: 21px
}

.manual-source ol,
.install-next ol {
    margin: 14px 0 0 21px;
    color: var(--teal);
    font-size: 15px;
    line-height: 1.7
}

.manual-source li,
.install-next li {
    padding-left: 4px
}

.manual-source .url-block {
    margin-top: 18px;
    border: 1px solid var(--rule)
}

.install-next {
    background: var(--card)
}

.install-next .checkpoint {
    margin-top: 18px
}

.troubleshoot-sec .faq-list {
    border-bottom: 1px solid var(--rule-soft)
}

.official-note {
    max-width: 72ch
}

.refresh-steps {
    margin: -4px 0 0 22px;
    color: var(--teal);
    font-size: inherit;
    line-height: 1.6
}

.refresh-steps li {
    padding-left: 5px;
    margin-block: 3px
}

@media (max-width: 760px) {
    .webink-install-card {
        align-items: stretch;
        flex-direction: column
    }

    .webink-install-card .btn {
        justify-content: center;
        width: 100%
    }

    .command-line,
    .url-line {
        align-items: stretch;
        flex-direction: column;
        gap: 10px
    }

    .command-line code,
    .url-line code {
        white-space: pre-wrap;
        overflow-wrap: anywhere
    }

    .copy-btn {
        align-self: flex-start;
        min-height: 40px;
        padding-inline: 14px
    }
}

/* Four requirements, stepped 4 -> 2 -> 1 so rows always divide evenly
   instead of auto-fit stranding one cell on its own row. */
.reqs {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 1px;
    background: var(--rule-soft);
    border: 1px solid var(--rule-soft);
    border-radius: var(--r-md);
    overflow: hidden
}

@media (max-width: 900px) {
    .reqs {
        grid-template-columns:repeat(2, 1fr)
    }
}

@media (max-width: 560px) {
    .reqs {
        grid-template-columns:1fr
    }
}

.dl-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px
}

.req {
    background: var(--paper);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px
}

.req b {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink)
}

.req span {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5
}

/* device tabs on the install page — bigger than the OS sub-tabs inside them */
.ptabs {
    display: flex;
    gap: 4px;
    background: var(--card);
    padding: 4px;
    border-radius: 99px;
    border: 1px solid var(--rule-soft);
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap
}

.ptabs button {
    font-family: var(--f-body);
    font-size: 14px;
    font-weight: 600;
    border: 0;
    background: none;
    color: var(--muted);
    padding: 11px 22px;
    border-radius: 99px;
    cursor: pointer;
    transition: all .2s
}

.ptabs button:hover {
    color: var(--ink)
}

.ptabs button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--paper)
}

[data-platform="ios"] .plat-macos, [data-platform="macos"] .plat-ios {
    display: none
}

.ostabs {
    display: flex;
    gap: 3px;
    background: var(--card);
    padding: 4px;
    border-radius: 99px;
    border: 1px solid var(--rule-soft);
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap
}

.ostabs button {
    font-family: var(--f-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    border: 0;
    background: none;
    color: var(--muted);
    padding: 9px 18px;
    border-radius: 99px;
    cursor: pointer;
    transition: all .2s
}

.ostabs button:hover {
    color: var(--ink)
}

.ostabs button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--paper);
    font-weight: 700
}

[data-os="win"] .os-mac, [data-os="win"] .os-linux,
[data-os="mac"] .os-win, [data-os="mac"] .os-linux,
[data-os="linux"] .os-win, [data-os="linux"] .os-mac {
    display: none
}

.steps {
    display: flex;
    flex-direction: column;
    counter-reset: s
}

.step {
    display: grid;
    grid-template-columns:44px 1fr;
    gap: 20px;
    padding: 24px 0;
    border-top: 1px solid var(--rule-soft)
}

.step::before {
    counter-increment: s;
    content: counter(s);
    font-family: var(--f-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    background: var(--card);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center
}

.step-b {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0
}

.step-b p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--teal);
    max-width: 75ch
}

.step-b code {
    font-family: var(--f-mono);
    font-size: 12.5px;
    background: var(--card);
    padding: 2px 6px;
    border-radius: 5px;
    color: var(--ink)
}

.path {
    font-family: var(--f-mono);
    font-size: 12.5px;
    background: var(--card);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    color: var(--ink);
    overflow-x: auto;
    white-space: nowrap;
    max-width: fit-content;
}

/* ---------- about ---------- */
.about-top {
    display: grid;
    grid-template-columns:280px 1fr;
    gap: clamp(24px, 5vw, 56px);
    align-items: start
}

.about-h1 {
    font-size: clamp(30px, 5.5vw, 52px);
    font-weight: 800
}

.skills {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 1px;
    background: var(--rule-soft);
    border: 1px solid var(--rule-soft);
    border-radius: var(--r-lg);
    overflow: hidden
}

.track {
    background: var(--paper);
    padding: clamp(22px, 3.4vw, 36px);
    display: flex;
    flex-direction: column;
    gap: 20px
}

.track ul {
    list-style: none
}

.track li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    padding: 11px 0;
    border-top: 1px solid var(--rule-soft);
    font-size: 14.5px;
    color: var(--teal)
}

.track li span {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    flex: none
}

.tl-row {
    display: grid;
    grid-template-columns:150px 1fr;
    gap: 24px;
    padding: 22px 0;
    border-top: 1px solid var(--rule-soft)
}

.tl-row time {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums
}

.tl-row b {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    display: block
}

.tl-row .co {
    font-size: 14px;
    color: var(--teal);
    display: block;
    margin-top: 2px
}

.tl-row p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.55;
    margin-top: 8px;
    max-width: 62ch
}

.tl-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px
}

/* concurrent roles at one company, indented under it */
.tl-sub {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
    padding-left: 18px;
    border-left: 1px solid var(--rule-soft)
}

.tl-sub b {
    font-size: 15px
}

.tl-sub .co {
    font-family: var(--f-mono);
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: .02em
}

/* ---------- cookie consent ---------- */
.cc {
    position: fixed;
    right: clamp(12px, 2vw, 24px);
    bottom: clamp(12px, 2vw, 24px);
    z-index: 80;
    width: min(380px, calc(100vw - 24px));
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: clamp(18px, 2.2vw, 22px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: cc-in .32s cubic-bezier(.34, 1.2, .5, 1) both
}

@keyframes cc-in {
    from {
        opacity: 0;
        transform: translateY(12px)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc {
        animation: none
    }
}

.cc h2 {
    font-size: 17px;
    letter-spacing: -.02em;
    color: var(--ink)
}

.cc p {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--teal)
}

.cc p a {
    color: var(--ink);
    text-underline-offset: 3px
}

.cc-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: clamp(8px, 1.4vw, 14px)
}

.cc-btn {
    font-family: var(--f-body);
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 99px;
    cursor: pointer;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink);
    transition: background .2s, border-color .2s
}

.cc-btn:hover {
    background: var(--card-2);
    border-color: var(--muted)
}

.cc-btn.accept {
    background: var(--lime);
    border-color: var(--lime);
    color: #123028
}

.cc-btn.accept:hover {
    background: var(--lime-deep);
    border-color: var(--lime-deep)
}

/* footer entry point to change the choice later */
.cc-reopen {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

.cc-reopen:hover {
    color: var(--ink)
}

@media (max-width: 520px) {
    .cc {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto
    }

    .cc-actions {
        flex-direction: column-reverse
    }

    .cc-btn {
        width: 100%
    }
}

/* ---------- legal ---------- */
.legal {
    display: grid;
    grid-template-columns:230px 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: start
}

.legal-h1 {
    font-size: clamp(30px, 5.5vw, 52px);
    font-weight: 800
}

.toc {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 3px
}

.toc b {
    font-family: var(--f-mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    padding-bottom: 8px
}

.toc a {
    font-size: 12.5px;
    color: var(--muted);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    line-height: 1.4;
    transition: all .18s
}

.toc a:hover {
    background: var(--card);
    color: var(--ink)
}

.legal-body {
    display: flex;
    flex-direction: column;
    gap: 34px;
    min-width: 0
}

.legal-body h2 {
    font-size: 19px;
    letter-spacing: -.02em
}

.legal-sec {
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-margin-top: 20px
}

.legal-sec p, .legal-intro p {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--teal);
    max-width: 70ch
}

.legal-intro {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-bottom: 44px
}

.legal-sec p.sub {
    font-weight: 600;
    color: var(--ink);
    margin-top: 6px
}

.legal-sec ul {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 9px
}

.legal-sec li {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--teal);
    max-width: 68ch
}

.legal-sec li::marker {
    color: var(--muted)
}

.legal-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 26px
}

/* ---------- responsive ---------- */
/* Narrow screens drop columns rather than scrolling sideways.
   Stack goes first (longest), then Role, then Type. Year / Project / Status always stay. */
@media (max-width: 940px) {
    .tbl {
        min-width: 560px
    }

    .col-stack {
        display: none
    }
}

@media (max-width: 720px) {
    .tbl {
        min-width: 420px
    }

    .col-role {
        display: none
    }
}

@media (max-width: 560px) {
    .tbl {
        min-width: 0
    }

    .col-type {
        display: none
    }
}

/* "In progress" is wider than the old label; at ~320px the row needed ~20px back */
@media (max-width: 420px) {
    .tbl th, .tbl td {
        padding-right: 8px
    }

    .t-name a, .t-name .plain {
        font-size: 17px;
        gap: 9px
    }

    .t-name .thumb {
        width: 28px;
        height: 28px
    }
}

@media (max-width: 860px) {
    .legal {
        grid-template-columns:1fr
    }

    .toc {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        padding: 14px;
        background: var(--card);
        border-radius: var(--r-md)
    }

    .toc b {
        width: 100%;
        padding-bottom: 4px
    }
}

@media (max-width: 760px) {
    .work-grid, .skills, .stat-strip-in, .about-top {
        grid-template-columns:1fr
    }

    .stat {
        border-left: 0;
        border-top: 1px solid var(--rule-soft);
        padding-left: 0
    }

    .stat:first-child {
        border-top: 0
    }

    .lang {
        grid-template-columns:1fr;
        gap: 10px
    }

    .lang-n {
        text-align: left
    }

    .rel {
        grid-template-columns:auto 1fr;
        gap: 12px
    }

    .rel time {
        grid-column: 1 / -1
    }

    .rel .act {
        grid-column: 1 / -1;
        justify-content: flex-start
    }

    .tl-row {
        grid-template-columns:1fr;
        gap: 6px
    }

    .cs-id img {
        width: 46px;
        height: 46px
    }

    .foot-in {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px
    }

    .photo {
        max-width: 280px
    }

    .step {
        grid-template-columns:34px 1fr;
        gap: 14px
    }

    .deco-top {
        right: 70px;
        width: 70px
    }

    .deco-bottom {
        right: 49px;
        width: 110px
    }

    .nav-toggle {
        display: block
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: var(--pad);
        left: var(--pad);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--paper);
        border: 1px solid var(--rule);
        border-radius: var(--r-md);
        padding: 8px;
        box-shadow: var(--shadow);
        z-index: 50
    }

    .nav-links.open {
        display: flex
    }

    .nav-links a {
        padding: 12px 14px;
        font-size: 15px;
        text-align: left
    }
}
