/* =====================================================================
   Mohammed Marzouq — Portfolio
   Design system: "Editorial Engineer"
   Warm off-black · single acid-lime accent · condensed grotesk display
   · monospace micro-labels · hairline grid.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
    --bg: #0e0e0c;
    --bg-raised: #151512;
    --bg-sunken: #0a0a09;
    --ink: #f0ede4;
    --ink-soft: #c4c0b5;
    --muted: #8a867c;
    --faint: #57544d;
    --line: rgba(240, 237, 228, .1);
    --line-strong: rgba(240, 237, 228, .22);
    --accent: #c6f432;
    --accent-ink: #0e0e0c;
    --accent-soft: rgba(198, 244, 50, .12);

    --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
    --font-body: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --gutter: clamp(20px, 4vw, 56px);
    --maxw: 1480px;
    --nav-h: 68px;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img,
video,
svg,
iframe {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Film-grain overlay for an analog, printed feel */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
    opacity: .055;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #2a2a26;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ---------- Primitives ---------- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.display {
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -.005em;
    line-height: .88;
}

.accent {
    color: var(--accent);
}

.muted {
    color: var(--muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 300;
    padding: 10px 14px;
    background: var(--accent);
    color: var(--accent-ink);
    transform: translateY(-200%);
    transition: transform .2s;
}

.skip-link:focus {
    transform: none;
}

/* ---------- Buttons ---------- */
.btn {
    --h: 54px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    height: var(--h);
    padding: 0 24px;
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink);
    overflow: hidden;
    isolation: isolate;
    transition: color .35s var(--ease-out), border-color .35s var(--ease-out);
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ink);
    transform: translateY(101%);
    transition: transform .45s var(--ease-out);
}

.btn:hover::before {
    transform: none;
}

.btn:hover {
    color: var(--accent-ink);
    border-color: var(--ink);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.btn .arrow {
    display: inline-block;
    transition: transform .35s var(--ease-out);
}

.btn:hover .arrow {
    transform: translate(3px, -3px);
}

.btn-sm {
    --h: 40px;
    padding: 0 16px;
    font-size: 11.5px;
}

/* ---------- Progress bar ---------- */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 80;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
    pointer-events: none;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: background .4s, border-color .4s, backdrop-filter .4s;
}

.nav.is-scrolled {
    background: rgba(14, 14, 12, .78);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-color: var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: -.02em;
    transition: transform .5s var(--ease-out);
}

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

.brand-name {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 30px);
}

.nav-link {
    position: relative;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-block: 6px;
    transition: color .25s;
}

.nav-link sup {
    font-size: 9px;
    color: var(--faint);
    margin-right: 4px;
    vertical-align: top;
    position: relative;
    top: -.2em;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .4s var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--ink);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link.is-active {
    color: var(--accent);
}

.menu-btn {
    display: none;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.menu-btn .bars {
    display: grid;
    gap: 4px;
}

.menu-btn .bars i {
    display: block;
    width: 16px;
    height: 1.5px;
    background: currentColor;
}

/* Full-screen mobile menu */
.menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    padding: 20px var(--gutter) 32px;
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .7s var(--ease-in-out), visibility 0s linear .7s;
}

.menu.is-open {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path .7s var(--ease-in-out), visibility 0s;
}

.menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: calc(var(--nav-h) - 20px);
}

.menu-links {
    margin-top: auto;
    display: grid;
    gap: 2px;
}

.menu-links a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(44px, 12vw, 88px);
    line-height: .95;
    border-bottom: 1px solid var(--line);
    padding-block: 6px;
    transform: translateY(30px);
    opacity: 0;
    transition: transform .6s var(--ease-out), opacity .6s, color .2s;
}

.menu.is-open .menu-links a {
    transform: none;
    opacity: 1;
}

.menu.is-open .menu-links a:nth-child(2) { transition-delay: .04s; }
.menu.is-open .menu-links a:nth-child(3) { transition-delay: .08s; }
.menu.is-open .menu-links a:nth-child(4) { transition-delay: .12s; }
.menu.is-open .menu-links a:nth-child(5) { transition-delay: .16s; }
.menu.is-open .menu-links a:nth-child(6) { transition-delay: .2s; }
.menu.is-open .menu-links a:nth-child(7) { transition-delay: .24s; }
.menu.is-open .menu-links a:nth-child(8) { transition-delay: .28s; }

.menu-links a:hover {
    color: var(--accent);
}

.menu-links a span {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}

.menu-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding-top: calc(var(--nav-h) + 24px);
    padding-bottom: clamp(56px, 7vw, 104px);
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.hero-meta .accent {
    color: var(--accent);
}

.hero-name {
    margin-top: clamp(14px, 2vw, 28px);
    font-size: 12.6vw;
    /* JS fits this precisely to the container width */
    line-height: .84;
    white-space: nowrap;
    color: var(--ink);
}

.hero-name .fit {
    display: inline-block;
}

.hero-name .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: .07em;
    margin-bottom: -.07em;
}

.hero-name .w>span {
    display: inline-block;
    transform: translateY(105%);
    animation: rise 1.2s var(--ease-out) .1s forwards;
}

.hero-name .w:nth-child(2)>span {
    animation-delay: .22s;
}

@keyframes rise {
    to {
        transform: none;
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
    margin-top: clamp(32px, 4.5vw, 64px);
    align-items: end;
}

.hero-intro {
    grid-column: 1 / span 7;
}

.hero-role {
    font-size: clamp(22px, 2.5vw, 38px);
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: -.02em;
}

.hero-role em {
    font-style: normal;
    color: var(--accent);
}

.hero-lede {
    margin-top: 20px;
    max-width: 54ch;
    font-size: clamp(16px, 1.15vw, 19px);
    color: var(--ink-soft);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    color: var(--muted);
}

.status .dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.status .dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    animation: ping 2.2s var(--ease-out) infinite;
}

@keyframes ping {
    0% {
        transform: scale(.6);
        opacity: 1;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.hero-portrait {
    grid-column: 9 / span 4;
    position: relative;
}

.portrait-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--bg-raised);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.08) brightness(.95);
    transform: scale(1.04);
    transition: filter .8s var(--ease-out), transform 1.2s var(--ease-out);
}

.hero-portrait:hover .portrait-frame img {
    filter: grayscale(0) contrast(1.02);
    transform: scale(1);
}

.hero-portrait figcaption {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--muted);
}

.sticker {
    position: absolute;
    top: -40px;
    left: -44px;
    width: 124px;
    height: 124px;
    z-index: 2;
    pointer-events: none;
}

.sticker svg {
    width: 100%;
    height: 100%;
    animation: spin 22s linear infinite;
}

.sticker-core {
    position: absolute;
    inset: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    font-size: 30px;
    line-height: .8;
}

.sticker-core small {
    display: block;
    font-size: 13px;
    letter-spacing: .04em;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: clamp(48px, 6vw, 88px);
    border-top: 1px solid var(--line);
}

.stat {
    padding: 22px 20px 0;
    border-left: 1px solid var(--line);
}

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

.stat dt {
    color: var(--muted);
}

.stat dd {
    margin-top: 10px;
    font-size: clamp(44px, 5vw, 84px);
}

.stat dd sup {
    font-size: .45em;
    color: var(--accent);
    vertical-align: top;
    position: relative;
    top: .1em;
}

/* ---------- Marquee ---------- */
.marquee {
    background: var(--accent);
    color: var(--accent-ink);
    overflow: hidden;
    padding-block: 16px;
    user-select: none;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 48s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.marquee-group span {
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(30px, 3.6vw, 52px);
    line-height: 1;
    padding-inline: clamp(16px, 1.8vw, 28px);
    white-space: nowrap;
}

.marquee-group .sep {
    font-size: clamp(18px, 2vw, 28px);
    padding-inline: 0;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

/* ---------- Section scaffolding ---------- */
.section {
    padding-block: clamp(88px, 11vw, 168px);
}

.sec-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
    align-items: end;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: clamp(40px, 5vw, 72px);
}

.sec-index {
    grid-column: 1 / span 2;
    color: var(--accent);
    align-self: start;
}

.sec-title {
    grid-column: 3 / span 7;
    font-size: clamp(60px, 9vw, 148px);
}

.sec-kicker {
    grid-column: 10 / span 3;
    text-align: right;
    color: var(--muted);
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
}

.facts {
    grid-column: 1 / span 3;
    border-top: 1px solid var(--line-strong);
}

.facts div {
    display: grid;
    gap: 4px;
    padding-block: 16px;
    border-bottom: 1px solid var(--line);
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    font-size: 15px;
    color: var(--ink);
}

.about-body {
    grid-column: 5 / span 8;
}

.about-statement {
    font-size: clamp(24px, 2.7vw, 42px);
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: -.02em;
    color: var(--ink);
}

.about-statement strong {
    font-weight: 500;
    color: var(--accent);
}

.about-statement .dim {
    color: var(--muted);
}

.quirks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: clamp(32px, 4vw, 52px);
}

.quirk {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 14px;
    color: var(--ink-soft);
    transition: border-color .3s, color .3s, transform .4s var(--ease-out);
}

.quirk:hover {
    border-color: var(--accent);
    color: var(--ink);
    transform: translateY(-2px) rotate(-1.5deg);
}

/* ---------- Featured work ---------- */
.featured {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 20px var(--gutter);
    margin-bottom: clamp(72px, 9vw, 128px);
}

.feat {
    position: relative;
    display: flex;
    flex-direction: column;
}

.feat:nth-child(1) {
    grid-column: 1 / span 7;
    grid-row: 1 / span 2;
}

.feat:nth-child(2),
.feat:nth-child(3) {
    grid-column: 8 / span 5;
}

.feat-media {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 10;
}

.feat:nth-child(1) .feat-media {
    flex: 1;
    aspect-ratio: auto;
    min-height: 360px;
}

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

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

.feat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 6px 10px;
    background: var(--accent);
    color: var(--accent-ink);
}

.feat-num {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 2;
    color: var(--ink);
    mix-blend-mode: difference;
}

.feat-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 20px;
    padding-top: 16px;
}

.feat-title {
    font-size: clamp(26px, 2.6vw, 44px);
    transition: color .3s;
}

.feat:nth-child(1) .feat-title {
    font-size: clamp(32px, 3.6vw, 60px);
}

.feat:hover .feat-title {
    color: var(--accent);
}

.feat-year {
    color: var(--muted);
    align-self: start;
    padding-top: .3em;
}

.feat-desc {
    grid-column: 1 / -1;
    color: var(--ink-soft);
    font-size: 15px;
    max-width: 62ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stretch::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ---------- Filters ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ink-soft);
    transition: background .25s, color .25s, border-color .25s;
}

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

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

.chip .count {
    opacity: .55;
    font-size: 10.5px;
}

.filter-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
}

.clear-filter {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.clear-filter[hidden] {
    display: none;
}

.tag-drawer {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.tag-drawer summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 14px;
    cursor: pointer;
    list-style: none;
    color: var(--ink-soft);
}

.tag-drawer summary::-webkit-details-marker {
    display: none;
}

.tag-drawer summary .plus {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    transition: transform .35s var(--ease-out);
}

.tag-drawer[open] summary .plus {
    transform: rotate(45deg);
}

.tag-drawer .chips {
    padding-bottom: 18px;
}

.tag-drawer .chip {
    height: 30px;
    font-size: 10.5px;
    padding: 0 12px;
}

/* ---------- Project index ---------- */
.index-head {
    display: grid;
    grid-template-columns: 56px minmax(0, 5fr) minmax(0, 2fr) minmax(0, 3fr) 64px 28px;
    gap: 20px;
    padding-block: 14px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--faint);
}

.index-head span:nth-child(5) {
    text-align: right;
}

.row {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 5fr) minmax(0, 2fr) minmax(0, 3fr) 64px 28px;
    gap: 20px;
    align-items: center;
    padding-block: 22px;
    border-bottom: 1px solid var(--line);
    transition: background .35s;
}

.row::before {
    content: "";
    position: absolute;
    left: calc(var(--gutter) * -1);
    right: calc(var(--gutter) * -1);
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
    opacity: 0;
    transition: opacity .35s;
    pointer-events: none;
}

.row:hover::before {
    opacity: 1;
}

.row[hidden] {
    display: none;
}

.row.is-entering {
    animation: rowIn .6s var(--ease-out) both;
}

@keyframes rowIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

.row-idx {
    color: var(--muted);
}

.row-title {
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(24px, 2.5vw, 40px);
    line-height: .98;
    transition: color .3s, transform .5s var(--ease-out);
}

.row:hover .row-title {
    color: var(--accent);
    transform: translateX(10px);
}

.row-meta {
    display: contents;
}

.row-cat {
    color: var(--muted);
}

.row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    position: relative;
    z-index: 2;
    height: 24px;
    padding: 0 8px;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .2s, border-color .2s, background .2s;
}

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

.row-year {
    color: var(--ink-soft);
    text-align: right;
    font-family: var(--font-mono);
    font-size: 13px;
}

.row-arrow {
    font-size: 20px;
    color: var(--muted);
    text-align: right;
    transition: transform .45s var(--ease-out), color .3s;
}

.row:hover .row-arrow {
    color: var(--accent);
    transform: rotate(45deg);
}

.row-thumb {
    display: none;
}

.empty-state {
    padding: 48px 0;
    color: var(--muted);
}

/* Cursor-following preview (desktop only) */
.preview {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 45;
    width: clamp(280px, 24vw, 400px);
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-999px, -999px, 0);
    transition: opacity .3s var(--ease-out);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
    outline: 1px solid var(--line-strong);
}

.preview.is-on {
    opacity: 1;
}

.pv-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity .35s var(--ease-out), transform .7s var(--ease-out);
}

.pv-item.is-on {
    opacity: 1;
    transform: none;
}

@media (hover: none),
(pointer: coarse),
(max-width: 899px) {
    .preview {
        display: none;
    }
}

/* ---------- Open source ---------- */
.oss-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.oss {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    min-height: 280px;
    border: 1px solid var(--line);
    background: var(--bg-raised);
    transition: border-color .35s, transform .5s var(--ease-out);
}

.oss:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px);
}

.oss-media {
    position: relative;
    overflow: hidden;
    background: #000;
}

.oss-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s var(--ease-out);
}

.oss:hover .oss-media img {
    transform: scale(1.06);
}

.oss-media.typo {
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--accent);
    color: var(--accent-ink);
    text-align: center;
}

.oss-media.typo span {
    font-size: clamp(30px, 2.8vw, 44px);
    line-height: .9;
    transition: transform .6s var(--ease-out);
}

.oss:hover .oss-media.typo span {
    transform: rotate(-3deg) scale(1.04);
}

.oss-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(20px, 2vw, 28px);
}

.oss-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--muted);
}

.oss-meta .accent {
    color: var(--accent);
}

.oss-title {
    font-size: clamp(26px, 2.2vw, 36px);
    transition: color .3s;
}

.oss:hover .oss-title {
    color: var(--accent);
}

.oss-desc {
    color: var(--ink-soft);
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oss-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
}

.oss-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.oss-tags span {
    height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    color: var(--muted);
}

.oss-link {
    position: relative;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    transition: background .25s, color .25s, border-color .25s;
}

.oss-link:hover {
    background: var(--ink);
    color: var(--accent-ink);
    border-color: var(--ink);
}

/* ---------- Recommendations ---------- */
.kudos {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
}

.quote-feature {
    grid-column: 1 / span 8;
    position: relative;
}

.quote-mark {
    display: block;
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 900;
    font-size: clamp(120px, 14vw, 220px);
    line-height: .6;
    height: .42em;
    color: var(--accent);
}

.quote-feature p {
    font-size: clamp(28px, 3.5vw, 56px);
    line-height: 1.08;
    letter-spacing: -.025em;
    font-weight: 500;
}

.cite {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    font-size: 18px;
}

.cite strong {
    display: block;
    font-weight: 600;
    font-size: 15px;
}

.cite span {
    color: var(--muted);
}

.rating {
    grid-column: 10 / span 3;
    align-self: start;
    border: 1px solid var(--line);
    padding: 28px;
    background: var(--bg-raised);
}

.rating-score {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 14px;
}

.rating-score b {
    font-size: clamp(88px, 8vw, 128px);
    line-height: .8;
}

.rating-score span {
    color: var(--muted);
    font-family: var(--font-mono);
}

.stars {
    display: flex;
    gap: 4px;
    margin-top: 14px;
    color: var(--accent);
    font-size: 15px;
}

.rating p {
    margin-top: 16px;
    color: var(--ink-soft);
    font-size: 15px;
}

.rating a {
    display: inline-flex;
    margin-top: 20px;
    color: var(--accent);
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.quote-list {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(40px, 5vw, 72px);
    border-top: 1px solid var(--line);
}

.quote-sm {
    display: flex;
    flex-direction: column;
    padding: 28px var(--gutter) 0 0;
}

.quote-sm+.quote-sm {
    padding-left: var(--gutter);
    border-left: 1px solid var(--line);
}

.quote-sm p {
    font-size: 18px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.quote-sm .cite {
    margin-top: auto;
    padding-top: 24px;
}

/* ---------- Awards ---------- */
.award {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
    align-items: start;
}

.award-text {
    grid-column: 1 / span 5;
}

.award-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    background: var(--accent);
    color: var(--accent-ink);
}

.award-title {
    margin-top: 22px;
    font-size: clamp(40px, 4.6vw, 76px);
}

.award-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 18px;
    color: var(--muted);
}

.award-lede {
    margin-top: 28px;
    font-size: 18px;
    color: var(--ink-soft);
}

.award-more {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .6s var(--ease-out);
}

.award-more.is-open {
    grid-template-rows: 1fr;
}

.award-more>div {
    overflow: hidden;
}

.award-more p {
    margin-top: 18px;
    color: var(--ink-soft);
}

.built {
    margin-top: 24px;
    padding: 4px 0 4px 20px;
    border-left: 2px solid var(--accent);
}

.built h4 {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--accent);
}

.built p {
    margin-top: 10px;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    color: var(--accent);
}

.toggle .plus {
    display: inline-block;
    font-size: 16px;
    transition: transform .35s var(--ease-out);
}

.toggle[aria-expanded="true"] .plus {
    transform: rotate(45deg);
}

.award-media {
    grid-column: 7 / span 6;
}

.carousel {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
}

.carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1s var(--ease-out), transform 6s linear;
}

.carousel img.is-active {
    opacity: 1;
    transform: scale(1);
}

.carousel-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
}

.carousel-count {
    color: var(--muted);
}

.carousel-count b {
    color: var(--ink);
    font-weight: 500;
}

.carousel-track {
    position: relative;
    height: 1px;
    background: var(--line-strong);
    overflow: hidden;
}

.carousel-track i {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
}

.carousel-btns {
    display: flex;
    gap: 6px;
}

.carousel-btns button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    transition: background .25s, color .25s, border-color .25s;
}

.carousel-btns button:hover {
    background: var(--ink);
    color: var(--accent-ink);
    border-color: var(--ink);
}

.li-embed {
    position: relative;
    margin-top: 28px;
    padding-top: 79%;
    border: 1px solid var(--line);
    background: var(--bg-raised);
}

.li-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Skills & certs ---------- */
.skills {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
}

.stack {
    grid-column: 1 / span 6;
}

.certs {
    grid-column: 8 / span 5;
}

.col-title {
    display: flex;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--muted);
}

.stack-group {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding-block: 24px;
    border-bottom: 1px solid var(--line);
}

.stack-group dt {
    color: var(--muted);
    padding-top: .5em;
}

.stack-group:first-of-type dt {
    color: var(--accent);
}

.stack-group dd {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
}

.stack-group dd span {
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(24px, 2.4vw, 38px);
    line-height: 1.05;
    transition: color .25s;
}

.stack-group dd span:hover {
    color: var(--accent);
}

.stack-group dd span:not(:last-child)::after {
    content: "/";
    color: var(--faint);
    margin-inline: .3em;
}

.stack-group dd small {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    vertical-align: super;
    margin-left: 4px;
}

.cert-list li {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 14px;
    align-items: baseline;
    padding-block: 14px;
    border-bottom: 1px solid var(--line);
    transition: padding .4s var(--ease-out);
}

.cert-list li:hover {
    padding-left: 8px;
}

.cert-list .n {
    color: var(--faint);
}

.cert-list strong {
    display: block;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
}

.cert-list em {
    font-style: normal;
    font-size: 13.5px;
    color: var(--muted);
}

.cert-list .cat {
    color: var(--muted);
    font-size: 10.5px;
}

.cert-list .is-key strong {
    color: var(--accent);
}

.cert-list .is-key .cat {
    padding: 3px 7px;
    background: var(--accent);
    color: var(--accent-ink);
}

/* ---------- Articles ---------- */
.article {
    position: relative;
    display: grid;
    grid-template-columns: 140px minmax(0, 6fr) minmax(0, 3fr) 28px;
    gap: 20px;
    align-items: center;
    padding-block: 28px;
    border-bottom: 1px solid var(--line);
}

.article:first-child {
    border-top: 1px solid var(--line-strong);
}

.article-date {
    color: var(--muted);
}

.article-title {
    font-size: clamp(26px, 2.8vw, 46px);
    transition: color .3s, transform .5s var(--ease-out);
}

.article:hover .article-title {
    color: var(--accent);
    transform: translateX(10px);
}

.article-desc {
    font-size: 14.5px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article .row-arrow {
    font-size: 20px;
}

.article:hover .row-arrow {
    color: var(--accent);
    transform: rotate(45deg);
}

/* ---------- Contact / footer ---------- */
.contact {
    position: relative;
    padding-top: clamp(96px, 12vw, 180px);
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.contact-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    color: var(--muted);
}

.contact-kicker .accent {
    color: var(--accent);
}

.contact-title {
    margin-top: 24px;
    font-size: clamp(72px, 13.5vw, 240px);
    line-height: .82;
}

.contact-title .accent {
    color: var(--accent);
}

.mail-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: clamp(32px, 4vw, 56px);
}

.mail {
    font-size: clamp(24px, 3.2vw, 48px);
    font-weight: 500;
    letter-spacing: -.02em;
    background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat,
        linear-gradient(var(--line-strong), var(--line-strong)) 0 100% / 100% 2px no-repeat;
    padding-bottom: 6px;
    transition: background-size .6s var(--ease-out), color .3s;
}

.mail:hover {
    background-size: 100% 2px, 100% 2px;
    color: var(--accent);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink-soft);
    transition: background .25s, color .25s, border-color .25s;
}

.copy-btn:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.copy-btn.is-done {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gutter);
    margin-top: clamp(64px, 8vw, 120px);
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.contact-grid h3 {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--muted);
    margin-bottom: 14px;
}

.contact-grid li+li {
    margin-top: 8px;
}

.contact-grid a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color .25s;
}

.contact-grid a:hover {
    color: var(--accent);
}

.contact-grid a i {
    width: 16px;
    color: var(--muted);
    transition: color .25s;
}

.contact-grid a:hover i {
    color: var(--accent);
}

.contact-grid p,
.contact-grid li {
    color: var(--ink-soft);
}

.clock {
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    font-size: 44px;
    line-height: 1;
    color: var(--ink);
}

.footer-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    margin-top: clamp(56px, 7vw, 96px);
    padding-block: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-bar a:hover {
    color: var(--accent);
}

/* ---------- Scroll reveal ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1100px) {
    .nav-links {
        display: none;
    }

    .menu-btn {
        display: inline-flex;
    }

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

    .index-head,
    .row {
        grid-template-columns: 48px minmax(0, 5fr) minmax(0, 3fr) 56px 24px;
    }

    .index-head span:nth-child(3),
    .row-cat {
        display: none;
    }

    .index-head span:nth-child(5) {
        text-align: right;
    }
}

@media (max-width: 899px) {

    .hero-intro,
    .hero-portrait,
    .facts,
    .about-body,
    .quote-feature,
    .rating,
    .award-text,
    .award-media,
    .stack,
    .certs {
        grid-column: 1 / -1;
    }

    .hero-portrait {
        max-width: 420px;
        margin-top: 24px;
        margin-left: 28px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat:nth-child(3) {
        border-left: 0;
        padding-left: 0;
    }

    .stat:nth-child(n+3) {
        margin-top: 24px;
        border-top: 1px solid var(--line);
    }

    .sec-index,
    .sec-title,
    .sec-kicker {
        grid-column: 1 / -1;
        text-align: left;
    }

    .sec-head {
        gap: 10px;
    }

    .facts {
        order: 2;
    }

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

    .feat:nth-child(n) {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .feat:nth-child(1) .feat-media {
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    .index-head {
        display: none;
    }

    .row {
        grid-template-columns: 104px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb title year"
            "thumb meta meta";
        gap: 8px 16px;
        padding-block: 16px;
        align-items: start;
    }

    .row-idx,
    .row-arrow {
        display: none;
    }

    .row-thumb {
        grid-area: thumb;
        display: block;
        position: relative;
        aspect-ratio: 4 / 3;
        overflow: hidden;
        background: #000;
    }

    .row-thumb img,
    .row-thumb video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .row-title {
        grid-area: title;
        font-size: 22px;
    }

    .row:hover .row-title {
        transform: none;
    }

    .row-year {
        grid-area: year;
        font-size: 12px;
    }

    .row-meta {
        grid-area: meta;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .row-cat {
        display: none;
    }

    .quote-list {
        grid-template-columns: 1fr;
    }

    .quote-sm,
    .quote-sm+.quote-sm {
        padding: 28px 0;
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }

    .rating {
        margin-top: 12px;
    }

    .certs {
        margin-top: 40px;
    }

    .article {
        grid-template-columns: 1fr 24px;
        gap: 8px 16px;
    }

    .article-date {
        grid-column: 1 / -1;
    }

    .article-desc {
        grid-column: 1;
    }

    .article .row-arrow {
        grid-column: 2;
        grid-row: 2;
    }

    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 40px;
    }
}

@media (max-width: 640px) {
    .hero-name {
        white-space: normal;
    }

    .hero-name .w {
        display: block;
    }

    .hero-meta span:nth-child(2) {
        display: none;
    }

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

    .oss-media {
        aspect-ratio: 16 / 9;
    }

    .stack-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .brand-name {
        display: none;
    }

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

    .sticker {
        width: 100px;
        height: 100px;
        top: -30px;
        left: -26px;
    }

    .sticker-core {
        inset: 21px;
        font-size: 24px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .marquee-track {
        animation: none;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}
