:root {
    --bg-base: #05070f;
    --bg-card: rgba(13, 19, 36, 0.75);
    --bg-card-hover: rgba(22, 32, 60, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(236, 72, 153, 0.35);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent-pink: #ec4899;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(236, 72, 153, 0.18), transparent),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.12), transparent 50%),
        radial-gradient(circle at 10% 40%, rgba(6, 182, 212, 0.1), transparent 40%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- NAVIGATION --- */
nav {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 7, 15, 0.88);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.brand-logo span {
    color: var(--accent-pink);
}

.brand-badge {
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(236, 72, 153, 0.35);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 8px;
}

.btn-back:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* --- LANGUAGE SELECTOR --- */
.lang-dropdown {
    position: relative;
}

.lang-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
}

.lang-toggle:hover {
    border-color: var(--accent-pink);
    background: rgba(236, 72, 153, 0.08);
}

.lang-toggle svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.lang-dropdown.is-open .lang-toggle svg {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(13, 19, 36, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 130px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.2s ease;
    z-index: 110;
}

.lang-dropdown.is-open .lang-menu,
.lang-dropdown:hover .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.lang-menu a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.lang-menu a.active {
    color: var(--accent-pink);
    background: rgba(236, 72, 153, 0.12);
    font-weight: 700;
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
}

@media (max-width: 640px) {
    .nav-inner {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* --- HERO --- */
.hero {
    padding: 80px 0 50px;
    text-align: center;
    position: relative;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(236, 72, 153, 0.08);
    border: 1px solid rgba(236, 72, 153, 0.25);
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 0.85rem;
    color: #fbcfe8;
    margin-bottom: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 30%, #ec4899 75%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 840px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn-primary {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #ffffff;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px -2px rgba(236, 72, 153, 0.4);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px -2px rgba(236, 72, 153, 0.6);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* --- SECTION COMMONS --- */
section {
    padding: 60px 0;
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 36px;
}

.section-title-wrap h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.section-title-wrap p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 720px;
    margin: 0 auto;
}

/* --- OVERVIEW & CARDS GRID --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(236, 72, 153, 0.4);
    transform: translateY(-3px);
    background: var(--bg-card-hover);
}

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

.card-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
}

.card-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-cyan {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-pink {
    background: rgba(236, 72, 153, 0.12);
    color: var(--accent-pink);
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-yellow {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.card-role {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
}

.card-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.overview-box {
    background: #080c18;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 28px;
    line-height: 1.7;
    color: var(--text-muted);
}

.overview-box p + p {
    margin-top: 16px;
}

/* --- DIAGRAM FIGURE --- */
.diagram-figure {
    background: #060914;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    margin: 32px 0 20px;
    text-align: center;
    overflow: hidden;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.diagram-figure figcaption {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 16px;
    font-family: 'JetBrains Mono', monospace;
}

.svg-diagram {
    width: 100%;
    height: auto;
    max-width: 960px;
    display: block;
    margin: 0 auto;
}

/* --- NOTICE BOX --- */
.notice-box {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    padding: 20px 24px;
    margin-top: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    color: #fde68a;
    font-size: 0.9rem;
    line-height: 1.6;
}

.notice-icon {
    color: var(--accent-yellow);
    flex-shrink: 0;
    margin-top: 2px;
}

.research-section {
    padding-bottom: 20px;
}

.research-section .cards-grid {
    margin-bottom: 0;
}

.contact-section {
    padding-top: 20px;
}

/* --- RESEARCH INQUIRY BOX --- */
.inquiry-box {
    background: #080c18;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 0;
}

.inquiry-content h3 {
    font-size: 1.35rem;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 8px;
}

.inquiry-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.btn-inquiry {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #ffffff;
    font-weight: 700;
    padding: 14px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px -2px rgba(236, 72, 153, 0.4);
}

.btn-inquiry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px -2px rgba(236, 72, 153, 0.6);
    color: #ffffff;
}

@media (max-width: 768px) {
    .inquiry-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-inquiry {
        width: 100%;
        justify-content: center;
    }
}

/* --- FOOTER --- */
footer {
    background-color: #070a12;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text-main);
    margin-bottom: 16px;
}

.footer-logo span {
    color: var(--accent-pink);
}

.footer-info h4 {
    font-size: 1.15rem;
    margin-bottom: 18px;
    color: var(--text-main);
    font-weight: 700;
}

.footer-info p {
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.footer-info strong {
    color: var(--text-main);
}

.footer-bottom {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.875rem;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--accent-pink);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- COOKIE CONSENT --- */
.cookie-consent-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    background: rgba(13, 19, 36, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(236, 72, 153, 0.08);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUpCookie 0.6s ease forwards 0.5s;
    text-align: left;
}

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

.cookie-consent-wrapper.cookie-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.cookie-icon {
    color: var(--accent-pink);
    flex-shrink: 0;
}

.cookie-header h4 {
    font-size: 1.05rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 700;
}

.cookie-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 12px;
}

.cookie-actions button {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: none;
}

.btn-cookie-primary {
    background: linear-gradient(135deg, #ec4899, #d946ef);
    color: #ffffff;
    box-shadow: 0 4px 15px -2px rgba(236, 72, 153, 0.4);
}

.btn-cookie-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px -2px rgba(236, 72, 153, 0.6);
}

.btn-cookie-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-cookie-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.cookie-footer {
    text-align: center;
    margin-top: -4px;
}

.cookie-settings-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}

.cookie-settings-btn:hover {
    color: var(--text-main);
}

/* --- COOKIE MODAL --- */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    animation: fadeInCookieModal 0.3s ease forwards;
    text-align: left;
}

@keyframes fadeInCookieModal {
    to { opacity: 1; }
}

.cookie-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 80px rgba(236, 72, 153, 0.1);
    overflow: hidden;
}

.cookie-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: var(--accent-pink);
}

.cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.cookie-modal-intro {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cookie-category-header h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--text-main);
    font-weight: 700;
}

.cookie-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-weight: 600;
}

.cookie-badge.required {
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent-pink);
}

.cookie-category p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .toggle-slider {
    background-color: var(--accent-pink);
    border-color: var(--accent-pink);
}

.cookie-toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: white;
}

.cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    background: rgba(0, 0, 0, 0.2);
}

.cookie-modal-footer button {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .cookie-consent-wrapper {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }
    .cookie-actions {
        flex-direction: column;
    }
    .cookie-modal-footer {
        flex-direction: column-reverse;
    }
    .cookie-modal-footer button {
        width: 100%;
    }
}
