/* scire.dev — Scholarly Minimalism */

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

html {
    font-size: 17px;
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    background-color: #FAF8F5;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.72;
    color: #3D3833;
    background-color: #FAF8F5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Reading Progress Bar ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #7A6B5D;
    z-index: 1000;
    transition: width 50ms linear;
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #FAF8F5;
    scroll-snap-align: start;
}

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

.hero-title {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: #2A2521;
    letter-spacing: 0.08em;
    font-variant: small-caps;
    line-height: 1.2;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out forwards;
}

.hero-descriptor {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #9B9590;
    letter-spacing: 0.04em;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.6s forwards;
}

.hero-chevron {
    position: absolute;
    bottom: 3rem;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 1.5s forwards;
    cursor: pointer;
}

.hero-chevron svg {
    animation: chevronPulse 3s ease-in-out infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ===== Navigation ===== */
.nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 2rem 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7647rem; /* ~13px */
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9B9590;
    scroll-snap-align: start;
}

.nav-item {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 300ms ease;
}

.nav-item:hover {
    color: #5C4E42;
}

.nav-item.active {
    color: #3D3833;
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #9B9590;
    display: inline-block;
}

/* ===== Content Column ===== */
.content-column {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Content Sections ===== */
.content-section {
    padding: 4rem 0;
    scroll-snap-align: start;
}

.content-section + .section-terminus + .content-section {
    padding-top: 0;
}

/* ===== Section Meta ===== */
.section-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7647rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9B9590;
}

.meta-separator {
    margin: 0 0.15rem;
}

.meta-reading-time::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #9B9590;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* ===== Headings ===== */
.section-heading {
    font-family: 'Source Serif 4', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: #2A2521;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.section-subheading {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: #2A2521;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

/* ===== Body Text ===== */
.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.72;
    color: #3D3833;
    margin-bottom: 1.5rem;
}

.body-text em {
    font-weight: 500;
    font-style: italic;
}

/* ===== Pull Quote ===== */
.pull-quote {
    margin: 3rem 0 3rem 2rem;
    padding-left: 1.5rem;
    border-left: 1px solid #9B9590;
}

.pull-quote p {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1.5;
    color: #2A2521;
}

/* ===== Code Block ===== */
.code-block {
    background-color: #F0ECE7;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 2px;
}

.code-block code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.9em;
    color: #6B635C;
    display: block;
    line-height: 1.8;
}

/* Inline code */
code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.9em;
    color: #6B635C;
    background-color: #F5F3F0;
    padding: 2px 6px;
    border-radius: 2px;
}

/* ===== Image Moment ===== */
.image-moment {
    margin: 3rem -10vw;
    text-align: center;
}

.image-placeholder {
    width: 90vw;
    max-width: 90vw;
    height: 320px;
    margin: 0 auto;
    background-color: #F5F3F0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-grain {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
}

.image-content {
    position: relative;
    z-index: 1;
}

.image-caption {
    display: block;
    margin-top: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7647rem;
    letter-spacing: 0.03em;
    color: #9B9590;
}

/* ===== Section Terminus ===== */
.section-terminus {
    text-align: center;
    padding: 4rem 0;
}

.terminus-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #9B9590;
}

/* ===== Notes List ===== */
.notes-list {
    margin-top: 2rem;
}

.note-item {
    padding: 2rem 0;
    border-top: 1px solid #E8E4DF;
}

.note-item:last-child {
    border-bottom: 1px solid #E8E4DF;
}

.note-meta {
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7647rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9B9590;
}

.note-title {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #2A2521;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: color 300ms ease;
}

.note-title:hover {
    color: #7A6B5D;
}

.note-excerpt {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.9412rem;
    line-height: 1.72;
    color: #6B635C;
}

/* ===== Contact Block ===== */
.contact-block {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #E8E4DF;
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.contact-label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7647rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9B9590;
}

.contact-link {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #7A6B5D;
    cursor: pointer;
    position: relative;
    transition: color 300ms ease;
}

.contact-link:hover {
    color: #5C4E42;
}

.external-arrow {
    font-size: 0.8em;
    color: #9B9590;
    margin-left: 0.25rem;
}

/* ===== Link Underline Animation ===== */
.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    right: 50%;
    height: 1px;
    background-color: #7A6B5D;
    transition: left 300ms ease, right 300ms ease;
}

.contact-link:hover::after {
    left: 0;
    right: 0;
}

/* ===== Footer ===== */
.footer {
    padding: 4rem 0 6rem;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.footer-mark {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-variant: small-caps;
    letter-spacing: 0.06em;
    font-size: 1rem;
    color: #9B9590;
}

.footer-separator {
    color: #D4C5B2;
}

.footer-note {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7647rem;
    letter-spacing: 0.03em;
    color: #9B9590;
    font-style: italic;
}

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

/* ===== Fade-In Animation Classes ===== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .content-column {
        padding: 0 1.25rem;
    }

    .image-moment {
        margin: 2rem -1.25rem;
    }

    .image-placeholder {
        width: 100%;
        max-width: 100%;
        height: 240px;
    }

    .nav {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .pull-quote {
        margin-left: 0.5rem;
        padding-left: 1rem;
    }

    .pull-quote p {
        font-size: 1.2rem;
    }

    .contact-block {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 16px;
    }

    .hero-title {
        letter-spacing: 0.05em;
    }

    .nav {
        gap: 1rem;
        font-size: 0.7rem;
    }
}
