/* ---------------------------------------------------
   Tokens
--------------------------------------------------- */
:root {
    --green: #3DDC84;
    --green-dark: #2BAF6A;
    --blue: #4285F4;
    --ink: #1B1F1D;
    --surface: #F3F5F4;
    --bg: #FAFCFB;
    --ink-70: rgba(27,31,29,0.7);
    --ink-62: rgba(27,31,29,0.62);
    --ink-60: rgba(27,31,29,0.6);
    --ink-45: rgba(27,31,29,0.45);
    --ink-40: rgba(27,31,29,0.4);
    --ink-15: rgba(27,31,29,0.15);
    --ink-08: rgba(27,31,29,0.08);
    --ink-06: rgba(27,31,29,0.06);
    --ink-05: rgba(27,31,29,0.05);
    --paper-72: rgba(250,252,251,0.72);
    --paper-70: rgba(250,252,251,0.7);
    --paper-10: rgba(250,252,251,0.1);
    --green-tint-12: rgba(61,220,132,0.12);
    --green-tint-14: rgba(61,220,132,0.14);
    --green-tint-25: rgba(61,220,132,0.25);
    --blue-tint-12: rgba(66,133,244,0.12);
    --blue-tint-14: rgba(66,133,244,0.14);
    --blue-tint-25: rgba(66,133,244,0.25);
    --font: 'Roboto', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }

.site-shell { overflow-x: hidden; }

/* ---------------------------------------------------
   Logo lockup
--------------------------------------------------- */
.logo-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
}

.logo-badge {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(43,175,106,0.35);
    flex-shrink: 0;
}

.logo-badge--small { width: 36px; height: 36px; border-radius: 11px; box-shadow: none; }

.logo-glyph { color: #fff; font-weight: 900; font-size: 22px; }
.logo-glyph--small { font-size: 18px; }

.logo-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--blue);
    border: 2px solid var(--bg);
}

.logo-word { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.logo-word--footer { font-size: 17px; color: var(--bg); }

/* ---------------------------------------------------
   Header
--------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250,252,251,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ink-08);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.nav-link {
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    transition: background .15s ease, color .15s ease;
}

.nav-link:hover { background: var(--surface); color: var(--green-dark); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.search-trigger:hover { background: var(--surface); color: var(--green-dark); }

/* ---------------------------------------------------
   Buttons / pills
--------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    transition: border-color .15s ease, background .15s ease;
}

.btn-outline { border: 1.5px solid var(--ink-15); color: var(--ink); }
.btn-outline:hover { border-color: var(--green); }
.btn-outline--large { padding: 14px 28px; border-radius: 14px; font-weight: 700; font-size: 15px; }

.btn-dark { background: var(--ink); color: var(--bg); font-weight: 700; border: none; cursor: pointer; }
.btn-dark:hover { background: var(--green-dark); }

.btn-primary {
    padding: 14px 28px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #0E2B1A;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(61,220,132,0.3);
}

/* ---------------------------------------------------
   Hero
--------------------------------------------------- */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 32px 80px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--green-dark);
    margin-bottom: 24px;
}

.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.hero-title {
    font-size: 58px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0 0 24px;
}

.hero-title-accent { color: var(--green-dark); }

.hero-description {
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink-70);
    max-width: 520px;
    margin: 0 0 36px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art { position: relative; }

.code-card {
    border-radius: 24px;
    background: var(--ink);
    padding: 28px;
    box-shadow: 0 24px 60px rgba(27,31,29,0.25);
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: #e6f7ec;
    line-height: 1.7;
    overflow-x: auto;
}

.code-card-dots { display: flex; gap: 7px; margin-bottom: 18px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.code-annotation { color: var(--blue); }
.code-keyword { color: var(--green); }
.code-indent { padding-left: 20px; }

.hero-art-badge {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--blue);
    box-shadow: 0 12px 30px rgba(66,133,244,0.35);
    transform: rotate(-8deg);
}

/* ---------------------------------------------------
   Recent posts
--------------------------------------------------- */
.posts-section { background: var(--surface); padding: 88px 32px; }
.posts-section-inner { max-width: 1200px; margin: 0 auto; }

.posts-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 44px;
    gap: 24px;
    flex-wrap: wrap;
}

.eyebrow-mono {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--green-dark);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.eyebrow-mono--light { color: var(--green); }

.section-heading { font-size: 38px; font-weight: 900; letter-spacing: -0.02em; margin: 0; }
.section-heading--light { font-size: 36px; margin: 0 0 20px; }

.posts-section-tagline { color: var(--ink-60); font-size: 15px; max-width: 360px; margin: 0; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 1px 3px var(--ink-06), 0 8px 20px rgba(27,31,29,0.04);
    border: 1px solid var(--ink-05);
    color: var(--ink);
    transition: box-shadow .2s ease, transform .2s ease;
}

.post-card:hover {
    box-shadow: 0 4px 10px rgba(27,31,29,0.08), 0 16px 32px rgba(27,31,29,0.08);
    transform: translateY(-3px);
}

.post-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.post-icon-tile {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--green-tint-14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--green-dark);
    overflow: hidden;
    text-transform: uppercase;
}

.post-icon-tile img { width: 100%; height: 100%; object-fit: cover; }

.post-card:nth-child(even) .post-icon-tile { background: var(--blue-tint-14); color: var(--blue); }

.reading-time { font-family: var(--font-mono); font-size: 12px; color: var(--ink-40); }

.post-card-title { font-size: 19px; font-weight: 700; line-height: 1.35; margin: 0 0 10px; letter-spacing: -0.01em; }

.post-card-excerpt { font-size: 14.5px; line-height: 1.6; color: var(--ink-62); margin: 0 0 20px; flex: 1; }

.post-card-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.tag-chip {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--green-dark);
}

.tag-chip--accent { background: var(--green-tint-12); }

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(27,31,29,0.07);
    font-size: 13px;
    color: var(--ink-45);
}

.read-more { color: var(--green-dark); font-weight: 500; }

/* ---------------------------------------------------
   About section
--------------------------------------------------- */
.about-section { background: var(--ink); color: var(--bg); padding: 96px 32px; }

.about-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
    align-items: center;
}

.about-art { position: relative; }

.about-photo,
.about-photo-placeholder {
    aspect-ratio: 1;
    border-radius: 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
}

.about-photo-placeholder {
    background: repeating-linear-gradient(135deg, var(--green-tint-14) 0 12px, rgba(61,220,132,0.06) 12px 24px);
    border: 1px solid var(--green-tint-25);
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(250,252,251,0.5);
    text-align: center;
    padding: 20px;
}

.about-badge {
    position: absolute;
    bottom: -16px;
    left: -16px;
    padding: 14px 20px;
    border-radius: 16px;
    background: var(--green);
    color: #0E2B1A;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.about-paragraph { font-size: 16.5px; line-height: 1.75; color: var(--paper-72); margin: 0 0 18px; }

.about-pills { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

.pill {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.pill--green { background: var(--green-tint-12); color: var(--green); border-color: var(--green-tint-25); }
.pill--blue { background: var(--blue-tint-12); color: #7ba7f8; border-color: var(--blue-tint-25); }

/* ---------------------------------------------------
   Subscribe strip
--------------------------------------------------- */
.subscribe-section { background: var(--bg); padding: 72px 32px; }
.subscribe-section--post { padding-top: 0; }

.subscribe-card {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 52px 40px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--ink-06);
}

.subscribe-heading { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; margin: 0 0 10px; }
.subscribe-copy { font-size: 15px; color: var(--ink-60); margin: 0 0 26px; }

.subscribe-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }

.subscribe-input {
    flex: 1;
    min-width: 220px;
    padding: 13px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--ink-15);
    font-size: 14px;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
}

/* ---------------------------------------------------
   Footer
--------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper-70); padding: 56px 32px 32px; }
.site-footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--paper-10);
}

.footer-brand { max-width: 320px; }
.footer-brand .logo-lockup { margin-bottom: 14px; }
.footer-description { font-size: 14px; line-height: 1.6; margin: 0; }

.footer-columns { display: flex; gap: 64px; flex-wrap: wrap; }

.footer-heading {
    font-size: 13px;
    font-weight: 700;
    color: var(--bg);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-column { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-link { color: var(--paper-70); }
.footer-link:hover { color: var(--green) !important; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------------------------------------------------
   Single post / page
--------------------------------------------------- */
.post-full { max-width: 760px; margin: 0 auto; padding: 64px 24px 80px; }
.post-full-header { margin-bottom: 24px; }

.post-full-title {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 12px 0 16px;
}

.post-full-meta { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ink-60); flex-wrap: wrap; }
.meta-dot { opacity: 0.5; }

.author-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.author-avatar--dot { background: var(--green); display: inline-block; }

.post-full-image {
    height: 340px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    margin-bottom: 28px;
}

.post-full-content { font-size: 1.05rem; line-height: 1.75; }
.post-full-content h2, .post-full-content h3 { font-weight: 700; margin-top: 1.6em; }

.post-full-content pre {
    background: var(--ink);
    color: #E6F4EA;
    border-radius: 12px;
    padding: 18px 20px;
    overflow-x: auto;
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.post-full-content code {
    background: var(--surface);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.9em;
    font-family: var(--font-mono);
}

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

.post-full-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; }
.post-full-content th, .post-full-content td { border: 1px solid var(--ink-08); padding: 10px 14px; text-align: left; }
.post-full-content th { background: var(--surface); }
.post-full-content a { text-decoration: underline; }

.post-full-content img { max-width: 100%; height: auto; border-radius: 12px; }

/* Koenig editor card width classes — required by Ghost for wide/full-bleed images and cards */
.post-full-content .kg-width-wide {
    width: 100%;
    max-width: 960px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.post-full-content .kg-width-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.post-full-content .kg-width-full img { border-radius: 0; }

.post-full-footer { margin-top: 28px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------
   Tag archive / Topics overview
--------------------------------------------------- */
.topic-header { max-width: 1200px; margin: 0 auto; padding: 72px 32px 32px; }
.topic-header-inner { max-width: 640px; }

.topic-description { font-size: 17px; line-height: 1.6; color: var(--ink-70); margin: 0 0 12px; }
.topic-count { font-size: 14px; color: var(--ink-45); margin: 0; }

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.topic-card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--ink-05);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px var(--ink-06);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.topic-card:hover {
    box-shadow: 0 8px 20px rgba(27,31,29,0.08);
    transform: translateY(-2px);
    border-color: var(--green-tint-25);
}

.topic-card-name { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.topic-card-count { font-size: 13px; color: var(--ink-45); margin: 0; }

.topic-empty { color: var(--ink-45); font-size: 15px; grid-column: 1 / -1; text-align: center; padding: 40px 0; }

.pagination-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px 64px;
    display: flex;
    justify-content: center;
}

.pagination-wrap .pagination {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--ink-60);
}

.pagination-wrap .older-posts,
.pagination-wrap .newer-posts {
    padding: 9px 18px;
    border-radius: 999px;
    border: 1.5px solid var(--ink-15);
    color: var(--ink);
    font-weight: 500;
    transition: border-color .15s ease;
}

.pagination-wrap .older-posts:hover,
.pagination-wrap .newer-posts:hover { border-color: var(--green); color: var(--green-dark); }

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; padding-top: 64px; }
    .about-section-inner { grid-template-columns: 1fr; }
    .about-art { max-width: 320px; margin: 0 auto 32px; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 44px; }
}

@media (max-width: 600px) {
    .post-grid { grid-template-columns: 1fr; }
    .site-header-inner { flex-wrap: wrap; }
    .site-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
    .hero-title { font-size: 36px; }
    .hero-description { font-size: 16px; }
    .section-heading { font-size: 30px; }
}
