:root {
    --bg-color: #030305;
    --bg-card: #0a0a0f;
    --text-primary: #ffffff;
    --text-secondary: #9499b0;
    --accent-blue: #00f2ff;
    --accent-violet: #8a2be2;
    --accent-gradient: linear-gradient(135deg, #00f2ff 0%, #8a2be2 100%);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: cubic-bezier(0.22, 1, 0.36, 1);
    --container-width: 1200px;
    --header-height: 70px;
    --glow: 0 0 20px rgba(0, 242, 255, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: var(--header-height); -webkit-text-size-adjust: 100%; }
body { 
    background-color: var(--bg-color); 
    color: var(--text-primary); 
    font-family: var(--font-main); 
    line-height: 1.5; 
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
section { padding: 60px 0; position: relative; }

/* --- Mobile Typography --- */
h1 { font-size: 2rem; letter-spacing: -1px; }
h2 { font-size: 1.75rem; letter-spacing: -0.5px; }
h3 { font-size: 1.25rem; }
p { font-size: 0.95rem; color: var(--text-secondary); }

/* --- Header & Nav (Mobile First) --- */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}
header.scrolled { background: rgba(5, 5, 8, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.05); }

.logo { font-size: 1.25rem; font-weight: 800; z-index: 1001; }

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}
.nav-toggle span { width: 25px; height: 2px; background: #fff; transition: var(--transition); }
.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: 0.5s var(--transition);
    z-index: 1000;
}
.nav-links.active { right: 0; }
.nav-links a { font-size: 1.5rem; font-weight: 600; color: var(--text-secondary); }
.nav-links a.active { color: #fff; }

/* --- Buttons --- */
.btn-cta, .btn-outline, .btn-discord {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    width: 100%; /* Full width on mobile */
}
.btn-cta { background: var(--accent-gradient); color: #fff; box-shadow: var(--glow); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.btn-discord { background: #5865F2; color: #fff; }

/* --- Hero Section --- */
.hero { 
    min-height: 85vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 100px 0 60px;
}
.hero-content { 
    max-width: 800px; 
    margin: 0 auto; 
    width: 100%;
}
.hero-btns { 
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    gap: 16px; 
    margin-top: 32px; 
}
.stats-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    margin-top: 60px; 
}

@media (min-width: 768px) {
    .hero-btns { flex-direction: row; }
    .stats-grid { 
        display: flex; 
        justify-content: center; 
        gap: 60px; 
    }
}

/* Expertise */
.expertise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.expertise-card { background: var(--bg-card); padding: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); text-align: center; }
.expertise-card i { font-size: 1.5rem; display: block; margin-bottom: 10px; color: var(--accent-blue); }
.expertise-card span { font-size: 0.85rem; font-weight: 600; }

/* Services */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.service-card { background: var(--bg-card); padding: 30px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }
.service-icon { font-size: 2rem; margin-bottom: 20px; }

/* Projects */
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.portfolio-item { background: var(--bg-card); border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: var(--transition); display: flex; flex-direction: column; }
.portfolio-item:hover { transform: translateY(-5px); border-color: rgba(0, 242, 255, 0.2); }
.portfolio-img { aspect-ratio: 16/9; overflow: hidden; }
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.portfolio-item:hover .portfolio-img img { transform: scale(1.05); }

.portfolio-info { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.portfolio-info h3 { font-size: 1.25rem; margin-bottom: 15px; }

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.tag { background: rgba(0, 242, 255, 0.08); color: var(--accent-blue); padding: 5px 12px; border-radius: 999px; font-size: 0.7rem; font-weight: 500; border: 1px solid rgba(0, 242, 255, 0.1); }

.project-description { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); padding: 15px; border-radius: 12px; backdrop-filter: blur(10px); }
.project-description p { font-size: 0.85rem; line-height: 1.6; color: var(--text-secondary); }

/* Process */
.process-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.process-step { padding: 30px; background: var(--bg-card); border-radius: 16px; position: relative; }
.step-number { font-size: 3rem; font-weight: 800; opacity: 0.05; position: absolute; top: 10px; right: 20px; }

/* Testimonials */
.testimonial-card { min-width: 100%; background: var(--bg-card); padding: 30px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }

/* CTA */
.cta { background: #fff; color: #000; margin: 40px 20px; padding: 60px 20px; border-radius: 24px; text-align: center; }
.cta h2 { font-size: 2rem; margin-bottom: 30px; }

/* Footer */
footer { padding: 60px 0 30px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.footer-brand p { max-width: 100%; }
.footer-bottom { flex-direction: column; gap: 15px; text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); }

/* --- Tablet Adaptations (768px+) --- */
@media (min-width: 768px) {
    section { padding: 60px 0; }
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    
    .nav-toggle { display: none; }
    .nav-links { 
        position: static; width: auto; height: auto; 
        background: transparent; flex-direction: row; gap: 40px; 
    }
    .nav-links a { font-size: 0.95rem; }
    .nav-links .btn-cta { display: none; }

    .btn-cta, .btn-outline, .btn-discord { width: auto; }
    .hero-btns { flex-direction: row; }
    
    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 40px; }
    .expertise-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .process-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* --- Desktop Adaptations (1024px+) --- */
@media (min-width: 1024px) {
    section { padding: 80px 0; }
    .container { padding: 0 40px; }
    
    .portfolio-info { padding: 30px; }
    .portfolio-info h3 { font-size: 1.5rem; }
    .project-description p { font-size: 0.9rem; }
    
    h1 { font-size: 3.75rem; max-width: 900px; margin-inline: auto; }
    h2 { font-size: 2.8rem; }
    p { font-size: 1.05rem; }

    .hero p { max-width: 700px; }
    
    .expertise-grid { grid-template-columns: repeat(4, 1fr); }
    .services-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* --- Large Desktop (1280px+) --- */
@media (min-width: 1280px) {
    .container { padding: 0; }
    h1 { font-size: 4rem; }
}

/* Animations */
.reveal { opacity: 1; transform: none; }
.js-reveal { opacity: 0; transform: translateY(30px); }

.loader { 
    position: fixed; 
    inset: 0; 
    background: var(--bg-color); 
    z-index: 10000; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
}
.loader-bar { width: 0; height: 2px; background: #fff; margin-top: 20px; }
