:root {
    --bg-color: #0a0a0f;
    --text-color: #f0f0f5;
    --primary: #00f0ff;
    --secondary: #ff0055;
    --accent: #7000ff;
    --glass-bg: rgba(25, 25, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

body.dark-theme {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Background Effects */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
}

.blob {
    position: fixed;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: 10%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: var(--accent);
    border-radius: 50%;
}

.blob-2 {
    bottom: 10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
    border-radius: 50%;
    animation-delay: -10s;
}

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

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

/* Buttons */
.btn-primary, .btn-primary-small {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}

.btn-primary {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-primary-small {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.btn-primary:hover, .btn-primary-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3);
    color: white;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 0 10%;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    position: relative;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--primary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 31px, 0); }
    20% { clip: rect(62px, 9999px, 13px, 0); }
    40% { clip: rect(34px, 9999px, 94px, 0); }
    60% { clip: rect(88px, 9999px, 56px, 0); }
    80% { clip: rect(22px, 9999px, 11px, 0); }
    100% { clip: rect(4px, 9999px, 78px, 0); }
}

.hero p {
    font-size: 1.2rem;
    color: #a0a0b0;
    margin-bottom: 2.5rem;
}

/* 3D Cube Animation */
.cube-wrapper {
    perspective: 1000px;
    width: 300px;
    height: 300px;
    margin: auto;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 20s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(112, 0, 255, 0.2);
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4) inset;
    top: 50px;
    left: 50px;
}

.front  { transform: rotateY(0deg) translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.right  { transform: rotateY(90deg) translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.top    { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotate {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Typography Shared */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(90deg, #fff, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Services */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    transition: transform 0.4s ease, background 0.4s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(25, 25, 35, 0.8);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.service-card p {
    color: #a0a0b0;
    font-size: 0.95rem;
}

/* Portfolio */
.grid-portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-card:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay span {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact */
.contact-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.info-item {
    margin: 1.5rem 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.info-item .icon {
    font-size: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    color: #606070;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 2rem;
        margin-top: 80px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-3d-placeholder {
        margin: 2rem auto;
    }
    
    .nav-links {
        display: none; /* In a real app, add a hamburger menu */
    }
}
