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

:root {
    --surface-0: oklch(0.10 0.015 280);
    --surface-1: oklch(0.13 0.012 280);
    --surface-2: oklch(0.16 0.010 280);
    --stroke: oklch(0.22 0.015 280);
    --text-hi: oklch(0.92 0.008 280);
    --text-mid: oklch(0.62 0.015 280);
    --text-lo: oklch(0.42 0.012 280);
    --brand: oklch(0.65 0.25 295);
    --brand-quiet: oklch(0.55 0.18 295);
    --brand-surface: oklch(0.20 0.06 295);
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Manrope', system-ui, sans-serif;
    background: var(--surface-0);
    color: var(--text-hi);
    font-size: clamp(1.05rem, 1.1vw, 1.15rem);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--text-hi); }
img { max-width: 100%; height: auto; display: block; }

.mono { font-family: 'Azeret Mono', monospace; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }
.wrap-narrow { max-width: 1200px; }

/* ── Nav ── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: oklch(0.10 0.015 280 / 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--stroke);
}
.nav-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 56px;
}
.wordmark {
    font-weight: 800; font-size: 0.95rem; letter-spacing: -0.04em;
    color: var(--text-hi); text-decoration: none;
}
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a {
    font-size: 0.9rem; font-weight: 500; text-decoration: none;
    color: var(--text-mid); transition: color 0.15s; letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--text-hi); }

.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 28px; height: 20px; position: relative;
}
.nav-toggle span {
    display: block; width: 100%; height: 2px; background: var(--text-hi);
    position: absolute; left: 0; transition: 0.2s;
}
.nav-toggle span:first-child { top: 2px; }
.nav-toggle span:last-child { bottom: 2px; }

/* ── Hero ── */
.hero {
    min-height: 100svh; display: grid;
    align-content: end; padding: 0 0 clamp(4rem, 10vh, 8rem);
    padding-top: 56px;
}
.page-hero {
    padding: clamp(8rem, 15vh, 12rem) 0 clamp(3rem, 6vh, 5rem);
}
.hero-tag {
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--brand);
    margin-bottom: 1.5rem;
}
.hero h1, .page-hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 800;
    line-height: 1.0; letter-spacing: -0.04em;
    max-width: 14ch; margin-bottom: 2rem;
}
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 20ch; }
.hero-sub {
    font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--text-mid);
    max-width: 52ch; line-height: 1.8; margin-bottom: 3rem;
}
.hero-sub a { color: var(--brand); }
.hero-cta {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-size: 0.85rem; font-weight: 600; color: var(--surface-0);
    background: var(--brand); padding: 0.75rem 1.8rem;
    border-radius: 6px; text-decoration: none;
    transition: transform 0.15s, background 0.15s;
}
.hero-cta:hover { background: var(--brand-quiet); color: var(--surface-0); transform: translateY(-1px); }

/* ── Section scaffolding ── */
section { padding: clamp(5rem, 10vw, 9rem) 0; }
.section-label {
    font-size: 0.65rem; font-weight: 600; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--brand); margin-bottom: 1.25rem;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800;
    letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 0.75rem;
}
.section-desc {
    font-size: 1.1rem; color: var(--text-mid); max-width: 54ch;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* ── Expertise grid ── */
.expertise-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 1px; background: var(--stroke);
}
.exp-cell {
    background: var(--surface-0); padding: clamp(1.5rem, 3vw, 2.5rem);
}
.exp-cell h3 {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}
.exp-cell p { font-size: 1rem; color: var(--text-mid); line-height: 1.75; }
.exp-cell.wide { grid-column: span 2; }

/* ── Numbers ── */
.numbers {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1px; background: var(--stroke);
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
    margin-top: clamp(3rem, 6vw, 5rem);
}
.num { background: var(--surface-0); padding: clamp(1.5rem, 3vw, 2.5rem); }
.num-val {
    font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800;
    letter-spacing: -0.04em; color: var(--brand);
}
.num-label { font-size: 0.85rem; color: var(--text-lo); margin-top: 0.25rem; }

/* ── Ventures ── */
.dark-band { background: var(--surface-1); }
.ventures-list { list-style: none; }
.ventures-list li {
    display: grid; grid-template-columns: 200px 1fr;
    gap: 2rem; align-items: baseline;
    padding: 1.5rem 0; border-bottom: 1px solid var(--stroke);
}
.ventures-list li:first-child { border-top: 1px solid var(--stroke); }
.v-name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.v-desc { font-size: 1.05rem; color: var(--text-mid); }

/* ── Stack ── */
.stack-cols {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
}
.stack-item { padding: 2rem 0; border-top: 1px solid var(--stroke); }
.stack-item h3 {
    font-size: 1.05rem; font-weight: 700; margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}
.stack-item p { font-size: 1rem; color: var(--text-mid); line-height: 1.75; }

/* ── Contact ── */
.contact-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
}
.contact-row > div > a {
    display: block; padding: 1.25rem 0;
    border-bottom: 1px solid var(--stroke);
    text-decoration: none; color: var(--text-hi);
    transition: color 0.15s;
}
.contact-row > div > a:hover { color: var(--brand); }
.c-label { font-size: 0.7rem; color: var(--text-lo); margin-bottom: 0.15rem; }
.c-val { font-size: 0.95rem; font-weight: 600; }

/* ── Blog post grid (homepage) ── */
.post-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
}
.post-card { background: var(--surface-0); border-radius: 6px; overflow: hidden; }
.post-card-img img { width: 100%; height: 200px; object-fit: cover; }
.post-card-body { padding: 1.5rem; }
.post-card-body h3 {
    font-size: 1.15rem; font-weight: 700; margin: 0.5rem 0;
    letter-spacing: -0.01em; line-height: 1.3;
}
.post-card-body h3 a { color: var(--text-hi); }
.post-card-body h3 a:hover { color: var(--brand); }
.post-card-body p { font-size: 1rem; color: var(--text-mid); line-height: 1.7; }
.post-date { font-size: 0.7rem; color: var(--text-lo); }
.view-all {
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em;
    color: var(--brand);
}

/* ── Blog listing ── */
.blog-listing { padding: clamp(2rem, 5vw, 4rem) 0 clamp(5rem, 10vw, 9rem); }
.post-list { list-style: none; }
.post-row {
    display: grid; grid-template-columns: 240px 1fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
    border-bottom: 1px solid var(--stroke);
    align-items: start;
}
.post-row:first-child { border-top: 1px solid var(--stroke); }
.post-row-img img {
    width: 100%; height: 160px; object-fit: cover; border-radius: 4px;
}
.post-row-body h2 {
    font-size: 1.35rem; font-weight: 700; margin: 0.4rem 0;
    letter-spacing: -0.02em; line-height: 1.3;
}
.post-row-body h2 a { color: var(--text-hi); }
.post-row-body h2 a:hover { color: var(--brand); }
.post-row-body p { font-size: 1rem; color: var(--text-mid); line-height: 1.7; }
.post-meta {
    display: flex; gap: 1rem; align-items: center;
    font-size: 0.7rem; color: var(--text-lo);
}
.post-cat {
    font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--brand);
}

/* ── Single post ── */
.post-header {
    padding: clamp(8rem, 15vh, 12rem) 0 clamp(2rem, 4vh, 3rem);
}
.post-header h1 {
    font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 800;
    line-height: 1.1; letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}
.post-meta-single {
    display: flex; gap: 1.5rem; font-size: 0.75rem; color: var(--text-lo);
}
.reading-time { color: var(--text-lo); }

.post-featured-img { margin-bottom: clamp(2rem, 4vw, 4rem); }
.post-featured-img img { border-radius: 6px; width: 100%; }

.post-content { padding-bottom: clamp(3rem, 6vw, 5rem); }
.post-content h2 {
    font-size: 1.75rem; font-weight: 800; margin: 3rem 0 1rem;
    letter-spacing: -0.02em;
}
.post-content h3 {
    font-size: 1.3rem; font-weight: 700; margin: 2.5rem 0 0.75rem;
    letter-spacing: -0.01em;
}
.post-content p { margin-bottom: 1.5rem; color: var(--text-hi); line-height: 1.9; font-size: 1.08rem; }
.post-content ul, .post-content ol {
    margin: 0 0 1.5rem 1.5rem; color: var(--text-mid); font-size: 1.05rem;
}
.post-content li { margin-bottom: 0.5rem; line-height: 1.8; }
.post-content blockquote {
    border-left: none; background: var(--surface-1);
    padding: 1.5rem 2rem; margin: 1.5rem 0; border-radius: 6px;
    font-style: italic; color: var(--text-mid);
}
.post-content pre {
    background: var(--surface-1); padding: 1.5rem;
    border-radius: 6px; overflow-x: auto; margin: 1.5rem 0;
    font-family: 'Azeret Mono', monospace; font-size: 0.85rem;
    line-height: 1.6; color: var(--text-hi);
}
.post-content code {
    font-family: 'Azeret Mono', monospace; font-size: 0.88em;
    background: var(--surface-1); padding: 0.15em 0.4em;
    border-radius: 3px;
}
.post-content pre code { background: none; padding: 0; font-size: 1em; }
.post-content img { border-radius: 6px; margin: 1.5rem 0; }
.post-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ── Post footer ── */
.post-footer {
    padding: clamp(2rem, 4vw, 3rem) 0 clamp(4rem, 8vw, 7rem);
    border-top: 1px solid var(--stroke);
}
.post-tags { margin-bottom: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 0.3rem 0.8rem;
    background: var(--surface-1); border-radius: 4px; color: var(--text-mid);
}

.share-bar {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.25rem 0; border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
    margin-bottom: 2rem;
}
.share-label { font-size: 0.7rem; color: var(--text-lo); letter-spacing: 0.1em; text-transform: uppercase; }
.share-link {
    font-size: 0.8rem; font-weight: 600; color: var(--text-mid);
    background: none; border: none; cursor: pointer;
    font-family: 'Manrope', system-ui, sans-serif;
    transition: color 0.15s;
}
.share-link:hover { color: var(--brand); }

.post-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.post-nav-link {
    display: block; padding: 1rem 0; color: var(--text-hi); text-decoration: none;
}
.post-nav-link.next { text-align: right; }
.post-nav-link span:first-child {
    font-size: 0.7rem; color: var(--text-lo); display: block; margin-bottom: 0.25rem;
}
.post-nav-title { font-weight: 600; font-size: 0.95rem; }
.post-nav-link:hover .post-nav-title { color: var(--brand); }

/* ── Pagination ── */
.pagination {
    padding: 2rem 0; text-align: center;
    font-size: 0.85rem;
}
.pagination a, .pagination span {
    padding: 0.5rem 0.75rem; margin: 0 0.15rem;
    border-radius: 4px; color: var(--text-mid);
}
.pagination a:hover { color: var(--brand); }
.pagination .current {
    background: var(--brand); color: var(--surface-0); font-weight: 600;
}

/* ── Empty state ── */
.empty-state {
    text-align: center; padding: clamp(4rem, 8vw, 8rem) 0;
}
.empty-state h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-mid); }

/* ── Footer ── */
footer {
    padding: 2rem 0; border-top: 1px solid var(--stroke);
}
.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
}
footer p { font-size: 0.7rem; color: var(--text-lo); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
    font-size: 0.75rem; color: var(--text-lo); font-weight: 500;
    transition: color 0.15s;
}
.footer-links a:hover { color: var(--brand); }

/* ── Page content ── */
.page-content { padding-bottom: clamp(5rem, 10vw, 9rem); }
.page-content p { margin-bottom: 1.25rem; max-width: 65ch; line-height: 1.85; }

/* ── Load animation ── */
@keyframes up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero .hero-tag, .hero h1, .hero .hero-sub, .hero .hero-cta {
    opacity: 0; animation: up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero h1 { animation-delay: 0.08s; }
.hero .hero-sub { animation-delay: 0.16s; }
.hero .hero-cta { animation-delay: 0.24s; }

/* ── WP overrides ── */
.wp-block-image { margin: 1.5rem 0; }
.wp-block-image img { border-radius: 6px; }
.wp-block-code { background: var(--surface-1); border-radius: 6px; padding: 1.5rem; }
.alignwide { max-width: 960px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex; flex-direction: column; gap: 0;
        position: fixed; top: 56px; left: 0; right: 0;
        background: var(--surface-0); border-bottom: 1px solid var(--stroke);
        padding: 1rem clamp(1.5rem, 4vw, 3rem);
    }
    .nav-links.open a { display: block; padding: 0.75rem 0; font-size: 0.95rem; }
    .expertise-grid { grid-template-columns: 1fr; }
    .exp-cell.wide { grid-column: span 1; }
    .numbers { grid-template-columns: 1fr 1fr; }
    .ventures-list li { grid-template-columns: 1fr; gap: 0.25rem; }
    .stack-cols { grid-template-columns: 1fr; }
    .contact-row { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: 1fr; }
    .post-row { grid-template-columns: 1fr; }
    .post-row-img img { height: 200px; }
    .post-nav { grid-template-columns: 1fr; gap: 1rem; }
    .post-nav-link.next { text-align: left; }
    .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}
