:root {
    --brand: #9645ff;
    --brand-hover: #7b25eb;
    --bg: #0b1220;
    --bg-light: #f4f7fb;
    --text: #0f172a;
    --text-light: #e2f5ff;
    --light: #f8fafc;
    --muted: #94a3b8;
    --card: rgba(255, 255, 255, .95);
    --glass: rgba(255, 255, 255, .18);
    --radius: 24px;
    --shadow: 0 10px 30px rgba(2, 6, 23, .15);
    --shadow-hover: 0 10px 30px rgba(2, 6, 23, .30);
    --border-color: rgba(2, 6, 23, .08);
    --border-color-light: rgba(255, 255, 255, .15);
}

/* 1. Global Styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    height: 100%;
    scroll-behavior: smooth;
    background-color: var(--bg-light);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

a {
    color: inherit;
    text-decoration: none;
}

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

.unselectable {
    user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
}

/* 2. Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

section {
    padding: 68px 0;
}

.grid {
    display: grid;
    gap: 18px;
}

/* 3. Typography & Common Elements */
.title {
    font-size: 32px;
    margin: 0 0 22px 0;
    letter-spacing: .2px;
}

.sub {
    color: var(--muted);
    margin-top: -6px;
    margin-bottom: 28px;
}

.card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    color: #1f2937;
}

/* 4. Header */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(120%) blur(8px);
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(2, 6, 23, .06);
    transition: background-color 0.5s, color 0.5s;
}

.header-down {
    background-color: #40214b;
    color: #fff;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav nav {
    display: flex;
    gap: 8px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #1e293b;
    font-size: 22px;
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

#logoBlack {
    display: none;
}

.header-links {
    font-weight: 600;
    transition: color .2s ease, background-color .2s ease;
    padding: 8px 16px;
    border-radius: 99px;
}

.header-links:hover {
    color: var(--brand);
    background-color: rgba(150, 70, 255, 0.1);
}

.header-down .header-links:hover {
    color: var(--light);
    background-color: rgba(255, 255, 255, .1);
}

/* 5. Language Selector */
.language-selector {
    position: relative;
    display: inline-block;
}

#language-toggle {
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
}

#language-toggle:hover {
    color: var(--brand);
    background-color: rgba(150, 70, 255, 0.1);
}

.header-down #language-toggle:hover {
    color: var(--light);
    background-color: rgba(255, 255, 255, .1);
}

#language-options {
    display: none;
    position: absolute;
    background-color: var(--card);
    min-width: 120px;
    box-shadow: var(--shadow);
    z-index: 1;
    border-radius: 12px;
    padding: 6px;
    left: 0;
    border: 1px solid var(--border-color);
}

#language-options a {
    font-weight: 600;
    padding: 10px 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    color: #000;
    transition: background-color .2s ease, color .2s ease;
}

#language-options a:hover {
    background-color: rgba(150, 70, 255, 0.1);
    color: var(--brand);
}

.lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.language-selector.open #language-options {
    display: block;
}

/* 6. Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, .35), rgba(2, 6, 23, .65));
    z-index: 1;
}

.hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.hero-inner {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 32px 16px;
    z-index: 2;
}

.hero-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(2, 6, 23, .15);
}

.hero-card h1 {
    margin: 0 0 14px 0;
    line-height: 1.08;
    font-size: 44px;
    letter-spacing: .2px;
}

/* 7. Project Section */
.project-card {
    padding: 0;
    overflow: hidden;
}

.project-q {
    width: 100%;
    text-align: left;
    padding: 18px;
    border: none;
    background: transparent;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    color: #000;
}

.project-q .arrow {
    width: 28px;
    height: 28px;
    border: 1px solid var(--text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.project-q .arrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-left: 1px solid var(--text);
    border-bottom: 1px solid var(--text);
    transform: translateY(-1px) rotate(-45deg);
}

.project-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.project-a .inner {
    padding: 0 18px 18px 18px;
    color: #334155;
    line-height: 1.6;
}

.project-card.open .project-q .arrow {
    transform: rotate(180deg);
}

.project-card.open .project-a {
    max-height: 5000px;
}

.project-footer {
    padding: 18px 18px 24px 18px;
    border-top: 1px solid var(--border-color);
    margin-top: 18px;
}

.btn-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    background-color: var(--brand);
    padding: 10px 20px;
    border-radius: 99px;
    box-shadow: var(--shadow);
    transition: background-color .3s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-learn-more:hover {
    background-color: var(--brand-hover);
}

.btn-learn-more i {
    font-size: 1.2em;
}

/* 8. Team Section */
.team {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.member {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.member:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
}

.member .ph {
    aspect-ratio: 1 / 1.25;
    background: linear-gradient(135deg, #e2f5ff, #ffffff);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    color: #1f2937;
    font-weight: 700;
}

.member .meta {
    padding: 12px 12px 14px;
}

.name {
    font-weight: 800;
}

.role {
    color: var(--muted);
    font-size: 14px;
}

/* 9. FAQ Section */
.faq {
    display: grid;
    gap: 18px;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 0;
    box-shadow: var(--shadow);
    overflow: hidden;
    color: #1f2937;
}

.faq-q {
    width: 100%;
    text-align: left;
    padding: 18px;
    border: none;
    background: transparent;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    color: #000;
}

.faq-q .arrow {
    width: 28px;
    height: 28px;
    border: 1px solid var(--text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.faq-q .arrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-left: 1px solid var(--text);
    border-bottom: 1px solid var(--text);
    transform: translateY(-1px) rotate(-45deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-a .inner {
    padding: 0 18px 18px 18px;
    color: #334155;
    font-size: 17px;
}

.faq-item.open .faq-q .arrow {
    transform: rotate(180deg);
}

.faq-item.open .faq-a {
    max-height: 240px;
}

/* 10. Footer */
footer {
    padding: 28px 0 56px;
    background: #40214b;
    color: var(--text-light);
    margin-top: 36px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    color: var(--light);
}

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

.pill {
    background: rgba(255, 255, 255, .1);
    padding: 10px 14px;
    border-radius: 999px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--border-color-light);
}

.pill span {
    opacity: .9;
}

.pill i {
    font-size: 1.3em;
}

/* Social Links */
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    border: 1px solid var(--border-color-light);
    color: var(--text-light);
    font-size: 1.3em;
    transition: background-color .3s, transform .2s, color .3s;
}

.social-link:hover {
    background: var(--brand);
    transform: scale(1.1);
    color: #fff;
}

/* 11. Scroll to Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 24px;
    font-weight: bold;
    border: none;
    outline: none;
    background-color: var(--brand);
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    line-height: 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: background-color .3s;
}

#scrollToTopBtn:hover {
    background-color: var(--brand-hover);
}

/* 12. Icons */
.title,
.project-q span[id^="loc-"],
.faq-q span[id^="loc-"] {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* 13. Media Queries */
@media (max-width: 920px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .team {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .team {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    /* Header */
    header .nav {
        display: grid;
        grid-template-columns: auto auto;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 16px;
    }

    header nav {
        display: grid;
        grid-template-columns: auto auto;
        flex-wrap: wrap;
        justify-content: center;
        justify-self: end;
        gap: 8px;
    }

    #language-options {
        left: auto;
        right: 0;
    }

    /* Hero */
    .hero {
        align-items: flex-start;
    }
    
    .hero-inner {
        width: calc(100% - 32px);
        padding: 80px 0 0 0;
    }
    
    .hero-card h1 {
        font-size: clamp(28px, 8vw, 44px);
    }

    .logo img {
        height: 32px;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-inner .contact {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 620px) {
    .grid.cols-3 {
        grid-template-columns: 1fr;
    }
    .hero-card h1 {
        font-size: 34px;
    }
}

