@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #10152e;
    --accent-primary: #007cff;
    --accent-secondary: #00d4ff;
    --highlight-primary: #ff8800;
    --highlight-secondary: #ff3995;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --border-color: rgba(0, 124, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(0, 124, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 124, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Glow Effects */
.glow-accent {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.glow-1 {
    background: var(--accent-primary);
    top: -300px;
    left: -300px;
    animation: float 20s ease-in-out infinite;
}

.glow-2 {
    background: var(--accent-secondary);
    bottom: -300px;
    right: -300px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(100px, 100px); }
}

/* Card Styles */
.card {
    background: rgba(16, 21, 46, 0.6);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 124, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 124, 255, 0.1);
}

/* Navigation */
.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn-primary {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.75rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: var(--bg-primary);
}

.btn-primary:hover::before {
    left: 0;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-secondary {
    background: linear-gradient(135deg, var(--highlight-primary) 0%, var(--highlight-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Glitch Effect for Hero */
.glitch {
    position: relative;
    font-weight: 700;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    color: var(--accent-primary);
    animation: glitch1 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    color: var(--accent-secondary);
    animation: glitch2 3s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
}

/* Responsive */
@media (max-width: 768px) {
    .grid-background { background-size: 30px 30px; }
    .glow-accent { width: 400px; height: 400px; }
}

/* Floating Cards */
.floating-cards-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Mobile: Cards below buttons */
.floating-cards-container-mobile {
    display: none;
}

@media (max-width: 768px) {
    .floating-cards-container {
        display: none;
    }
    
    .floating-cards-container-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }
}

@media (max-width: 640px) {
    .floating-cards-container-mobile {
        grid-template-columns: 1fr;
    }
}

.floating-card {
    position: absolute;
    background: rgba(16, 21, 46, 0.8);
    border: 1px solid rgba(0, 124, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 280px;
    pointer-events: auto;
    transition: all 0.3s ease;
    animation-duration: 20s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.floating-card:hover {
    border-color: rgba(0, 124, 255, 0.5);
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 124, 255, 0.2);
    animation-play-state: paused;
}

.card-1 {
    top: 15%;
    left: 5%;
    animation-name: float-card-1;
}

.card-2 {
    top: 20%;
    right: 2%;
    animation-name: float-card-2;
    animation-delay: -5s;
}

.card-3 {
    bottom: 20%;
    left: 10%;
    animation-name: float-card-3;
    animation-delay: -10s;
}

.card-4 {
    bottom: 15%;
    right: 5%;
    animation-name: float-card-4;
    animation-delay: -15s;
}

@keyframes float-card-1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -30px) rotate(2deg); }
    50% { transform: translate(-15px, -20px) rotate(-1deg); }
    75% { transform: translate(25px, 10px) rotate(1deg); }
}

@keyframes float-card-2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-25px, 20px) rotate(-2deg); }
    50% { transform: translate(20px, 30px) rotate(1deg); }
    75% { transform: translate(-20px, -15px) rotate(-1deg); }
}

@keyframes float-card-3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, 25px) rotate(1deg); }
    50% { transform: translate(-20px, -30px) rotate(-2deg); }
    75% { transform: translate(15px, 20px) rotate(1deg); }
}

@keyframes float-card-4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-30px, -20px) rotate(-1deg); }
    50% { transform: translate(25px, 25px) rotate(2deg); }
    75% { transform: translate(-15px, 30px) rotate(-1deg); }
}

/* Responsive Floating Cards */
@media (max-width: 1024px) {
    .floating-card {
        max-width: 220px;
        padding: 1rem;
    }
    
    .card-1 { top: 10%; left: 3%; }
    .card-2 { top: 5%; right: 3%; }
    .card-3 { bottom: 19%; left: 2%; }
    .card-4 { bottom: 20%; right: 3%; }
}

@media (max-width: 768px) {
    .floating-card {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        max-width: 100%;
        animation: none;
    }
    
    .floating-card:hover {
        transform: scale(1.02);
    }
}

/* Contact Form Styles */
input[type="text"],
input[type="email"],
textarea {
    font-family: 'Space Grotesk', sans-serif;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 124, 255, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}
