/* Main Stylesheet for Liddora Online - Optimized for Performance */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;900&display=swap');

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

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-muted: #888888;
    --accent-color: #7FFF00;
    /* Neon Green */
    --accent-blur: rgba(127, 255, 0, 0.4);
    --font-main: 'Outfit', sans-serif;
    --container-width: 1400px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 60px 0;
}

.hero-bg-accent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-blur) 0%, transparent 70%);
    filter: blur(100px);
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: var(--container-width);
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-main-content {
    text-align: center;
    z-index: 5;
    margin-top: -250px;
    /* Restored user tweak */
    position: relative;
}

.hero-greeting {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 30px;
    border-radius: 50px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 30;
    /* Keep high */
    transform: translateY(-40px);
    /* Shift up */
}

.hero-title {
    font-size: clamp(4rem, 12vw, 11rem);
    font-weight: 900;
    line-height: 0.8;
    text-transform: uppercase;
    margin-bottom: 0;
    letter-spacing: -0.04em;
    position: relative;
    transform: translateY(-40px);
    /* Shift up */
}

.hero-visual {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 15;
    /* HIGHER THAN TEXT */
    pointer-events: none;
}

.image-wrapper {
    height: 95%;
    display: flex;
    align-items: flex-end;
}

.hero-img {
    height: 100%;
    width: auto;
    filter: grayscale(100%) contrast(1.1) brightness(0.9);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.hero-actions {
    margin-bottom: 20px;
    position: relative;
    z-index: 30;
    /* ABOVE IMAGE */
}

/* Split Button */
.split-btn {
    display: inline-flex;
    background: var(--accent-color);
    padding: 4px;
    border-radius: 50px;
    box-shadow: 0 0 40px rgba(127, 255, 0, 0.4);
    transition: 0.3s;
}

.split-btn:hover {
    box-shadow: 0 0 60px rgba(127, 255, 0, 0.6);
    transform: translateY(-5px);
}

.btn {
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    color: #000;
    transition: 0.3s;
    display: inline-block;
    /* Ensure padding works */
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 30px rgba(127, 255, 0, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 0 50px rgba(127, 255, 0, 0.5);
    transform: translateY(-2px);
}

.btn-split-icon {
    background: rgba(0, 0, 0, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    margin-left: 5px;
}

/* Hero Footer Elements */
.hero-footer-elements {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 40px;
    z-index: 35;
}

.hero-bottom-left {
    max-width: 320px;
}

.hero-description {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: right;
}

.stat-num {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 2px;
}

/* Loops Sections */
.services-loop-section,
.software-loop-section {
    padding: 40px 0;
    background: #000;
    overflow: hidden;
}

.loop-track {
    display: flex;
    gap: 60px;
    animation: scrollLoop 40s linear infinite;
    width: max-content;
}

.loop-track.reverse {
    animation-direction: reverse;
}

@keyframes scrollLoop {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.loop-item {
    font-size: 1.6rem;
    font-weight: 800;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.loop-item i {
    color: #555;
    font-size: 1.4rem;
}

.loop-item:hover {
    color: #fff;
    text-shadow: 0 0 20px var(--accent-color);
}

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

/* About Text Section */
.about-text-section {
    padding: 120px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: flex-start;
}

.section-subtitle {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.about-desc {
    font-size: 1.3rem;
    color: var(--accent-color);
    font-weight: 500;
}

.about-content p {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 25px;
}

/* Software Heading */
.software-heading-container {
    text-align: center;
    padding: 80px 0 20px;
}

.loop-heading {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: #444;
}

/* Portfolio Section */
.portfolio-section {
    padding: 120px 0;
}

.section-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 60px;
}

/* Portfolio Tabs */
.portfolio-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid #222;
    color: #555;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn:hover {
    border-color: #555;
    color: #fff;
}

.tab-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(127, 255, 0, 0.4);
}

/* Portfolio Grid */
.portfolio-grid-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
}

.portfolio-item {
    background: #0a0a0a;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid #111;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 16/10;
}

.portfolio-item:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.item-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: 0.5s;
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    z-index: 5;
    font-size: 3.5rem;
    color: var(--accent-color);
}

.portfolio-item:hover .item-overlay {
    opacity: 1;
}

.portfolio-item:hover .item-image {
    transform: scale(1.1);
    filter: blur(2px);
}

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    z-index: 10;
}

.item-info h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.item-info p {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Universal Modal Overhaul */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    overflow-y: auto;
}

.modal-container {
    max-width: 1200px;
    margin: 40px auto;
    background: #0a0a0a;
    border-radius: 40px;
    border: 1px solid #111;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 100;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
}

.modal-visual-side {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 1px solid #111;
    min-height: 600px;
}

.modal-visual-side img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Prevents stretching */
    background: #050505;
}

.modal-visual-side video,
.modal-visual-side iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
}

.modal-info-side {
    padding: 60px;
    display: flex;
    flex-direction: column;
    max-height: 800px;
    /* Limit height of info side to match visual side or container */
}

.modal-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 20px;
    margin: 20px 0;
}

/* Custom Scrollbar for Info Side */
.modal-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.modal-scroll-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-scroll-area::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.modal-meta {
    flex-shrink: 0;
    /* Keep fixed */
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.modal-category {
    background: var(--accent-color);
    color: #000;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.modal-year {
    color: #555;
    font-weight: 700;
}

.modal-title {
    flex-shrink: 0;
    /* Keep fixed */
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 10px;
}

.modal-description {
    font-size: 1.1rem;
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #111;
    color: #eee;
    font-weight: 500;
}

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

.modal-actions {
    flex-shrink: 0;
    /* Keep fixed */
    margin-top: auto;
    padding-top: 30px;
}

/* Mobile Modal */
@media (max-width: 991px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .modal-visual-side {
        aspect-ratio: 16/10;
        min-height: auto;
        /* Remove the 600px block on mobile! */
        border-right: none;
        border-bottom: 1px solid #111;
    }

    .modal-info-side {
        padding: 40px;
        max-height: none;
        /* Let it grow or be controlled by container */
        height: auto;
    }

    .modal-scroll-area {
        max-height: 40vh;
        /* Limit scroll area on mobile so button is visible */
        margin: 15px 0;
    }

    .modal-title {
        font-size: 2.2rem;
    }
}

/* Contact Section */
.contact-section {
    padding: 150px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-glow {
    position: absolute;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-blur) 0%, transparent 70%);
    filter: blur(120px);
    z-index: 1;
    pointer-events: none;
    /* Fix clickable issue */
}

.contact-content {
    position: relative;
    z-index: 10;
}

.contact-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    margin-bottom: 20px;
}

.contact-link {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--accent-color);
    text-decoration: none;
    transition: 0.4s;
}

.contact-link:hover {
    text-shadow: 0 0 50px var(--accent-color);
}

/* Mobile Adaptability */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-footer-elements {
        position: relative;
        flex-direction: column;
        align-items: center;
        bottom: auto;
        padding: 40px 0;
        gap: 40px;
    }

    .hero-bottom-left,
    .stat-item {
        text-align: center;
        max-width: 100%;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-container {
        height: auto;
        padding-top: 50px;
    }
}

@media (max-width: 768px) {
    .hero-main-content {
        margin-top: -80px;
        /* Reduced shift for mobile */
        position: relative;
    }

    .hero-title {
        font-size: 16vw;
        line-height: 0.85;
        margin-bottom: 1rem;
    }

    .hero-greeting {
        font-size: 1.1rem;
        padding: 8px 20px;
        transform: translateY(-20px);

    }

    .hero-visual {
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
        height: 50vh;
        width: 100%;
        z-index: 15;
    }

    .hero-img {
        height: 100%;
        opacity: 1;
    }

    .hero-footer-elements {
        padding: 0 20px 40px;
        gap: 30px;
    }

    .hero-bottom-left {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 250px;
    }

    .hero-actions {
        width: 100%;
        max-width: 320px;
        margin-bottom: 30px;
    }

    .split-btn {
        display: flex;
        width: 100%;
    }

    .btn {
        flex: 1;
        padding: 15px 10px;
        font-size: 1rem;
        display: flex;
        justify-content: center;
    }

    .btn-split-icon {
        width: 60px;
        flex: 0 0 60px;
    }

    .hero-description {
        text-align: center;
        font-size: 0.9rem;
        padding: 12px;
    }

    .hero-stats {
        gap: 30px;
        margin-top: 10px;
    }

    .stat-num {
        font-size: 2.2rem;
    }

    .portfolio-grid-display {
        grid-template-columns: 1fr;
    }
}