/* ─── Project Style (Based on Visual Chronometer) ─── */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1d1d1f;
    background: #fff;
}

/* ─── Layout ─── */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 40px;
}

.container.narrow {
    max-width: 780px;
}

/* ─── Hero ─── */
.hero {
    text-align: center;
    padding: 120px 40px 100px;
    background: #fff;
}

.hero-overline {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #86868b;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.4;
    color: #6e6e73;
    margin-bottom: 40px;
}

.hero-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.pill {
    display: inline-block;
    padding: 10px 28px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
    border: 1px solid #d2d2d7;
    border-radius: 980px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.pill:hover {
    background: #f5f5f7;
    border-color: #bbb;
}

.hero-authors {
    font-size: 0.9rem;
    font-weight: 400;
    color: #6e6e73;
    margin-bottom: 4px;
}

.hero-affiliation {
    font-size: 0.8rem;
    font-weight: 400;
    color: #86868b;
    margin-bottom: 56px;
}

.author-link {
    color: #6e6e73 !important;
    text-decoration: none !important;
    transition: font-weight 0.2s ease;
}

.author-link:hover, .author-link:active, .author-link:focus, .author-link:visited:hover {
    font-weight: 600 !important;
    color: #6e6e73 !important;
    text-decoration: none !important;
}

.hero-video-container {
    max-width: 960px;
    margin: 64px auto 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeUp 0.7s ease 0.3s both;
}

.hero-video {
    width: 100%;
    display: block;
    border-radius: 20px;
    cursor: pointer;
}

/* ─── Sections ─── */
.section-dark {
    background: #f5f5f7;
    padding: 100px 40px;
}

.section-light {
    background: #fff;
    padding: 100px 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.05rem;
    font-weight: 400;
    color: #6e6e73;
    line-height: 1.55;
    max-width: 640px;
    margin: 0 auto;
}

.body-large {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.65;
    color: #424245;
    margin-bottom: 20px;
}

.container.narrow h2 {
    text-align: center;
    margin-bottom: 28px;
}

#method .container h2 {
    text-align: center;
    margin-bottom: 28px;
}

#method .container .body-large {
    text-align: left;
    font-size: 1rem;
    line-height: 1.65;
}

#method .framework-figure {
    max-width: 960px;
    margin: 0 auto;
}

.container.narrow .body-large {
    text-align: left;
    font-size: 1rem;
    line-height: 1.65;
}

.framework-figure {
    margin: 0;
    max-width: 100%;
}

.framework-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.framework-figure figcaption {
    margin-top: 18px;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.65;
    color: #6e6e73;
    text-align: left;
}

/* ─── Demo Grid (Compatibility for video comparisons) ─── */
.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 1120px;
    margin: 0 auto;
}

.comparison-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.comparison-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 48px 0 24px;
}

/* ─── Citation ─── */
.citation-container {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 24px 28px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #424245;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    position: relative;
}

.copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-button:hover {
    background: #f5f5f7;
}

/* ─── Fade-in animation ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero h1,
.hero-subtitle,
.hero-links,
.section-header,
.comparison-card {
    animation: fadeUp 0.7s ease both;
}

.hero-subtitle     { animation-delay: 0.1s; }
.hero-links        { animation-delay: 0.2s; }

/* ─── Responsive ─── */
@media (max-width: 860px) {
    .hero h1 { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1.2rem; }
    h2 { font-size: 2rem; }
    .demo-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero { padding: 80px 24px 64px; }
    .section-dark, .section-light { padding: 64px 24px; }
}