/* ============================================
   Matthew Karsten — Author Site
   Editorial publishing aesthetic
   ============================================ */

:root {
    --ink: #111;
    --paper: #faf9f6;
    --cream: #f3f1ec;
    --muted: #6b6b6b;
    --accent: #2d5a27;
    --accent-light: #e8f0e6;
    --gold: #b8860b;
    --live: #2d8a4e;
    --pub: #b8860b;
    --draft: #888;
    --radius: 8px;
    --max-w: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-brand {
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 2px;
    color: var(--ink);
}
.nav-links {
    display: flex;
    gap: 32px;
}
.nav-links a {
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: 0.2s;
}

/* Hero */
.hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 80px 32px 60px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: center;
}
.hero-label {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.hero-title {
    font-size: 4.5rem;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -1px;
    margin-bottom: 24px;
}
.hero-sub {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 32px;
}
.hero-sub strong { color: var(--ink); }
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-portrait img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 3/4;
    object-fit: cover;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: -apple-system, system-ui, sans-serif;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--ink);
    color: var(--paper);
}
.btn-primary:hover {
    background: #333;
}
.btn-ghost {
    border: 1.5px solid var(--ink);
    color: var(--ink);
    background: transparent;
}
.btn-ghost:hover {
    background: var(--ink);
    color: var(--paper);
}

/* Sections */
.section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 64px 32px;
}
.section-header {
    margin-bottom: 40px;
}
.section-tag {
    display: inline-block;
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.section h2 {
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: -0.5px;
}
.section-footer {
    margin-top: 32px;
    text-align: center;
}
.link-arrow {
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent);
    letter-spacing: 0.5px;
    transition: gap 0.2s;
}
.link-arrow:hover {
    text-decoration: underline;
}

/* Featured Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.featured-card {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}
.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.featured-cover {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--cream);
}
.featured-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.status-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.status-dot.live { background: var(--live); box-shadow: 0 0 8px rgba(45,138,78,0.5); }
.status-dot.pub { background: var(--pub); }
.status-dot.draft { background: var(--draft); }
.featured-info {
    padding: 20px;
}
.featured-badge {
    display: inline-block;
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.featured-badge.live { background: #e6f4ea; color: var(--live); }
.featured-badge.pub { background: #fef3e2; color: var(--pub); }
.featured-badge.draft { background: #f0f0f0; color: var(--draft); }
.featured-badge.print { background: var(--accent-light); color: var(--accent); }
.featured-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}
.featured-info p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Stats Strip */
.stats-strip {
    background: var(--ink);
    color: var(--paper);
    display: flex;
    justify-content: center;
    gap: 64px;
    padding: 40px 32px;
}
.stat { text-align: center; }
.stat-n {
    display: block;
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-l {
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
}

/* About Teaser */
.about-teaser {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-teaser-text p {
    color: var(--muted);
    margin: 16px 0;
    font-size: 1.05rem;
}
.about-teaser-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}
.platform-pill {
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 20px;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 24px;
    letter-spacing: 0.5px;
}

/* ======================
   BOOKS PAGE
   ====================== */
.page-header {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 48px 32px 32px;
}
.page-header h1 {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 8px;
}
.page-header p {
    color: var(--muted);
    font-size: 1.1rem;
}
.filter-row {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px 32px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-btn {
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 20px;
    border: 1.5px solid rgba(0,0,0,0.12);
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    color: var(--muted);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* Book detail cards */
.book-list {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px 64px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.book-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    padding: 32px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}
.book-row:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.book-row-cover {
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    background: var(--cream);
}
.book-row-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.book-row-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.book-row-body .role {
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}
.role.author { color: var(--accent); }
.role.editor { color: var(--pub); }
.book-row-body h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2px;
}
.book-row-body .byline {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 12px;
}
.book-row-body .desc {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
    max-width: 560px;
}
.book-row-body .tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.book-row-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.book-link {
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.15s;
}
.book-link.primary {
    background: var(--ink);
    color: var(--paper);
}
.book-link.primary:hover { background: #333; }
.book-link.outline {
    border: 1.5px solid rgba(0,0,0,0.15);
    color: var(--ink);
}
.book-link.outline:hover {
    border-color: var(--ink);
    background: rgba(0,0,0,0.03);
}

/* ======================
   ABOUT PAGE
   ====================== */
.about-hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 64px 32px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
}
.about-photo {
    border-radius: 12px;
    aspect-ratio: 3/4;
    object-fit: cover;
    width: 100%;
}
.about-body h1 {
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 24px;
}
.about-body p {
    color: var(--muted);
    margin-bottom: 16px;
    font-size: 1.05rem;
    max-width: 580px;
}
.about-body p strong { color: var(--ink); }

/* Timeline */
.timeline {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px 64px;
}
.timeline h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 32px;
}
.timeline-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 24px;
    padding: 20px 0;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.timeline-year {
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    padding-top: 2px;
}
.timeline-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.timeline-text p {
    font-size: 0.9rem;
    color: var(--muted);
}

/* ======================
   CONTACT PAGE
   ====================== */
.contact-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 64px 32px;
    text-align: center;
}
.contact-page h1 {
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 16px;
}
.contact-page .lead {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 48px;
}
.contact-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 24px;
    text-align: left;
}
.contact-card h3 {
    font-size: 0.75rem;
    font-family: -apple-system, system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.contact-card a {
    color: var(--ink);
    font-size: 1.1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.15);
    transition: border-color 0.2s;
}
.contact-card a:hover { border-color: var(--accent); }
.contact-card p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 8px;
}

/* FAQ */
.faq-list {
    text-align: left;
    margin-top: 48px;
}
.faq-list h2 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 24px;
    text-align: center;
}
.faq-item {
    padding: 20px 0;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.faq-item:last-child { border-bottom: 1px solid rgba(0,0,0,0.06); }
.faq-q {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1rem;
}
.faq-a {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--ink);
    color: rgba(255,255,255,0.7);
    padding: 48px 32px 24px;
    margin-top: 32px;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}
.footer-sub { font-size: 0.85rem; margin-top: 4px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-col a:hover { color: white; }
.footer-copy {
    max-width: var(--max-w);
    margin: 16px auto 0;
    font-size: 0.8rem;
    opacity: 0.5;
    text-align: center;
}

/* ======================
   RESPONSIVE
   ====================== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 1px solid rgba(0,0,0,0.1);
        padding: 16px 32px;
        gap: 16px;
    }
    .nav-toggle { display: flex; }

    .hero {
        grid-template-columns: 1fr;
        padding: 40px 24px;
        gap: 32px;
    }
    .hero-portrait { order: -1; max-width: 240px; margin: 0 auto; }
    .hero-title { font-size: 3rem; }
    .hero-content { text-align: center; }
    .hero-actions { justify-content: center; }

    .featured-grid { grid-template-columns: 1fr; gap: 20px; }
    .stats-strip { gap: 24px; flex-wrap: wrap; padding: 32px 24px; }
    .about-teaser { grid-template-columns: 1fr; }
    .about-teaser-logos { justify-content: flex-start; }

    .book-row { grid-template-columns: 120px 1fr; gap: 20px; padding: 20px; }
    .book-row-body h3 { font-size: 1.2rem; }

    .about-hero { grid-template-columns: 1fr; }
    .about-photo { max-width: 240px; }

    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .page-header h1 { font-size: 2.2rem; }

    .section { padding: 40px 24px; }
}
