/* Fonts: Lora (body) + Inter (UI/headings) — self-hosted, no external requests */
@font-face {
    font-family: 'Lora';
    src: url('fonts/Lora-variable.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lora';
    src: url('fonts/Lora-Italic-variable.ttf') format('truetype');
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Italic-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

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

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #333333;
    --text-secondary: #666666;
    --copper: #b87333;
    --copper-dark: #96572a;
    --dark: #2a2a2a;
    --holly-bg: #fdf8f3;
    --tech-bg: #f5f0eb;
    --border: #eee;
    --success: #2d6a4f;
    --fail: #c0392b;
    --font-body: 'Lora', Georgia, 'Times New Roman', serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-body);
    line-height: 1.8;
    font-size: 1.05rem;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--copper-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--copper); }

/* Hero */
.hero {
    position: relative;
    min-height: 50vh;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #3a3028 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 3rem 1.5rem;
}
.hero-image {
    background-size: cover;
    background-position: center;
    min-height: 60vh;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(184, 115, 51, 0.15) 0%, transparent 60%);
}
.hero-image::before {
    background: rgba(0, 0, 0, 0.45);
}
.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 640px;
}
.hero h1 {
    font-family: var(--font-ui);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}
.hero .subtitle {
    font-size: 1.1rem;
    opacity: 0.7;
    font-style: italic;
    margin-bottom: 2rem;
}
.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.btn-primary {
    display: inline-block;
    background: var(--copper);
    color: #fff;
    padding: 0.7rem 1.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    transition: background 0.2s;
}
.btn-primary:hover { background: var(--copper-dark); color: #fff; }
.hero-cta .text-link {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hero-cta .text-link:hover { color: #fff; }

/* Hero compact (about, log) */
.hero-compact {
    min-height: 0;
    padding: 2.5rem 1.5rem;
}
.hero-compact h1 { font-size: 1.6rem; margin-bottom: 0; }

/* Navigation */
.top-nav {
    background: var(--dark);
    padding: 0.7rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}
.top-nav a:hover { color: #fff; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-brand { color: var(--copper) !important; font-weight: 600; }

/* Main content */
main {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Sections */
.section { margin-bottom: 3rem; }
.section-title {
    font-family: var(--font-ui);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--copper);
}

/* Entry cards (home + log) */
.entry-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}
.entry-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.entry-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.4rem;
}
.entry-date {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.entry-badge {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 600;
}
.badge-build { background: rgba(184,115,51,0.12); color: var(--copper-dark); }
.badge-reflection { background: rgba(74,107,122,0.12); color: #4a6b7a; }
.badge-episode { background: rgba(192,57,43,0.12); color: var(--fail); }
.entry-card-title {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 0.3rem;
}
.entry-teaser {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* What-is-this section */
.what-is-this {
    background: var(--tech-bg);
    border-radius: 6px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
}
.what-is-this p { margin-bottom: 0.8rem; }
.what-is-this p:last-child { margin-bottom: 0; }

/* About page */
.about-section {
    margin-bottom: 3rem;
}
.about-section h2 {
    font-family: var(--font-ui);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--copper);
}
.about-section p {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: #444;
}
.holly-quote {
    font-style: italic;
    border-left: 3px solid var(--copper);
    padding-left: 1.2rem;
    margin: 1.2rem 0;
    color: var(--text);
}

/* Dek — leading paragraph(s) before an entry's body */
.dek {
    font-size: 1.15rem;
    font-style: italic;
    color: #666;
    line-height: 1.55;
    margin: 0.5rem 0 1rem;
}

/* Footnote — small muted note at the bottom of an entry */
.entry-footnote {
    font-size: 0.9rem;
    color: #777;
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* Holly reflection block (in entries) */
.holly-reflection {
    border-left: 3px solid var(--copper);
    padding: 1.2rem 1.5rem;
    background: var(--holly-bg);
    margin: 1.5rem 0;
    border-radius: 0 6px 6px 0;
}
.holly-reflection .holly-label {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--copper);
    font-style: normal;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.holly-reflection p {
    font-size: 1rem;
    font-style: italic;
    margin: 0.4rem 0;
    color: #444;
}

/* Parts table */
.parts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 1.5rem 0;
    background: var(--tech-bg);
    border-radius: 6px;
    overflow: hidden;
}
.parts-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    border-bottom: 2px solid var(--copper);
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--dark);
    font-size: 0.85rem;
}
.parts-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e8e0d8;
}
.parts-table tr:last-child td { border-bottom: none; }
.cost-total {
    font-weight: 600;
    color: var(--copper-dark);
}

/* Entry page */
.entry-header {
    margin-bottom: 2rem;
}
.entry-header h1 {
    font-family: var(--font-ui);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 0.5rem;
}
.entry-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}
.tag {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    background: rgba(184,115,51,0.08);
    color: var(--copper-dark);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    text-decoration: none;
}

.entry-content p {
    font-size: 1.05rem;
    margin: 0.8rem 0;
    color: #444;
}

/* Images */
figure { margin: 1.5rem 0; }
figure img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
figcaption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

/* Prev/next nav */
.entry-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.entry-nav a {
    font-size: 0.95rem;
    color: var(--copper-dark);
    text-decoration: none;
    padding: 0.5rem 0;
}
.entry-nav a:hover { text-decoration: underline; }
.entry-nav .disabled { color: #ccc; }

/* Back to log */
.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
}

/* Start from beginning (log page) */
.start-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--tech-bg);
    border-radius: 6px;
    font-size: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 1rem;
    color: #aaa;
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.footer-main { margin-bottom: 0.5rem; color: var(--copper); }
.footer-sub { font-size: 0.8rem; color: #bbb; }
.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.footer-links a {
    color: #999;
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.8rem;
}
.footer-links a:hover { color: var(--copper); }

/* Responsive */
@media (max-width: 600px) {
    .hero { min-height: 40vh; padding: 2rem 1rem; }
    .hero h1 { font-size: 1.5rem; }
    main { padding: 1.5rem 1rem; }
    .entry-header h1 { font-size: 1.4rem; }
    .nav-links { gap: 1rem; }
    .hero-cta { flex-direction: column; gap: 1rem; }
}
