/* Shared site stylesheet extracted from inline styles */
:root {
    /* Dark foundation with a deep purple brand and rich dark yellow accent */
    --bg: #08050a;
    /* very dark background with purple undertone */
    --surface: #0f0914;
    /* surface slightly lighter with warm purple hint */
    --text: #efe9f8;
    /* soft, slightly warm off-white */
    --muted: #bfb3d0;
    /* muted pale lilac for secondary text */
    --line: #24182b;
    /* subtle dark divider with purple tinge */
    --brand: #5a2d8f;
    /* deep purple — primary visual identity */
    --accent: #d9b300;
    /* rich, dark yellow for CTAs and highlights */
    --accent-ink: #231700;
    /* ink color to sit on top of accent for readability */
    --shadow: 0 10px 36px rgba(17, 6, 40, 0.6);
    --radius: 10px;
    --maxw: 1120px;
}

/* Subtle film grain texture overlay for depth (very low opacity) */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px), radial-gradient(rgba(0, 0, 0, 0.01) 1px, transparent 1px);
    background-size: 3px 3px, 6px 6px;
    mix-blend-mode: overlay;
    opacity: 0.6;
    z-index: 0;
}

/* Decorative layered background: subtle color washes using brand and accent */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(800px 400px at 10% 20%, color-mix(in oklab, var(--brand) 30%, transparent) 0%, transparent 40%),
        radial-gradient(600px 360px at 85% 70%, color-mix(in oklab, var(--accent) 20%, transparent) 0%, transparent 45%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.65));
    background-blend-mode: screen, screen, normal;
    filter: blur(24px) saturate(120%);
    opacity: 0.85;
    transform: translate3d(0, 0, 0);
    transition: opacity 360ms ease;
}

@keyframes bg-wander {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }

    50% {
        transform: translate3d(2%, 1.5%, 0) scale(1.02);
    }

    100% {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }
}

/* Gentle drifting for depth; reduce motion for accessibility */
@media (prefers-reduced-motion: no-preference) {
    body::before {
        animation: bg-wander 40s ease-in-out infinite alternate;
    }
}

/* High contrast / reduced background for accessibility */
@media (prefers-contrast: more) {
    body::before {
        opacity: 0.35;
        filter: none;
    }
}

/* Glass-like card surface variant — useful for highlighted panels */
.card--glass {
    background: rgba(15, 9, 20, 0.78);
    background: linear-gradient(180deg, color-mix(in oklab, rgba(255, 255, 255, 0.02) 8%, transparent) 0%, color-mix(in oklab, var(--surface) 76%, rgba(0, 0, 0, 0.12) 20%) 100%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    backdrop-filter: blur(6px) saturate(120%);
    border: 1px solid color-mix(in oklab, var(--line) 60%, var(--brand) 6%);
}

/* Animated CTA gradient for primary button (subtle) */
.btn.primary {
    background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 60%, var(--brand) 10%), color-mix(in oklab, var(--accent) 40%, #000000 10%));
    background-size: 200% 100%;
}

.btn.primary:hover {
    background-position: 100% 0;
}

/* Section accent bar */
.section-accent {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-accent::before {
    content: '';
    width: 6px;
    height: 28px;
    background: linear-gradient(180deg, var(--brand), var(--accent));
    border-radius: 4px;
    display: inline-block;
}

/* Card overlay on hover for subtle depth */
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    transition: opacity 260ms ease;
    opacity: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.06));
}

.card:hover::after {
    opacity: 0.7;
}

/* Scroll progress indicators */
/* Top progress bar */
.scroll-progress-top {
    position: fixed;
    left: 0;
    top: 0;
    height: 3px;
    width: 100%;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}

.scroll-progress-top .bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    transition: width 120ms linear;
}

/* Side progress for project article reading */
.project-progress-side {
    position: fixed;
    right: 28px;
    top: 120px;
    width: 8px;
    height: calc(100vh - 240px);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    z-index: 9998;
    display: none;
    /* enabled only on project pages (hidden by default) */
}

.project-progress-side .fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--brand), var(--accent));
    transition: height 120ms linear;
}

@media (min-width: 900px) {
    .project-progress-side {
        /* intentionally disabled — top progress bar is sufficient */
        display: none !important;
    }
}

/* Extra override: hide RHS progress on project pages to avoid duplicate indicators */
.project .project-progress-side,
.project-progress-side {
    display: none !important;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 240ms ease, color 240ms ease;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}

/* Slightly tighter horizontal gutters on dedicated project pages */
body.project-page .wrap {
    padding: 0 clamp(12px, 2.6vw, 22px);
}

/* Hero */
#hero {
    padding-top: clamp(60px, 10vh, 140px);
    padding-bottom: clamp(48px, 8vw, 84px);
}

#hero h1 {
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.02em;
}

#hero .lead {
    max-width: 760px;
    opacity: 0.95;
}

#hero .actions {
    margin-top: 20px;
}

/* Decorative hero ornament and animated underline (subtle) */
#hero h1 {
    position: relative;
    z-index: 1;
}

#hero h1::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 6px;
    width: 64px;
    height: 42px;
    background: linear-gradient(135deg, color-mix(in oklab, var(--brand) 70%, transparent), color-mix(in oklab, var(--accent) 60%, transparent));
    opacity: 0.06;
    transform: rotate(-8deg);
    border-radius: 8px;
    pointer-events: none;
}

#hero h1::after {
    content: '';
    display: block;
    width: 64px;
    height: 6px;
    margin-top: 18px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    border-radius: 6px;
    transform-origin: left;
    transform: scaleX(0);
    opacity: 0.95;
    transition: transform 600ms cubic-bezier(.2, .9, .2, 1) 160ms;
}

@media (prefers-reduced-motion: no-preference) {

    /* add a helper class `.in-view` on the hero (via JS) to reveal the underline */
    #hero.in-view h1::after {
        transform: scaleX(1);
    }
}

/* Navigation */
nav a {
    position: relative;
    padding: 8px 6px;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: transparent;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 240ms cubic-bezier(.2, .9, .2, 1), background 240ms ease;
}

nav a:hover::after,
nav a:focus::after {
    transform: scaleX(1);
    background: color-mix(in oklab, var(--accent) 70%, var(--brand) 10%);
}

/* Cards: refined elevation and subtle sheen on hover */
.card {
    transition: transform 260ms cubic-bezier(.2, .9, .2, 1), box-shadow 260ms ease, border-color 260ms ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(6, 3, 20, 0.5);
    border-color: color-mix(in oklab, var(--brand) 50%, var(--line) 50%);
}

.card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 40%;
    pointer-events: none;
    background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 6%, transparent) 0%, transparent 100%);
    opacity: 0.03;
    border-radius: inherit;
}

/* Card link / cta styling */
.card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

.card-link:link,
.card-link:visited,
.card-link:hover,
.card-link:active,
.card-link:focus {
    text-decoration: none !important;
    color: inherit;
}

.card-link h3,
.card-link p {
    text-decoration: none !important;
}

.card-link h3 {
    color: var(--text);
    margin-bottom: 8px;
    transition: color 200ms ease;
}

.card-link:hover h3 {
    color: var(--accent);
}

.cta {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 12px;
    transition: all 200ms ease;
    border: 1px solid transparent;
}

.cta:hover {
    background: color-mix(in oklab, var(--accent) 15%, transparent);
    border-color: color-mix(in oklab, var(--accent) 40%, transparent);
    transform: translateX(4px);
    text-decoration: none;
}

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

/* Typographic refinements */
h1,
h2,
h3 {
    text-rendering: optimizeLegibility;
}

h3 {
    font-size: 16px;
}

/* Utility: subtle dividers for sections */
section {
    padding-top: clamp(36px, 6vw, 84px);
    padding-bottom: clamp(36px, 6vw, 84px);
}

header.site {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 5, 10, 0.95);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
    background: color-mix(in oklab, var(--bg) 95%, transparent);
    border-bottom: 2px solid color-mix(in oklab, var(--line) 80%, var(--brand) 20%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.brand {
    letter-spacing: .02em;
    font-weight: 700;
    color: var(--brand);
    font-size: 1.1rem;
    text-decoration: none;
    display: block;
    transition: all 200ms ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.brand:hover {
    color: var(--accent);
    background: color-mix(in oklab, var(--surface) 60%, transparent);
}

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

nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    position: relative;
    font-weight: 500;
    border-radius: 6px;
    transition: all 200ms ease;
    display: block;
}

nav a:focus,
nav a:hover {
    color: var(--accent);
    background: color-mix(in oklab, var(--surface) 60%, transparent);
    outline: none;
}

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

@media (max-width: 768px) {
    .nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    nav {
        width: auto;
        max-width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    nav::-webkit-scrollbar {
        display: none;
    }
    
    nav a {
        padding: 7px 10px;
        border: 1px solid color-mix(in oklab, var(--line) 60%, var(--brand) 20%);
        background: color-mix(in oklab, var(--surface) 50%, transparent);
        white-space: nowrap;
    }
}

main {
    position: relative;
    z-index: 1;
}

section {
    padding: clamp(48px, 8vw, 120px) 0;
    border-bottom: 1px solid var(--line);
}

section:last-of-type {
    border-bottom: none;
}

h1 {
    font-size: clamp(40px, 7.2vw, 92px);
    line-height: .95;
    letter-spacing: -0.01em;
    margin: 0 0 20px;
    font-weight: 700;
}

h2 {
    font-size: clamp(18px, 2.2vw, 22px);
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--muted);
    margin: 0 0 28px;
}

p.lead {
    font-size: clamp(18px, 2.4vw, 22px);
    color: var(--text);
    max-width: 820px;
    margin: 0 0 28px;
}

p.lead a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent);
    text-underline-offset: 3px;
    font-weight: 600;
    transition: all 200ms ease;
}

p.lead a:hover {
    color: color-mix(in oklab, var(--accent) 90%, #fff 10%);
    text-decoration-color: var(--accent);
}

p.lead a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}

.actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    border-radius: 8px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--brand);
    color: var(--brand);
    background: color-mix(in oklab, var(--surface) 70%, transparent);
    text-decoration: none;
    min-width: 140px;
    text-align: center;
    transition: all 220ms ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: color-mix(in oklab, var(--brand) 20%, var(--surface) 80%);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn.primary {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
    box-shadow: 0 3px 10px color-mix(in oklab, var(--accent) 30%, rgba(0, 0, 0, 0.4));
}

.btn.primary:hover {
    background: color-mix(in oklab, var(--accent) 90%, #fff 10%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px color-mix(in oklab, var(--accent) 35%, rgba(0, 0, 0, 0.5));
}

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

@media (max-width: 768px) {
    .wrap {
        padding: 0 clamp(16px, 4vw, 24px);
    }

    body.project-page .wrap {
        padding: 0 clamp(10px, 3.4vw, 16px);
    }
    
    .btn {
        width: 100%;
        min-width: auto;
        padding: 16px 24px;
        font-size: 1.05rem;
    }
    
    .actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .actions .btn {
        width: 100%;
    }
    
    .card {
        padding: 20px;
        min-height: auto;
    }
    
    .card h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .card p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .cta {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        margin-top: 16px;
    }
    
    #contact .grid.two {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: clamp(36px, 6vw, 64px) 0;
    }
    
    /* About section mobile */
    #about .wrap > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    #about figure {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #about figure img {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Meta tags mobile */
    .meta {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    /* Hero mobile adjustments */
    #hero h1 {
        font-size: clamp(32px, 10vw, 48px);
        line-height: 1.1;
    }
    
    p.lead {
        font-size: clamp(16px, 4vw, 18px);
    }
    
    /* Better touch targets for interactive elements */
    nav a,
    .btn,
    .cta {
        min-height: 44px;
    }
    
    nav a {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Extra small mobile devices (320px and below) */
@media (max-width: 375px) {
    .wrap {
        padding: 0 16px;
    }
    
    #hero h1 {
        font-size: clamp(28px, 12vw, 40px);
    }
    
    h2 {
        font-size: 16px;
    }
    
    .card {
        padding: 16px;
    }
    
    .card h3 {
        font-size: 1rem;
    }
    
    .card p {
        font-size: 0.9rem;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
}

.grid {
    display: grid;
    gap: 16px;
}

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

@media (min-width: 720px) {
    .grid.two {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    position: relative;
    border: 2px solid color-mix(in oklab, var(--line) 70%, var(--brand) 15%);
    border-radius: 12px;
    background: linear-gradient(180deg, color-mix(in oklab, var(--surface) 75%, var(--brand) 8%) 0%, color-mix(in oklab, var(--surface) 65%, #000000 25%) 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    flex-grow: 1;
}

.project-cover {
    margin: 0 0 8px;
    height: 132px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid color-mix(in oklab, var(--line) 65%, var(--brand) 20%);
    background: color-mix(in oklab, var(--surface) 72%, #000000 28%);
}

.project-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid color-mix(in oklab, var(--line) 50%, transparent);
}

.tag,
.badge {
    font-size: 0.75rem;
    border: 1px solid color-mix(in oklab, var(--brand) 40%, var(--line) 60%);
    color: var(--text);
    border-radius: 6px;
    padding: 6px 12px;
    background: color-mix(in oklab, var(--surface) 60%, transparent);
    font-weight: 500;
    opacity: 0.9;
    transition: all 150ms ease;
}

.tag:hover,
.badge:hover {
    border-color: var(--brand);
    background: color-mix(in oklab, var(--brand) 15%, var(--surface) 85%);
    opacity: 1;
}

/* Layout helpers for project pages */
.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 720px) {
    .two-col {
        grid-template-columns: 1fr 320px;
    }
}

.card-surface {
    background: linear-gradient(180deg, color-mix(in oklab, var(--surface) 78%, var(--brand) 6%) 0%, color-mix(in oklab, var(--surface) 66%, #000000 20%) 100%);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
}

footer {
    padding: 32px 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    border-top: 1px solid var(--line);
    margin-top: 48px;
}

/* Contact section improvements */
#contact .card {
    min-height: auto;
}

#contact .card h3 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 700;
}

#contact .card p {
    margin-bottom: 14px;
    line-height: 1.7;
}

#contact .card strong {
    color: var(--text);
    font-weight: 600;
    display: inline-block;
    min-width: 90px;
}

#contact .card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 200ms ease;
    display: inline-block;
    border-bottom: 1px solid transparent;
}

#contact .card a:hover {
    background: color-mix(in oklab, var(--accent) 15%, transparent);
    border-bottom-color: var(--accent);
    text-decoration: none;
}

#contact .card a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Utility */
.back {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--accent);
    text-decoration: none
}

.lede {
    color: var(--muted);
    margin: 0 0 18px
}

/* Reusable lightbox component (used by project pages) */
.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-inner {
    max-width: 94vw;
    max-height: 94vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox img {
    max-width: 94vw;
    max-height: 94vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
    touch-action: none;
    transform-origin: center center;
    transition: transform 120ms ease;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: none;
    padding: 8px 12px;
    font-size: 20px;
    border-radius: 6px;
    cursor: pointer;
}

.lightbox-close:focus {
    outline: 2px solid color-mix(in oklab, var(--accent) 60%, var(--brand) 20%);
}

/* Hint text inside figcaption for lightbox-enabled images */
.lightbox-hint {
    font-size: 0.95rem;
    color: var(--muted);
}

/* Small decorative badge on cards to add a subtle hook */
.card .card-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, color-mix(in oklab, var(--brand) 48%, transparent), color-mix(in oklab, var(--accent) 24%, transparent));
    color: var(--text);
    font-size: 12px;
    opacity: 0.9;
    pointer-events: none;
}

/* Gentle background motion for decorative layers (very subtle) */
@keyframes bg-drift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(-6px, -4px, 0) scale(1.01);
    }

    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.bg-layer {
    will-change: transform;
    animation: bg-drift 28s ease-in-out infinite alternate;
    opacity: 0.9;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .bg-layer {
        animation: none;
    }

    #hero h1::after {
        transition: none;
        transform: scaleX(1);
    }
}

/* Better focus-visible styles for keyboard users */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.card:focus-within {
    outline: 3px solid color-mix(in oklab, var(--accent) 60%, var(--brand) 10%);
    outline-offset: 3px;
    border-radius: 8px;
}

/* Reveal-on-scroll: subtle fade-up used on section headings and cards */
.reveal {
    opacity: 0;
    transform: translateY(8px) scale(0.998);
    transition: opacity 420ms cubic-bezier(.2, .9, .2, 1), transform 420ms cubic-bezier(.2, .9, .2, 1);
    will-change: opacity, transform;
}

.reveal.in-view {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Subtle cursor focal ring (decorative, non-intrusive) */
.cursor-ring {
    position: fixed;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.6);
    transition: transform 260ms cubic-bezier(.2, .9, .2, 1), opacity 260ms ease, background 220ms ease;
    z-index: 99999;
    mix-blend-mode: screen;
    opacity: 0.7;
    display: none;
    /* enabled by JS on pointer devices */
}

/* Nav active state (scrollspy) */
nav a.active {
    color: var(--accent);
}

nav a.active::after {
    transform: scaleX(1);
    background: color-mix(in oklab, var(--accent) 70%, var(--brand) 10%);
}

/* section heading accent (small vertical bar) */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: var(--brand);
    border-radius: 2px;
    display: inline-block;
    opacity: 0.9;
}