@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");
@import "variables.css";

/* === RESET & BASE === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-deep);
    /* Subtle grid spotlight */
    background-image:
        radial-gradient(
            circle at 50% 0%,
            rgba(59, 130, 246, 0.08) 0%,
            transparent 60%
        ),
        var(--bg-grid);
    background-size:
        100% 100%,
        44px 44px,
        44px 44px;
    color: var(--text-grey);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

small,
.feature-list span,
.project-tag,
.meta-text,
.price-tag {
    font-family: var(--font-mono);
    letter-spacing: 0.01em;
}

h1,
h2,
h3 {
    color: var(--text-white);
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}
img {
    max-width: 100%;
    display: block;
}

/* === UTILITIES === */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

/* Gradient Text (Fix: Padding added to prevent clipping) */
.text-gradient {
    background: var(--grad-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
    font-weight: 800;

    padding-bottom: 0.1em;
    padding-right: 0.1em;
    display: inline-block;
    line-height: 1.2;
}
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-base);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-base);
    background: var(--surface-card);
    color: var(--text-white);
}

.btn-primary {
    background: var(--grad-primary);
    color: var(--text-white);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.45);
    border-color: rgba(59, 130, 246, 0.7);
}
.btn-primary:hover {
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
}
.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
}

/* === NAVIGATION === */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-base);
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}
.logo span {
    color: var(--accent-cyan);
}

.nav-links a {
    color: var(--text-off-white);
    margin-left: 2.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}
.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    transition: width 0.3s ease;
}
.nav-links a:hover::after {
    width: 100%;
}
.nav-links a:hover {
    color: var(--text-white);
}

/* === HERO SECTION === */
.hero {
    min-height: 85vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
    padding-top: 2rem;
}
.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}
.hero p {
    font-size: 1.25rem;
    color: var(--text-grey);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

/* === THE CUBE (Glass + Neon) === */
.hero-graphic {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
}
.cube {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    animation: spin 12s infinite linear;
}
.face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid var(--border-base);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: 900;
    color: var(--text-white);
    backdrop-filter: blur(2px);
}
.front {
    transform: translateZ(100px);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3) inset;
}
.back {
    transform: rotateY(180deg) translateZ(100px);
}
.right {
    transform: rotateY(90deg) translateZ(100px);
}
.left {
    transform: rotateY(-90deg) translateZ(100px);
}
.top {
    transform: rotateX(90deg) translateZ(100px);
    background: rgba(59, 130, 246, 0.08);
}
.bottom {
    transform: rotateX(-90deg) translateZ(100px);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

@keyframes spin {
    0% {
        transform: rotateX(-20deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(-20deg) rotateY(360deg);
    }
}

/* === SERVICES GRID === */
.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

/* Card Styles (Refined Transition) */
.card {
    background: var(--surface-card);
    border: 1px solid var(--border-base);
    padding: 2.5rem;
    border-radius: var(--radius-base);
    position: relative;
    overflow: hidden;

    /* Performance Optimization */
    transition:
        transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    will-change: transform, box-shadow;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(59, 130, 246, 0.4);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* SVG Icon Styling */
.card-icon {
    margin-bottom: 1.5rem;
    display: inline-block;
}
.card-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--accent-cyan);
    stroke-width: 1.5;
    fill: none;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
    transition:
        stroke 0.3s ease,
        filter 0.3s ease;
}
.card:hover .card-icon svg {
    stroke: var(--accent-blue);
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.5));
}

/* === FOOTER === */
footer {
    border-top: 1px solid var(--border-base);
    background: var(--surface-card);
    color: var(--text-grey);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 4rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .hero-graphic {
        height: 350px;
    }
    .nav-links {
        display: none;
    }
    .grid-2x2 {
        grid-template-columns: 1fr;
    }
}

/* === INTERNAL PAGE STYLES === */

/* Feature Rows (For Services Page) */
.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}
.feature-row.reverse {
    direction: rtl;
} /* Flips text/image for alternating layout */
.feature-row.reverse .feature-text {
    direction: ltr;
} /* Keeps text readable */

.feature-image {
    background: var(--surface-card);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-base);
    padding: 1rem;
    box-shadow: var(--shadow-card);
    position: relative;
}
/* Neon corner accent */
.feature-image::after {
    content: "";
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    border-right: 2px solid var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
}
.feature-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-off-white);
}
.feature-list li::before {
    content: "▹";
    color: var(--accent-cyan);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}
.project-card {
    display: block; /* Make whole card clickable */
    background: var(--surface-card);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-base);
    overflow: hidden;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}
.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-neon);
}
.project-img {
    height: 200px;
    background: #050505;
    object-fit: cover;
    width: 100%;
    border-bottom: 1px solid var(--border-base);
}
.project-content {
    padding: 1.5rem;
}
.project-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-base);
    background: rgba(59, 130, 246, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(59, 130, 246, 0.4);
    margin-bottom: 0.5rem;
}

/* Contact Form (Cyberpunk Input Styles) */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-white);
    font-weight: 500;
}
.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: #050505;
    border: 1px solid var(--border-base);
    border-radius: var(--radius-base);
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    background: #0a0a0a;
}

@media (max-width: 768px) {
    .feature-row,
    .feature-row.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 2rem;
    }
    .feature-image::after {
        display: none;
    }
}

/* === MOBILE MENU STYLES === */
.mobile-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 101;
}
.mobile-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-white);
    transition: 0.3s ease;
}

/* Mobile Responsive Override */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        border-bottom: 1px solid var(--border-base);

        /* Hide by default */
        display: none;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

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

    /* Hamburger Animation */
    .mobile-toggle.open .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .mobile-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-toggle.open .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}
