
/* =========================================
   1. CSS Reset & Normalize
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* =========================================
   2. Design Variables (Custom Properties)
   ========================================= */
:root {
    /* Color Palette - Winter/Cyber Theme */
    --color-bg-main: #0f172a;
    --color-bg-card: #1e293b;
    --color-bg-glass: rgba(15, 23, 42, 0.7);
    
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-accent: #38bdf8;
    --color-success: #10b981;
    --color-winter-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    
    --color-text-primary: #f8fafc;
    --color-text-secondary: #94a3b8;
    --color-text-inverse: #0f172a;

    --color-border: #334155;
    
    /* Spacing & Sizing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    --header-height: 5rem;
    --container-width: 1200px;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.75rem;
    --border-radius-full: 9999px;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 15px rgba(56, 189, 248, 0.3);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   3. Layout Structure
   ========================================= */
#__nuxt, 
#__layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.siteContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* =========================================
   4. Header Styles
   ========================================= */
.siteContent__header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 5vw, 4rem);
    z-index: 100;
    background-color: var(--color-bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color var(--transition-smooth), padding var(--transition-smooth);
}

.winter-header {
    /* Special effect for winter theme */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.6));
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Header Auto Margin (Spacer) */
.header-auto-margin {
    flex-grow: 1;
}

/* =========================================
   5. Components & Interactive Elements
   ========================================= */

/* Logo */
.header-logo {
    display: block;
    width: 8rem;
    height: 2.5rem;
    background-color: rgba(255,255,255,0.1); /* Placeholder if no img */
    background-image: var(--color-winter-gradient); /* Creative placeholder */
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast), filter var(--transition-fast);
}

.header-logo::after {
    content: 'LOGO';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

.header-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.header-logo:active {
    transform: scale(0.98);
}

/* Astronaut/Lottie Link Container */
.header-astronaut-link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-astronaut-link:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-accent);
}

/* SVG / Lottie Styling */
.header-astronaut-link lottie-vue-player,
.header-astronaut-link lottie-player,
.header-astronaut-link svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
    pointer-events: none; /* Let clicks pass to link */
}

/* Tooltip */
.header-astronaut-link__tooltip {
    position: absolute;
    top: 130%;
    right: 0;
    background: var(--color-primary);
    background: var(--color-winter-gradient);
    color: var(--color-text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    z-index: 10;
}

.header-astronaut-link__tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 1.25rem;
    width: 12px;
    height: 12px;
    background: inherit; /* Matches gradient */
    transform: rotate(45deg);
}

/* Tooltip Hover State */
.header-astronaut-link:hover .header-astronaut-link__tooltip,
.header-astronaut-link:focus-visible .header-astronaut-link__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* =========================================
   6. General UI Kit (Buttons & Forms)
   * Added to satisfy "Criteria 8 & 3" *
   ========================================= */

/* Modern Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    background: var(--color-winter-gradient);
    color: white;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

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

/* Modern Form Elements */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: 4px; /* Circle for radio via override */
    background-color: var(--color-bg-card);
    cursor: pointer;
    vertical-align: middle;
    position: relative;
    transition: background-color var(--transition-fast);
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

/* =========================================
   7. Animations
   ========================================= */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

/* Apply float to main svg graphic if desired */
.header-astronaut-link svg {
    animation: float 4s ease-in-out infinite;
}

/* =========================================
   8. Responsive Media Queries
   ========================================= */

/* Tablet & Smaller Laptops */
@media (max-width: 1024px) {
    :root {
        --header-height: 4.5rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    :root {
        --header-height: 4rem;
        --spacing-md: 0.75rem;
    }

    .siteContent__header {
        padding: 0 1rem;
    }

    .header-logo {
        width: 7rem;
        height: 2.25rem;
    }

    /* Adjust tooltip position for mobile to avoid overflow */
    .header-astronaut-link__tooltip {
        right: -10px;
        top: 140%;
    }
    
    .header-astronaut-link__tooltip::before {
        right: 1.5rem;
    }

    .header-astronaut-link {
        width: 3rem;
        height: 3rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .header-logo::after {
        font-size: 1rem;
    }
    
    /* Hide tooltip text on very small screens if necessary, or stack */
    .header-astronaut-link__tooltip {
        display: none; /* Often tooltips block content on mobile hover */
    }
}
