:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #121214;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a5;
    --text-muted: #6a6a70;
    --accent-primary: #c47830;
    --accent-primary-rgb: 196, 120, 48;
    --accent-secondary: #b56a26;
    --gradient-start: var(--accent-primary);
    --gradient-end: #d9924b;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --nav-blur-bg-opacity: rgba(10, 10, 11, 0.8);
    --warning-color: #facc15;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --btn-primary-hover-shadow: rgba(196, 120, 48, 0.25);
    --card-border-alpha: rgba(255, 255, 255, 0.1);
    --consultancy-icon-bg: linear-gradient(135deg, rgba(56, 161, 105, 0.1), rgba(72, 187, 120, 0.02));
    --development-icon-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.02));
    --research-icon-bg: linear-gradient(135deg, rgba(192, 132, 252, 0.1), rgba(192, 132, 252, 0.02));
    --accent-primary-rgba-border: rgba(196, 120, 48, 0.3);
    --accent-primary-rgba-bg: rgba(196, 120, 48, 0.08);
    --accent-primary-bg-alpha-03: rgba(196, 120, 48, 0.3);
    --accent-primary-bg-alpha-008: rgba(196, 120, 48, 0.08);
    --card-icon-consultancy-start: rgba(56, 161, 105, 0.1);
    --card-icon-consultancy-end: rgba(72, 187, 120, 0.02);
    --card-icon-development: rgba(59, 130, 246, 0.1);
    --card-icon-development-alt: rgba(59, 130, 246, 0.02);
    --card-icon-research: rgba(192, 132, 252, 0.1);
    --card-icon-research-alt: rgba(192, 132, 252, 0.02);
    --warning-bg-alpha-008: rgba(250, 204, 21, 0.08);
    --warning-border: rgba(250, 204, 21, 0.2);
    --constellation: #777777;
    --logo-drop-shadow: rgba(34, 197, 94, 3);
    --badge: #facc15;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: grayscale;
}

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

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: var(--nav-blur-bg-opacity);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--border-color);
}

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

.logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;

    img {
        height: 26px;
        filter: drop-shadow(0 0 3px var(--logo-drop-shadow));
    }
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

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

.btn-login {
    padding: 0.5rem 1.25rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    transition: border-color 0.2s ease, color 0.2s ease !important;
}

.btn-login:hover {
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Main content */
main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Hero Section (homepage) */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Page hero — used on sub-pages (consultancy, development, research) */
.page-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 9rem 2rem 5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.page-hero .hero-content-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 640px;
}


/* Badge — used on both homepage and sub-pages */
.badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.page-hero .badge {
    margin-bottom: 1.75rem;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: linear-gradient(135deg, #c47830, #d9924b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.page-hero > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 2rem;
}


/* Back-to-services link (sub-pages only) */
.btn-secondary-back {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-secondary-back:hover {
    background: rgba(var(--accent-primary-rgb), 0.08);
    border-color: var(--accent-primary);
}



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

.btn-primary {
    padding: 0.85rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #000;
    border: none;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(196, 120, 48, 0.25);
}

.btn-secondary {
    padding: 0.85rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
}


/* Stats Section */
.stats-section {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    margin-bottom: 6rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 250px;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-number {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* Services Section */
.services-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 8rem;
}

.section-title {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-title .line {
    width: 60px;
    height: 1px;
    background: var(--border-color);
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-icon {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.consultancy::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(56, 161, 105, 0.1), rgba(72, 187, 120, 0.02));
    border-radius: 8px;
}

.development::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.02));
    border-radius: 8px;
}

.research::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.1), rgba(192, 132, 252, 0.02));
    border-radius: 8px;
}

.card-icon img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    pointer-events: none;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.card-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
    align-self: flex-start;
}

.card-link:hover {
    opacity: 0.8;
}


/* Detail section (sub-pages only) */
.detail-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem 7rem;
}

.service-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}


/* Detail card */
.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.detail-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.detail-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.detail-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    flex-grow: 1;
}


/* About Section */
.about-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 8rem;
}

.about-text-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
}

.about-text-left h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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


/* Contact Section */
.contact-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 8rem;
}

.contact-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.contact-inner h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.status-badge.pending {
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.2);
    color: var(--badge);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #facc15;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.contact-inner > p {
    color: var(--text-secondary);
    line-height: 1.7;
}


/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mono-footer {
    font-family: var(--font-mono);
}


/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 0.1s;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
}

.fade-in-up.visible {
    animation: fadeInUp 0.7s ease forwards;
    animation-delay: 0.15s;
}

.fade-in-up-delay {
    opacity: 0;
    transform: translateY(24px);
}

.fade-in-up-delay.visible {
    animation: fadeInUp 0.7s ease forwards;
    animation-delay: 0.35s;
}

.fade-in-up-delay-2 {
    opacity: 0;
    transform: translateY(24px);
}

.fade-in-up-delay-2.visible {
    animation: fadeInUp 0.7s ease forwards;
    animation-delay: 0.55s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

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


/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero h1,
    .page-hero h1 {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }

    .stats-section {
        flex-direction: column;
        align-items: center;
        padding: 2rem 1.5rem;
        margin-bottom: 4rem;
    }

    .services-section {
        padding: 4rem 1.5rem;
    }

    .detail-section {
        padding: 3rem 1.5rem;
    }

    .service-cards,
    .service-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card {
        padding: 2rem;
    }

    .detail-card {
        padding: 2rem;
    }

    .about-text-left {
        padding: 2rem;
    }

    .page-hero {
        padding: 7rem 1.5rem 4rem;
    }
}

@media (max-width: 480px) {
    .hero-inner {
        width: 100%;
    }

    .badge {
        font-size: 0.7rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        text-align: center;
        width: 100%;
    }
}
