/* --- CSS RESET & VARIABLES --- */
:root {
    --primary: #16C784;
    --primary-glow: rgba(22, 199, 132, 0.4);
    --primary-dark: #12A66D;
    --secondary: #22C55E;
    --bg-dark: #070a14;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

/* --- AMBIENT GLOW BLOBS --- */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}

.blob-1 {
    width: 40vw;
    height: 40vw;
    top: -10%;
    left: -10%;
    background: var(--primary);
}

.blob-2 {
    width: 50vw;
    height: 50vw;
    bottom: -10%;
    right: -10%;
    background: var(--secondary);
}

.blob-3 {
    width: 30vw;
    height: 30vw;
    top: 40%;
    right: 20%;
    background: #3b82f6;
    opacity: 0.05;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #4ade80);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-primary-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: #fff;
}

.btn-primary-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    color: #fff;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

.w-100 { width: 100%; justify-content: center; }

/* --- GLASS CARD --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(22, 199, 132, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* --- NAVBAR --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

#navbar.scrolled {
    padding: 1rem 0;
    background: rgba(7, 10, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
}

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

.logo {
    position: relative;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 10px rgba(22, 199, 132, 0.4)) brightness(1.2) contrast(1.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* --- HERO SECTION --- */
#hero {
    padding: 12rem 0 6rem;
    overflow: visible; /* Ensure rotating glows aren't clipped */
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(22, 199, 132, 0.1);
    border: 1px solid rgba(22, 199, 132, 0.2);
    color: var(--primary);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

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

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-cube {
    position: absolute;
    border-radius: 40px;
    z-index: 1;
    backdrop-filter: blur(1.5px);
    mix-blend-mode: screen;
    box-shadow: inset 0 0 15px rgba(22, 199, 132, 0.2); /* Use inside glow */
    border: none; /* Remove explicit border to avoid side artifacts */
}

.cube-1 {
    width: 420px;
    height: 420px;
    animation: rotateCube 25s linear infinite;
    background: radial-gradient(circle at center, rgba(22, 199, 132, 0.05) 0%, transparent 70%);
    box-shadow: 0 0 40px rgba(22, 199, 132, 0.1);
}

.cube-2 {
    width: 340px;
    height: 340px;
    animation: rotateCubeInverse 18s linear infinite;
    border-color: rgba(59, 130, 246, 0.15);
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
}

@keyframes rotateCube {
    from { transform: rotate(0deg) scale(0.9); }
    50% { transform: rotate(180deg) scale(1.1); }
    to { transform: rotate(360deg) scale(0.9); }
}

@keyframes rotateCubeInverse {
    from { transform: rotate(360deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(0.9); }
    to { transform: rotate(0deg) scale(1.1); }
}

.hero-main-img {
    width: 105%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 10;
    transform-origin: center;
    animation: heroPulse 6s ease-in-out infinite, heroFloat 8s ease-in-out infinite;
    filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.8));
    overflow: visible;
}

.hero-glow-outer {
    position: absolute;
    width: 140%; /* Increase size to avoid hard edges */
    height: 140%;
    background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 65%);
    z-index: 1;
    animation: glowRotate 10s linear infinite;
    opacity: 0.5;
    pointer-events: none;
}

.hero-glow-inner {
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
    filter: blur(80px);
    z-index: 2;
    opacity: 0.3;
    animation: pulseInner 4s ease-in-out infinite;
}

@keyframes heroPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(22, 199, 132, 0.2)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 35px rgba(22, 199, 132, 0.4)); }
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

@keyframes glowRotate {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.1); }
}

@keyframes pulseInner {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

.floating-chip {
    position: absolute;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.chip-1 { top: 20%; right: -20px; animation: floatChip 5s ease-in-out infinite; }
.chip-2 { bottom: 20%; left: -20px; animation: floatChip 5s ease-in-out infinite reverse; }

@keyframes floatChip {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- SERVICES --- */
#services {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card .icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-box.primary { background: rgba(22, 199, 132, 0.1); color: var(--primary); }
.icon-box.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.icon-box.purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.icon-box.teal { background: rgba(20, 184, 166, 0.1); color: #14b8a6; }

.service-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.service-card p { color: var(--text-muted); font-size: 0.9375rem; }

/* --- PROJECTS --- */
#projects {
    padding: 8rem 0;
    background: rgba(22, 199, 132, 0.02);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    padding: 0;
    cursor: pointer;
    overflow: hidden;
}

.project-thumb {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-glass);
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-thumb img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7, 10, 20, 0.9) 0%, transparent 60%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-title-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-info {
    padding: 1.5rem;
}

.traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
}

.traits span {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
}

.action-btn {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.project-card:hover .action-btn {
    gap: 0.8rem;
}

/* --- CONTACT --- */
#contact { padding: 8rem 0; }
.contact-card { max-width: 800px; margin: 0 auto; }
.icon-circle {
    width: 80px; height: 80px; background: rgba(22, 199, 132, 0.1);
    color: var(--primary); border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 2rem; margin-bottom: 2rem;
}

.contact-form { text-align: left; margin-top: 3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-muted); }
.form-group input, .form-group textarea {
    width: 100%; padding: 1rem 1.25rem; background: rgba(7, 10, 20, 0.5);
    border: 1px solid var(--border-glass); border-radius: 12px; color: #fff;
    font-family: inherit; transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 10px var(--primary-glow);
}

/* --- FOOTER --- */
footer { padding: 4rem 0; border-top: 1px solid var(--border-glass); }
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.footer-brand {
    transform: scale(0.9);
}
footer p { color: var(--text-muted); font-size: 0.875rem; }

/* --- MODAL --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active { display: flex; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 10, 20, 0.9);
    backdrop-filter: blur(20px);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    z-index: 10;
    background: #0f172a;
    display: flex;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: var(--transition);
}

.close-modal:hover { background: var(--primary); }

.modal-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    width: 100%;
}

.modal-gallery {
    background: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-glass);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }
.carousel-prev:hover, .carousel-next:hover { background: var(--primary); }

.carousel-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.3); cursor: pointer;
}
.indicator.active { width: 24px; border-radius: 4px; background: var(--primary); }

.modal-info {
    padding: 3rem;
    overflow-y: auto;
    height: 100%;
}

.modal-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2rem; }
.modal-header h2 { font-size: 2rem; }
.modal-badge { font-size: 0.75rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; }

#modal-features-list { list-style: none; margin-top: 1rem; }
#modal-features-list li {
    display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; color: var(--text-muted);
}
#modal-features-list li i { color: var(--primary); margin-top: 0.25rem; font-size: 1rem; }

.modal-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-glass); }

/* --- RESPONSIVE --- */
/* --- MOBILE OVERLAY --- */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: #070a14;
    z-index: 2000;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.mobile-close-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

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

.mobile-nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.mobile-nav-links .divider {
    height: 1px;
    background: var(--border-glass);
    width: 100%;
    margin: 1rem 0;
}

/* --- ABOUT SECTION --- */
#about { padding: 6rem 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.about-image { position: relative; }
.glass-art {
    height: 450px; background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-glass); border-radius: 32px;
    display: flex; align-items: center; justify-content: center; position: relative;
    overflow: hidden;
}
.main-about-image { 
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}
.glass-art:hover .main-about-image { transform: scale(1.05); }

.stat-card {
    position: absolute; bottom: 2rem; right: -1rem;
    padding: 1.5rem 2rem; text-align: center;
}
.stat-num { display: block; font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.875rem; color: var(--text-muted); font-weight: 600; }

.feature-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 2rem; }
.feature-item { display: flex; gap: 1.25rem; }
.feature-item .dot {
    width: 12px; height: 12px; border-radius: 50%; background: var(--primary);
    margin-top: 0.5rem; box-shadow: 0 0 10px var(--primary-glow);
}
.feature-item h4 { margin-bottom: 0.5rem; font-size: 1.125rem; }
.feature-item p { color: var(--text-muted); font-size: 0.9375rem; }

@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
    .hero-text h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text p { margin: 0 auto 2.5rem; }
    .hero-actions { justify-content: center; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; font-size: 1.5rem; color: #fff; background: none; border: none; }
    .form-row { grid-template-columns: 1fr; }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
