/* ============================================================
   AURISUS — writings.css (page-specific)
   ============================================================ */

/* Page Header */
.page-header {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: var(--space-6);
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid color-mix(in srgb, var(--silver) 15%, transparent);
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    width: 100%;
}

.page-title {
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--ivory);
    margin: 0 0 var(--space-3);
}

.page-sub {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--silver);
    max-width: 48ch;
    margin: 0;
    line-height: 1.5;
}

/* Background */
.inner-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.text-bg-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150vw;
    height: 150vw;
    min-width: 800px;
    min-height: 800px;
    transform: translate(-50%, -50%);
    opacity: 0.5;
}

.float-line {
    animation: floatLine 12s ease-in-out infinite alternate;
}

@keyframes floatLine {
    0% { transform: translateX(0); opacity: 0.05; }
    100% { transform: translateX(30px); opacity: 0.15; }
}

/* Intro Section */
.intro-section {
    padding-top: var(--space-7);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid color-mix(in srgb, var(--silver) 10%, transparent);
}

.intro-section .lead {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    color: var(--ivory);
    font-weight: 500;
    max-width: 40ch;
    line-height: 1.3;
    margin-bottom: var(--space-4);
}

.intro-section p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    max-width: 68ch;
    margin-bottom: var(--space-3);
}

/* Writings List / Substack Feed */
.writings-list {
    padding-top: var(--space-7);
    padding-bottom: var(--space-8);
}

.section-header {
    margin-bottom: var(--space-6);
}

.section-header .section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    color: var(--ivory);
    margin-bottom: var(--space-4);
    font-weight: 600;
}

.section-header p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    max-width: 68ch;
    margin-bottom: var(--space-3);
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Substack Post Cards */
.substack-card {
    display: block;
    border-top: 1px solid color-mix(in srgb, var(--silver) 15%, transparent);
    padding-top: var(--space-4);
    margin-top: var(--space-2);
    text-decoration: none;
    transition: border-color var(--dur) var(--ease);
}

.substack-card:hover {
    border-color: var(--ivory);
}

.post-meta {
    display: flex;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-size: 0.8125rem;
    color: var(--silver);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    color: var(--ivory);
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: 1.2;
    transition: color var(--dur) var(--ease);
}

.substack-card:hover .post-title {
    color: var(--silver);
}

.post-excerpt {
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    color: var(--silver);
    max-width: 68ch;
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

/* Feed Footer */
.feed-footer {
    margin-top: var(--space-6);
    border-top: 1px solid color-mix(in srgb, var(--silver) 15%, transparent);
    padding-top: var(--space-4);
}

/* Loading Dots */
.feed-loading {
    display: flex;
    gap: 0.5rem;
    padding: var(--space-4) 0;
}

.loading-dot {
    width: 6px;
    height: 6px;
    background: var(--silver);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* Error / Empty State */
.feed-error {
    padding: var(--space-4);
    border: 1px dashed color-mix(in srgb, var(--silver) 30%, transparent);
    color: var(--silver);
    font-size: 0.9375rem;
}

.feed-error a {
    color: var(--ivory);
    text-decoration: underline;
}