/* ══════════════════════════════════════════════════
   SouthLab.eu — Dark Tech/Cyber Theme
   ══════════════════════════════════════════════════ */

/* ── Reset & Variables ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:          #0a0e17;
    --bg-card:     #111827;
    --bg-card-alt: #0f172a;
    --border:      #1e293b;
    --border-glow: rgba(0, 229, 255, 0.2);
    --primary:     #00e5ff;
    --primary-dim: rgba(0, 229, 255, 0.15);
    --secondary:   #3b82f6;
    --text:        #e2e8f0;
    --text-light:  #94a3b8;
    --text-muted:  #64748b;
    --white:       #ffffff;
    --danger:      #ef4444;
    --success:     #22c55e;
    --glow:        0 0 20px rgba(0, 229, 255, 0.15);
    --glow-strong: 0 0 40px rgba(0, 229, 255, 0.25);
    --radius:      12px;
    --radius-sm:   8px;
    --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:   'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--white); }

img { max-width: 100%; height: auto; }

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

/* ── Typography ────────────────────────────────── */
h1, h2, h3, h4 { color: var(--white); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title h2 { margin-bottom: .5rem; }
.section-title p { color: var(--text-light); max-width: 600px; margin: 0 auto; }

.accent { color: var(--primary); }
.glow-text { text-shadow: 0 0 20px rgba(0, 229, 255, 0.4); }

/* ── Buttons ───────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: .95rem;
    border: none;
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--bg);
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 229, 255, 0.5);
    color: var(--bg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary-dim);
    transform: translateY(-2px);
    color: var(--primary);
}

/* ── Navigation ────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all .3s ease;
}

.navbar.scrolled {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: .6rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img { height: 40px; }

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

.nav-links a {
    color: var(--text-light);
    font-size: .9rem;
    font-weight: 500;
    transition: color .2s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    box-shadow: 0 0 8px var(--primary);
}

.nav-cta {
    padding: .5rem 1.2rem !important;
    background: var(--primary-dim);
    border: 1px solid var(--primary);
    border-radius: 50px;
    color: var(--primary) !important;
    font-weight: 600 !important;
}
.nav-cta:hover {
    background: var(--primary);
    color: var(--bg) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: .5rem;
}

/* ── Hero ──────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

/* Animated grid background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

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

/* Glow orbs */
.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 1rem;
    background: var(--primary-dim);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 50px;
    font-size: .8rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-badge .pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(1.5); }
}

.hero h1 { margin-bottom: 1.2rem; }
.hero h1 span { color: var(--primary); }

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 550px;
    line-height: 1.7;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.hero-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    font-family: var(--font-mono);
}
.hero-stat-value .accent { font-weight: 800; }
.hero-stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Sections ──────────────────────────────────── */
section { padding: 6rem 0; }

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity .3s;
}

.service-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--glow);
    transform: translateY(-4px);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.service-card h3 { margin-bottom: .6rem; }
.service-card p { color: var(--text-light); font-size: .9rem; line-height: 1.6; }

/* ── About ─────────────────────────────────────── */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-text .highlight {
    color: var(--primary);
    font-weight: 600;
}

.about-visual {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
}

.about-visual::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Terminal mockup */
.terminal {
    background: #0d1117;
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: .82rem;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1rem;
    background: #161b22;
    border-bottom: 1px solid #21262d;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-body {
    padding: 1rem;
    line-height: 1.8;
    color: #c9d1d9;
}

.terminal-body .prompt { color: var(--primary); }
.terminal-body .cmd { color: #f0f6fc; }
.terminal-body .comment { color: var(--text-muted); }
.terminal-body .string { color: #a5d6ff; }
.terminal-body .success { color: var(--success); }

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .3s;
}
.stat-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--glow);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    display: block;
}

.stat-label {
    font-size: .82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: .3rem;
}

/* ── Why Choose Us ─────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .3s;
}
.feature-item:hover {
    border-color: var(--border-glow);
    box-shadow: var(--glow);
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.feature-item h3 { font-size: 1rem; margin-bottom: .3rem; }
.feature-item p { color: var(--text-light); font-size: .85rem; }

/* ── Technologies ──────────────────────────────── */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
    transition: all .3s;
    cursor: default;
}

.tech-badge:hover {
    border-color: var(--primary);
    box-shadow: var(--glow);
    color: var(--primary);
    transform: translateY(-2px);
}

.tech-badge .tech-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

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

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s;
}
.portfolio-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--glow);
    transform: translateY(-4px);
}

.portfolio-preview {
    height: 200px;
    background: linear-gradient(135deg, var(--bg-card-alt), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.portfolio-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

.portfolio-info { padding: 1.5rem; }
.portfolio-info h3 { margin-bottom: .3rem; }

.portfolio-category {
    font-size: .75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: .6rem;
}

.portfolio-info p { color: var(--text-light); font-size: .88rem; }

/* ── Contact ───────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.form-group { margin-bottom: 1.2rem; }

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: .4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: .75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: .9rem;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-message {
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    margin-bottom: 1rem;
    display: none;
}
.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
    display: block;
}
.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    display: block;
}

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }

.contact-info-card {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .3s;
}
.contact-info-card:hover {
    border-color: var(--border-glow);
}

.contact-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.contact-info-card h4 {
    font-size: .85rem;
    margin-bottom: .2rem;
}
.contact-info-card p {
    color: var(--text-light);
    font-size: .88rem;
}

/* ── Footer ────────────────────────────────────── */
.footer {
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo img { height: 32px; }

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}
.footer-links a {
    color: var(--text-muted);
    font-size: .85rem;
    transition: color .2s;
}
.footer-links a:hover { color: var(--primary); }

.footer-copy {
    width: 100%;
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .8rem;
}

/* ── Animations ────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── Mobile Responsive ─────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.2rem;
        transition: right .3s ease;
        border-left: 1px solid var(--border);
        z-index: 1001;
    }
    .nav-links.show { right: 0; }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s;
    }
    .nav-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: var(--text);
        font-size: 1.5rem;
        cursor: pointer;
    }

    .hero { min-height: auto; padding: 7rem 0 4rem; }
    .hero-stats { gap: 1.5rem; flex-wrap: wrap; }

    .about-content { grid-template-columns: 1fr; gap: 2rem; }

    .stats-row { grid-template-columns: repeat(2, 1fr); }

    .contact-grid { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; }

    .footer-inner { justify-content: center; text-align: center; }
    .footer-links { justify-content: center; }

    section { padding: 4rem 0; }
}

@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .hero-stats { gap: 1rem; }
    .stats-row { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .stat-number { font-size: 1.6rem; }
}
