/* === CSS RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-accent: #1a1a1a;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-accent: #666666;

    /* Brand Colors */
    --brand-primary: #00d4ff;
    --brand-secondary: #0099cc;
    --brand-glow: rgba(0, 212, 255, 0.6);

    /* Neural Network Colors */
    --neural-primary: rgba(0, 212, 255, 0.4);
    --neural-secondary: rgba(0, 212, 255, 0.1);
    --neural-glow: rgba(0, 212, 255, 0.8);

    /* Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: 20px;

    /* Typography */
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Animations */
    --transition-fast: 0.2s ease-out;
    --transition-normal: 0.4s ease-out;
    --transition-slow: 0.8s ease-out;
}

/* === GLOBAL STYLES === */
html {
    height: 100%;
    overflow: hidden;
    /* Improved mobile scrolling */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Better mobile touch handling */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* === NEURAL NETWORK BACKGROUND === */
#neuralCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* === AMBIENT LIGHTS === */
.ambient-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.light {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.light-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--brand-primary) 0%, transparent 70%);
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.light-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #00ffaa 0%, transparent 70%);
    top: 60%;
    right: 15%;
    animation-delay: -3s;
}

.light-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #ff6b6b 0%, transparent 70%);
    bottom: 20%;
    left: 10%;
    animation-delay: -6s;
}

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

/* === GRID OVERLAY === */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0.02;
    background-image:
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* === MAIN CONTAINER === */
.main-container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(var(--glass-blur));
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    /* Improved mobile */
    min-height: 60px;
}

.brand {
    position: relative;
    display: flex;
    align-items: center;
}

.brand-text {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
}

.brand-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--brand-glow);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.6;
    animation: pulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* === CONTACT NAVIGATION === */
.contact-nav {
    display: flex;
    gap: var(--spacing-sm);
}

.contact-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition-normal);
    text-decoration: none;
    cursor: pointer;
    /* Better mobile touch targets */
    min-width: 44px;
    min-height: 44px;
}

.contact-link:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--brand-primary);
    box-shadow: 0 0 20px var(--brand-glow);
    transform: translateY(-2px);
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.contact-link:hover .contact-icon {
    color: var(--brand-primary);
}

/* Tooltip */
.contact-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    font-family: var(--font-mono);
    z-index: 1001;
}

.contact-link:hover::after {
    opacity: 1;
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    min-height: 100vh;
    /* Better mobile spacing */
    padding-top: calc(60px + var(--spacing-md));
    padding-bottom: calc(60px + var(--spacing-md));
}

.content-wrapper {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

/* === PRIMARY STATEMENT === */
.primary-statement {
    margin-bottom: var(--spacing-lg);
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-md);
}

.title-line {
    display: block;
    animation: titleReveal 1.2s ease-out forwards;
    opacity: 0;
    transform: translateY(40px);
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
    color: var(--text-secondary);
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
    background: linear-gradient(135deg, var(--brand-primary), #00ffaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
    text-shadow: 0 0 30px var(--brand-glow);
}

.title-line:nth-child(3) {
    animation-delay: 0.6s;
    color: var(--text-primary);
}

@keyframes titleReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SECONDARY INFO === */
.secondary-info {
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 1s ease-out 0.8s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tag {
    position: relative;
    padding: 6px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.tag:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 0 15px var(--brand-glow);
}

.separator {
    color: var(--brand-primary);
    font-weight: 700;
    opacity: 0.7;
}

/* === DESCRIPTOR === */
.descriptor {
    animation: fadeInUp 1s ease-out 1.2s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.descriptor-text {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === FOOTER === */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    /* Improved mobile */
    min-height: 60px;
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-accent);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-primary);
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--brand-glow);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.status-text {
    letter-spacing: 0.02em;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .header {
        padding: var(--spacing-sm);
    }

    .contact-nav {
        gap: 8px;
    }

    .contact-link {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    .main-content {
        padding: calc(60px + var(--spacing-sm)) var(--spacing-sm) calc(60px + var(--spacing-sm));
    }

    .tagline {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .separator {
        display: none;
    }

    .descriptor-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    .light {
        display: none; /* Hide ambient lights on mobile for performance */
    }

    .grid-overlay {
        background-size: 25px 25px;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 1rem;
    }

    .contact-link {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .contact-icon {
        width: 18px;
        height: 18px;
    }

    .main-title {
        font-size: clamp(2rem, 10vw, 4rem);
        line-height: 1;
    }

    .descriptor-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .tag {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .status-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    .header, .footer {
        padding: 8px 12px;
    }

    .main-content {
        padding: calc(60px + 12px) 12px calc(60px + 12px);
    }

    .contact-nav {
        gap: 6px;
    }

    .contact-link {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .contact-icon {
        width: 16px;
        height: 16px;
    }
}

/* Landscape mobile orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .main-content {
        padding-top: calc(50px + var(--spacing-sm));
        padding-bottom: calc(50px + var(--spacing-sm));
    }

    .header, .footer {
        min-height: 50px;
    }

    .primary-statement {
        margin-bottom: var(--spacing-md);
    }

    .secondary-info {
        margin-bottom: var(--spacing-md);
    }
}

/* === CUSTOM SCROLLBAR (for any overflow) === */
::-webkit-scrollbar {
    width: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 2px;
}

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

/* === SELECTION STYLES === */
::selection {
    background: var(--brand-glow);
    color: var(--text-primary);
}

::-moz-selection {
    background: var(--brand-glow);
    color: var(--text-primary);
}
