/* ============================================
   DESIGN SYSTEM — Victor Ndekei Portfolio
   Inspired by TitanGate Equity's premium aesthetic
   ============================================ */

/* Inter Display, self-hosted (extracted from Inter.ttc, Latin subset) */
@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 100;
    font-display: swap;
    src: url('fonts/InterDisplay-Thin.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 100;
    font-display: swap;
    src: url('fonts/InterDisplay-ThinItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 200;
    font-display: swap;
    src: url('fonts/InterDisplay-ExtraLight.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 200;
    font-display: swap;
    src: url('fonts/InterDisplay-ExtraLightItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/InterDisplay-Light.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/InterDisplay-LightItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/InterDisplay-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/InterDisplay-RegularItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/InterDisplay-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/InterDisplay-MediumItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/InterDisplay-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/InterDisplay-SemiBoldItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/InterDisplay-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/InterDisplay-BoldItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/InterDisplay-ExtraBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/InterDisplay-ExtraBoldItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('fonts/InterDisplay-Black.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Display';
    font-style: italic;
    font-weight: 900;
    font-display: swap;
    src: url('fonts/InterDisplay-BlackItalic.woff2') format('woff2');
}

:root {
    /* Core Palette — Deep black with electric blue */
    --color-bg: #000000;
    --color-bg-elevated: #050508;
    --color-bg-card: #0a0a0f;
    --color-bg-card-hover: #0f0f18;
    --color-surface: #0d0d14;
    --color-border: rgba(255, 255, 255, 0.05);
    --color-border-hover: rgba(255, 255, 255, 0.1);
    --color-border-card: rgba(255, 255, 255, 0.04);

    --color-text-primary: #ffffff;
    --color-text-secondary: #8a8a9a;
    /* tertiary and muted are text colours: both stay at or above 4.5:1
       contrast on the page and card backgrounds (WCAG AA) */
    --color-text-tertiary: #80808f;
    --color-text-muted: #7a7a8b;

    /* TitanGate Blue */
    --color-accent: #004CFF;
    --color-accent-light: #3370ff;
    --color-accent-dim: #002d99;
    /* accent for text: #004CFF is only 3.5:1 on black, this is 5.4:1+ */
    --color-accent-text: #4d82ff;
    --color-accent-glow: rgba(0, 76, 255, 0.15);
    --color-accent-subtle: rgba(0, 76, 255, 0.06);

    --gradient-accent: linear-gradient(135deg, #004CFF 0%, #0066ff 50%, #3380ff 100%);
    --gradient-text: linear-gradient(135deg, #ffffff 0%, #ccd9ff 40%, #80aaff 100%);
    --gradient-glow: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 76, 255, 0.04), transparent 40%);

    /* Typography */
    --font-display: 'Inter Display', -apple-system, sans-serif;
    --font-heading: var(--font-display);
    --font-body: var(--font-display);

    /* Spacing — Generous & luxurious */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    --space-6xl: 10rem;
    --space-7xl: 14rem;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: 200ms var(--ease-out-expo);
    --transition-base: 500ms var(--ease-out-expo);
    --transition-slow: 800ms var(--ease-out-expo);
}

[data-theme="light"] {
    --color-bg: #ffffff;
    --color-bg-elevated: #fafafa;
    --color-bg-card: #f5f5f7;
    --color-bg-card-hover: #f0f0f4;
    --color-surface: #f9f9fb;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-hover: rgba(0, 0, 0, 0.15);
    --color-border-card: rgba(0, 0, 0, 0.06);

    --color-text-primary: #111111;
    --color-text-secondary: #555555;
    --color-text-tertiary: #666666;
    --color-text-muted: #6b6b6b;

    --color-accent-text: #004CFF;

    --color-accent-glow: rgba(0, 76, 255, 0.08);
    --color-accent-subtle: rgba(0, 76, 255, 0.04);

    --gradient-text: linear-gradient(135deg, #111111 0%, #004CFF 100%);
    --gradient-glow: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 76, 255, 0.08), transparent 40%);
}

[data-theme="light"] body::before {
    box-shadow:
        inset 0 0 120px 20px rgba(0, 0, 0, 0.02),
        inset 0 0 300px 60px rgba(0, 0, 0, 0.01);
}

[data-theme="light"] .cursor-glow {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.04) 0%, transparent 70%);
}

[data-theme="light"] .grain-overlay {
    opacity: 0.03;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color var(--transition-base), color var(--transition-base);
}

::selection {
    background: rgba(0, 76, 255, 0.3);
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   VIEWPORT BLUE GLOW (TitanGate Signature)
   ============================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    box-shadow:
        inset 0 0 120px 20px rgba(0, 76, 255, 0.06),
        inset 0 0 300px 60px rgba(0, 76, 255, 0.03);
    transition: opacity 1s ease;
}

/* ============================================
   GRAIN OVERLAY
   ============================================ */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* ============================================
   CURSOR GLOW
   ============================================ */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 76, 255, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xl);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--color-text-primary);
    margin-bottom: var(--space-lg);
}

.section-desc {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 480px;
    line-height: 1.75;
    font-weight: 300;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: all var(--transition-base);
}

.header.scrolled {
    background: color-mix(in srgb, var(--color-bg) 70%, transparent);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--color-border);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-svg {
    width: 36px;
    height: auto;
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
    filter: drop-shadow(0 0 0px transparent);
}

.nav-logo:hover .logo-svg {
    color: var(--color-accent-light);
    filter: drop-shadow(0 0 8px rgba(0, 76, 255, 0.5)) drop-shadow(0 0 20px rgba(0, 76, 255, 0.25));
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-link {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--color-text-tertiary);
    padding: var(--space-sm) var(--space-lg);
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
}

.nav-link:hover {
    color: var(--color-text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link--secondary {
    font-size: 0.8125rem;
    color: var(--color-text-tertiary);
}

.nav-link--secondary:hover {
    color: var(--color-text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    letter-spacing: 0.02em;
}

.btn--primary {
    background: var(--color-accent);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 76, 255, 0.2);
}

.btn--primary:hover {
    background: var(--color-accent-light);
    box-shadow: 0 0 50px rgba(0, 76, 255, 0.35);
    transform: translateY(-1px);
}

.btn--outline {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-hover);
}

.btn--outline:hover {
    border-color: color-mix(in srgb, var(--color-text-primary) 20%, transparent);
    color: var(--color-text-primary);
    background: color-mix(in srgb, var(--color-text-primary) 4%, transparent);
}

.btn--large {
    padding: 14px 32px;
    font-size: 0.875rem;
}

.btn--full {
    width: 100%;
    justify-content: center;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    background: color-mix(in srgb, var(--color-text-primary) 3%, transparent);
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--color-text-primary);
    background: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
    transform: scale(1.05);
}

.theme-toggle svg {
    transition: all var(--transition-base);
}

/* Show/hide icons based on theme */
[data-theme="dark"] .sun-icon,
[data-theme="light"] .moon-icon {
    display: block;
}

[data-theme="dark"] .moon-icon,
[data-theme="light"] .sun-icon {
    display: none;
}

.mobile-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: var(--space-xl);
}

.mobile-actions .theme-toggle {
    width: 48px;
    height: 48px;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--color-bg) 96%, transparent);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--color-text-tertiary);
    transition: all var(--transition-fast);
    letter-spacing: -0.02em;
}

.mobile-link:hover {
    color: var(--color-text-primary);
}

/* ============================================
   HERO SECTION — compact intro that hands off to the work
   ============================================ */
.hero {
    padding: 9rem 0 var(--space-3xl);
    position: relative;
}

.hero-id {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.hero-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border-hover);
}

.hero-id-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: var(--space-sm);
    padding: 6px 12px;
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    max-width: 30ch;
    font-family: var(--font-heading);
    font-size: clamp(1.625rem, 2.8vw, 2.375rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xl);
}

.hero-title-muted {
    color: var(--color-text-tertiary);
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-xl);
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.hero-link:hover {
    color: var(--color-text-primary);
}

.hero-link--primary {
    color: var(--color-text-primary);
    font-weight: 500;
}

.hero-link--primary svg {
    transition: transform var(--transition-fast);
}

.hero-link--primary:hover svg {
    transform: translateY(3px);
}

/* ============================================
   PROJECTS / WORK
   ============================================ */
.work-section {
    padding: 0 0 clamp(5.5rem, 9vw, 8.5rem);
    scroll-margin-top: 90px;
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: var(--space-lg);
    margin-bottom: var(--space-2xl);
    border-top: 1px solid var(--color-border-hover);
}

.work-heading {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.work-count {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4xl) var(--space-xl);
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-card);
    margin-bottom: var(--space-lg);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 1s var(--ease-out-expo);
}

.project-card:hover .project-card-image img {
    transform: scale(1.03);
}

.project-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-tag {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    letter-spacing: 0.02em;
    margin-bottom: var(--space-sm);
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.project-desc {
    max-width: 52ch;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-xl);
    margin-top: auto;
    padding-top: var(--space-lg);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.project-link:hover {
    color: var(--color-accent-text);
}

.project-link svg {
    transition: transform var(--transition-fast);
}

.project-link:first-child:hover svg {
    transform: translateX(4px);
}

.project-link--external:hover svg {
    transform: translate(2px, -2px);
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .hero {
        padding-top: 7.5rem;
    }

    .hero-status {
        margin-left: 0;
    }

    .hero-links {
        column-gap: var(--space-lg);
    }
}

/* ============================================
   ABOUT
   ============================================ */
.about-section {
    padding: clamp(5.5rem, 9vw, 8.5rem) 0;
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), var(--color-border), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: var(--space-5xl);
    align-items: start;
}

.about-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.85;
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

.about-text--lead {
    font-size: 1.125rem;
    color: var(--color-text-primary);
    font-weight: 400;
    line-height: 1.7;
    opacity: 0.9;
}

.about-capabilities {
    margin-top: var(--space-3xl);
    padding-top: var(--space-3xl);
    border-top: 1px solid var(--color-border);
}

.capabilities-title {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.capability {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    position: relative;
}

.capability:hover {
    border-color: rgba(0, 76, 255, 0.12);
    background: rgba(0, 76, 255, 0.02);
}

.capability-icon {
    color: var(--color-accent-dim);
    flex-shrink: 0;
    opacity: 0.6;
}

.capability:hover .capability-icon {
    color: var(--color-accent);
    opacity: 1;
}

.capability span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-secondary);
}

.capability:hover span {
    color: var(--color-text-primary);
}

/* ============================================
   GIVING BACK — Interface Playbook
   ============================================ */
.giving-section {
    padding: clamp(4rem, 7vw, 6rem) 0;
    position: relative;
}

.giving-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), var(--color-border), transparent);
}

.giving-desc {
    max-width: 560px;
}

.playbook-feature {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    margin-top: var(--space-3xl);
    padding: var(--space-2xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-card);
    border-radius: var(--radius-xl);
}

/* Screenshot in a quiet browser frame */
.playbook-shot {
    display: block;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-hover);
    background: var(--color-bg);
    transition: transform var(--transition-base), border-color var(--transition-fast);
}

.playbook-shot:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--color-text-primary) 18%, transparent);
}

.playbook-shot-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.6875rem;
    color: var(--color-text-tertiary);
}

.playbook-shot-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border-hover);
}

.playbook-shot-bar span {
    margin-left: var(--space-sm);
}

.playbook-shot-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top left;
}

.playbook-shot-img--light { display: none; }
[data-theme="light"] .playbook-shot-img--light { display: block; }
[data-theme="light"] .playbook-shot-img--dark { display: none; }

.playbook-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-lg);
}

.playbook-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

.playbook-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    opacity: 0.9;
    margin-bottom: var(--space-md);
}

.playbook-text {
    font-size: 0.9375rem;
    line-height: 1.8;
    font-weight: 300;
    color: var(--color-text-secondary);
}

.playbook-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: var(--space-2xl) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.playbook-stat {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-xs);
    padding: var(--space-lg) 0;
}

.playbook-stat + .playbook-stat {
    padding-left: var(--space-lg);
    border-left: 1px solid var(--color-border);
}

.playbook-stat dd {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

.playbook-stat dt {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.playbook-ctas {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

/* the human touch, same hand as the photo captions */
.playbook-note {
    font-family: 'Caveat', cursive;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    transform: rotate(-3deg);
}

.playbook-inside {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: var(--space-3xl);
    background: var(--color-border);
}

.playbook-item {
    padding: var(--space-2xl) var(--space-xl);
    background: var(--color-bg);
    transition: background var(--transition-base);
}

.playbook-item:hover {
    background: var(--color-bg-card);
}

.playbook-item .process-number {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}

.playbook-credits {
    margin-top: var(--space-2xl);
    max-width: 720px;
    font-size: 0.8125rem;
    line-height: 1.7;
    font-weight: 300;
    color: var(--color-text-tertiary);
}

@media (max-width: 1024px) {
    .playbook-feature {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .playbook-inside {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .playbook-feature {
        padding: var(--space-md);
    }

    .playbook-inside {
        grid-template-columns: 1fr;
    }

    .playbook-stat + .playbook-stat {
        padding-left: var(--space-md);
    }

    .playbook-stat dd {
        font-size: 1.5rem;
    }
}

/* ============================================
   PROCESS
   ============================================ */
.process-section {
    padding: clamp(5.5rem, 9vw, 8.5rem) 0;
    position: relative;
}

.process-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), var(--color-border), transparent);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--color-border);
}

.process-card {
    padding: var(--space-3xl) var(--space-2xl);
    background: var(--color-bg);
    transition: all var(--transition-base);
    position: relative;
}

.process-card:hover {
    background: var(--color-bg-card);
}

.process-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-slow);
}

.process-card:hover::after {
    width: 60%;
}

.process-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--color-text-primary) 3%, transparent);
    line-height: 1;
    margin-bottom: var(--space-xl);
    display: block;
    letter-spacing: -0.04em;
}

.process-card:hover .process-number {
    color: rgba(0, 76, 255, 0.08);
}

.process-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

.process-desc {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    line-height: 1.7;
    font-weight: 300;
}

/* ============================================
   EXPLORATIONS
   ============================================ */
.explorations-section {
    padding: clamp(5.5rem, 9vw, 8.5rem) 0;
    position: relative;
}

.explorations-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), var(--color-border), transparent);
}

.explorations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--color-border);
    margin-bottom: var(--space-3xl);
}

.exploration-card {
    aspect-ratio: 4/3;
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
    background: var(--color-bg);
}

.exploration-card:hover {
    background: var(--color-bg-card);
}

.exploration-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.exploration-card:hover img {
    transform: scale(1.05);
}

.exploration-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.exploration-placeholder span {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--color-text-primary) 4%, transparent);
    letter-spacing: -0.04em;
}

.exploration-card:hover .exploration-placeholder span {
    color: rgba(0, 76, 255, 0.06);
}

.explorations-cta {
    text-align: center;
}

/* ============================================
   LIFE / THE PILE — scattered candid photos
   ============================================ */
.life-section {
    padding: clamp(5.5rem, 9vw, 8.5rem) 0 clamp(4.5rem, 7vw, 7rem);
    position: relative;
    overflow: hidden;
}

.life-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), var(--color-border), transparent);
}

.section-header--center {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-3xl);
}

.section-header--center .section-desc {
    margin-left: auto;
    margin-right: auto;
    max-width: 560px;
}

.life-desc {
    max-width: 560px;
}

/* The pile — a loose, overlapping scatter of prints */
.pile {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    max-width: 1040px;
    margin: 0 auto;
    padding: var(--space-2xl) 0;
}

.pile-photo {
    --r: 0deg;
    --w: 300px;
    --ar: 4/3;
    position: relative;
    width: var(--w);
    margin: clamp(-2.75rem, -2vw, -1.25rem);
    padding: 12px 12px 44px;
    background: #fdfdfa;
    border-radius: 3px;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.16),
        0 12px 28px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    /* entrance start state */
    opacity: 0;
    transform: translateY(60px) rotate(0deg) scale(0.9);
    will-change: transform;
    transition: transform 0.7s var(--ease-out-expo),
                box-shadow 0.5s var(--ease-out-expo);
}

[data-theme="light"] .pile-photo {
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.1),
        0 14px 30px rgba(0, 0, 0, 0.16);
}

/* Per-photo scatter: index (stagger), rotation, width, aspect ratio.
   Portraits (1,3,5,7) sit at 3/4; landscapes (2,4,6) at 4/3. */
.pile-photo:nth-child(1) { --i: 0; --r: -6deg; --w: 290px; --ar: 3/4; }
.pile-photo:nth-child(2) { --i: 1; --r: 4deg;  --w: 340px; --ar: 4/3; }
.pile-photo:nth-child(3) { --i: 2; --r: -3deg; --w: 260px; --ar: 3/4; }
.pile-photo:nth-child(4) { --i: 3; --r: 6deg;  --w: 330px; --ar: 4/3; }
.pile-photo:nth-child(5) { --i: 4; --r: -5deg; --w: 270px; --ar: 3/4; }
.pile-photo:nth-child(6) { --i: 5; --r: 3deg;  --w: 320px; --ar: 4/3; }
.pile-photo:nth-child(7) { --i: 6; --r: -4deg; --w: 275px; --ar: 3/4; }

/* settle into the scattered resting angle once in view */
.pile.in-view .pile-photo {
    opacity: 1;
    transform: rotate(var(--r));
    transition: opacity 0.7s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
    transition-delay: calc(var(--i) * 90ms);
}

/* nudge one — it straightens, lifts and rises above the pile */
.pile.in-view .pile-photo:hover,
.pile.in-view .pile-photo:focus-visible {
    transform: rotate(0deg) translateY(-14px) scale(1.06);
    transition-delay: 0ms;
    z-index: 30;
    box-shadow:
        0 2px 2px rgba(0, 0, 0, 0.2),
        0 30px 60px rgba(0, 0, 0, 0.55);
    outline: none;
}

[data-theme="light"] .pile.in-view .pile-photo:hover,
[data-theme="light"] .pile.in-view .pile-photo:focus-visible {
    box-shadow:
        0 2px 2px rgba(0, 0, 0, 0.12),
        0 30px 60px rgba(0, 0, 0, 0.25);
}

/* click-to-nudge: a sticky "picked up" state so it also works on touch
   devices, where there is no hover. Higher specificity than the resting rule. */
.pile.in-view .pile-photo.nudged {
    transform: rotate(0deg) translateY(-14px) scale(1.06);
    transition-delay: 0ms;
    box-shadow:
        0 2px 2px rgba(0, 0, 0, 0.2),
        0 30px 60px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .pile.in-view .pile-photo.nudged {
    box-shadow:
        0 2px 2px rgba(0, 0, 0, 0.12),
        0 30px 60px rgba(0, 0, 0, 0.25);
}

/* the little jolt when you nudge a photo */
@keyframes pilePhotoNudge {
    0%   { transform: rotate(0deg) translateY(-14px) scale(1.06); }
    30%  { transform: rotate(-3.5deg) translateY(-22px) scale(1.08); }
    55%  { transform: rotate(2.5deg) translateY(-15px) scale(1.06); }
    78%  { transform: rotate(-1.2deg) translateY(-15px) scale(1.06); }
    100% { transform: rotate(0deg) translateY(-14px) scale(1.06); }
}

.pile.in-view .pile-photo.nudging {
    animation: pilePhotoNudge 0.5s var(--ease-out-quart);
    z-index: 40;
}

@media (prefers-reduced-motion: reduce) {
    .pile.in-view .pile-photo.nudging { animation: none; }
}

/* the photo itself (placeholder media or real <img>) */
.pile-photo-media,
.pile-photo-img {
    display: block;
    width: 100%;
    aspect-ratio: var(--ar);
    object-fit: cover;
    border-radius: 1px;
    background: linear-gradient(135deg, #1a1f33 0%, #0a0d18 60%, #141a2e 100%);
}

/* placeholder label — remove once real photos are in */
.pile-photo-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pile-photo-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow), radial-gradient(120% 120% at 30% 20%, rgba(0, 76, 255, 0.18), transparent 55%);
    opacity: 0.9;
}

.pile-photo-media::after {
    content: attr(data-label);
    position: relative;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.4em 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
}

.pile-photo:nth-of-type(3n) .pile-photo-media { background: linear-gradient(135deg, #241a33 0%, #0d0a18 60%, #1e142e 100%); }
.pile-photo:nth-of-type(3n+1) .pile-photo-media { background: linear-gradient(135deg, #14262e 0%, #0a1418 60%, #142a2e 100%); }

/* handwritten caption — the human touch */
.pile-photo-caption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    text-align: center;
    font-family: 'Caveat', cursive;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.05;
    color: #2a2a33;
    transform: rotate(-1.2deg);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .pile-photo {
        opacity: 1;
        transform: rotate(var(--r));
        transition: box-shadow 0.4s ease;
    }
    .pile.in-view .pile-photo:hover {
        transform: rotate(0deg) scale(1.03);
    }
}

@media (max-width: 900px) {
    /* width set directly so it overrides the per-photo --w nth-child rules */
    .pile-photo {
        width: clamp(200px, 40vw, 260px);
        margin: clamp(-1.5rem, -1.5vw, -0.75rem);
        padding: 10px 10px 38px;
    }
    .pile-photo-caption { font-size: 1.1rem; }
}

@media (max-width: 560px) {
    .life-section { padding: var(--space-5xl) 0 var(--space-4xl); }
    .section-header--center { margin-bottom: var(--space-3xl); }
    .pile {
        gap: var(--space-sm);
        padding: var(--space-md) 0;
    }
    .pile-photo {
        width: clamp(170px, 54vw, 220px);
        margin: -0.6rem;
        padding: 8px 8px 30px;
    }
    .pile-photo-caption { font-size: 1.05rem; }
}

/* ============================================
   FAQ
   ============================================ */
.faq-section {
    padding: clamp(5.5rem, 9vw, 8.5rem) 0;
    position: relative;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), var(--color-border), transparent);
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-5xl);
    align-items: start;
}

.faq-subtext {
    font-size: 1rem;
    color: var(--color-text-tertiary);
    line-height: 1.7;
    margin-top: var(--space-lg);
    font-weight: 300;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
    border-top: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) 0;
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
    gap: var(--space-lg);
}

.faq-question:hover {
    color: var(--color-text-primary);
}

.faq-icon {
    font-size: 1.25rem;
    font-weight: 200;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-accent-text);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    line-height: 1.8;
    padding-bottom: var(--space-xl);
    font-weight: 300;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: clamp(5.5rem, 9vw, 8.5rem) 0;
}

.cta-card {
    text-align: center;
    padding: var(--space-6xl) var(--space-3xl);
    background: transparent;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

/* L-shaped corners on CTA */
.cta-card::before,
.cta-card::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: rgba(0, 76, 255, 0.2);
    border-style: solid;
    z-index: 2;
}

.cta-card::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.cta-card::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: var(--space-xl);
    position: relative;
}

.cta-desc {
    font-size: 1rem;
    color: var(--color-text-tertiary);
    max-width: 460px;
    margin: 0 auto var(--space-3xl);
    line-height: 1.8;
    position: relative;
    font-weight: 300;
}

.cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    position: relative;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: var(--space-5xl) 0 var(--space-xl);
    border-top: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-4xl);
    margin-bottom: var(--space-4xl);
    padding-bottom: var(--space-4xl);
    border-bottom: 1px solid var(--color-border);
}

.footer-logo-svg {
    width: 42px;
    height: auto;
    color: var(--color-text-primary);
    display: inline-block;
    margin-bottom: var(--space-md);
    transition: all var(--transition-fast);
    filter: drop-shadow(0 0 0px transparent);
}

.footer-logo-svg:hover {
    color: var(--color-accent-light);
    filter: drop-shadow(0 0 8px rgba(0, 76, 255, 0.5)) drop-shadow(0 0 20px rgba(0, 76, 255, 0.25));
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    max-width: 260px;
    line-height: 1.7;
    font-weight: 300;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
}

.footer-col-title {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-lg);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-col a {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    display: inline-block;
    font-weight: 300;
}

.footer-col a:hover {
    color: var(--color-text-primary);
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copyright,
.footer-credit {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

.footer-giant-text {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

.footer-giant-text span {
    font-family: var(--font-heading);
    font-size: clamp(5rem, 14vw, 12rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px color-mix(in srgb, var(--color-text-primary) 4%, transparent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ============================================
   NOTES PAGE
   ============================================ */
/* The fixed header is 88px tall (56px nav + 16px padding top and bottom).
   Clear it, then add a modest gap that scales with the screen. */
.notes-main {
    min-height: 100vh;
    padding: calc(88px + clamp(1.5rem, 5vw, 4rem)) 0 clamp(4rem, 10vw, 8rem);
}

.notes-header {
    max-width: 640px;
    padding-bottom: clamp(1.5rem, 4vw, 3rem);
    border-bottom: 1px solid var(--color-border);
}

.notes-header .section-label {
    margin-bottom: var(--space-md);
}

.notes-title {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 6vw, 4rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

.notes-desc {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    font-weight: 400;
    max-width: 480px;
}

/* Notes list */
.notes-list {
    display: flex;
    flex-direction: column;
}

.note-item {
    display: grid;
    grid-template-columns: 112px 1fr 24px;
    align-items: center;
    gap: var(--space-2xl);
    padding: clamp(1.25rem, 3vw, 2rem) 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.note-item:first-child {
    border-top: 1px solid var(--color-border);
}

.note-item:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* Dates and excerpts use the secondary text colour: the muted and tertiary
   tokens fall below 4.5:1 contrast in both themes. */
.note-date {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
    align-self: center;
    font-variant-numeric: tabular-nums;
}

.note-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.note-body .note-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.3;
    transition: color var(--transition-fast);
}

.note-item:hover .note-body .note-title,
.note-item:focus-visible .note-body .note-title {
    color: var(--color-accent-light);
}

[data-theme="light"] .note-item:hover .note-body .note-title,
[data-theme="light"] .note-item:focus-visible .note-body .note-title {
    color: var(--color-accent);
}

.note-excerpt {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    font-weight: 400;
    max-width: 680px;
}

.note-arrow {
    color: var(--color-text-secondary);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.note-item:hover .note-arrow,
.note-item:focus-visible .note-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   NOTE ARTICLE PAGE
   ============================================ */
.note-page-main {
    padding: calc(88px + clamp(1.5rem, 5vw, 4rem)) 0 clamp(4rem, 10vw, 8rem);
}

.note-page-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 2rem);
}

/* 44px tall so it's an easy tap target */
.note-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: clamp(1rem, 3vw, 2rem);
    transition: color var(--transition-fast);
    letter-spacing: 0.02em;
}

.note-back:hover {
    color: var(--color-text-primary);
}

.note-back:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.note-back svg {
    transition: transform var(--transition-fast);
}

.note-back:hover svg {
    transform: translateX(-3px);
}

.note-page-date {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: var(--space-md);
    font-variant-numeric: tabular-nums;
}

.note-page-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--color-text-primary);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
    border-bottom: 1px solid var(--color-border);
}

/* Article body: regular weight and a calmer line height read better on small screens */
.note-article .note-lead {
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
    color: var(--color-text-primary);
    line-height: 1.7;
    font-weight: 400;
    margin-bottom: var(--space-xl);
    opacity: 0.92;
}

.note-article p {
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-weight: 400;
    margin-bottom: var(--space-lg);
}

.note-article h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.025em;
    margin-top: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--space-md);
}

.note-article blockquote {
    border-left: 2px solid var(--color-accent);
    padding: var(--space-sm) 0 var(--space-sm) clamp(1rem, 4vw, 2rem);
    margin: clamp(2rem, 5vw, 3rem) 0;
}

.note-article blockquote p {
    font-family: var(--font-heading);
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
    color: var(--color-text-primary);
    font-weight: 400;
    line-height: 1.65;
    font-style: italic;
    margin-bottom: 0;
    opacity: 0.88;
}

/* Note footer / nav between notes */
.note-page-footer {
    margin-top: clamp(3rem, 8vw, 6rem);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.note-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 280px;
}

.note-nav-link--next {
    text-align: right;
    margin-left: auto;
}

.note-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-text-secondary);
}

.note-nav-title {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.note-nav-link:hover .note-nav-title {
    color: var(--color-text-primary);
}

/* Active nav state for Notes page */
.nav-link--active {
    color: var(--color-text-primary) !important;
}

/* Notes responsive */
@media (max-width: 768px) {
    .note-item {
        grid-template-columns: 1fr 24px;
        grid-template-rows: auto auto;
        gap: var(--space-sm) var(--space-lg);
    }

    .note-date {
        grid-column: 1;
        grid-row: 1;
    }

    .note-body {
        grid-column: 1;
        grid-row: 2;
    }

    .note-arrow {
        grid-column: 2;
        grid-row: 1 / 3;
        opacity: 1;
        transform: none;
    }
}

/* Show notes straight away for people who turn off motion */
@media (prefers-reduced-motion: reduce) {
    .notes-main .reveal-up,
    .note-page-main .reveal-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children more gently */
.reveal-up:nth-child(1) {
    transition-delay: 0ms;
}

.reveal-up:nth-child(2) {
    transition-delay: 100ms;
}

.reveal-up:nth-child(3) {
    transition-delay: 200ms;
}

.reveal-up:nth-child(4) {
    transition-delay: 300ms;
}

.reveal-up:nth-child(5) {
    transition-delay: 400ms;
}

.reveal-up:nth-child(6) {
    transition-delay: 500ms;
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

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

    .faq-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

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

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

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

    .cta-card {
        padding: var(--space-4xl) var(--space-xl);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-links-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .section-title {
        font-size: clamp(2rem, 7vw, 3rem);
    }

    body::before {
        box-shadow:
            inset 0 0 60px 10px rgba(0, 76, 255, 0.05),
            inset 0 0 150px 30px rgba(0, 76, 255, 0.02);
    }
}

@media (max-width: 480px) {
    .explorations-grid {
        grid-template-columns: 1fr;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================================
   INTERFACE PLAYBOOK (resource)
   ============================================ */
.playbook-section {
    padding: clamp(5.5rem, 9vw, 8.5rem) 0;
    position: relative;
}

.playbook-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), var(--color-border), transparent);
}

.playbook-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-card);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.playbook-card::after {
    content: '';
    position: absolute;
    inset: auto -20% -60% auto;
    width: 60%;
    aspect-ratio: 1;
    background: radial-gradient(circle, var(--color-accent-glow), transparent 65%);
    pointer-events: none;
}

.playbook-copy .section-desc {
    max-width: 520px;
}

.playbook-copy .section-desc + .section-desc {
    margin-top: var(--space-md);
}

.playbook-copy strong {
    color: var(--color-text-primary);
    font-weight: 500;
}

.playbook-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
}

.playbook-meta {
    position: relative;
    z-index: 1;
}

.playbook-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.playbook-stat {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-xs);
    padding: var(--space-xl);
    background: var(--color-bg);
}

.playbook-stat dd {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-primary);
}

.playbook-stat dt {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    letter-spacing: 0.02em;
}

.playbook-chapters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    list-style: none;
}

.playbook-chapters li {
    padding: 6px 12px;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-full);
}

@media (max-width: 900px) {
    .playbook-card {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
}

@media (max-width: 480px) {
    .playbook-ctas .btn {
        width: 100%;
        justify-content: center;
    }

    .playbook-stat {
        padding: var(--space-lg);
    }
}
