/* ===== Reset & Variables ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --bg-card: #141414;
    --bg-elevated: #1a1a1a;
    --text: #f5f5f7;
    --text-muted: #8a8a8a;
    --text-dim: #5a5a5a;
    --accent: #c9a96e;
    --accent-light: #d4b87a;
    --accent-glow: rgba(201, 169, 110, 0.15);
    --border: #222222;
    --nav-h: 48px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
        'Helvetica Neue', 'PingFang SC', 'Noto Sans SC', sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.6;
}

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

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

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
}

.nav-content {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    color: var(--accent);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nav-logo:hover { opacity: 1; }

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.3s;
}

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

/* ===== Section Common ===== */
.section-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 24px;
}

.section-desc {
    font-size: 19px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 64px;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-h) + 60px) 24px 60px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(201, 169, 110, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 169, 110, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.12em;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(48px, 10vw, 88px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 24px;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-desc {
    font-size: 20px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Review Bubbles */
.hero-visual {
    position: relative;
    z-index: 2;
    margin-top: 64px;
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.review-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    min-width: 220px;
    max-width: 260px;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    animation: bubbleIn 0.8s ease forwards;
}

.bubble-1 { animation-delay: 0.3s; }
.bubble-2 { animation-delay: 0.6s; }
.bubble-3 { animation-delay: 0.9s; }

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

.bubble-stars {
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: var(--accent);
}

.review-bubble p {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.5;
}

.bubble-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 980px;
    letter-spacing: 0.04em;
}

.tag-pos { background: rgba(201, 169, 110, 0.15); color: var(--accent); }
.tag-neu { background: rgba(138, 138, 138, 0.15); color: var(--text-muted); }
.tag-neg { background: rgba(255, 100, 80, 0.12); color: #ff6b56; }

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ===== Overview ===== */
.overview {
    padding: 140px 0;
    background: var(--bg);
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 169, 110, 0.2);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    color: var(--accent);
}

.overview-card h3 {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 10px;
}

.overview-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== Dataset ===== */
.dataset {
    padding: 140px 0;
    background: var(--bg-elevated);
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 64px;
}

.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
}

.data-card-hero {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
    padding: 48px;
}

.data-number {
    display: block;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.data-card-hero .data-number {
    font-size: 72px;
}

.data-unit {
    display: block;
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 4px;
}

.data-desc {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.5;
}

/* Bar Chart */
.data-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    height: 160px;
}

.bar {
    width: 56px;
    border-radius: 8px 8px 0 0;
    background: var(--bar-color);
    position: relative;
    transition: height 1s ease;
    height: 0;
}

.bar.animated {
    height: calc(var(--target-height) * 1%);
}

.bar span {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Label Mapping */
.label-mapping {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
}

.label-mapping h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 32px;
    text-align: center;
}

.mapping-flow {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.mapping-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rating-badge {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
}

.mapping-arrow {
    font-size: 20px;
    color: var(--text-dim);
}

.label-badge {
    padding: 10px 24px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 600;
}

.label-neg { background: rgba(255, 100, 80, 0.1); color: #ff6b56; }
.label-neu { background: rgba(138, 138, 138, 0.1); color: var(--text-muted); }
.label-pos { background: rgba(201, 169, 110, 0.12); color: var(--accent); }

/* File List */
.file-list h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.files {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.file-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.3s;
}

.file-item:hover {
    border-color: rgba(201, 169, 110, 0.2);
}

.file-icon { font-size: 18px; }

.file-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.file-size {
    font-size: 13px;
    color: var(--text-dim);
}

/* ===== Architecture ===== */
.architecture {
    padding: 140px 0;
    background: var(--bg);
}

.arch-flow {
    max-width: 640px;
    margin: 0 auto 80px;
}

.arch-step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    min-width: 28px;
    padding-top: 2px;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.step-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-example {
    margin-top: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--accent);
    overflow-x: auto;
}

.step-visual {
    margin-top: 16px;
}

.arch-connector {
    display: flex;
    justify-content: 28px;
    padding-left: 13px;
    height: 40px;
}

/* Transformer Blocks */
.transformer-blocks {
    display: flex;
    gap: 6px;
    align-items: center;
}

.t-block {
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.t-dots {
    color: var(--text-dim);
    font-size: 14px;
    padding: 0 4px;
}

/* Layer Flow */
.layer-flow {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-node {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--accent);
}

.layer-arrow {
    color: var(--text-dim);
    font-size: 14px;
}

/* Output Probs */
.output-probs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prob-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.prob-bar span:first-child {
    min-width: 32px;
    color: var(--text-muted);
}

.prob-bar span:last-child {
    min-width: 36px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text);
    font-weight: 500;
}

.prob-fill {
    height: 6px;
    border-radius: 3px;
    background: var(--accent);
    flex: 1;
    max-width: 120px;
}

/* Config Table */
.config-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
}

.config-table h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 28px;
    text-align: center;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.config-item {
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.config-key {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.config-val {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* ===== Results ===== */
.results {
    padding: 140px 0;
    background: var(--bg-elevated);
}

.result-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.metric-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.metric-ring {
    width: 120px;
    height: 120px;
    position: relative;
}

.metric-ring svg {
    width: 100%;
    height: 100%;
}

.metric-circle {
    transition: stroke-dashoffset 1.5s ease;
}

.metric-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.metric-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Confusion Matrix */
.confusion-matrix {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
}

.confusion-matrix h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 28px;
    text-align: center;
}

.matrix-grid {
    display: grid;
    grid-template-columns: 100px repeat(3, 1fr);
    gap: 4px;
    max-width: 560px;
    margin: 0 auto;
}

.matrix-header {
    display: contents;
}

.matrix-header span {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    padding: 8px;
}

.matrix-row {
    display: contents;
}

.row-label {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 8px;
}

.matrix-cell {
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell-tp {
    background: rgba(201, 169, 110, 0.12);
    border: 1px solid rgba(201, 169, 110, 0.2);
}

.cell-off {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.cell-val {
    font-size: 14px;
    font-weight: 600;
}

.cell-tp .cell-val { color: var(--accent); }
.cell-off .cell-val { color: var(--text-dim); }

/* ===== Demo ===== */
.demo {
    padding: 140px 0;
    background: var(--bg);
}

.demo-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
}

.demo-input-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.demo-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    color: var(--text);
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.demo-input::placeholder {
    color: var(--text-dim);
}

.demo-input:focus {
    border-color: var(--accent);
}

.demo-btn {
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.demo-btn:hover {
    background: var(--accent-light);
}

.demo-result {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-sentiment {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.result-emoji {
    font-size: 32px;
}

.result-text {
    font-size: 24px;
    font-weight: 700;
}

.result-confidence {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: auto;
    background: var(--bg-elevated);
    padding: 4px 14px;
    border-radius: 980px;
}

.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.breakdown-item span:first-child {
    min-width: 36px;
    font-size: 14px;
    color: var(--text-muted);
}

.breakdown-item span:last-child {
    min-width: 48px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
    text-align: right;
}

.breakdown-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    background: var(--text-dim);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.breakdown-fill.fill-main {
    background: var(--accent);
}

/* Examples */
.examples {
    text-align: center;
}

.examples-label {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.example-tags {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 980px;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== Project Structure ===== */
.structure {
    padding: 140px 0;
    background: var(--bg-elevated);
}

.tree {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.tree-icon { font-size: 16px; }

.tree-name {
    font-weight: 500;
    color: var(--text);
}

.tree-desc {
    color: var(--text-dim);
    font-size: 13px;
    margin-left: 16px;
}

.indent-1 { padding-left: 24px; }
.indent-2 { padding-left: 48px; }
.indent-3 { padding-left: 72px; }

/* ===== Footer ===== */
.footer {
    padding: 60px 0 32px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.footer-content {
    text-align: center;
}

.footer-main {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-sub {
    font-size: 13px;
    color: var(--text-dim);
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .overview-cards,
    .data-grid {
        grid-template-columns: 1fr;
    }

    .data-card-hero {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .result-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .files {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-num {
        font-size: 28px;
    }

    .mapping-flow {
        gap: 24px;
    }

    .hero-visual {
        gap: 16px;
    }

    .review-bubble {
        min-width: 180px;
    }
}

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

    .result-metrics {
        grid-template-columns: 1fr;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    .files {
        grid-template-columns: 1fr;
    }

    .mapping-flow {
        flex-direction: column;
        align-items: center;
    }
}
