/* ============================================================
   Kavocado Theme — Minimal Technical
   IBM Plex family: Mono (accents/code), Sans (body), Serif (headings)
   ============================================================ */

:root {
    --bg:          #0f1117;
    --bg-subtle:   #161b27;
    --border:      #232a3a;
    --text:        #c9d1e0;
    --text-muted:  #5a6680;
    --text-dim:    #3d4a60;
    --heading:     #e8edf5;
    --accent:      #4f8ef7;
    --accent-dim:  #1e3a6e;
    --accent-warm: #e8a24a;
    --code-bg:     #1a2035;

    --font-sans:   'IBM Plex Sans', sans-serif;
    --font-mono:   'IBM Plex Mono', monospace;
    --font-serif:  'IBM Plex Serif', serif;

    --max-w:       1100px;
    --max-w-text:  720px;
    --nav-h:       60px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(15, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    color: var(--heading);
    letter-spacing: -0.02em;
    text-decoration: none;
}
.site-logo:hover { text-decoration: none; color: var(--accent); }
.logo-mark {
    color: var(--accent);
    margin-right: 0.15em;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--heading); }

/* ── Hero ── */
.hero {
    padding: 7rem 2rem 6rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79,142,247,0.07) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: lowercase;
    margin-bottom: 1.25rem;
}
.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 300;
    color: var(--heading);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    max-width: 700px;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 580px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-primary, .btn-secondary {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.6rem 1.4rem;
    border-radius: 2px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    letter-spacing: 0.03em;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: #3a7aed;
    text-decoration: none;
    color: #fff;
}
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* ── Floating image animation ── */
@keyframes float-ease {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-14px); }
    100% { transform: translateY(0px); }
}
@keyframes float-ease-slow {
    0%   { transform: translateY(0px) rotate(-1deg); }
    50%  { transform: translateY(-10px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(-1deg); }
}
@keyframes float-ease-fast {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-18px); }
    100% { transform: translateY(0px); }
}

.float-img {
    animation: float-ease 6s ease-in-out infinite;
    filter: drop-shadow(0 12px 32px rgba(79,142,247,0.18));
    max-width: 220px;
    margin: 0 auto;
}
.float-img--slow {
    animation: float-ease-slow 9s ease-in-out infinite;
}
.float-img--fast {
    animation: float-ease-fast 4.5s ease-in-out infinite;
}

/* ── Feature sections ── */
.feature-section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2rem 2rem;
}
.feature-block {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}
.feature-block.reverse {
    grid-template-columns: 280px 1fr;
}
.feature-block.reverse .feature-image {
    order: -1;
}
.feature-block:last-child { border-bottom: none; }

.feature-text h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--heading);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.feature-text p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    max-width: 520px;
}
.feature-link {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.feature-link:hover { text-decoration: underline; }

.feature-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* ── About section ── */
.about-section {
    border-bottom: 1px solid var(--border);
    padding: 4rem 2rem;
}
.about-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}
.about-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    padding-top: 0.3rem;
}
.about-body p {
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 1rem;
    font-size: 1.02rem;
}
.about-body p:last-child { margin-bottom: 0; }

/* ── Section eyebrow ── */
.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    padding: 3rem 0 0;
    border-top: 1px solid var(--border);
    margin-bottom: -1rem;
}

/* ── Navigate grid ── */
.index-section {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
}
.index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 2rem;
}
.index-card {
    background: var(--bg-subtle);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.2s;
}
.index-card:hover {
    background: var(--bg);
    text-decoration: none;
}
.index-card-icon {
    font-size: 1.3rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.index-card-title {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--heading);
    letter-spacing: 0.02em;
}
.index-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Recent posts ── */
.recent-posts {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 4rem 2rem;
}
.section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.section-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* ── Post list ── */
.post-list {
    list-style: none;
    margin-bottom: 2rem;
}
.post-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 1.5rem;
    align-items: baseline;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}
.post-item:first-child { border-top: 1px solid var(--border); }
.post-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.post-category {
    color: var(--accent-warm);
    font-size: 0.7rem;
}
.post-title {
    color: var(--heading);
    font-weight: 400;
    font-size: 0.97rem;
    text-decoration: none;
}
.post-title:hover { color: var(--accent); text-decoration: none; }
.post-summary {
    grid-column: 2;
    font-size: 0.87rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.6;
}

/* ── Article page ── */
.article-page {
    max-width: var(--max-w-text);
    margin: 0 auto;
    padding: 0 2rem 4rem;
}
.article-header {
    padding: 4rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}
.article-meta {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.article-meta a { color: var(--text-muted); }
.article-meta a:hover { color: var(--accent); }
.article-meta .sep { color: var(--text-dim); }
.article-meta .tag {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.1em 0.5em;
    border-radius: 2px;
    font-size: 0.7rem;
}
.article-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 300;
    color: var(--heading);
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.article-subtitle {
    margin-top: 0.75rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* ── Article body ── */
.article-body {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text);
}
.article-body h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--heading);
    margin: 2.5rem 0 0.75rem;
    letter-spacing: -0.01em;
}
.article-body h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    margin: 2rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
}
.article-body p { margin-bottom: 1.25rem; }
.article-body a { color: var(--accent); }
.article-body ul, .article-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.article-body li { margin-bottom: 0.3rem; }
.article-body blockquote {
    border-left: 2px solid var(--accent);
    margin: 1.5rem 0;
    padding: 0.5rem 1.25rem;
    color: var(--text-muted);
    font-style: italic;
}
.article-body code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: 2px;
    color: var(--accent-warm);
}
.article-body pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.6;
}
.article-body pre code {
    background: none;
    padding: 0;
    color: var(--text);
    font-size: 0.875rem;
}
.article-body img {
    border-radius: 3px;
    margin: 1.5rem 0;
    max-width: 100%;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.article-body th, .article-body td {
    text-align: left;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
}
.article-body th {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* ── Article footer nav ── */
.article-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}
.article-nav {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
}
.article-nav:hover { color: var(--accent); text-decoration: none; }
.article-nav.next { margin-left: auto; }

/* ── Archives ── */
.archives-list { padding-top: 1rem; }
.archive-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    margin: 2.5rem 0 0.5rem;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 3rem 2rem 2rem;
    background: var(--bg-subtle);
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--heading);
    display: block;
    margin-bottom: 0.75rem;
}
.footer-col p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul a {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
}
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
}
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--accent); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .about-inner { grid-template-columns: 1fr; gap: 1rem; }
    .index-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-block,
    .feature-block.reverse {
        grid-template-columns: 1fr;
    }
    .feature-block.reverse .feature-image { order: 0; }
    .float-img { max-width: 160px; }
    .footer-inner { grid-template-columns: 1fr; }
    .nav-links { gap: 1.2rem; }
    .post-item { grid-template-columns: 1fr; gap: 0.2rem; }
    .post-summary { grid-column: 1; }
}
