/* ============================================================================
   PORTFOLIO — DANIEL PAULY RETRAUBUN
   Modern CSS, no frameworks. Built from cssshowcase.com/snippets patterns.

   Snippet credits by category:
   ─ Layout & Grid ......... auto-responsive grid, split navigation, flow/cluster
   ─ UI Components ......... basic card, primary button, hamburger menu, timeline,
                             chip/tag, switch/toggle, floating action button
   ─ Animation & Motion .... fade-in on scroll (scroll-driven), lift with shadow,
                             animated gradient background, float, icon slide,
                             underline slide-in
   ─ Color & Theming ....... design system palette in OKLCH, light-dark(),
                             gradient text, modern glassmorphism, OKLCH gradients
   ─ Typography ............ fluid typography (clamp), optimal reading measure,
                             text-wrap balance/pretty, typography reset
   ─ Accessibility ......... skip link, focus-visible ring, reduced motion,
                             prefers-reduced-transparency, sr-only
   ============================================================================ */

/* ============================================================================
   1. DESIGN TOKENS — OKLCH palette + light-dark() theming
   ============================================================================ */

:root {
    /* Opt in to both color schemes (required for light-dark()) */
    color-scheme: light dark;

    /* --- OKLCH brand palette (10-step, one hue angle) ---
     Design system palette in OKLCH — change --hue to re-theme */
    --hue: 235;
    --color-50: oklch(0.97 0.02 var(--hue));
    --color-100: oklch(0.93 0.04 var(--hue));
    --color-200: oklch(0.85 0.08 var(--hue));
    --color-300: oklch(0.77 0.12 var(--hue));
    --color-400: oklch(0.69 0.16 var(--hue));
    --color-500: oklch(0.61 0.19 var(--hue));
    --color-600: oklch(0.52 0.19 var(--hue));
    --color-700: oklch(0.44 0.17 var(--hue));
    --color-800: oklch(0.35 0.13 var(--hue));
    --color-900: oklch(0.27 0.09 var(--hue));

    /* Brand pair (sky blue → indigo) */
    --brand: oklch(0.62 0.17 235);
    --brand-2: oklch(0.55 0.22 275);
    --brand-gradient: linear-gradient(135deg, var(--brand), var(--brand-2));

    /* Semantic tokens via light-dark() — no @media blocks needed */
    --bg: light-dark(oklch(0.985 0.005 240), oklch(0.15 0.02 250));
    --surface: light-dark(oklch(0.995 0.002 240), oklch(0.21 0.025 250));
    --surface-2: light-dark(oklch(0.97 0.012 240), oklch(0.24 0.03 250));
    --text: light-dark(oklch(0.26 0.03 250), oklch(0.93 0.01 240));
    --muted: light-dark(oklch(0.52 0.025 250), oklch(0.66 0.02 250));
    --border: light-dark(oklch(0.9 0.02 240), oklch(0.32 0.03 250));
    --on-accent: white;

    /* OKLCH shadows */
    --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.12);
    --shadow-md: 0 2px 8px oklch(0 0 0 / 0.2);
    --shadow-lg: 0 8px 24px oklch(0 0 0 / 0.35);
    --shadow-brand: 0 12px 40px oklch(0.62 0.17 235 / 0.35);

    /* Radius scale */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Spacing scale (4px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Fluid type scale (Major Third, clamp()) */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.12rem + 0.65vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.45rem + 2.1vw, 2.75rem);
    --text-4xl: clamp(2.25rem, 1.55rem + 3.5vw, 3.75rem);

    /* Motion tokens */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 0.15s;
    --dur: 0.25s;
    --dur-slow: 0.45s;

    --measure: 65ch;
    /* optimal reading measure */
}

/* Manual override via data-theme attribute (set by the tiny theme script) */
:root[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

/* ============================================================================
   2. RESET — modern CSS reset + typography reset
   ============================================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100dvh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

ul[role="list"],
ol[role="list"] {
    list-style: none;
    padding: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.1;
    font-weight: 800;
    text-wrap: balance;
    letter-spacing: -0.02em;
}

p {
    text-wrap: pretty;
    max-width: var(--measure);
}

a {
    color: var(--brand);
}

a:hover {
    color: var(--brand-2);
}

/* ============================================================================
   3. UTILITIES — container, flow, cluster, gradient-text, sr-only
   ============================================================================ */

.container {
    width: min(100% - 2.5rem, 72rem);
    margin-inline: auto;
}

/* Flow utility — vertical rhythm between siblings */
.flow>*+* {
    margin-top: var(--space-4);
}

/* Cluster utility — horizontal wrap + gap */
.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

/* Gradient text (background-clip) */
.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Visually hidden — screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ============================================================================
   4. ACCESSIBILITY — skip link + global focus ring
   ============================================================================ */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.5rem;
    background: var(--color-600);
    color: var(--color-50);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 0 0 0.5rem 0.5rem;
    text-decoration: none;
    transition: top var(--dur-fast) ease;
}

.skip-link:focus-visible {
    top: 0;
    outline: 3px solid var(--color-300);
    outline-offset: 2px;
}

/* Keyboard-only focus ring */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ============================================================================
   5. HEADER / NAVIGATION — split navigation + CSS-only hamburger
   ============================================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    /* modern glassmorphism */
    background: light-dark(oklch(0.995 0.002 240 / 0.75), oklch(0.15 0.02 250 / 0.7));
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid var(--border);
}

.navbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: 0.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.brand-logo {
    width: min(9rem, 40%);
    filter: drop-shadow(0 2px 8px oklch(0.62 0.17 235 / 0.35));
}

/* Hamburger — hidden checkbox + label, morphs into an X */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    cursor: pointer;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle:checked+.hamburger-btn .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle:checked+.hamburger-btn .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked+.hamburger-btn .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
    display: none;
}

.nav-list {
    display: flex;
    gap: var(--space-5);
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Animated underline link (underline slide-in) */
.nav-link {
    position: relative;
    display: inline-block;
    padding-block: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 0;
    height: 2px;
    background: var(--brand-gradient);
    border-radius: 2px;
    transition: left 0.3s var(--ease-out), right 0.3s var(--ease-out);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
    left: 0;
    right: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Mobile menu */
@media (width < 64rem) {
    .nav-menu {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 1rem;
        right: 1rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: var(--space-4);
        box-shadow: var(--shadow-lg);
    }

    .nav-toggle:checked~.nav-menu {
        display: block;
        animation: drop-in var(--dur) var(--ease-out) both;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-link {
        display: block;
    }

    .nav-actions {
        justify-content: space-between;
        padding-top: var(--space-3);
        border-top: 1px solid var(--border);
    }
}

@keyframes drop-in {
    from {
        opacity: 0;
        translate: 0 -0.5rem;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@media (width >=64rem) {
    .hamburger-btn {
        display: none;
    }

    .nav-menu {
        display: block;
    }
}

/* ============================================================================
   6. THEME SWITCH — CSS toggle (switch/toggle pattern)
   ============================================================================ */

.theme-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.theme-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.theme-track {
    display: inline-flex;
    align-items: center;
    width: 2.75rem;
    height: 1.5rem;
    padding: 0.15rem;
    border-radius: var(--radius-full);
    background: light-dark(oklch(0.88 0.02 240), oklch(0.32 0.03 250));
    border: 1px solid var(--border);
    transition: background var(--dur) ease;
}

.theme-thumb {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: translate var(--dur) var(--ease-out);
}

.theme-toggle-input:checked+.theme-track {
    background: var(--brand-gradient);
    border-color: transparent;
}

.theme-toggle-input:checked+.theme-track .theme-thumb {
    translate: 1.25rem 0;
}

.theme-label-text {
    font-size: var(--text-xs);
    color: var(--muted);
}

/* ============================================================================
   7. LANGUAGE SELECTOR (kept functional via tiny inline JS)
   ============================================================================ */

.lang-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid color-mix(in oklch, var(--brand) 40%, transparent);
    background: color-mix(in oklch, var(--brand) 8%, transparent);
    color: var(--brand);
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
    transition: background var(--dur-fast), border-color var(--dur-fast);
}

.lang-btn:hover {
    background: color-mix(in oklch, var(--brand) 16%, transparent);
    border-color: color-mix(in oklch, var(--brand) 65%, transparent);
}

.lang-btn svg {
    flex-shrink: 0;
}

.lang-btn .lang-arrow {
    transition: transform var(--dur-fast) ease;
}

.lang-select-wrap.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 11rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 60;
}

.lang-select-wrap.open .lang-dropdown {
    display: block;
    animation: drop-in var(--dur-fast) var(--ease-out) both;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background var(--dur-fast);
}

.lang-option:hover {
    background: color-mix(in oklch, var(--brand) 10%, transparent);
    color: var(--brand);
}

.lang-option.active {
    background: color-mix(in oklch, var(--brand) 14%, transparent);
    color: var(--brand);
    font-weight: 700;
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ============================================================================
   8. BUTTONS — primary button + gradient CTA
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    font: 600 0.9rem/1.2 system-ui, sans-serif;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    text-decoration: none;
    transition:
        background var(--dur) ease-out,
        box-shadow var(--dur) ease-out,
        transform 0.1s ease-out;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn--primary {
    background: var(--color-600);
    color: var(--on-accent);
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    background: var(--color-700);
    box-shadow: var(--shadow-md);
}

/* Gradient CTA with animated shine */
.btn--cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
    color: var(--on-accent);
    background: var(--brand-gradient);
    background-size: 200% auto;
    box-shadow: var(--shadow-brand);
    transition: background-position var(--dur-slow) ease, box-shadow var(--dur) ease, transform 0.1s ease-out;
}

.btn--cta:hover {
    background-position: right center;
    box-shadow: 0 16px 48px oklch(0.62 0.17 235 / 0.5);
}

.btn--whatsapp {
    background: oklch(0.7 0.19 155);
    color: white;
}

.btn--whatsapp:hover {
    background: oklch(0.63 0.19 155);
    box-shadow: 0 12px 36px oklch(0.7 0.19 155 / 0.4);
}

.btn--icon-slide svg {
    transition: translate var(--dur) var(--ease-out);
}

.btn--icon-slide:hover svg {
    translate: 0.25rem 0;
}

/* ============================================================================
   9. HERO
   ============================================================================ */

.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(6rem, 12vw, 9rem) clamp(4rem, 8vw, 6rem);
    /* dot grid pattern + soft brand orbs */
    background:
        radial-gradient(1.2px 1.2px at 50% 50%, color-mix(in oklch, var(--brand) 22%, transparent) 0 1px, transparent 0) 0 0 / 32px 32px,
        radial-gradient(60rem 40rem at 85% -10%, oklch(0.62 0.17 235 / 0.22), transparent 60%),
        radial-gradient(50rem 40rem at -10% 110%, oklch(0.55 0.22 275 / 0.2), transparent 60%),
        var(--bg);
}

.hero-grid {
    display: grid;
    gap: var(--space-12);
    align-items: center;
}

@media (width >=64rem) {
    .hero-grid {
        grid-template-columns: 1.05fr 0.95fr;
    }
}

.hero-eyebrow {
    display: inline-block;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--brand);
    letter-spacing: -0.01em;
}

.hero-name {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-4xl);
    font-weight: 900;
    letter-spacing: -0.03em;
    background: var(--brand-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: text-shimmer 5s linear infinite;
}

@keyframes text-shimmer {
    to {
        background-position: 200% center;
    }
}

.hero-sub {
    margin-top: var(--space-5);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--muted);
}

.hero-quote {
    margin-top: var(--space-4);
    max-width: var(--measure);
    font-style: italic;
    color: var(--muted);
    border-left: 3px solid;
    border-image: var(--brand-gradient) 1;
    padding-left: var(--space-4);
}

.hero-cta {
    margin-top: var(--space-8);
}

/* Hero media — image frame + floating gradient blob */
.hero-media {
    position: relative;
    max-width: 28rem;
    margin-inline: auto;
}

.hero-img {
    position: relative;
    z-index: 2;
    clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
    filter: drop-shadow(0 20px 40px oklch(0.62 0.17 235 / 0.3));
    transition: clip-path var(--dur-slow) ease, filter var(--dur-slow) ease;
}

.hero-img:hover {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    filter: drop-shadow(0 25px 50px oklch(0.62 0.17 235 / 0.45));
}

.hero-blob {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
    opacity: 0.9;
}

@keyframes float {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -1.25rem;
    }
}

/* ============================================================================
   10. SECTIONS — headings + shared layout
   ============================================================================ */

.section {
    padding-block: clamp(4rem, 9vw, 7rem);
    position: relative;
}

.section-heading {
    max-width: 42rem;
    margin-bottom: var(--space-12);
}

.section-heading--center {
    margin-inline: auto;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: var(--space-2);
}

.section-title {
    font-size: var(--text-3xl);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    width: 3rem;
    height: 3px;
    border-radius: 2px;
    background: var(--brand-gradient);
}

.section-heading--center .section-title::after {
    left: 50%;
    translate: -50% 0;
    width: 4rem;
}

.section-lead {
    margin-top: var(--space-4);
    color: var(--muted);
    font-size: var(--text-lg);
}

.section-heading--center .section-lead {
    margin-inline: auto;
}

/* ============================================================================
   11. ABOUT
   ============================================================================ */

.about-grid {
    display: grid;
    gap: var(--space-12);
}

@media (width >=64rem) {
    .about-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.about-copy p {
    margin-top: var(--space-3);
    color: var(--muted);
}

.connect-title {
    font-size: var(--text-2xl);
}

.connect-lead {
    margin-top: var(--space-2);
    color: var(--muted);
}

.socials {
    margin-top: var(--space-6);
}

/* Social icon buttons */
.social-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--text);
    border: 1px solid var(--border);
    background: var(--surface);
    transition:
        transform var(--dur) var(--ease-out),
        box-shadow var(--dur) ease,
        background var(--dur) ease,
        color var(--dur) ease,
        border-color var(--dur) ease;
}

.social-icon:hover {
    translate: 0 -0.25rem;
    color: var(--on-accent);
    background: var(--brand-gradient);
    border-color: transparent;
    box-shadow: 0 8px 20px oklch(0.62 0.17 235 / 0.4);
}

/* ============================================================================
   12. PORTFOLIO — RAM auto-responsive grid + cards
   ============================================================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-6);
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) ease-out, box-shadow var(--dur) ease-out;
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
    }
}

.card-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-2);
}

.card-media img,
.card-media svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform var(--dur-slow) var(--ease-out);
}

@media (hover: hover) {

    .card:hover .card-media img,
    .card:hover .card-media svg {
        transform: scale(1.05);
    }
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-5);
    flex: 1;
}

.card-title {
    font-size: var(--text-lg);
    color: var(--brand);
}

.card-sub {
    font-size: var(--text-sm);
    font-weight: 600;
}

.card-text {
    font-size: var(--text-sm);
    color: var(--muted);
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Chip / tag */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--border);
    font-size: var(--text-xs);
    font-weight: 600;
}

/* Present badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    background: color-mix(in oklch, var(--brand) 16%, transparent);
    color: var(--brand);
    border: 1px solid color-mix(in oklch, var(--brand) 40%, transparent);
}

/* ============================================================================
   13. CLIENTS — modern glassmorphism on a dark gradient panel
   ============================================================================ */

.section--clients {
    color: white;
    background:
        radial-gradient(40rem 30rem at 80% 20%, oklch(0.62 0.17 235 / 0.35), transparent 60%),
        radial-gradient(40rem 30rem at 10% 90%, oklch(0.55 0.22 275 / 0.35), transparent 60%),
        linear-gradient(135deg, oklch(0.22 0.05 250), oklch(0.17 0.06 280));
}

.section--clients .eyebrow {
    color: var(--color-300);
}

.section--clients .section-title {
    color: white;
}

.section--clients .section-lead {
    color: oklch(0.75 0.02 250);
}

.client-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    max-width: 28rem;
    margin-inline: auto;
    padding: var(--space-12) var(--space-8);
    border-radius: var(--radius-lg);
    text-align: center;
    background: oklch(1 0 0 / 0.08);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid oklch(1 0 0 / 0.16);
}

.client-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    opacity: 0.85;
}

.client-card-title {
    font-size: var(--text-2xl);
    background: linear-gradient(135deg, var(--color-300), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.client-card-text {
    color: oklch(0.75 0.02 250);
    max-width: 22rem;
}

/* ============================================================================
   14. TIMELINE — vertical line + dots + cards
   ============================================================================ */

.timeline {
    position: relative;
    max-width: 42rem;
    margin-inline: auto;
    padding-left: 2rem;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.5625rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand), var(--brand-2));
}

.tl-item {
    position: relative;
    padding-bottom: 1.75rem;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item::before {
    content: "";
    position: absolute;
    left: -1.625rem;
    top: 0.35rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--brand);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 2px oklch(0.62 0.17 235 / 0.4);
}

.tl-date {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.tl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    transition: translate var(--dur) var(--ease-out), box-shadow var(--dur) ease;
}

@media (hover: hover) {
    .tl-card:hover {
        translate: 0.375rem 0;
        box-shadow: -4px 0 20px oklch(0.62 0.17 235 / 0.25);
    }
}

.tl-card h3 {
    font-size: var(--text-lg);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: 0.25rem;
}

.tl-card h3 a {
    color: var(--text);
}

.tl-card h3 a:hover {
    color: var(--brand);
}

.tl-card p {
    font-size: var(--text-sm);
    color: var(--muted);
    margin-top: var(--space-2);
}

.tl-card strong {
    color: var(--text);
}

/* ============================================================================
   15. FOOTER
   ============================================================================ */

.site-footer {
    color: oklch(0.72 0.02 250);
    background: oklch(0.17 0.03 250);
    padding-block: var(--space-16) var(--space-8);
}

.site-footer .container {
    position: relative;
}

.site-footer .container::before {
    content: "";
    position: absolute;
    top: calc(-1 * var(--space-16));
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand), var(--brand-2), transparent);
}

.footer-grid {
    display: grid;
    gap: var(--space-8);
}

@media (width >=48rem) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-brand-img {
    width: min(9rem, 40%);
    margin-bottom: var(--space-4);
    filter: drop-shadow(0 2px 12px oklch(0.62 0.17 235 / 0.4));
}

.footer-title {
    font-size: var(--text-xl);
    color: white;
    margin-bottom: var(--space-4);
}

.footer-contact {
    color: oklch(0.72 0.02 250);
}

.footer-contact p {
    margin-top: var(--space-1);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: oklch(0.72 0.02 250);
    font-size: var(--text-sm);
}

.footer-links a:hover {
    color: var(--brand);
}

.footer-bottom {
    margin-top: var(--space-12);
    padding-top: var(--space-6);
    border-top: 1px solid oklch(1 0 0 / 0.12);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
}

.footer-credit {
    flex-basis: 100%;
    text-align: center;
    font-size: var(--text-xs);
    color: oklch(0.55 0.02 250);
}

.footer .social-icon {
    color: white;
    border-color: oklch(1 0 0 / 0.18);
    background: oklch(1 0 0 / 0.06);
}

/* ============================================================================
   16. BACK TO TOP — floating action button + scroll-driven reveal
   ============================================================================ */

.to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    color: white;
    background: var(--brand-gradient);
    box-shadow: var(--shadow-brand);
    opacity: 1;
    transition: opacity var(--dur) ease, translate var(--dur) var(--ease-out);
}

.to-top:hover {
    translate: 0 -0.25rem;
}

.to-top-icon {
    width: 1.1rem;
    height: 1.1rem;
    border-top: 2px solid white;
    border-left: 2px solid white;
    rotate: 45deg;
    translate: 0 0.3rem;
}

/* Fade the button in once the user scrolls (pure CSS, scroll-driven) */
@supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
        .to-top {
            opacity: 0;
            animation: to-top-in linear both;
            animation-timeline: scroll();
            animation-range: 300px 500px;
        }
    }
}

@keyframes to-top-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================================================
   17. SCROLL-REVEAL — CSS scroll-driven animations (no JS)
   ============================================================================ */

@keyframes fade-up-in {
    from {
        opacity: 0;
        translate: 0 1.5rem;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

/* Progressive enhancement — only where scroll-driven animations are supported */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: fade-up-in linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 30%;
        }

        .reveal--stagger {
            animation-delay: var(--delay, 0ms);
        }
    }
}

/* ============================================================================
   18. REDUCED MOTION / TRANSPARENCY / FORCED COLORS
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-name {
        background: var(--brand);
        animation: none;
    }

    .to-top {
        opacity: 1;
    }
}

/* Solid alternatives for frosted-glass surfaces */
@media (prefers-reduced-transparency: reduce) {

    .site-header,
    .client-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .site-header {
        background: var(--surface);
    }

    .client-card {
        background: oklch(0.22 0.04 250);
    }
}

/* Keep the UI usable under Windows High Contrast / forced colors */
@media (forced-colors: active) {

    .gradient-text,
    .hero-name,
    .client-card-title {
        background: none;
        color: CanvasText;
    }

    .hero-img {
        clip-path: none;
    }

    .skip-link {
        position: static;
    }
}