/* Base Variables - Defaulting to Dark Theme initially, but customizable */
:root {
    --primary-color: #0d0d0d;
    --accent-color: #dc8e93;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --background-color: #050505;
    --card-bg: #1a1a1a;
    --header-bg: #ffffff;
    --header-text: #0d0d0d;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* For z-index context */
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Sit above body background, below content */
    pointer-events: none;
    /* Let clicks pass through */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

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

.section {
    padding: 5rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.flex {
    display: flex;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.gap-1 {
    gap: 1rem;
}

/* Header */
header {
    background-color: var(--header-bg);
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--header-text);
    opacity: 0.8;
}

.nav-links a:hover {
    color: var(--accent-color);
    opacity: 1;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(26, 26, 26, 0.3) 0%, rgba(5, 5, 5, 0.8) 100%);
    /* transparency for canvas */
    padding-top: 80px;
    position: relative;
    z-index: 1;
}

main {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

/* Features / Services */
.card {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.card h3 {
    margin-bottom: 1rem;
    color: #ffffff;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Stats Section */
.stats {
    background-color: #0a0a0a;
    text-align: center;
}

.stat-item h2 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* Footer */
footer {
    background-color: #000;
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    color: #555;
    font-size: 0.85rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Navigation & Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    /* Above mobile menu */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--header-text);
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar {
        background-color: var(--header-text);
        /* Ensure contrast */
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        /* Below header */
        gap: 0;
        flex-direction: column;
        background-color: var(--header-bg);
        /* Use header bg for consistency */
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid var(--border-color);
        padding: 2rem 0;
    }

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

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    /* Adjust grids for mobile */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Mobile Menu - Hero Adjustment */
    .hero {
        min-height: 100vh;
        padding: 8rem 0 5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger {
        display: block;
        margin-left: auto;
        /* Push to the right */
    }

    /* Force bar color to black for contrast */
    .bar {
        background-color: #000;
    }

    /* Stack Tech Grid Items */
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

/* Tech Stack Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.tech-category {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tech-category h4 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}


.tech-icons i {
    font-size: 3rem;
    color: #fff;
    transition: transform 0.3s ease, color 0.3s ease;
    position: relative;
    /* For tooltip positioning */
    cursor: pointer;
}


.tech-icons i:hover {
    transform: scale(1.2);
    color: var(--accent-color);
    z-index: 10;
}

/* Custom Tooltip - Persistent Elements to prevent flickering */
.tech-icons i::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: var(--accent-color);
    color: #000;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 4px;
    margin-bottom: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    font-family: var(--font-body);
}

.tech-icons i:hover::after {
    opacity: 1;
    visibility: visible;
}



.tech-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.tech-tag:hover {
    background: var(--accent-color);
    color: #000;
}

/* Services Page Enhancements */
.service-section {
    padding: 8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.service-section:nth-child(even) {
    background: linear-gradient(to bottom, #050505, #0a0a0a);
}

.service-section:nth-child(odd) {
    background: linear-gradient(to bottom, #0a0a0a, #050505);
}

.service-header {
    margin-bottom: 4rem;
    position: relative;
    padding-left: 20px;
}

.service-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.service-header h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.service-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 100%;
    /* Changed from 600px to allow single line */
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 12px;
    transition: all 0.4s ease;
    height: 100%;
}

.glass-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.glass-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
}

.glass-card p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.7;
}