/* riron.org - Retro-Futuristic Scholarly Design */
/* Colors: #f5f0e8 (warm off-white), #4a90d9 (primary blue), #e8b84b (accent gold), #1a1a2e (deep base), #6c757d (muted gray) */
/* Fonts: EB Garamond (scholarly), Inter (UI) */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'EB Garamond', Georgia, serif;
    background-color: #f5f0e8;
    color: #1a1a2e;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Particle Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
    transition: background 0.3s ease;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: -0.02em;
}

.logo-dot {
    color: #4a90d9;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4a90d9;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #4a90d9;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(170deg, #1a1a2e 0%, #1a1a2e 55%, #f5f0e8 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-align: left;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #e8b84b;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    color: #f5f0e8;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-description {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.7;
    color: rgba(245, 240, 232, 0.75);
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.hero-cta {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #1a1a2e;
    background: #e8b84b;
    padding: 0.9rem 2.2rem;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: #f5f0e8;
    color: #1a1a2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(232, 184, 75, 0.3);
}

.hero-svg {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    max-width: 500px;
    z-index: 1;
    opacity: 0.6;
}

.hero-path-1,
.hero-path-2 {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 3s ease forwards;
}

.hero-path-2 {
    animation-delay: 0.5s;
}

.hero-node {
    opacity: 0;
    animation: fadeInNode 0.5s ease forwards;
}

.hero-node:nth-child(3) { animation-delay: 1s; }
.hero-node:nth-child(4) { animation-delay: 1.5s; }
.hero-node:nth-child(5) { animation-delay: 2s; }
.hero-node:nth-child(6) { animation-delay: 2.3s; }
.hero-node:nth-child(7) { animation-delay: 2.6s; }

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

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

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #6c757d;
    letter-spacing: 0.05em;
}

/* Timeline Section */
.timeline-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    background: #f5f0e8;
}

.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.timeline-spine {
    stroke: #4a90d9;
    stroke-width: 2;
    stroke-dasharray: 8, 6;
    opacity: 0.4;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 4rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-left {
    flex-direction: row;
    padding-right: calc(50% + 2rem);
}

.timeline-right {
    flex-direction: row-reverse;
    padding-left: calc(50% + 2rem);
}

.timeline-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.node-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90d9;
    border: 3px solid #f5f0e8;
    box-shadow: 0 0 0 2px #4a90d9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .node-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 2px #4a90d9, 0 0 12px rgba(74, 144, 217, 0.4);
}

.node-year {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: #4a90d9;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

.timeline-card {
    background: white;
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(26, 26, 46, 0.06);
    border: 1px solid rgba(26, 26, 46, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(26, 26, 46, 0.1);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.card-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.card-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #6c757d;
    margin-bottom: 1rem;
}

.card-tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4a90d9;
    background: rgba(74, 144, 217, 0.08);
    padding: 0.35rem 0.75rem;
    border-radius: 2px;
}

/* Data Section */
.data-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    background: #1a1a2e;
}

.data-section .section-title {
    color: #f5f0e8;
}

.data-section .section-subtitle {
    color: rgba(245, 240, 232, 0.5);
}

.data-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.data-card {
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(245, 240, 232, 0.08);
    border-radius: 4px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.data-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.data-card-wide {
    grid-column: 1 / -1;
}

.data-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #e8b84b;
    margin-bottom: 1.5rem;
}

/* Bar Chart */
.bar-group {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    height: 180px;
    padding-bottom: 0.5rem;
}

.bar {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.bar-fill {
    width: 100%;
    background: linear-gradient(to top, #4a90d9, rgba(74, 144, 217, 0.6));
    border-radius: 2px 2px 0 0;
    height: 0;
    transition: height 1s ease;
}

.bar-labels {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.bar-labels span {
    flex: 1;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #6c757d;
}

/* Donut Chart */
.donut-chart {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.donut-svg {
    width: 140px;
    height: 140px;
    transform: rotate(-90deg);
    flex-shrink: 0;
}

.donut-segment {
    transition: stroke-dasharray 1.2s ease;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(245, 240, 232, 0.7);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Line Chart */
.line-svg {
    width: 100%;
    height: auto;
}

.citation-path,
.citation-path-2 {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease;
}

.citation-path.animated,
.citation-path-2.animated {
    stroke-dashoffset: 0;
}

.line-legend {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    justify-content: center;
}

.line-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(245, 240, 232, 0.6);
}

.line-swatch {
    display: inline-block;
    width: 16px;
    height: 3px;
    border-radius: 1px;
}

/* About Section */
.about-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    background: #f5f0e8;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(26, 26, 46, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 3rem;
    font-weight: 500;
    color: #4a90d9;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6c757d;
}

/* Footer */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    background: #1a1a2e;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #f5f0e8;
    margin-bottom: 0.75rem;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        padding: 8rem 1.5rem 4rem;
        background: linear-gradient(180deg, #1a1a2e 0%, #1a1a2e 60%, #f5f0e8 60%);
    }

    .hero-svg {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 80%;
        margin-top: 2rem;
    }

    .timeline-left,
    .timeline-right {
        padding-left: 3rem;
        padding-right: 0;
        flex-direction: row;
    }

    .timeline-node {
        left: 0;
        transform: none;
    }

    .timeline-spine {
        transform: translateX(-50%);
    }

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

    .about-stats {
        gap: 2rem;
    }

    .donut-chart {
        flex-direction: column;
        align-items: center;
    }

    .main-nav {
        gap: 1rem;
    }
}
