/*
Theme Name: Daveola Minimal
Theme URI: https://blog.davidoladeji.com
Author: David Oladeji
Author URI: https://davidoladeji.com
Description: A clean, minimal editorial blog theme.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: daveola-minimal
*/

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

:root {
    --bg: #fafaf9;
    --surface: #ffffff;
    --text: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #a8a29e;
    --border: #e7e5e4;
    --accent: #b45309;
    --accent-hover: #92400e;
    --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    padding: 48px 0 0;
    margin-bottom: 64px;
}

.header-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.site-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.site-name span { color: var(--accent); }

.header-nav {
    display: flex;
    gap: 24px;
}

.header-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

/* Intro */
.intro { margin-bottom: 32px; }

.intro-tagline {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Search */
.search-bar {
    position: relative;
    margin-bottom: 40px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.08);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

/* Posts list */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-item {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.post-item:last-child { border-bottom: 1px solid var(--border); }

.post-date {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.post-title {
    font-family: var(--font-serif);
    font-size: 1.625rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 12px;
    transition: color 0.2s;
}

.post-title a { color: inherit; cursor: pointer; }
.post-title a:hover { color: var(--accent); }

.post-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.read-more {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.read-more { cursor: pointer; }
.read-more:hover { gap: 8px; }

.read-more svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.copy-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    user-select: none;
    position: relative;
}

.copy-link:hover { color: var(--text-secondary); }

.copy-link svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.copy-link .copied-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.copy-link .copied-tooltip.show { opacity: 1; }

/* Inline post content (expand/collapse on listing) */
.posts-list .post-content {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-bottom: 0;
}

.posts-list .post-content.open {
    display: block;
}

.collapse-btn {
    margin-top: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-sans);
    transition: color 0.2s;
}

.collapse-btn:hover { color: var(--text); }

.collapse-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Single post content */
.single-post-header {
    margin-bottom: 40px;
}

.single-post-header .post-date {
    margin-bottom: 12px;
}

.single-post-header .post-title {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 0;
}

.post-content {
    margin-bottom: 48px;
}

.post-content p {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    color: var(--text);
    line-height: 1.85;
    margin-bottom: 20px;
}

.post-content p:last-child { margin-bottom: 0; }

.post-content ul,
.post-content ol {
    margin: 16px 0 20px 20px;
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    color: var(--text);
    line-height: 1.85;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 8px;
}

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    margin: 32px 0 16px;
    line-height: 1.3;
}

.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }
.post-content h4 { font-size: 1.125rem; }

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.post-content pre {
    background: #f5f5f4;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.post-content code {
    background: #f5f5f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 40px;
    transition: gap 0.2s;
}

.back-link:hover { gap: 10px; }

.back-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.pagination a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.pagination a:hover { gap: 8px; }

.pagination svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Post navigation (single) */
.post-nav {
    display: flex;
    justify-content: space-between;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    gap: 24px;
}

.post-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    max-width: 50%;
}

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

.post-nav .nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

.post-nav .next { text-align: right; margin-left: auto; }

/* Footer */
.site-footer {
    margin-top: 80px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.footer-links a svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.08s; }
.fade-in-delay-2 { transition-delay: 0.16s; }
.fade-in-delay-3 { transition-delay: 0.24s; }
.fade-in-delay-4 { transition-delay: 0.32s; }

/* 404 */
.not-found {
    text-align: center;
    padding: 80px 0;
}

.not-found h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.not-found p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 600px) {
    .site-header { padding: 32px 0 0; margin-bottom: 40px; }
    .header-inner { flex-direction: column; gap: 16px; }
    .post-title { font-size: 1.375rem; }
    .single-post-header .post-title { font-size: 1.75rem; }
    .site-footer { margin-top: 56px; }
    .post-nav { flex-direction: column; }
    .post-nav a { max-width: 100%; }
    .post-nav .next { text-align: left; }
}
