@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0a0a0a;
    --card-bg: #161616;
    --text-primary: #ffffff;
    --text-secondary: #d1d1d1; /* Brightened for better legibility */
    --accent-color: #3b82f6; /* Modern Blue */
    --accent-glow: rgba(59, 130, 246, 0.2);
    --border-color: #2a2a2a;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 100px 0;
}

/* Header */
header {
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: url('../img/hero-bg.png') no-repeat center center;
    background-size: cover;
    perspective: 1000px;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 90%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
    animation: floating3d 6s ease-in-out infinite;
}

@keyframes floating3d {
    0%, 100% { transform: translateZ(20px) rotateX(2deg) rotateY(-2deg); }
    50% { transform: translateZ(50px) rotateX(-2deg) rotateY(2deg); }
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.4rem;
    color: #ffffff; /* Maximum contrast for the main description */
    max-width: 850px;
    margin: 0 auto 2.5rem;
    text-shadow: 0 5px 20px rgba(0,0,0,0.8), 0 0 10px rgba(255,255,255,0.1);
    font-weight: 400;
    line-height: 1.5;
}

/* Custom Solutions Banner */
.custom-banner {
    padding: 120px 0;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('../img/custom-banner.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    text-align: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.banner-content {
    max-width: 900px;
    margin: 0 auto;
}

.banner-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.banner-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.badge-custom {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 5px;
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.project-tag {
    font-size: 0.75rem;
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.project-card h3 {
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.project-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.project-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

.gallery-img {
    height: 180px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    flex-shrink: 0;
}

.gallery-img:hover {
    border-color: var(--accent-color);
    transform: scale(1.02);
}

/* 3D Carousel (Spinner) */
.carousel-3d-stage {
    perspective: 1500px;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* Removed overflow:hidden to prevent 3D clipping */
}

.carousel-3d-inner {
    position: relative;
    width: 320px;
    height: 200px;
    transform-style: preserve-3d;
    /* Push the carousel back so it rotates around the center */
    transform: translateZ(calc(var(--radius) * -1));
    animation: rotateCarousel 40s linear infinite;
}

.carousel-3d-inner:hover {
    animation-play-state: paused;
}

@keyframes rotateCarousel {
    from { transform: translateZ(calc(var(--radius) * -1)) rotateY(0deg); }
    to { transform: translateZ(calc(var(--radius) * -1)) rotateY(360deg); }
}

.carousel-3d-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    /* Each item is rotated and then pushed out by the radius */
    transform: rotateY(var(--angle)) translateZ(var(--radius));
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    transition: var(--transition);
}

.carousel-3d-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 50px var(--accent-glow);
    transform: rotateY(var(--angle)) translateZ(calc(var(--radius) + 80px)) scale(1.1);
    z-index: 100;
}

.carousel-3d-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .carousel-3d-stage { 
        height: 500px; /* More vertical space */
        perspective: 1200px; /* Adjusted for mobile depth */
    }
    .carousel-3d-inner { 
        width: 260px; /* Slightly narrower for better spacing */
        height: 160px; 
    }
    .carousel-3d-item {
        /* Significantly larger radius multiplier for mobile to separate cards */
        transform: rotateY(var(--angle)) translateZ(calc(var(--radius) * 0.95));
    }
}

.meta-item {
    margin-bottom: 0.8rem;
}

.meta-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.meta-value {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
}

.skill-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .nav-links {
        display: none;
    }
    .banner-content h2 {
        font-size: 2.2rem;
    }
    .banner-content p {
        font-size: 1rem;
    }
    .project-gallery {
        height: 250px; /* Larger project images on mobile */
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    animation: pulse-wa 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #128c7e;
    color: #fff;
}

@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.wa-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #ff4d4d;
    border-radius: 50%;
    border: 2px solid #fff;
}
