/* TCG Virtual Players — Landing page design system.
 * Light/dark theme via <html data-theme="light|dark">.
 * Follows the VIP Research Group project-landing pattern.
 */

:root,
:root[data-theme="light"] {
    --bg: #f4f6fb;
    --bg-gradient: radial-gradient(1200px 600px at 80% -10%, rgba(52, 97, 224, 0.10), transparent 60%);
    --panel: #ffffff;
    --panel-2: #f0f3f9;
    --border: #dde3ee;
    --text: #1c2333;
    --muted: #5d6980;
    --accent: #3461e0;
    --accent-soft: rgba(52, 97, 224, 0.10);
    --accent-2: #7c3aed;
    --accent-2-soft: rgba(124, 58, 237, 0.10);
    --ok: #15803d;
    --ok-soft: rgba(21, 128, 61, 0.12);
    --warn: #b45309;
    --bad: #dc2626;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
    --input-bg: #ffffff;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0e1117;
    --bg-gradient: radial-gradient(1200px 600px at 80% -10%, rgba(79, 124, 255, 0.12), transparent 60%);
    --panel: #171b24;
    --panel-2: #1f2430;
    --border: #2a3040;
    --text: #e7eaf1;
    --muted: #98a1b3;
    --accent: #6c8cff;
    --accent-soft: rgba(108, 140, 255, 0.14);
    --accent-2: #a78bfa;
    --accent-2-soft: rgba(167, 139, 250, 0.14);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.14);
    --warn: #fbbf24;
    --bad: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.30);
    --input-bg: #11141c;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    background: var(--bg);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    overflow-x: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }

section[id] { scroll-margin-top: 70px; }

/* ── Topbar ── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.topbar-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
}
.brand:hover { text-decoration: none; }
.brand-logo { border-radius: 6px; }
.brand-name span { color: var(--muted); font-weight: 500; }

.landing-nav { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.landing-nav a {
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 500;
}
.landing-nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }

.spacer { flex: 1; }

.theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2);
    cursor: pointer;
}
.hamburger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Buttons ── */

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    transition: filter 0.12s ease;
    text-decoration: none;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.secondary { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Container ── */

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
    flex: 1;
    min-width: 0;
}

/* ── Hero ── */

.landing-hero {
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(circle 3px at center, var(--accent) 2.5px, transparent 3px),
        linear-gradient(0deg, transparent 49.3%, var(--accent) 49.3%, var(--accent) 50.7%, transparent 50.7%),
        linear-gradient(90deg, transparent 49.3%, var(--accent) 49.3%, var(--accent) 50.7%, transparent 50.7%);
    background-size: 56px 56px;
    background-position: 28px 28px, 0 0, 0 0;
    opacity: 0.10;
}
:root[data-theme="dark"] .landing-hero::before { opacity: 0.12; }
.landing-hero::after {
    content: '';
    position: absolute;
    z-index: 1;
    top: 5%;
    left: 20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse at center, var(--accent) 0%, transparent 65%);
    opacity: 0.12;
    filter: blur(70px);
    pointer-events: none;
}
:root[data-theme="dark"] .landing-hero::after { opacity: 0.15; }
.landing-hero > .container { position: relative; z-index: 2; }

.hero {
    display: block;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    padding: 3.5rem 0 3rem;
}

.hero .eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.hero h1 .accent {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lede {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 58ch;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.75rem;
    flex-wrap: wrap;
}
.hero-cta .btn { padding: 0.65rem 1.5rem; font-size: 1rem; }

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}
.feature-list li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.15rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.feature-icon {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.1rem;
}
.feature-list strong { display: block; font-size: 0.92rem; }
.feature-list small { color: var(--muted); font-size: 0.84rem; line-height: 1.45; }

/* ── Sections ── */

.landing-section { padding: 3.5rem 0; }
.section-alt { background: var(--panel-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title { text-align: center; margin-bottom: 2.25rem; }
.section-title span {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.section-title h2 { margin: 0; font-size: 1.7rem; letter-spacing: -0.02em; }

.text-panel {
    max-width: 60rem;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow);
}
.text-panel p { margin: 0 0 1rem; }
.text-panel p:last-child { margin-bottom: 0; }

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.workflow-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1.3rem;
    box-shadow: var(--shadow);
}
.workflow-icon, .access-icon, .info-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
}
.workflow-item h3, .info-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
}
.workflow-item p, .info-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ── Access panel ── */

.access-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    max-width: 60rem;
    margin: 0 auto;
}
.access-option {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.4rem;
    box-shadow: var(--shadow);
    color: var(--text);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.access-option:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.access-option strong { font-size: 1.02rem; }
.access-option > span:last-child { color: var(--muted); font-size: 0.88rem; }

/* ── Info grid ── */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 60rem;
    margin: 0 auto;
}
.info-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.4rem;
    box-shadow: var(--shadow);
}

/* ── Team ── */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
    max-width: 64rem;
    margin: 0 auto;
}
.team-card {
    display: flex;
    gap: 1rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.team-card-supervisor { border-color: var(--accent-2); }
.team-avatar {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 700;
    border: 2px solid var(--border);
}
.team-card-supervisor .team-avatar { background: var(--accent-2-soft); color: var(--accent-2); border-color: var(--accent-2); }
.team-photo {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.team-card-supervisor .team-photo { border-color: var(--accent-2); }
.team-body h3 { margin: 0 0 0.15rem; font-size: 1.02rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.team-role { margin: 0 0 0.35rem; color: var(--accent); font-size: 0.84rem; font-weight: 600; }
.team-card-supervisor .team-role { color: var(--accent-2); }
.team-bio { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ── FAQ ── */

.faq-list {
    max-width: 60rem;
    margin: 0 auto;
    display: grid;
    gap: 0.6rem;
}
.faq-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.faq-item summary::before {
    content: '';
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%233461e0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 3v6M3 6h6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}
:root[data-theme="dark"] .faq-item summary::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236c8cff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 3v6M3 6h6'/%3E%3C/svg%3E");
}
.faq-item[open] summary::before { transform: rotate(45deg); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
    margin: 0;
    padding: 0 1.25rem 1rem 3rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Publications ── */

.empty-note { text-align: center; color: var(--muted); font-style: italic; }

.pub-list {
    max-width: 60rem;
    margin: 0 auto;
    display: grid;
    gap: 0.75rem;
}
.pub-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.15rem 1.3rem;
    box-shadow: var(--shadow);
}
.pub-item h3 { margin: 0 0 0.3rem; font-size: 0.98rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.pub-authors { margin: 0 0 0.15rem; color: var(--muted); font-size: 0.85rem; }
.pub-venue { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.82rem; font-style: italic; }
.pub-link { font-size: 0.84rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.pub-link .lucide { width: 14px; height: 14px; }

/* ── Footer ── */

.footer {
    padding: 1.5rem 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}
.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ── Lucide icons ── */
.lucide { width: 1em; height: 1em; vertical-align: -0.125em; }
.feature-icon .lucide, .workflow-icon .lucide, .access-icon .lucide, .info-icon .lucide { width: 20px; height: 20px; }

/* ── Responsive ── */

@media (max-width: 768px) {
    .landing-nav { display: none; }
    .landing-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--panel); border-bottom: 1px solid var(--border); padding: 0.5rem 1rem 1rem; box-shadow: var(--shadow); }
    .hamburger { display: flex; }
    .feature-list { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 0 2rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .access-panel { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .footer .container { flex-direction: column; text-align: center; }
    .pipeline-diagram { flex-direction: column; align-items: center; }
    .pipeline-arrow { transform: rotate(90deg); }
}

/* ── Pipeline diagram ─────────────────────────────────────────────────── */
.pipeline-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    margin: 0 auto;
    max-width: 900px;
}
.pipeline-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    min-width: 110px;
    text-align: center;
}
.pipeline-stage:hover, .pipeline-stage:focus {
    background: var(--card-bg, rgba(128,128,128,.1));
    transform: translateY(-3px);
    outline: none;
}
.pipeline-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--accent, #58a6ff);
    color: #fff;
}
.pipeline-icon i { width: 22px; height: 22px; }
.pipeline-stage strong { font-size: .92rem; }
.pipeline-stage small { font-size: .75rem; opacity: .65; }
.pipeline-arrow {
    font-size: 1.4rem;
    opacity: .4;
    padding: 0 2px;
    user-select: none;
}
.pipeline-info-box {
    max-width: 600px;
    margin: 18px auto 0;
    padding: 14px 20px;
    border-radius: 8px;
    background: var(--card-bg, rgba(128,128,128,.08));
    font-size: .88rem;
    line-height: 1.5;
    text-align: center;
}
