:root {
    --bg-color: #f5f0e8;
    --bg-dark: #2c2420;
    --text-font: "Bungee", sans-serif;
    --text-font-body: "Markazi Text", serif;
    --text-color: #2c2420;
    --text-light: #f5f0e8;
    --accent: #8b5e3c;
    --accent-dark: #5c3d1e;
    --card-bg: #ede4d3;
    --card-border: #c4a882;
    --muted: #7a6652;
}

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

body {
    background-color: var(--bg-color);
    font-family: var(--text-font-body);
    min-height: 100dvh;
    color: var(--text-color);
}

/* ── LAYOUT ── */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    width: 90%;
    max-width: 860px;
    margin: 0 auto;
}

/* ── HEADER ── */
.page-header {
    padding: 4vh 0 3vh;
    border-bottom: 2px solid var(--card-border);
    margin-bottom: 4vh;
}

.back-link {
    display: inline-block;
    font-family: var(--text-font);
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.06em;
    margin-bottom: 1.2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-dark);
}

.page-title {
    font-family: var(--text-font);
    font-size: clamp(2rem, 8vw, 4rem);
    color: var(--accent-dark);
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ── ARTICLES LIST ── */
.articles {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ── ARTICLE CARD ── */
.article-card {
    background-color: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 14px;
    padding: 1.8rem 2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(44, 36, 32, 0.14);
}

.placeholder-card {
    opacity: 0.55;
    border-style: dashed;
}

.placeholder-card:hover {
    transform: none;
    box-shadow: none;
}

/* ── ARTICLE INTERNALS ── */
.article-meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.article-date {
    font-family: var(--text-font-body);
    font-size: 0.95rem;
    color: var(--muted);
}

.article-tag {
    font-family: var(--text-font);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-light);
    background-color: var(--accent);
    border-radius: 999px;
    padding: 0.2em 0.8em;
}

.article-title {
    font-family: var(--text-font);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--accent-dark);
    letter-spacing: 0.02em;
    margin-bottom: 0.8rem;
}

.article-excerpt {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 1.2rem;
}

.read-more {
    font-family: var(--text-font);
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--accent-dark);
}

/* ── FOOTER ── */
footer {
    display: flex;
    align-items: center;
    padding: 2rem 0;
    border-top: 2px solid var(--card-border);
    margin-top: 4vh;
}

.linkedInLogo {
    border-radius: 8px;
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.85;
}

.linkedInLogo:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* ── SUBSTACK ICON ── */
.substack-icon svg {
    display: block;
    border-radius: 8px;
    opacity: 0.85;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.substack-icon:hover svg {
    transform: scale(1.15);
    opacity: 1;
}

/* ── INLINE SUBSTACK LINK ── */
.substack-inline {
    color: #FF6719;
    text-decoration: none;
    font-weight: 600;
}

.substack-inline:hover {
    text-decoration: underline;
}

/* ── LOADING DOTS ── */
.loading-state {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 4rem 0;
}

.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--card-border);
    animation: bounce 1.2s infinite ease-in-out;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

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

/* ── FEED ERROR ── */
.feed-error {
    font-family: var(--text-font-body);
    color: var(--muted);
    font-size: 1.1rem;
    text-align: center;
    padding: 3rem 0;
}

.feed-error a {
    color: var(--accent);
    text-decoration: none;
}

.feed-error a:hover {
    text-decoration: underline;
}
