/* ═══════════════════════════════════════════════════════════════
   GRXHUB - Design System & Styles
   Cinematic dark aesthetic with geometric precision
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   CSS VARIABLES - Design Tokens
   ─────────────────────────────────────────────────────────────── */
:root {
    /* Background colors - deep obsidian with cool undertones */
    --bg-base: #050507;
    --bg-primary: #0a0a0e;
    --bg-secondary: #0f1014;
    --bg-tertiary: #16171d;
    --bg-elevated: #1c1d26;
    --bg-overlay: rgba(5, 5, 7, 0.94);

    /* Text colors - crisp, high contrast */
    --text-primary: #f8f9fb;
    --text-secondary: #a1a7b4;
    --text-muted: #5c6370;
    --text-disabled: #3a3d47;

    /* Border colors - geometric precision */
    --border-subtle: rgba(255, 255, 255, 0.03);
    --border-default: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-active: rgba(255, 255, 255, 0.18);

    /* Border widths */
    --border-thin: 1px;
    --border-medium: 2px;
    --border-thick: 3px;

    /* Refined accent palette - cinematic, saturated */
    --accent-pink: #ff6b9d;
    --accent-blue: #6b8cff;
    --accent-green: #4ade94;
    --accent-yellow: #fbbf24;
    --accent-purple: #a78bfa;
    --accent-red: #ff6b6b;
    --accent-cyan: #22d3ee;

    /* Section-specific accents */
    --accent-photography: var(--accent-pink);
    --accent-projects: var(--accent-blue);
    --accent-hub: var(--accent-green);
    --accent-recent: var(--accent-yellow);

    /* Border radius - geometric with soft touches */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;

    /* Spacing - deliberate whitespace */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 96px;

    /* Shadows - cinematic depth */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 24px 72px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 40px;
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.3);

    /* Transitions - cinematic, intentional */
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-dramatic: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 150ms var(--ease-default);
    --transition-base: 300ms var(--ease-smooth);
    --transition-slow: 500ms var(--ease-smooth);
    --transition-slower: 700ms var(--ease-dramatic);

    /* Z-index layers */
    --z-base: 0;
    --z-dropdown: 10;
    --z-sticky: 50;
    --z-fixed: 100;
    --z-modal: 200;
    --z-tooltip: 300;

    /* Layout */
    --header-height: 80px;
    --container-max: 1400px;
    --grid-gap: 20px;

    /* Typography - Distinctive pairing: Satoshi for display, General Sans for body */
    --font-display: 'Satoshi', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'General Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.75rem;
    --text-5xl: 3.75rem;
    --text-6xl: 5rem;

    /* Hover effects */
    --hover-lift: translateY(-4px);
    --hover-lift-lg: translateY(-8px);
    --hover-scale: scale(1.02);
    --hover-scale-sm: scale(1.01);
}

/* Light theme - clean, bright, sophisticated */
[data-theme="light"] {
    --bg-base: #fefefe;
    --bg-primary: #f9fafb;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #e9ebef;
    --bg-elevated: #ffffff;
    --bg-overlay: rgba(254, 254, 254, 0.96);

    --text-primary: #0f1115;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-disabled: #d1d5db;

    --border-subtle: rgba(15, 17, 21, 0.04);
    --border-default: rgba(15, 17, 21, 0.08);
    --border-hover: rgba(15, 17, 21, 0.14);
    --border-active: rgba(15, 17, 21, 0.20);

    /* Vibrant accents for light mode */
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-purple: #8b5cf6;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.10), 0 8px 16px rgba(0, 0, 0, 0.05);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}


/* Film grain texture overlay */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.025;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' 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;
}

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

/* ───────────────────────────────────────────────────────────────
   FIXED DOT GRID - Always visible behind everything
   ─────────────────────────────────────────────────────────────── */
.fixed-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 40px 40px;
}

[data-theme="light"] .fixed-grid {
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
}

/* ───────────────────────────────────────────────────────────────
   AMBIENT COLOR SPLASHES - Throughout entire page
   ─────────────────────────────────────────────────────────────── */
.ambient-splashes {
    position: fixed;
    inset: -200px;
    pointer-events: none;
    z-index: 0;
}

.splash {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: splashDrift 25s ease-in-out infinite;
}

/* Red splashes */
.splash--red-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-red);
    top: 5%;
    left: 5%;
    animation-delay: 0s;
}

.splash--red-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-pink);
    top: 55%;
    right: 15%;
    animation-delay: -8s;
    animation-duration: 30s;
}

.splash--red-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-red);
    bottom: 10%;
    left: 30%;
    animation-delay: -15s;
    animation-duration: 28s;
}

/* Green splashes */
.splash--green-1 {
    width: 450px;
    height: 450px;
    background: var(--accent-green);
    top: 30%;
    right: 5%;
    animation-delay: -5s;
    animation-duration: 28s;
}

.splash--green-2 {
    width: 380px;
    height: 380px;
    background: var(--accent-green);
    bottom: 25%;
    left: 10%;
    animation-delay: -12s;
    animation-duration: 32s;
}

/* Blue splashes */
.splash--blue-1 {
    width: 480px;
    height: 480px;
    background: var(--accent-blue);
    bottom: 5%;
    right: 10%;
    animation-delay: -3s;
    animation-duration: 26s;
}

.splash--blue-2 {
    width: 420px;
    height: 420px;
    background: var(--accent-blue);
    top: 15%;
    left: 40%;
    animation-delay: -10s;
    animation-duration: 30s;
}

.splash--blue-3 {
    width: 360px;
    height: 360px;
    background: var(--accent-cyan);
    top: 70%;
    left: 60%;
    animation-delay: -18s;
    animation-duration: 27s;
}

@keyframes splashDrift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -20px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 30px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -10px) scale(1.02);
    }
}

[data-theme="light"] .splash {
    opacity: 0.08;
    filter: blur(100px);
}

/* ───────────────────────────────────────────────────────────────
   NAVIGATION - Floating Corners
   ─────────────────────────────────────────────────────────────── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-lg) var(--space-xl);
    pointer-events: none;
}

.nav-left,
.nav-right {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-right {
    gap: var(--space-md);
}

/* Name/Identity */
.nav-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.nav-name:hover {
    color: var(--accent-pink);
}

/* Nav divider */
.nav-divider {
    color: var(--text-disabled);
    font-weight: 300;
    margin: 0 var(--space-xs);
}

/* Nav breadcrumb items */
.nav-crumb {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.nav-crumb-current {
    color: var(--text-primary);
}

/* Breadcrumb container */
.nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Section icons */
.nav-sections {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 2px;
}

.nav-sections-indicator {
    margin-left: var(--space-md);
    padding-left: var(--space-md);
    border-left: 1px solid var(--border-subtle);
}

.nav-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 10px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 16px;
    height: 2px;
    border-radius: var(--radius-full);
    background: var(--section-accent, var(--accent-pink));
    transition: transform var(--transition-base), opacity var(--transition-base);
    opacity: 0;
}

.nav-section i {
    font-size: 16px;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.nav-section-label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

/* Section accent colors */
.nav-section[data-section="photography"] { --section-accent: var(--accent-photography); }
.nav-section[data-section="projects"] { --section-accent: var(--accent-projects); }
.nav-section[data-section="hub"] { --section-accent: var(--accent-hub); }
.nav-section[data-section="recent"] { --section-accent: var(--accent-recent); }
.nav-section[data-section="about"] { --section-accent: var(--accent-cyan); }

.nav-section:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-section:hover::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

.nav-section.active {
    color: var(--text-primary);
}

.nav-section.active i {
    color: var(--section-accent, var(--accent-pink));
}

.nav-section.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

/* Social icons */
.nav-socials {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-social:hover {
    transform: translateY(-2px);
}

.nav-social--instagram:hover {
    color: #e1306c;
    background: rgba(225, 48, 108, 0.1);
}

.nav-social--x:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-social--linkedin:hover {
    color: #0a66c2;
    background: rgba(10, 102, 194, 0.1);
}

.nav-social--email:hover {
    color: var(--accent-red);
    background: rgba(255, 107, 107, 0.1);
}

.nav-social--phone:hover {
    color: var(--accent-green);
    background: rgba(74, 222, 148, 0.1);
}

.nav-social i {
    font-size: 18px;
}

/* Separator between socials and theme */
.nav-separator {
    width: 1px;
    height: 18px;
    background: var(--border-active);
    flex-shrink: 0;
}

/* Theme toggle */
.nav-theme {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.nav-theme:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.nav-theme i {
    font-size: 18px;
    color: var(--text-muted);
    transition: all var(--transition-base);
    position: absolute;
}

.nav-theme:hover i {
    color: var(--accent-yellow);
}

.sun-icon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.moon-icon { opacity: 1; transform: rotate(0) scale(1); }

[data-theme="light"] .sun-icon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .moon-icon { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* ───────────────────────────────────────────────────────────────
   MAIN CONTENT
   ─────────────────────────────────────────────────────────────── */
.main-content {
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

.main-content .sections-grid {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl) var(--space-3xl);
}

/* Page content wrapper for subpages */
.page-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-3xl);
}

/* ───────────────────────────────────────────────────────────────
   HERO SECTION - Full viewport, personal, precision-focused
   ─────────────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    min-height: 100svh;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--header-height) var(--space-xl) var(--space-xl);
    margin-bottom: var(--space-xl);
    overflow: hidden;
}

/* Main hero content */
.hero-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    flex: 1 1 50%;
    min-width: 0;
}

.hero-identity {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hero-name,
.hero-handle {
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.95;
    margin: 0;
    overflow: hidden;
}

.hero-name {
    font-size: clamp(2.5rem, 9vw, 7rem);
    color: var(--text-primary);
}

.hero-handle {
    font-size: clamp(1.8rem, 6vw, 4.5rem);
    color: var(--text-secondary);
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    overflow: visible;
}

.hero-word {
    display: inline-block;
    animation: heroReveal 1.1s var(--ease-dramatic) backwards;
    animation-delay: calc(var(--delay) * 0.15s + 0.3s);
    position: relative;
    overflow: visible;
}

/* Subtle gradient shimmer on hero text */
.hero-word::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(107, 140, 255, 0.12) 25%,
        rgba(255, 107, 157, 0.12) 50%,
        rgba(74, 222, 148, 0.12) 75%,
        transparent 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { background-position: 300% center; }
    50% { background-position: 0% center; }
}

@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(100%) skewY(3deg);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) skewY(0);
        filter: blur(0);
    }
}

/* Hero badges */
.hero-badges {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    animation: fadeSlideUp 0.9s var(--ease-dramatic) 0.8s backwards;
}

.hero-badge {
    --badge-accent: var(--accent-blue);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 16px 10px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: var(--border-thin) solid var(--border-default);
    transition: all var(--transition-base);
    overflow: hidden;
}

/* Subtle gradient overlay */
.hero-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--badge-accent) 8%, transparent) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
}

/* Accent line on left edge */
.hero-badge::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background: var(--badge-accent);
    border-radius: var(--radius-full);
    opacity: 0.6;
    transition: all var(--transition-base);
}

.hero-badge:hover {
    border-color: color-mix(in srgb, var(--badge-accent) 40%, transparent);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 0 1px color-mix(in srgb, var(--badge-accent) 15%, transparent);
}

.hero-badge:hover::before {
    opacity: 1;
}

.hero-badge:hover::after {
    top: 10%;
    bottom: 10%;
    opacity: 1;
}

.hero-badge i {
    position: relative;
    font-size: 16px;
    color: var(--badge-accent);
    transition: transform var(--transition-base);
}

.hero-badge:hover i {
    transform: scale(1.1);
}

.hero-badge span {
    position: relative;
}

/* Individual badge accent colors */
.hero-badge:nth-child(1) { --badge-accent: var(--accent-blue); }
.hero-badge:nth-child(2) { --badge-accent: var(--accent-purple); }
.hero-badge:nth-child(3) { --badge-accent: var(--accent-pink); }

/* Context lines */
.hero-context {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    animation: fadeSlideUp 0.9s var(--ease-dramatic) 0.6s backwards;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-location {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-secondary);
    max-width: 400px;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gear badges */

/* Background elements - Modern mesh gradient with geometric shapes */
.hero-bg-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}




/* ───────────────────────────────────────────────────────────────
   HERO ASCII ART
   Grid is always 120x60 characters. Font size is computed by JS
   to fit within the container while preserving aspect ratio.
   ─────────────────────────────────────────────────────────────── */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
    width: 100%;
    height: 100%;
}

.hero-ascii-wrapper {
    flex: 1 1 50%;
    min-width: 0;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeSlideUp 0.9s var(--ease-dramatic) 1s backwards;
}

.hero-ascii {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
}

.hero-ascii-title {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 0.02em;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
}

.hero-ascii-title.visible {
    opacity: 1;
}

.ascii-art {
    font-family: var(--font-mono);
    /* Font size is set dynamically by JS to fit the container */
    font-size: 6px;
    line-height: 0.7;
    letter-spacing: 0;
    margin: 0;
    white-space: pre;
}

.ascii-art .ascii-row > span {
    padding-block: 0.25em;
    margin-block: -0.25em;
}

/* Dual layer crossfade system - both layers stack centered */
.ascii-layer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Row-based diagonal animation */
.ascii-layer .ascii-row {
    display: block;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth);
}

/* Fade in: rows appear from top-left to bottom-right */
.ascii-layer.fading-in .ascii-row {
    opacity: 1;
    transform: translateX(0);
}

/* Fade out: rows disappear from top-left to bottom-right */
.ascii-layer.fading-out .ascii-row {
    opacity: 0;
    transform: translateX(6px);
}

/* Row display */
.ascii-art .ascii-row {
    display: block;
}

/* Responsive hero */
@media (max-width: 768px) {
    .hero-section {
        padding: var(--header-height) var(--space-md) var(--space-md);
        min-height: auto;
    }

    .hero-container {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .hero-main {
        flex: 0 0 auto;
        width: 100%;
        gap: var(--space-lg);
    }

    .hero-ascii-wrapper {
        flex: 0 0 auto;
        width: 100%;
        margin: 0 auto;
        align-items: center;
    }

    .hero-ascii {
        height: min(300px, 40vh);
    }

    .hero-name {
        font-size: clamp(2.2rem, 12vw, 4rem);
    }

    .hero-handle {
        font-size: clamp(1.6rem, 9vw, 2.8rem);
        flex-wrap: wrap;
    }

    .hero-tagline {
        font-size: var(--text-lg);
    }

    .hero-location {
        font-size: var(--text-sm);
    }

    .hero-badges {
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-handle {
        font-size: 1.4rem;
    }

    .hero-tagline {
        font-size: var(--text-base);
    }

    .hero-badge {
        padding: 8px 12px 8px 10px;
        font-size: var(--text-xs);
        gap: var(--space-xs);
    }

    .hero-badge i {
        font-size: 14px;
    }

    .hero-badge::after {
        top: 25%;
        bottom: 25%;
    }
}

/* ───────────────────────────────────────────────────────────────
   SECTIONS GRID - Asymmetric Bento
   ─────────────────────────────────────────────────────────────── */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
    gap: var(--grid-gap);
}

.section-card[data-section="photography"] { grid-column: span 7; grid-row: span 2; min-height: 440px; }
.section-card[data-section="projects"] { grid-column: span 5; grid-row: span 1; }
.section-card[data-section="hub"] { grid-column: span 3; grid-row: span 1; }
.section-card[data-section="recent"] { grid-column: span 2; grid-row: span 1; }
.section-card[data-section="about"] { grid-column: span 5; grid-row: span 1; }

/* ───────────────────────────────────────────────────────────────
   SECTION CARD - Cinematic depth
   ─────────────────────────────────────────────────────────────── */
.section-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: var(--border-thin) solid var(--border-subtle);
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    transition:
        border-color var(--transition-slow),
        box-shadow var(--transition-slower),
        transform var(--transition-base);
    animation: cardEntrance 0.8s var(--ease-dramatic) backwards;
    animation-delay: calc(var(--index) * 0.08s + 0.5s);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Gradient overlay on hover */
.section-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--accent) 8%, transparent) 0%,
        transparent 50%,
        color-mix(in srgb, var(--accent) 3%, transparent) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-slower);
}

/* Inner border glow */
.section-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 0%, transparent);
    transition: box-shadow var(--transition-slow);
    pointer-events: none;
}

.section-card:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent),
        0 8px 80px -20px var(--accent);
    transform: translateY(-6px);
}

.section-card:hover::before {
    opacity: 1;
}

.section-card:hover::after {
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 15%, transparent);
}

/* Card glow that follows cursor */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        color-mix(in srgb, var(--accent) 15%, transparent) 0%,
        transparent 45%
    );
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.section-card:hover .card-glow {
    opacity: 1;
}

/* Shine sweep effect */
.card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.01) 40%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(255, 255, 255, 0.01) 60%,
        transparent 65%
    );
    transform: translateX(-100%);
    transition: transform 0.9s ease;
    pointer-events: none;
}

.section-card:hover .card-shine {
    transform: translateX(100%);
}

.card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-tertiary));
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
    border: var(--border-thin) solid color-mix(in srgb, var(--accent) 15%, transparent);
    position: relative;
}

/* Icon glow effect */
.card-icon::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    opacity: 0;
    filter: blur(12px);
    transition: opacity var(--transition-slow);
    z-index: -1;
}

.section-card:hover .card-icon {
    background: color-mix(in srgb, var(--accent) 18%, var(--bg-tertiary));
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    transform: scale(1.08) translateY(-2px);
}

.section-card:hover .card-icon::before {
    opacity: 0.3;
}

.card-icon i {
    font-size: 26px;
    color: var(--accent);
    transition: transform var(--transition-base);
}

.section-card:hover .card-icon i {
    transform: scale(1.05);
}

.card-text {
    flex: 1;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    transition: color var(--transition-base);
}

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

.card-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Arrow indicator */
.card-arrow {
    position: absolute;
    top: var(--space-xl);
    right: var(--space-xl);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: var(--border-thin) solid var(--border-subtle);
    opacity: 0;
    transform: translateX(-12px) scale(0.9);
    transition: all var(--transition-base);
}

.card-arrow i {
    font-size: 18px;
    color: var(--accent);
    transition: transform var(--transition-base);
}

.section-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.section-card:hover .card-arrow i {
    transform: translateX(2px);
}

/* Featured card (Photography) specific styles */
.section-card[data-section="photography"] {
    background:
        linear-gradient(145deg, var(--bg-secondary) 0%, color-mix(in srgb, var(--accent-pink) 3%, var(--bg-secondary)) 100%);
}

.section-card[data-section="photography"] .card-icon {
    width: 68px;
    height: 68px;
}

.section-card[data-section="photography"] .card-icon i {
    font-size: 32px;
}

.section-card[data-section="photography"] .card-title {
    font-size: 2.2rem;
}

.section-card[data-section="photography"] .card-subtitle {
    font-size: var(--text-base);
    max-width: 340px;
}

/* Compact cards (Hub, Recent) */
.section-card[data-section="hub"] .card-subtitle,
.section-card[data-section="recent"] .card-subtitle {
    font-size: var(--text-xs);
}

.section-card[data-section="recent"] {
    justify-content: center;
}

.section-card[data-section="recent"] .card-icon {
    margin-bottom: var(--space-md);
}

.section-card[data-section="recent"] .card-subtitle {
    display: none;
}

/* ───────────────────────────────────────────────────────────────
   FOOTER
   ─────────────────────────────────────────────────────────────── */
.site-footer {
    position: relative;
    padding: var(--space-md) var(--space-sm) var(--space-md);
    z-index: 1;
    /* margin-top: var(--space-xl); */
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-line {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--border-default) 15%,
        var(--border-default) 85%,
        transparent 100%
    );
    margin-bottom: var(--space-lg);
}

.footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.footer-dot {
    opacity: 0.3;
    font-size: 4px;
}

/* ───────────────────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sections-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .section-card[data-section="photography"] { grid-column: span 6; grid-row: span 1; min-height: 300px; }
    .section-card[data-section="projects"] { grid-column: span 3; grid-row: span 1; }
    .section-card[data-section="hub"] { grid-column: span 3; }
    .section-card[data-section="recent"] { grid-column: span 3; }
    .section-card[data-section="about"] { grid-column: span 6; }

    .section-card[data-section="recent"] .card-subtitle {
        display: block;
    }
}

@media (max-width: 768px) {
    :root {
        --grid-gap: var(--space-md);
        --header-height: 68px;
    }

    .main-content .sections-grid {
        padding: 0 var(--space-md) var(--space-xl);
    }

    .page-content {
        padding: calc(var(--header-height) + var(--space-lg)) var(--space-md) var(--space-xl);
    }

    .site-nav {
        padding: var(--space-md);
    }

    .nav-name {
        font-size: var(--text-lg);
    }

    .nav-social {
        width: 28px;
        height: 28px;
    }

    .nav-social i {
        font-size: 16px;
    }

    .nav-theme {
        width: 28px;
        height: 28px;
    }

    .nav-theme i {
        font-size: 16px;
    }

    .nav-section {
        padding: 4px 6px;
    }

    .nav-section i {
        font-size: 14px;
    }

    .nav-section-label {
        display: none;
    }

    .sections-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .section-card,
    .section-card[data-section="photography"],
    .section-card[data-section="projects"],
    .section-card[data-section="hub"],
    .section-card[data-section="recent"],
    .section-card[data-section="about"] {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 160px;
    }

    .section-card {
        padding: var(--space-lg);
    }

    .section-card:hover {
        transform: translateY(-3px);
    }

    .card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: var(--space-md);
    }

    .card-icon i {
        font-size: 22px;
    }

    .section-card[data-section="photography"] .card-icon {
        width: 48px;
        height: 48px;
    }

    .section-card[data-section="photography"] .card-icon i {
        font-size: 22px;
    }

    .card-title,
    .section-card[data-section="photography"] .card-title {
        font-size: 1.3rem;
    }

    .card-subtitle,
    .section-card[data-section="photography"] .card-subtitle {
        font-size: var(--text-xs);
        max-width: none;
    }

    .card-arrow {
        top: var(--space-lg);
        right: var(--space-lg);
        width: 36px;
        height: 36px;
    }

    .card-arrow i {
        font-size: 16px;
    }

    .section-card[data-section="recent"] .card-subtitle {
        display: block;
    }
}

@media (max-width: 480px) {
    .nav-name {
        font-size: var(--text-base);
    }

    .nav-divider {
        display: none;
    }

    .nav-sections {
        display: none;
    }

    .nav-socials {
        gap: 2px;
    }

    .nav-social {
        width: 26px;
        height: 26px;
    }

    .nav-social i {
        font-size: 14px;
    }

    .section-card {
        min-height: 140px;
        padding: var(--space-md);
    }

    .card-icon {
        width: 42px;
        height: 42px;
    }

    .card-icon i {
        font-size: 20px;
    }

    .card-title {
        font-size: 1.15rem;
    }
}

/* ───────────────────────────────────────────────────────────────
   UTILITIES
   ─────────────────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-secondary);
}

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

/* ═══════════════════════════════════════════════════════════════
   FORM COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group--switch {
    flex-direction: row;
    align-items: center;
}

/* Labels */
.form-label {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-required {
    color: var(--accent-red);
    margin-left: 2px;
}

/* Text Input & Select Base */
.form-input,
.form-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-base);
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:hover,
.form-select:hover {
    border-color: var(--border-hover);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-blue) 20%, transparent);
    background: var(--bg-elevated);
}

/* Select Specific */
.form-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-sm) center;
    padding-right: var(--space-xl);
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Switch/Toggle */
.form-switch {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    user-select: none;
}

.form-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-switch-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--bg-elevated);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.form-switch-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.form-switch-input:checked + .form-switch-slider {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.form-switch-input:checked + .form-switch-slider::before {
    transform: translateX(22px);
    background: #fff;
}

.form-switch-input:focus + .form-switch-slider {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-green) 20%, transparent);
}

.form-switch-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* File Input */
.form-file {
    position: relative;
}

.form-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.form-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border: var(--border-thin) dashed var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-file-label i {
    font-size: 20px;
}

.form-file:hover .form-file-label {
    border-color: var(--accent-blue);
    background: var(--bg-elevated);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn:active {
    transform: translateY(0);
}

.btn i {
    font-size: 16px;
}

.btn--primary {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.btn--primary:hover {
    background: color-mix(in srgb, var(--accent-blue) 90%, #fff);
    border-color: color-mix(in srgb, var(--accent-blue) 90%, #fff);
    box-shadow: var(--shadow-md), 0 0 20px color-mix(in srgb, var(--accent-blue) 30%, transparent);
}

.btn--success {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: #fff;
}

.btn--success:hover {
    background: color-mix(in srgb, var(--accent-green) 90%, #fff);
    border-color: color-mix(in srgb, var(--accent-green) 90%, #fff);
    box-shadow: var(--shadow-md), 0 0 20px color-mix(in srgb, var(--accent-green) 30%, transparent);
}

.btn--danger {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

.btn--danger:hover {
    background: color-mix(in srgb, var(--accent-red) 90%, #fff);
    border-color: color-mix(in srgb, var(--accent-red) 90%, #fff);
    box-shadow: var(--shadow-md), 0 0 20px color-mix(in srgb, var(--accent-red) 30%, transparent);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn--ghost {
    background: transparent;
    border-color: transparent;
}

.btn--ghost:hover {
    background: var(--bg-tertiary);
    box-shadow: none;
}

.btn--sm {
    padding: 6px 12px;
    font-size: var(--text-xs);
}

.btn--sm i {
    font-size: 14px;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-xl);
    transition: color var(--transition-base);
    text-transform: uppercase;
}

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

.back-link i {
    font-size: 16px;
    transition: transform var(--transition-base);
}

.back-link:hover i {
    transform: translateX(-4px);
}

/* ═══════════════════════════════════════════════════════════════
   REUSABLE TOOL COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* Tool Page Layout */
.tool-page {
    max-width: 560px;
    margin: 0 auto;
}

.tool-container {
    background: var(--bg-secondary);
    border: var(--border-thin) solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    position: relative;
}

.tool-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--accent, var(--accent-purple)) 4%, transparent) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    position: relative;
}

.tool-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent, var(--accent-purple)) 10%, var(--bg-tertiary));
    border: var(--border-thin) solid color-mix(in srgb, var(--accent, var(--accent-purple)) 18%, transparent);
}

.tool-icon i {
    font-size: 26px;
    color: var(--accent, var(--accent-purple));
}

.tool-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.tool-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 2px;
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    position: relative;
}

/* File Dropzone */
.file-dropzone {
    position: relative;
    border: var(--border-medium) dashed var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    background: var(--bg-tertiary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.file-dropzone:hover,
.file-dropzone.dragover {
    border-color: var(--accent, var(--accent-purple));
    background: color-mix(in srgb, var(--accent, var(--accent-purple)) 4%, var(--bg-tertiary));
}

.file-dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-dropzone-content {
    pointer-events: none;
}

.file-dropzone-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    transition: color var(--transition-fast);
}

.file-dropzone:hover .file-dropzone-icon,
.file-dropzone.dragover .file-dropzone-icon {
    color: var(--accent, var(--accent-purple));
}

.file-dropzone-text {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.file-dropzone-hint {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* File Preview */
.file-preview {
    display: none;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-md);
}

.file-preview.active {
    display: flex;
}

.file-preview-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-elevated);
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.file-preview-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-preview-remove:hover {
    background: var(--bg-elevated);
    color: var(--accent-red);
}

/* Labeled Switch */
.labeled-switch {
    position: relative;
    display: inline-flex;
    background: var(--bg-tertiary);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-full);
    padding: 4px;
    cursor: pointer;
    user-select: none;
}

.labeled-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.labeled-switch-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 1;
}

.labeled-switch-option {
    padding: var(--space-xs) var(--space-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    transition: color var(--transition-fast);
    white-space: nowrap;
    text-align: center;
}

.labeled-switch-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--accent, var(--accent-purple));
    border-radius: var(--radius-full);
    transition: transform var(--transition-base);
    z-index: 0;
}

.labeled-switch-input:not(:checked) ~ .labeled-switch-track .labeled-switch-option:first-child {
    color: #fff;
}

.labeled-switch-input:not(:checked) ~ .labeled-switch-slider {
    transform: translateX(0);
}

.labeled-switch-input:checked ~ .labeled-switch-track .labeled-switch-option:last-child {
    color: #fff;
}

.labeled-switch-input:checked ~ .labeled-switch-slider {
    transform: translateX(100%);
}

.labeled-switch:hover {
    border-color: var(--border-hover);
}

.labeled-switch:focus-within {
    border-color: var(--accent, var(--accent-purple));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, var(--accent-purple)) 20%, transparent);
}

/* Progress Bar */
.progress {
    display: none;
}

.progress.active {
    display: block;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent, var(--accent-purple)), var(--accent-blue));
    border-radius: var(--radius-full);
    width: 0%;
    transition: width var(--transition-base);
}

.progress-text {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
}

/* Result Card */
.result-card {
    display: none;
    padding: var(--space-lg);
    background: color-mix(in srgb, var(--accent-green) 8%, var(--bg-tertiary));
    border: var(--border-thin) solid var(--accent-green);
    border-radius: var(--radius-lg);
}

.result-card.active {
    display: block;
}

.result-card.error {
    background: color-mix(in srgb, var(--accent-red) 8%, var(--bg-tertiary));
    border-color: var(--accent-red);
}

.result-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.result-header i {
    font-size: 24px;
    color: var(--accent-green);
}

.result-card.error .result-header i {
    color: var(--accent-red);
}

.result-title {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.result-stats {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-md);
}

.result-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-stat-label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-stat-value {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.result-stat-value.savings {
    color: var(--accent-green);
}

.result-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Form Row */
.form-row {
    display: flex;
    gap: var(--space-md);
    align-items: flex-end;
}

.form-row > * {
    flex: 1;
    min-width: 0;
}

.form-row .form-group--fixed {
    flex: 0 0 auto;
    width: 100px;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive - Tool Components */
@media (max-width: 768px) {
    .tool-container {
        padding: var(--space-lg);
    }

    .form-row {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .form-row > *,
    .form-row .form-group--fixed {
        flex: 1;
        width: 100%;
    }

    .result-stats {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* ═══════════════════════════════════════════════════════════════
   LEGAL PAGES
   ═══════════════════════════════════════════════════════════════ */

.legal-page {
    max-width: 800px;
    margin: 0 auto;
}

.legal-header {
    margin-bottom: var(--space-2xl);
}

.legal-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.legal-updated {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.legal-section h2 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.legal-section p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-md);
}

.legal-section ul:last-child {
    margin-bottom: 0;
}

.legal-section li {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: var(--space-lg);
    position: relative;
    margin-bottom: var(--space-sm);
}

.legal-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--accent-blue);
}

.legal-section li:last-child {
    margin-bottom: 0;
}

.legal-section a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.legal-section a:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

.legal-address {
    font-style: normal;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: var(--border-thin) solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal-warning {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: color-mix(in srgb, var(--accent-yellow) 8%, var(--bg-tertiary));
    border: var(--border-thin) solid color-mix(in srgb, var(--accent-yellow) 30%, transparent);
    border-radius: var(--radius-lg);
}

.legal-warning > i {
    font-size: 24px;
    color: var(--accent-yellow);
    flex-shrink: 0;
}

.legal-warning p {
    margin-bottom: var(--space-sm);
}

.legal-warning ul {
    margin-bottom: var(--space-sm);
}

/* Responsive Legal */
@media (max-width: 768px) {
    .legal-title {
        font-size: var(--text-3xl);
    }

    .legal-section h2 {
        font-size: var(--text-lg);
    }

    .legal-warning {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* ═══════════════════════════════════════════════════════════════
   CONSENT BANNER
   ═══════════════════════════════════════════════════════════════ */

.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-modal);
    padding: var(--space-md);
    background: var(--bg-elevated);
    border-top: var(--border-thin) solid var(--border-default);
    box-shadow: var(--shadow-lg);
    transform: translateY(100%);
    opacity: 0;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.consent-banner.visible {
    transform: translateY(0);
    opacity: 1;
}

.consent-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.consent-text {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.consent-icon {
    font-size: 24px;
    color: var(--accent-green);
    flex-shrink: 0;
    margin-top: 2px;
}

.consent-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.consent-description {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

.consent-link {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.consent-link:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

.consent-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* Consent Modal */
.consent-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 10);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.consent-modal.visible {
    opacity: 1;
    visibility: visible;
}

.consent-modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
}

.consent-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-secondary);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-base);
}

.consent-modal.visible .consent-modal-content {
    transform: translateY(0) scale(1);
}

.consent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: var(--border-thin) solid var(--border-subtle);
}

.consent-modal-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.consent-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.consent-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.consent-modal-close i {
    font-size: 20px;
}

.consent-modal-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.consent-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.consent-option-title {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.consent-option-description {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

.consent-option-toggle {
    flex-shrink: 0;
}

.consent-required {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.consent-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-top: var(--border-thin) solid var(--border-subtle);
}

.consent-modal-link {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.consent-modal-link:hover {
    color: var(--accent-blue);
}

/* Responsive Consent */
@media (max-width: 768px) {
    .consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }

    .consent-actions {
        justify-content: flex-end;
    }

    .consent-modal-footer {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER LINKS
   ═══════════════════════════════════════════════════════════════ */

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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