/* tanso.wiki - Cyberpunk Carbon Knowledge Encyclopedia */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Fonts: Inter (display/UI), Lora (body/serif) */

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

:root {
    --deep-base: #1a1a2e;
    --primary-blue: #4a90d9;
    --warm-white: #f5f0e8;
    --accent-gold: #e8b84b;
    --muted-gray: #6c757d;
    --cyan-neon: #4ae8e0;
    --burnt-orange: #d4722a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, serif;
    background-color: var(--deep-base);
    color: var(--warm-white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* HUD Scanlines Overlay */
.hud-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(74, 144, 217, 0.015) 2px,
        rgba(74, 144, 217, 0.015) 4px
    );
}

/* HUD Corner Decorations */
.hud-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 2;
}
.hud-corner-tl {
    top: 0; left: 0;
    border-top: 2px solid var(--accent-gold);
    border-left: 2px solid var(--accent-gold);
}
.hud-corner-tr {
    top: 0; right: 0;
    border-top: 2px solid var(--accent-gold);
    border-right: 2px solid var(--accent-gold);
}
.hud-corner-bl {
    bottom: 0; left: 0;
    border-bottom: 2px solid var(--accent-gold);
    border-left: 2px solid var(--accent-gold);
}
.hud-corner-br {
    bottom: 0; right: 0;
    border-bottom: 2px solid var(--accent-gold);
    border-right: 2px solid var(--accent-gold);
}

/* Header */
.hud-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    border-bottom: 1px solid rgba(74, 144, 217, 0.3);
    backdrop-filter: blur(10px);
}
.hud-header-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-icon {
    display: flex;
    align-items: center;
}
.logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--warm-white);
    letter-spacing: -0.5px;
}
.logo-dot {
    color: var(--accent-gold);
}
.hud-nav {
    display: flex;
    gap: 24px;
}
.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-gray);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 0;
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}
.nav-link:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(232, 184, 75, 0.4);
}
.nav-link:hover::after {
    width: 100%;
}
.hud-status {
    display: flex;
    align-items: center;
    gap: 8px;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-gold);
    animation: pulse-dot 2s infinite;
    display: inline-block;
}
.status-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 2px;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--accent-gold); }
    50% { opacity: 0.5; box-shadow: 0 0 8px var(--accent-gold); }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 32px 80px;
}
.hero-hud-frame {
    position: relative;
    max-width: 1100px;
    width: 100%;
    padding: 48px;
    border: 1px solid rgba(74, 144, 217, 0.2);
    display: flex;
    align-items: center;
    gap: 60px;
}
.hero-content {
    flex: 1;
}
.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}
.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--warm-white);
    margin-bottom: 24px;
}
.hero-highlight {
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(232, 184, 75, 0.3);
}
.hero-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    color: var(--muted-gray);
    max-width: 520px;
    margin-bottom: 40px;
    line-height: 1.8;
}
.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}
.stat-block {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-blue);
    text-shadow: 0 0 10px rgba(74, 144, 217, 0.3);
}
.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--deep-base);
    background: var(--accent-gold);
    padding: 14px 32px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid var(--accent-gold);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.hero-cta:hover {
    background: transparent;
    color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(232, 184, 75, 0.3);
}
.hero-cta:hover::before {
    left: 100%;
}
.cta-arrow {
    transition: transform 0.3s ease;
}
.hero-cta:hover .cta-arrow {
    transform: translateX(4px);
}
.hero-visual {
    flex-shrink: 0;
}
.carbon-atom-svg {
    animation: slow-rotate 30s linear infinite;
}
.electron {
    animation: orbit-pulse 3s ease-in-out infinite;
}
.electron.e1 { animation-delay: 0s; }
.electron.e2 { animation-delay: 0.75s; }
.electron.e3 { animation-delay: 1.5s; }
.electron.e4 { animation-delay: 2.25s; }

@keyframes slow-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes orbit-pulse {
    0%, 100% { opacity: 1; r: 4; }
    50% { opacity: 0.5; r: 6; }
}

/* Wiki Sections */
.wiki-section {
    padding: 100px 32px;
}
.section-dark {
    background: rgba(0, 0, 0, 0.3);
}
.section-hud-frame {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px;
    border: 1px solid rgba(74, 144, 217, 0.15);
}
.section-header {
    margin-bottom: 48px;
}
.section-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 12px;
}
.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--warm-white);
    margin-bottom: 12px;
}
.section-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    color: var(--muted-gray);
    max-width: 640px;
    line-height: 1.8;
}

/* Wiki Cards */
.wiki-entries {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.wiki-card {
    position: relative;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(74, 144, 217, 0.15);
    padding: 32px;
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
}
.wiki-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent-gold);
    transition: height 0.4s ease;
}
.wiki-card:hover {
    border-color: rgba(232, 184, 75, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(232, 184, 75, 0.1);
}
.wiki-card:hover::before {
    height: 100%;
}
.card-hud-border {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-blue));
    transition: width 0.6s ease;
}
.wiki-card:hover .card-hud-border {
    width: 100%;
}
.card-icon {
    margin-bottom: 20px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.wiki-card:hover .card-icon {
    opacity: 1;
}
.card-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--warm-white);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}
.wiki-card:hover .card-title {
    color: var(--accent-gold);
}
.card-excerpt {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    color: var(--muted-gray);
    line-height: 1.7;
    margin-bottom: 20px;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.meta-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border: 1px solid rgba(74, 144, 217, 0.3);
}
.meta-reading {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: var(--muted-gray);
}

/* Element Profile */
.element-profile {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}
.element-card-large {
    flex-shrink: 0;
    width: 200px;
    padding: 32px;
    border: 2px solid var(--accent-gold);
    text-align: center;
    position: relative;
    background: rgba(26, 26, 46, 0.8);
}
.element-card-large::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(74, 144, 217, 0.2);
    pointer-events: none;
}
.element-number {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    position: absolute;
    top: 12px;
    left: 16px;
}
.element-symbol {
    font-family: 'Inter', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(232, 184, 75, 0.3);
}
.element-name {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--warm-white);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}
.element-weight {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--muted-gray);
}
.element-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    align-items: center;
}
.detail-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.detail-value {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    color: var(--warm-white);
}
.detail-bar {
    grid-column: 1 / -1;
    height: 3px;
    background: rgba(74, 144, 217, 0.15);
    border-radius: 2px;
    overflow: hidden;
}
.detail-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), var(--primary-blue));
    border-radius: 2px;
    width: 0;
    transition: width 1.2s ease;
}

/* Carbon Cycle */
.cycle-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cycle-node {
    text-align: center;
    padding: 24px 16px;
    border: 1px solid rgba(74, 144, 217, 0.15);
    background: rgba(26, 26, 46, 0.6);
    max-width: 200px;
    transition: all 0.4s ease;
    cursor: pointer;
}
.cycle-node:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(232, 184, 75, 0.15);
    transform: translateY(-4px);
}
.node-hud {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}
.node-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--warm-white);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}
.node-value {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--accent-gold);
    margin-bottom: 8px;
}
.node-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.8rem;
    color: var(--muted-gray);
    line-height: 1.6;
}
.cycle-arrow {
    display: flex;
    align-items: center;
    opacity: 0.6;
    animation: arrow-pulse 2s ease-in-out infinite;
}
@keyframes arrow-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Data Section */
.data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.data-card {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(74, 144, 217, 0.15);
    padding: 32px;
    text-align: center;
    transition: all 0.4s ease;
}
.data-card:hover {
    border-color: rgba(232, 184, 75, 0.3);
    transform: translateY(-4px);
}
.data-viz {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 140px;
}
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 120px;
}
.bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 30px;
    height: 100%;
}
.bar-inner {
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, var(--accent-gold), var(--primary-blue));
    transition: height 1.5s ease;
    border-radius: 2px 2px 0 0;
}
.bar-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--muted-gray);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ring-chart {
    display: flex;
    justify-content: center;
}
.ring-segment {
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dasharray 1.5s ease;
}
.data-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--warm-white);
    margin-bottom: 8px;
}
.data-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.85rem;
    color: var(--muted-gray);
    line-height: 1.6;
}

/* Timeline Mini */
.timeline-mini {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 20px 0;
}
.timeline-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted-gray);
    border: 2px solid var(--primary-blue);
    transition: all 0.3s ease;
}
.timeline-point:hover .tl-dot,
.timeline-point.active .tl-dot {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(232, 184, 75, 0.5);
}
.tl-year {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted-gray);
    letter-spacing: 1px;
}
.timeline-point:hover .tl-year,
.timeline-point.active .tl-year {
    color: var(--accent-gold);
}
.timeline-line {
    flex: 1;
    height: 1px;
    background: rgba(74, 144, 217, 0.3);
    min-width: 20px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}
.about-text p {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.05rem;
    color: var(--muted-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}
.about-text em {
    color: var(--accent-gold);
    font-style: italic;
}
.about-quote {
    border-left: 3px solid var(--accent-gold);
    padding: 20px 24px;
    margin: 24px 0;
    background: rgba(232, 184, 75, 0.05);
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    color: var(--warm-white);
    font-style: italic;
    line-height: 1.8;
}
.quote-mark {
    color: var(--accent-gold);
    font-size: 1.5rem;
}
.about-quote cite {
    display: block;
    margin-top: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-style: normal;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.about-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.about-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--warm-white);
    text-decoration: none;
    padding: 14px 20px;
    border: 1px solid rgba(74, 144, 217, 0.2);
    transition: all 0.3s ease;
}
.about-link:hover {
    border-color: var(--accent-gold);
    background: rgba(232, 184, 75, 0.08);
    color: var(--accent-gold);
    transform: translateX(4px);
}
.link-icon {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    color: var(--accent-gold);
    transition: transform 0.3s ease;
}
.about-link:hover .link-icon {
    transform: translateX(4px);
}

/* Footer */
.hud-footer {
    padding: 60px 32px;
    border-top: 1px solid rgba(74, 144, 217, 0.2);
    text-align: center;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.footer-logo {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--warm-white);
    margin-bottom: 8px;
}
.footer-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}
.footer-hud-line {
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    margin: 0 auto 24px;
}
.footer-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}
.footer-status {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-year {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted-gray);
    letter-spacing: 1.5px;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-hud-frame {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .hero-title { font-size: 2.4rem; }
    .hero-desc { margin: 0 auto 40px; }
    .hero-stats { justify-content: center; }
    .wiki-entries { grid-template-columns: 1fr; }
    .element-profile { flex-direction: column; align-items: center; }
    .data-grid { grid-template-columns: 1fr; }
    .about-content { grid-template-columns: 1fr; }
    .cycle-diagram { flex-direction: column; align-items: center; }
    .cycle-arrow { transform: rotate(90deg); }
    .hud-nav { display: none; }
}

@media (max-width: 600px) {
    .hero-title { font-size: 1.8rem; }
    .section-title { font-size: 1.6rem; }
    .section-hud-frame { padding: 24px; }
    .hero-hud-frame { padding: 24px; }
    .hero-stats { flex-direction: column; gap: 20px; }
}

/* Animations - Visible state */
.wiki-card.visible,
.cycle-node.visible,
.data-card.visible,
.detail-row.visible {
    opacity: 1;
    transform: translateY(0);
}
