/* CSS Variables & Reset */
:root {
    --bg-dark: #0B0C10;
    --bg-surface: #1F2833;
    --primary: #66FCF1;
    --secondary: #45A29E;
    --text-main: #C5C6C7;
    --text-heading: #FFFFFF;
    --glass-bg: rgba(31, 40, 51, 0.4);
    --glass-border: rgba(102, 252, 241, 0.1);

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 252, 241, 0.3);
}

.btn-secondary {
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(102, 252, 241, 0.1);
}

.section-padding {
    padding: var(--spacing-xl) 5%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-small {
    background: rgba(102, 252, 241, 0.1);
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--primary);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    padding-top: 80px;
    /* Offset for nav */
    position: relative;
    overflow: hidden;
}

.typing-text {
    font-size: 1.5rem;
    color: rgba(197, 198, 199, 0.9);
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.name-highlight {
    color: var(--primary);
    font-weight: 700;
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--primary);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(102, 252, 241, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(102, 252, 241, 0.2);
}

.hero-section h1 {
    font-size: 4rem;
    /* Big impact */
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.img-container {
    width: 400px;
    height: 500px;
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.glow-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 252, 241, 0.2) 0%, rgba(11, 12, 16, 0) 70%);
    z-index: -1;
    filter: blur(40px);
}

/* Services (The Trinity) */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--primary);
    font-weight: 500;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(102, 252, 241, 0.5);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(102, 252, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.card h3 {
    font-size: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: rgba(197, 198, 199, 0.8);
}

.feature-list li i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Creative Suite (Bento Grid) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-item {
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-item.wide {
    grid-column: span 2;
}

.bento-item.tall {
    grid-row: span 2;
}

.bento-content {
    z-index: 2;
}

.icon-box {
    margin-bottom: 1rem;
    color: var(--primary);
}

.bento-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.1;
}

.pattern-grid {
    background-image: radial-gradient(var(--text-main) 1px, transparent 1px);
    background-size: 20px 20px;
}

.mobile-mockup {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 2rem;
    opacity: 0.6;
    /* Higher opacity for this one */
}

.mobile-mockup .screen {
    width: 80%;
    height: 80%;
    border: 4px solid var(--text-main);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: #000;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

/* Contact Section */
.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 4rem;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 4rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-methods {
    margin: 2rem 0;
}

.method {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-main);
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(11, 12, 16, 0.6);
    border: 1px solid rgba(197, 198, 199, 0.1);
    border-radius: 8px;
    color: var(--text-heading);
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(102, 252, 241, 0.1);
}

.full-width {
    width: 100%;
    justify-content: center;
}

footer {
    color: rgba(197, 198, 199, 0.4);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        width: 100%;
        top: 0;
        border-radius: 0;
        border-top: 0;
    }

    .nav-links {
        display: none;
        /* Mobile menu todo */
    }

    .hamburger {
        display: block;
    }

    .hero-section {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .img-container {
        width: 280px;
        height: 350px;
        margin-bottom: 2rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-item.wide,
    .bento-item.tall {
        grid-column: auto;
        grid-row: auto;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 200px;
    background: rgba(102, 252, 241, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Placeholder pattern */
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.05) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
}

.project-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.project-info p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: rgba(197, 198, 199, 0.8);
    flex-grow: 1;
}

.btn-text {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.btn-text:hover {
    gap: 8px;
    /* Slight arrow movement */
}


/* Skills Section */
.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-badge {
    background: rgba(31, 40, 51, 0.6);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-badge i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.skill-badge:hover {
    background: rgba(102, 252, 241, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(102, 252, 241, 0.1);
    color: var(--text-heading);
}


.project-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}


.skill-badge.highlight {
    background: rgba(102, 252, 241, 0.15);
    border-color: rgba(102, 252, 241, 0.3);
    color: var(--text-heading);
    font-weight: 600;
}


/* Alternate background for tools section */
#tools {
    background: rgba(31, 40, 51, 0.3);
}


/* Tech Marquee in Hero */
.tech-marquee {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background: rgba(11, 12, 16, 0.8);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(102, 252, 241, 0.1);
    z-index: 10;
}

.marquee-content {
    display: flex;
    gap: 2rem;
    animation: scroll 40s linear infinite;
    width: max-content;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.skill-badge.mini {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.skill-badge.mini i {
    width: 16px;
    height: 16px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Adjust Hero for Marquee */
#hero {
    padding-bottom: 80px;
    /* Space for marquee */
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(31, 40, 51, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(102, 252, 241, 0.1);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 600;
    border-color: var(--primary);
}

.project-card.hidden {
    display: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(11, 12, 16, 0.9);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--bg-surface);
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    color: var(--text-main);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
    background: rgba(11, 12, 16, 0.5);
    border-radius: 50%;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--primary);
    text-decoration: none;
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}

.modal-img-container {
    flex: 1;
    min-height: 250px;
    background: rgba(102, 252, 241, 0.05);
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--text-heading);
}

.modal-info p {
    color: rgba(197, 198, 199, 0.9);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.7;
}

/* --- Process Section --- */
.bg-darker {
    background-color: rgba(5, 6, 8, 0.5);
}

.process-timeline {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 20px;
}

.process-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-step::after {
    content: '';
    position: absolute;
    left: 23px;
    top: 55px;
    bottom: -45px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary) 0%, rgba(102, 252, 241, 0.1) 100%);
    z-index: 0;
}

.process-step:last-child::after {
    display: none;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: rgba(102, 252, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
    border: 2px solid var(--primary);
}

.step-content h3 {
    color: var(--text-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    margin-top: 10px;
}

.step-content p {
    color: rgba(197, 198, 199, 0.8);
    line-height: 1.6;
}

/* --- FAQ Section --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-heading);
    font-weight: 500;
}

.faq-icon {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 2rem;
}

.faq-item.active .faq-content {
    max-height: 200px;
    padding: 0 2rem 1.5rem 2rem;
}

.faq-content p {
    color: rgba(197, 198, 199, 0.8);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .process-timeline {
        padding: 2rem 1.5rem;
    }

    .process-step {
        gap: 1.5rem;
    }

    .faq-header {
        padding: 1.2rem 1.5rem;
    }

    .faq-header h3 {
        font-size: 1.1rem;
    }
}

/* Slider defaults (hidden on desktop) */
.slider-wrapper {
    position: relative;
}

.slider-arrow {
    display: none;
}

/* Mobile Projects Slider */
@media (max-width: 768px) {
    .slider-arrow {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: var(--primary);
        color: var(--bg-dark);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        transition: opacity 0.3s ease, transform 0.2s ease;
    }

    .slider-arrow:active {
        transform: translateY(-50%) scale(0.9);
    }

    .slider-arrow.prev {
        left: 0;
    }

    .slider-arrow.next {
        right: 0;
    }

    /* Hide arrows if we want to rely only on touch, or keep them for tap. We'll keep them visible by default on mobile. */

    .projects-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        padding-bottom: 1rem;
        padding-left: 5%;
        padding-right: 5%;
        margin-left: -5%;
        margin-right: -5%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
    }

    .projects-grid::-webkit-scrollbar {
        display: none;
    }

    .projects-grid .project-card {
        min-width: 85vw;
        max-width: 85vw;
        flex: 0 0 auto;
        scroll-snap-align: center;
    }

    .projects-grid .project-card:hover {
        transform: none;
        /* Disable lift on mobile to prevent scroll layout issues */
    }
}