/* ========================================
   PERSONAL SITE — STYLE
   Edit colors/fonts below to customize.
   ======================================== */

:root {
    --color-bg: #f5f5f5;
    --color-text: #1a1a1a;
    --color-muted: #888888;
    --color-accent: #444444;
    --color-link: #333333;
    --color-border: #e0e0e0;
    --font-body: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Lora', 'Georgia', serif;
    --max-width: 640px;
}

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

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

/* Nav */
nav {
    position: sticky;
    top: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 10;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-decoration: none;
    color: #444444;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-linkedin {
    display: flex;
    align-items: center;
    color: var(--color-muted);
    transition: color 0.2s;
}

.nav-linkedin:hover {
    color: var(--color-text);
}

/* Main */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

section:last-child {
    border-bottom: none;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
    color: #000000;
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

/* About header with photo */
.about-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.headshot {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.about-header h1 {
    margin-bottom: 0.3rem;
}

.tagline {
    font-size: 1.1rem;
    color: var(--color-muted);
    margin-bottom: 0;
}

.bio p {
    margin-bottom: 1rem;
}

.section-intro {
    color: var(--color-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Item lists (research & writing) */
.item-list {
    list-style: none;
}

.item-list li {
    display: flex;
    gap: 1.2rem;
    padding: 0.9rem 0;
    border-top: 1px solid var(--color-border);
    align-items: baseline;
}

.item-date {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--color-muted);
    min-width: 5rem;
    flex-shrink: 0;
}

.item-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.2s;
}

.item-title:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.item-desc {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
    line-height: 1.5;
}

/* Links */
a {
    color: var(--color-link);
    transition: color 0.2s;
}

a:hover {
    color: var(--color-accent);
}

/* Substack feed cards */
.substack-feed-embed {
    display: grid;
    gap: 0;
}

.substack-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.9rem 0;
    border-top: 1px solid var(--color-border);
    transition: background 0.15s;
}

.substack-card:hover {
    background: rgba(0, 0, 0, 0.02);
}

.substack-post {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.substack-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.substack-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-link);
    margin: 0;
    transition: color 0.2s;
}

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

.substack-date {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.15rem;
}

.substack-desc {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
    line-height: 1.5;
}

.substack-skeleton {
    color: var(--color-muted);
    font-size: 0.9rem;
    padding: 1rem 0;
}

.substack-error {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.substack-error a {
    color: var(--color-link);
}

/* Substack subscribe embed */
.substack-embed {
    margin-top: 2rem;
    border-radius: 6px;
    overflow: hidden;
}

/* Contact / social */
#contact p {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.social-links a:hover {
    color: var(--color-text);
    border-color: var(--color-text);
}

/* Footer */
footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
}

footer p {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* Mobile */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .about-header {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        gap: 1rem;
    }

    .item-list li {
        flex-direction: column;
        gap: 0.2rem;
    }

    .item-date {
        min-width: auto;
    }

    section {
        padding: 2.5rem 0;
    }
}
