/* ==========================================================================
   Tuncay KELES - Portfolio
   Dark, single theme by brand choice. Accent: #c4ff23.
   Shape rule: interactive controls are full pills, media is square-edged.
   ========================================================================== */

:root {
    --bg: #080808;
    --bg-raised: #121212;
    --fg: #f3f3ee;
    --fg-muted: rgba(243, 243, 238, .58);
    --fg-faint: rgba(243, 243, 238, .34);
    --line: rgba(243, 243, 238, .14);
    --line-strong: rgba(243, 243, 238, .32);
    --accent: #c4ff23;
    --accent-ink: #080808;

    --font-display: "Gloock", "Georgia", serif;
    --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    --pad: clamp(20px, 2.7vw, 44px);
    --header-h: 72px;

    --ease: cubic-bezier(.16, 1, .3, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
    --dur: .7s;
    --dur-fast: .22s;

    /* z-index scale */
    --z-header: 65;
    --z-preview: 30;
    --z-menu: 60;
    --z-toast: 70;
    --z-grain: 90;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
}

html.lenis, html.lenis body { height: auto; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

/* Film grain, fixed and non-interactive so it never repaints with scroll */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: var(--z-grain);
    pointer-events: none;
    opacity: .06;
    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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol, dl, dd, p, h1, h2, h3 { margin: 0; padding: 0; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

main:focus { outline: none; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px; left: 12px;
    z-index: calc(var(--z-menu) + 1);
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.split { display: inline; }
.split-word { display: inline-block; white-space: nowrap; }
.char { display: inline-block; will-change: transform; }

.eyebrow {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: var(--z-header);
    transition: transform .5s var(--ease), background-color .4s ease, border-color .4s ease;
    border-bottom: 1px solid transparent;
}

.site-header.is-solid {
    background: rgba(8, 8, 8, .72);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom-color: var(--line);
}

.site-header.is-hidden { transform: translateY(-100%); }

.site-header__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: var(--header-h);
    padding: 0 var(--pad);
}

.brand {
    justify-self: start;
    font-family: var(--font-display);
    font-size: 21px;
    line-height: 1;
    letter-spacing: -.01em;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .4s ease, transform .5s var(--ease);
}
.site-header.is-solid .brand { opacity: 1; transform: none; }
.brand span { color: var(--fg-muted); }

.nav__list { display: flex; align-items: center; }

.nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 500;
    color: var(--fg);
}
.nav__link .ph { font-size: 13px; color: var(--fg-muted); transition: transform var(--dur-fast) var(--ease), color var(--dur-fast); }
.nav__link::after {
    content: "";
    position: absolute;
    left: 22px; right: 22px; bottom: 4px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .45s var(--ease);
}
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link:hover .ph { transform: translate(2px, -2px); color: var(--accent); }

.pill {
    justify-self: end;
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--dur-fast) var(--ease);
}
.pill::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--fg);
    border-radius: inherit;
    transform: translateY(101%);
    transition: transform .45s var(--ease);
}
.pill:hover::before { transform: translateY(0); }
.pill:active { transform: scale(.97); }
.pill__label { display: inline-block; }

.menu-toggle {
    display: none;
    width: 44px; height: 44px;
    margin-left: -10px;
    position: relative;
}
.menu-toggle__line {
    position: absolute;
    left: 11px;
    width: 22px; height: 1.5px;
    background: var(--fg);
    transition: transform .4s var(--ease), top .4s var(--ease);
}
.menu-toggle__line:nth-child(1) { top: 17px; }
.menu-toggle__line:nth-child(2) { top: 26px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* Mobile panel */
.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-menu) - 1);
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    transition: opacity .4s ease;
}
.menu-backdrop.is-open { opacity: 1; }

.mobile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: var(--z-menu);
    width: min(86vw, 380px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--header-h) + 32px) 28px 36px;
    background: var(--bg-raised);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .6s var(--ease), visibility 0s linear .6s;
}
.mobile-menu.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .6s var(--ease), visibility 0s;
}
.mobile-menu__list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-family: var(--font-display);
    font-size: 44px;
    line-height: 1.1;
}
.mobile-menu__list .ph { font-size: 22px; color: var(--accent); }
.mobile-menu.is-open .mobile-menu__list li { animation: fadeUp .6s var(--ease) both; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(2) { animation-delay: .06s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(3) { animation-delay: .12s; }
.mobile-menu__mail { font-size: 15px; color: var(--fg-muted); word-break: break-all; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: #1a1d1f;
}

.hero__media {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 53% 28%;
    animation: heroZoom 2.4s var(--ease) both;
}

.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 8, 8, .55) 0%, rgba(8, 8, 8, 0) 18%),
        linear-gradient(0deg, var(--bg) 0%, rgba(8, 8, 8, .7) 22%, rgba(8, 8, 8, 0) 52%);
}

.hero__content {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 20rem) auto;
    align-items: end;
    column-gap: clamp(24px, 5vw, 96px);
    padding: 0 var(--pad) clamp(28px, 3.6vw, 56px);
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(76px, 13.2vw, 236px);
    line-height: .86;
    letter-spacing: -.025em;
}

.hero__line {
    display: block;
    overflow: hidden;
    padding: .02em 0 .06em;
    margin-bottom: -.06em;
}

.hero__title .char {
    animation: charUp 1.1s var(--ease) both;
    animation-delay: calc(.2s + var(--i) * 45ms);
}

.hero__role {
    display: grid;
    gap: 2px;
    padding-bottom: .5em;
    font-size: clamp(16px, 1.3vw, 20px);
    line-height: 1.5;
}
.hero__role-main { font-weight: 500; }
.hero__role-sub { color: var(--fg-muted); }
.hero__role-sep { display: none; }

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0 calc(.5em + 10px);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.hero__cta-line {
    width: 48px;
    height: 1px;
    background: currentColor;
    transition: width .5s var(--ease), background-color var(--dur-fast);
}
.hero__cta:hover .hero__cta-line { width: 80px; background: var(--accent); }
.hero__cta:hover { color: var(--accent); }

.fade-in { animation: fadeUp 1s var(--ease) both; animation-delay: var(--d, 0s); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about { padding: clamp(96px, 13vw, 200px) var(--pad) clamp(80px, 10vw, 160px); }

.about__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 32px;
}
.about__inner .eyebrow { padding-top: .9em; }

.about__text {
    max-width: 24em;
    font-size: clamp(27px, 3.5vw, 56px);
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -.025em;
}

.stats {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 0 clamp(20px, 2.5vw, 40px);
    margin-top: clamp(80px, 10vw, 150px);
}
.stats__item {
    display: grid;
    align-content: start;
    gap: clamp(20px, 2.4vw, 36px);
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.stats__label { font-size: 14px; color: var(--fg-muted); }
.stats__value {
    font-family: var(--font-display);
    font-size: clamp(64px, 7.4vw, 128px);
    line-height: .85;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}
.stats__value.stats__value--list {
    display: grid;
    gap: 4px;
    font-family: var(--font-body);
    font-size: clamp(20px, 1.9vw, 28px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.01em;
}

/* --------------------------------------------------------------------------
   Portfolio
   -------------------------------------------------------------------------- */

.portfolio { padding: clamp(80px, 9vw, 150px) var(--pad) clamp(80px, 8vw, 130px); }

.portfolio__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(46px, 7.6vw, 132px);
    line-height: .95;
    letter-spacing: -.025em;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: clamp(32px, 3.6vw, 52px);
}

.filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease);
}
.filter sup { font-size: 10px; color: var(--fg-muted); transform: translateY(-2px); }
.filter:hover { border-color: var(--fg); }
.filter:active { transform: scale(.97); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filter.is-active sup { color: var(--accent-ink); opacity: .6; }

.projects { margin-top: clamp(48px, 6vw, 96px); }

.projects__labels,
.project__link {
    display: grid;
    grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.3fr) minmax(0, 1.1fr) 72px 48px;
    align-items: center;
    column-gap: 24px;
}

.projects__labels {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-strong);
    font-size: 13px;
    color: var(--fg-faint);
}
.projects__labels span:nth-child(4) { grid-column: 4 / span 2; }

.project { position: relative; }
.project::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: var(--line);
    transform-origin: left;
}
.project.is-hidden { display: none; }

.project__link {
    position: relative;
    padding: 24px 0;
    min-height: 80px;
    transition: opacity .35s ease;
}

.project__link::before {
    content: "";
    position: absolute;
    inset: 0 calc(var(--pad) * -1);
    background: rgba(243, 243, 238, .035);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.project__name {
    font-family: var(--font-display);
    font-size: clamp(22px, 1.9vw, 30px);
    line-height: 1.15;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
    transition: transform .5s var(--ease), color var(--dur-fast);
}
.project__cat,
.project__tech,
.project__year {
    font-size: 16px;
    line-height: 26px;
    color: var(--fg-muted);
    transition: color var(--dur-fast);
}
.project__year { font-variant-numeric: tabular-nums; }

.project__arrow {
    justify-self: end;
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 17px;
    transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform .5s var(--ease);
}

@media (hover: hover) {
    .projects__list:hover .project__link { opacity: .32; }
    .projects__list .project__link:hover { opacity: 1; }
}
.project__link:hover::before,
.project__link:focus-visible::before { opacity: 1; }
.project__link:hover .project__name,
.project__link:focus-visible .project__name { transform: translateX(14px); }
.project__link:hover :is(.project__cat, .project__tech, .project__year) { color: var(--fg); }
.project__link:hover .project__arrow,
.project__link:focus-visible .project__arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    transform: rotate(45deg);
}
.project__link:focus-visible { outline-offset: -2px; }

.projects__empty { padding: 40px 0; color: var(--fg-muted); }


/* Floating screenshot that follows the cursor over project rows */
.preview {
    position: fixed;
    top: 0; left: 0;
    z-index: var(--z-preview);
    width: clamp(280px, 24vw, 420px);
    aspect-ratio: 16 / 10;
    pointer-events: none;
    visibility: hidden;
}
.preview__inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-raised);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
    clip-path: inset(50% 50% 50% 50%);
    transition: clip-path .6s var(--ease);
}
.preview.is-visible .preview__inner { clip-path: inset(0 0 0 0); }
.preview__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transform: scale(1.15);
    transition: transform .9s var(--ease), opacity .3s ease;
}
.preview.is-visible .preview__img { transform: scale(1); }
.preview__img.is-loading { opacity: 0; }
.preview.is-fallback .preview__img { opacity: 0; }

/* Shown while a screenshot loads, or when the capture service has none */
.preview__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 24px;
    background: var(--accent);
    color: var(--accent-ink);
}
.preview__inner { position: relative; }
.preview__fallback-name {
    font-family: var(--font-display);
    font-size: clamp(26px, 2.2vw, 36px);
    line-height: 1.05;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}
.preview__fallback-meta { font-size: 13px; font-weight: 600; letter-spacing: .04em; }

@media (hover: none) { .preview { display: none; } }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: end;
    gap: 48px clamp(32px, 6vw, 120px);
    margin: 0 var(--pad);
    padding: clamp(80px, 10vw, 160px) 0;
    border-top: 1px solid var(--line);
}

.contact__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(48px, 7.2vw, 128px);
    line-height: .95;
    letter-spacing: -.025em;
}

.contact__body { display: grid; gap: 28px; justify-items: start; }
.contact__text { max-width: 30ch; font-size: 18px; color: var(--fg-muted); }

.contact__mail-row { display: flex; align-items: center; gap: 14px; max-width: 100%; }

.contact__mail {
    font-size: clamp(22px, 2.3vw, 36px);
    font-weight: 500;
    letter-spacing: -.02em;
    line-height: 1.3;
    overflow-wrap: anywhere;
    background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
    transition: background-size .5s var(--ease), color var(--dur-fast);
}
.contact__mail:hover { color: var(--accent); background-size: 0 1px; background-position: right bottom; }

.icon-btn {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 48px; height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 18px;
    transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-btn:active { transform: scale(.94); }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--fg-muted);
    transition: color var(--dur-fast);
}
.text-link .ph { transition: transform var(--dur-fast) var(--ease); }
.text-link:hover { color: var(--fg); }
.text-link:hover .ph { transform: translate(2px, -2px); color: var(--accent); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { padding: 0 var(--pad); overflow: hidden; }

.site-footer__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--fg-muted);
}
.site-footer__name { color: var(--fg); font-weight: 500; }
.site-footer__links { display: flex; gap: 28px; }
.site-footer__links a, .to-top { transition: color var(--dur-fast); }
.site-footer__links a:hover, .to-top:hover { color: var(--fg); }
.to-top { display: inline-flex; align-items: center; gap: 8px; }
.to-top .ph { transition: transform var(--dur-fast) var(--ease); }
.to-top:hover .ph { transform: translateY(-3px); color: var(--accent); }

.site-footer__mark {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 32vw;
    line-height: .8;
    letter-spacing: -.045em;
    text-align: center;
    white-space: nowrap;
    padding-top: .06em;
    margin: 0 calc(var(--pad) * -1);
}
.site-footer__mark-inner { display: inline-block; transform-origin: 50% 100%; }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: var(--z-toast);
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
    transition: opacity .3s ease, transform .5s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Scroll reveals (only hidden once JS confirms motion is allowed)
   -------------------------------------------------------------------------- */

.motion .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .9s var(--ease), transform 1.1s var(--ease);
}
.motion .reveal.is-in { opacity: 1; transform: none; }

.motion .reveal-title .split-word { overflow: hidden; padding-bottom: .2em; margin-bottom: -.2em; vertical-align: top; }
.motion .reveal-title .char {
    transform: translateY(105%);
    transition: transform 1s var(--ease);
    transition-delay: calc(var(--i) * 22ms);
}
.motion .reveal-title.is-in .char { transform: none; }

.motion .project::after { transform: scaleX(0); transition: transform 1.2s var(--ease-in-out); }
.motion .project.is-in::after { transform: scaleX(1); }
.motion .project .project__link > span:not(.project__arrow) {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s ease, transform .9s var(--ease), color var(--dur-fast);
}
.motion .project.is-in .project__link > span { opacity: 1; transform: none; }
.motion .project.is-in .project__name { transition: opacity .7s ease, transform .5s var(--ease), color var(--dur-fast); }
.motion .project.is-in .project__cat { transition-delay: .06s; }
.motion .project.is-in .project__tech { transition-delay: .12s; }
.motion .project.is-in .project__year { transition-delay: .18s; }
.motion .project.is-in .project__link:hover > span { transition-delay: 0s; }

.words-ready [data-words] .word { opacity: .16; }

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes charUp {
    from { transform: translateY(110%); }
    to   { transform: translateY(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
@keyframes heroZoom {
    from { transform: scale(1.14); filter: brightness(.6); }
    to   { transform: scale(1); filter: brightness(1); }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .hero__content { grid-template-columns: minmax(0, 1fr) auto; row-gap: 20px; }
    .hero__title { grid-column: 1 / -1; }
    .projects__labels,
    .project__link { grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1fr) 56px 44px; column-gap: 16px; }
}

@media (max-width: 860px) {
    :root { --header-h: 64px; }

    .site-header__bar { grid-template-columns: auto 1fr auto; }
    .menu-toggle { display: block; }
    .nav { display: none; }
    .brand { justify-self: center; font-size: 18px; }
    .pill { height: 38px; padding: 0 16px; font-size: 14px; }

    .about__inner { grid-template-columns: 1fr; gap: 24px; }
    .about__inner .eyebrow { padding-top: 0; }

    .stats { grid-template-columns: 1fr 1fr; row-gap: 48px; }
    .stats__item--wide { grid-column: 1 / -1; }

    .contact { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .hero { min-height: 100svh; }
    .hero__img { object-position: 54% 50%; }
    .hero__media::after {
        background:
            linear-gradient(180deg, rgba(8, 8, 8, .6) 0%, rgba(8, 8, 8, 0) 16%),
            linear-gradient(0deg, var(--bg) 0%, rgba(8, 8, 8, .8) 26%, rgba(8, 8, 8, 0) 56%);
    }
    .hero__content {
        grid-template-columns: 1fr;
        row-gap: 14px;
        padding-bottom: max(32px, env(safe-area-inset-bottom));
    }
    .hero__title { font-size: clamp(64px, 21vw, 120px); }
    .hero__role { padding-bottom: 0; }
    .hero__cta { justify-self: end; padding-bottom: 0; }

    .projects__labels { display: none; }
    .project__link {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "name year"
            "meta meta";
        row-gap: 6px;
        padding: 22px 0;
    }
    .project__name { grid-area: name; font-size: 24px; }
    .project__year { grid-area: year; align-self: start; padding-top: 2px; }
    .project__cat { grid-area: meta; }
    .project__tech { grid-area: meta; justify-self: end; }
    .project__arrow { display: none; }
    .project__link:hover .project__name { transform: none; }
    .project__link::before { inset: 0 calc(var(--pad) * -1); }

    .filters { gap: 8px; }
    .filter { height: 38px; padding: 0 14px; font-size: 13px; }

    .site-footer__row { justify-content: flex-start; }
    .to-top { margin-left: auto; }
}

@media (max-width: 420px) {
    .site-footer__links { gap: 18px; }
    .site-footer__name { width: 100%; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }
}
