/* Copyright (c) 2026 Erewhon Labs LLC. All Rights Reserved. */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */

:root {
    /* Color Palette - Dark & Bold */
    --color-bg-dark: #0a0a0f;
    --color-bg-medium: #12121a;
    --color-surface: #1a1a27;

    --color-primary: #00d9ff;
    --color-primary-glow: rgba(0, 217, 255, 0.3);
    --color-accent: #ff3366;
    --color-accent-glow: rgba(255, 51, 102, 0.3);

    --color-text-primary: #ffffff;
    --color-text-secondary: #b4b4c8;
    --color-text-muted: #6e6e8a;
    --color-border: #2a2a3a;

    /* Spacing Scale */
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
    --space-48: 48px;
    --space-64: 64px;
    --space-80: 80px;
    --space-96: 96px;

    /* Typography Scale */
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;
    --text-4xl: 48px;
    --text-5xl: 64px;
    --text-6xl: 80px;
    --text-7xl: 120px;

    /* Font Families */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Crimson Pro', serif;

    /* Transitions */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base Styles
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   Background Elements
   ============================================ */

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 20% 50%,
        rgba(0, 217, 255, 0.08) 0%,
        transparent 50%
    ),
    radial-gradient(
        circle at 80% 50%,
        rgba(255, 51, 102, 0.06) 0%,
        transparent 50%
    );
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-24);
    z-index: 1;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-64);
}

/* ============================================
   Typography
   ============================================ */

.label {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: var(--space-24);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: var(--space-48);
    display: flex;
    flex-direction: column;
}

.hero-title-line {
    font-size: clamp(var(--text-5xl), 12vw, var(--text-7xl));
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title-line:first-child {
    animation-delay: 0.4s;
}

.hero-title-accent {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.6s;
}

/* ============================================
   Bio Section
   ============================================ */

.bio {
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
    max-width: 600px;
    margin-bottom: var(--space-48);
}

.bio-highlight {
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-primary);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.bio-text {
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--color-text-secondary);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1s forwards;
}

/* ============================================
   Links / Buttons
   ============================================ */

.links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-16);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-12);
    padding: var(--space-16) var(--space-32);
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.link-button:hover::before {
    opacity: 1;
}

/* Primary Button */
.link-button.primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #00b8d4 100%);
    color: var(--color-bg-dark);
    box-shadow: 0 0 30px var(--color-primary-glow);
}

.link-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px var(--color-primary-glow), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.link-button.primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-glow), 0 0 40px var(--color-primary-glow);
}

.link-arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
}

.link-button.primary:hover .link-arrow {
    transform: translateX(4px);
}

/* Secondary Button */
.link-button.secondary {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.link-button.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.link-button.secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.link-icon-svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ============================================
   Hero Image
   ============================================ */

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.6s forwards;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.profile-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    box-shadow:
        0 0 60px var(--color-primary-glow),
        0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    transition: transform var(--transition-slow);
}

.profile-image:hover {
    transform: scale(1.05);
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle,
        var(--color-primary-glow) 0%,
        transparent 70%
    );
    filter: blur(40px);
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablets and up */
@media (min-width: 768px) {
    .hero {
        padding: var(--space-48);
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
        gap: var(--space-96);
    }

    .hero-text {
        flex: 1;
    }

    .hero-image {
        flex: 0 0 auto;
    }

    .image-wrapper {
        max-width: 450px;
    }

    .bio {
        max-width: 700px;
    }
}

/* Desktop and up */
@media (min-width: 1024px) {
    .hero {
        padding: var(--space-64);
    }

    .image-wrapper {
        max-width: 500px;
    }
}

/* Large desktop */
@media (min-width: 1440px) {
    .image-wrapper {
        max-width: 550px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .image-glow {
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-text-primary: #ffffff;
        --color-text-secondary: #ffffff;
        --color-bg-dark: #000000;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    body {
        background: white;
        color: black;
    }

    .bg-gradient,
    .bg-grid,
    .image-glow {
        display: none;
    }

    .link-button {
        border: 1px solid black;
    }
}
