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

:root {
    --color-primary-dark: #240046;
    /* Deeper Purple */
    --color-primary: #5a189a;
    /* Rich Purple */
    --color-primary-light: #7b2cbf;
    --color-accent: #ff006e;
    /* Vibrant Pink */
    --color-accent-hover: #c90055;
    --color-text-main: #10002b;
    /* Very Dark Purple/Black */
    --color-text-light: #524763;
    /* Muted Purple-Grey */
    --color-white: #ffffff;
    --color-bg-light: #fdfcff;
    /* Very slight purple tint white */

    --font-main: 'Figtree', sans-serif;

    --transition-speed: 0.3s;
    --shadow-soft: 0 10px 40px -10px rgba(90, 24, 154, 0.15);
    --shadow-hover: 0 20px 50px -10px rgba(90, 24, 154, 0.25);
}

html {
    scroll-behavior: smooth;
}

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

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    /* Bolder headings for premium feel */
    letter-spacing: -0.02em;
    /* Tighter letter spacing for modern look */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    /* Figtree looks good uppercase in buttons */
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 0, 110, 0.2);
    transition: all var(--transition-speed) ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, #ff5c8d 100%);
    color: var(--color-white);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff5c8d 0%, var(--color-accent) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 0, 110, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid transparent;
}

.btn-secondary:hover {
    background: var(--color-primary-light);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(90, 24, 154, 0.3);
}

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#header.scrolled {
    background: rgba(36, 0, 70, 0.95);
    /* Glassmorphism dark */
    padding: 10px 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    /* Fallback */
    align-items: center;
}

.logo {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

.desktop-nav {
    flex: 0 0 auto;
    /* Natural width */
}

.desktop-nav ul {
    display: flex;
    gap: 35px;
    align-items: center;
    /* Ensure items inside are centered */
}

.desktop-nav a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    /* Removed padding-bottom to ensure perfect vertical center */
}

.desktop-nav a:hover {
    color: var(--color-white);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-accent);
    transition: width var(--transition-speed);
    border-radius: 2px;
}

.desktop-nav a:hover::after {
    width: 100%;
}

.header-socials {
    flex: 1;
    /* Takes available space right */
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.header-socials a {
    color: var(--color-white);
    font-size: 1.1rem;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-socials a:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
    border-color: var(--color-accent);
}

.mobile-menu-btn {
    display: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-primary-dark);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    text-align: center;
    width: 100%;
}

.mobile-menu li {
    margin: 25px 0;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s ease;
}

.mobile-menu.active li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.active li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.active li:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu.active li:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu.active li:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-menu.active li:nth-child(5) {
    transition-delay: 0.5s;
}


.mobile-menu a {
    color: var(--color-white);
    font-size: 1.8rem;
    font-weight: 800;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-btn:hover {
    transform: rotate(90deg) scale(1.1);
}

/* Hero Section */
#hero {
    height: 100vh;
    min-height: 700px;
    width: 100%;
    background: radial-gradient(circle at top right, #7b2cbf 0%, #240046 60%, #10002b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

/* Ambient glow effects */
#hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--color-accent);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
    top: -100px;
    right: -100px;
    z-index: 1;
}

#hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    filter: blur(120px);
    opacity: 0.2;
    border-radius: 50%;
    bottom: -50px;
    left: -100px;
    z-index: 1;
}


.hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    max-width: 900px;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #ffffff, #e0aaff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Gradient text */
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), text-shadow 0.4s ease;
    cursor: default;
}

.hero-content h1:hover {
    transform: translateY(-5px) scale(1.02) skewX(-2deg);
    text-shadow: 10px 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 1.35rem;
    margin-bottom: 50px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
#services {
    padding: 120px 0;
    background-color: var(--color-bg-light);
    position: relative;
}

.services-title {
    text-align: center;
    margin-bottom: 80px;
}

.services-title span {
    color: var(--color-accent);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
    background: rgba(255, 0, 110, 0.1);
    padding: 5px 15px;
    border-radius: 50px;
}

.services-title h2 {
    color: var(--color-text-main);
    font-size: 2.8rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.service-card {
    text-align: left;
    /* Modern Left align */
    padding: 40px;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 1;
    /* Gradient background on hover */
}

.service-card .icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 25px;
    width: 70px;
    height: 70px;
    background: rgba(90, 24, 154, 0.08);
    /* Soft background for icon */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: all 0.4s ease;
}

.service-card:hover .icon {
    background: var(--color-white);
    color: var(--color-accent);
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--color-text-main);
    font-size: 1.3rem;
    transition: color 0.3s;
}

.service-card:hover h3 {
    color: var(--color-white);
}

.service-card p {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.7;
    transition: color 0.3s;
}

.service-card:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* About Section */
#about {
    padding: 120px 0;
    background-color: #f2f4f8;
    /* Slightly cool grey */
}

.about-container {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--color-accent) 20%, transparent 20%);
    background-size: 20px 20px;
    opacity: 0.3;
    z-index: 0;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    transition: transform 0.5s;
}

.about-image:hover img {
    transform: perspective(1000px) rotateY(2deg);
}

.about-text {
    flex: 1;
}

.section-label {
    display: block;
    color: var(--color-accent);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.about-text h2 {
    color: var(--color-text-main);
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 30px;
}

.about-text h2 span {
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

.about-text h2 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(255, 0, 110, 0.2);
    z-index: -1;
    border-radius: 4px;
}

.about-text p {
    margin-bottom: 25px;
    color: var(--color-text-light);
    font-size: 1.05rem;
}

.text-link {
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid rgba(90, 24, 154, 0.3);
}

.text-link i {
    transition: transform 0.3s;
}

.text-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.text-link:hover i {
    transform: translateX(8px);
}

/* Portfolio Section */
#portfolio {
    padding: 120px 0;
    background: var(--color-bg-light);
}

.portfolio-header {
    margin-bottom: 60px;
}

.portfolio-header h2 {
    color: var(--color-text-main);
    font-size: 2.5rem;
    margin: 15px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    /* Glued together */
    margin-bottom: 60px;
}

.portfolio-item {
    position: relative;
    border-radius: 0;
    /* Square edges for glued look */
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1/1;
    /* Square images */
    transition: all 0.4s ease;
    z-index: 1;
}

.portfolio-item:hover {
    transform: scale(1.05);
    /* Zoom effect over neighbors */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

/* Overlay Effect */
.portfolio-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(36, 0, 70, 0.95), rgba(36, 0, 70, 0.2));
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 30px;
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

/* Changed from :hover to .active-overlay class */
.portfolio-item.active-overlay .overlay {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item::after {
    /* Removing old pseudo text content */
    display: none;
}

.portfolio-action {
    text-align: center;
}

/* Stats Section */
#stats {
    padding: 80px 0;
    background: var(--color-white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item h2 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 5px;
    font-weight: 900;
    letter-spacing: -2px;
}

.stat-item p {
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Footer */
footer {
    background-color: #10002b;
    /* Almost black purple */
    padding: 80px 0 30px;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

/* Footer decorative circle */
footer::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    filter: blur(150px);
    opacity: 0.2;
    border-radius: 50%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-socials a:hover {
    background: var(--color-accent);
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 20px rgba(233, 30, 99, 0.3);
}

.footer-contacts {
    display: flex;
    gap: 40px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-item i {
    color: var(--color-accent);
}

.copyright {
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: center;
    padding-top: 30px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-container {
        flex-direction: column;
        gap: 50px;
    }

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

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {

    .desktop-nav,
    .header-socials {
        display: none;
    }

    /* Portfolio Full Width Fix */
    #portfolio .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    .portfolio-header {
        padding: 0 20px;
        /* Restore padding for title */
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        margin: 0 0 40px 0;
        padding: 0;
    }

    .portfolio-item .overlay {
        font-size: 1rem;
        /* Smaller text for mobile */
        padding: 15px;
        /* Smaller padding */
    }

    .stats-container {
        grid-template-columns: 1fr;
        /* Stack visually */
        gap: 40px;
    }

    .footer-contacts {
        flex-direction: column;
        gap: 20px;
    }

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

    .services-title h2,
    .about-text h2 {
        font-size: 2.2rem;
    }
}

/* GSAP visibility handled by JS */

/* --- ANIMATIONS SYSTEM --- */

/* Keyframes */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(233, 30, 99, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(233, 30, 99, 0);
    }
}

/* Continuous Animations (Movement) */
.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse-glow 2s infinite;
}

/* Entrance Classes (Triggered by JS) */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-zoom {
    opacity: 0;
    /* transition handled by animation or transition property? 
       Using animation gives more control over keyframes. */
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    animation-play-state: paused;
    /* Wait for JS */
}

/* When JS adds .visible class */
.visible.reveal-up {
    animation-name: fadeInUp;
    animation-play-state: running;
}

.visible.reveal-left {
    animation-name: fadeInLeft;
    animation-play-state: running;
}

.visible.reveal-right {
    animation-name: fadeInRight;
    animation-play-state: running;
}

.visible.reveal-zoom {
    animation-name: zoomIn;
    animation-play-state: running;
}

/* Stagger Delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}