/* ============================================================
   LinksDrop — Public Blog CSS
   ============================================================ */

/* ---- Custom properties (light theme defaults) ---- */
:root {
    --ld-bg: #ffffff;
    --ld-bg-2: #f7f8fa;
    --ld-bg-3: #eef2f5;
    --ld-text: #111111;
    --ld-text-2: #555555;
    --ld-text-3: #888888;
    --ld-border: #dde4e8;
    --ld-accent: #1e7d99;
    --ld-accent-hover: #176278;
    --ld-accent-soft: #e6f2f7;
    --ld-accent-2: #124d5f;
    --ld-radius: 10px;
    --ld-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --ld-shadow-md: 0 4px 16px rgba(0,0,0,.1);
    --ld-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ld-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
    --ld-bg: #0d1014;
    --ld-bg-2: #141922;
    --ld-bg-3: #1e2632;
    --ld-text: #f1f1f1;
    --ld-text-2: #a0a0a0;
    --ld-text-3: #666666;
    --ld-border: #2a333d;
    --ld-accent: #3aa0be;
    --ld-accent-hover: #5ab8d4;
    --ld-accent-soft: #0d2c37;
    --ld-accent-2: #7ccddf;
    --ld-shadow: 0 1px 3px rgba(0,0,0,.4);
    --ld-shadow-md: 0 4px 16px rgba(0,0,0,.4);
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--ld-font);
    background: var(--ld-bg);
    color: var(--ld-text);
    line-height: 1.6;
    transition: background .2s, color .2s;
}

a { color: var(--ld-accent); text-decoration: none; }
a:hover { color: var(--ld-accent-hover); }

img { max-width: 100%; }

/* ---- Reading progress bar ---- */
#ld-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: var(--ld-accent);
    z-index: 9999;
    transition: width .1s linear;
}

/* ---- Navbar ---- */
.ld-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ld-bg);
    border-bottom: 1px solid var(--ld-border);
    padding: .75rem 0;
}

.ld-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ld-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--ld-text) !important;
    letter-spacing: -.03em;
    flex-shrink: 0;
    text-decoration: none;
}
.ld-nav-logo {
    width: 32px;
    height: 32px;
    display: block;
    flex-shrink: 0;
}

.ld-nav-links {
    display: flex;
    gap: .25rem;
    align-items: center;
    margin-left: auto;
}

.ld-nav-link {
    padding: .35rem .7rem;
    border-radius: 6px;
    font-size: .9rem;
    color: var(--ld-text-2) !important;
    transition: background .15s, color .15s;
}

.ld-nav-link:hover {
    background: var(--ld-bg-3);
    color: var(--ld-text) !important;
}

.ld-nav-search {
    background: none;
    border: none;
    padding: .35rem .6rem;
    cursor: pointer;
    color: var(--ld-text-2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background .15s;
}

.ld-nav-search:hover { background: var(--ld-bg-3); color: var(--ld-text); }
.ld-nav-search svg { width: 18px; height: 18px; }

/* Dark mode toggle */
.ld-dark-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: .35rem .6rem;
    border-radius: 6px;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--ld-text-2);
    transition: background .15s;
}

.ld-dark-toggle:hover { background: var(--ld-bg-3); }

/* ---- Hero ---- */
.ld-hero {
    background: var(--ld-bg-2);
    border-bottom: 1px solid var(--ld-border);
    padding: 4rem 0 3.5rem;
    text-align: center;
}

/* Compact hero for category/tag/author pages */
.ld-hero--sm {
    padding: 2.25rem 0 2rem;
}

.ld-hero--sm .ld-hero-title {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin-bottom: .3rem;
}

.ld-breadcrumb--hero {
    justify-content: center;
    margin-bottom: .6rem;
    color: var(--ld-text-3);
    font-size: .82rem;
}

.ld-breadcrumb--hero a { color: var(--ld-accent); }
.ld-breadcrumb--hero a:hover { color: var(--ld-accent-hover); }

.ld-hero-count {
    font-size: .85rem;
    color: var(--ld-text-3);
    margin: .35rem 0 0;
}

.ld-hero-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.ld-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -.04em;
    margin: 0 0 .6rem;
    color: var(--ld-text);
}

.ld-hero-sub {
    font-size: 1.1rem;
    color: var(--ld-text-2);
    margin: 0 0 2rem;
}

/* ---- Search bar ---- */
.ld-search-bar { max-width: 520px; margin: 0 auto; }

.ld-search-wrap {
    display: flex;
    align-items: center;
    background: var(--ld-bg);
    border: 1.5px solid var(--ld-border);
    border-radius: 50px;
    padding: .3rem .3rem .3rem .9rem;
    box-shadow: var(--ld-shadow);
    transition: border-color .2s, box-shadow .2s;
}

.ld-search-wrap:focus-within {
    border-color: var(--ld-accent);
    box-shadow: 0 0 0 3px rgba(47,111,87,.15);
}

.ld-search-icon { width: 18px; height: 18px; color: var(--ld-text-3); flex-shrink: 0; }

.ld-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: .4rem .75rem;
    font-size: .95rem;
    color: var(--ld-text);
    outline: none;
}

.ld-search-input::placeholder { color: var(--ld-text-3); }

.ld-search-btn {
    background: var(--ld-accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: .45rem 1.1rem;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.ld-search-btn:hover { background: var(--ld-accent-hover); }

/* ---- Main container ---- */
.ld-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ---- Section labels ---- */
.ld-section-label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ld-text-3);
    margin: 0 0 1.25rem;
}

/* ---- Featured post card ---- */
.ld-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: var(--ld-radius);
    overflow: hidden;
    background: var(--ld-bg-2);
    border: 1px solid var(--ld-border);
    box-shadow: var(--ld-shadow);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s;
}

.ld-featured-card:hover {
    box-shadow: var(--ld-shadow-md);
    transform: translateY(-2px);
    color: inherit;
}

@media (max-width: 768px) {
    /* Stack as plain blocks (not grid) so the image can size from its own width. */
    .ld-featured-card { display: block; }
}

.ld-featured-img {
    min-height: 280px;
    background-size: cover;
    background-position: center;
}

.ld-featured-img--placeholder {
    background: linear-gradient(135deg, var(--ld-accent) 0%, var(--ld-accent-2) 100%);
}

.ld-featured-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .75rem;
}

.ld-featured-meta {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

.ld-featured-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.25;
    color: var(--ld-text);
    margin: 0;
}

.ld-featured-excerpt {
    color: var(--ld-text-2);
    line-height: 1.6;
    margin: 0;
    font-size: .95rem;
}

/* ---- Post card grid ---- */
.ld-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.ld-grid--3 {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.ld-card {
    background: var(--ld-bg);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--ld-shadow);
    transition: box-shadow .2s, transform .2s;
}

.ld-card:hover {
    box-shadow: var(--ld-shadow-md);
    transform: translateY(-2px);
}

.ld-card-img-link { display: block; }

.ld-card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--ld-bg-3);
    transition: opacity .2s;
}

.ld-card-img--placeholder {
    background: linear-gradient(135deg, var(--ld-accent-soft) 0%, var(--ld-bg-3) 100%);
}

[data-theme="dark"] .ld-card-img--placeholder {
    background: linear-gradient(135deg, #0d2c37 0%, #071924 100%);
}

.ld-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

.ld-card-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.35;
    margin: 0;
}

.ld-card-title a { color: var(--ld-text); }
.ld-card-title a:hover { color: var(--ld-accent); }

.ld-card-excerpt {
    font-size: .875rem;
    color: var(--ld-text-2);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Badges ---- */
.ld-badge {
    display: inline-block;
    background: var(--ld-accent);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .2em .6em;
    border-radius: 4px;
    text-decoration: none;
    transition: background .15s;
}

.ld-badge:hover { background: var(--ld-accent-hover); color: #fff; }
.ld-badge--sm { font-size: .65rem; }

.ld-tag-pill {
    display: inline-block;
    background: var(--ld-bg-3);
    color: var(--ld-text-2);
    font-size: .8rem;
    padding: .2em .65em;
    border-radius: 4px;
    border: 1px solid var(--ld-border);
    text-decoration: none;
    transition: background .15s;
}

.ld-tag-pill:hover { background: var(--ld-border); color: var(--ld-text); }

/* ---- Post meta ---- */
.ld-post-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .875rem;
    color: var(--ld-text-3);
    flex-wrap: wrap;
}

.ld-post-meta--sm { font-size: .8rem; }
.ld-dot { opacity: .4; }

/* ---- Author avatar ---- */
.ld-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ld-accent);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    flex-shrink: 0;
    text-decoration: none;
}

.ld-avatar--sm { width: 20px; height: 20px; font-size: .6rem; }

/* ---- Pagination ---- */
.ld-pagination {
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin-top: 2.5rem;
}

.ld-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ld-text-2);
    background: var(--ld-bg-2);
    border: 1px solid var(--ld-border);
    transition: all .15s;
    text-decoration: none;
}

.ld-page-btn:hover, .ld-page-btn--active {
    background: var(--ld-accent);
    color: #fff;
    border-color: var(--ld-accent);
}

/* ---- Newsletter strip ---- */
.ld-newsletter-strip {
    background: var(--ld-bg-2);
    border-top: 1px solid var(--ld-border);
    padding: 3rem 1.5rem;
    margin-top: 2rem;
}

.ld-newsletter-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.ld-newsletter-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 .3rem;
}

.ld-newsletter-sub {
    color: var(--ld-text-2);
    margin: 0;
    font-size: .9rem;
}

.ld-newsletter-form {
    display: flex;
    gap: .5rem;
    flex: 1;
    min-width: 240px;
    flex-wrap: wrap;
}

.ld-newsletter-form-inline {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}

/* ---- Inputs & buttons ---- */
.ld-input {
    flex: 1;
    padding: .55rem .9rem;
    border: 1.5px solid var(--ld-border);
    border-radius: 8px;
    font-size: .9rem;
    background: var(--ld-bg);
    color: var(--ld-text);
    outline: none;
    transition: border-color .2s;
    min-width: 0;
}

.ld-input:focus { border-color: var(--ld-accent); }
.ld-input::placeholder { color: var(--ld-text-3); }

.ld-btn-primary {
    background: var(--ld-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .55rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.ld-btn-primary:hover { background: var(--ld-accent-hover); color: #fff; }

/* ---- Post layout (post detail) ---- */
.ld-post-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .ld-post-layout { grid-template-columns: 1fr; }
    .ld-toc-sidebar { display: none; }
}

/* ToC sidebar */
.ld-toc-sticky {
    position: sticky;
    top: 5rem;
    padding: 1rem;
    background: var(--ld-bg-2);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius);
}

.ld-toc-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ld-text-3);
    margin: 0 0 .75rem;
}

.ld-toc-nav { display: flex; flex-direction: column; gap: .1rem; }

.ld-toc-link {
    font-size: .82rem;
    color: var(--ld-text-2);
    padding: .25rem .4rem;
    border-radius: 4px;
    display: block;
    transition: background .15s, color .15s;
    text-decoration: none;
    line-height: 1.35;
}

.ld-toc-link:hover, .ld-toc-link--active {
    color: var(--ld-accent);
    background: var(--ld-bg-3);
}

.ld-toc-link--sub {
    padding-left: 1.1rem;
    font-size: .78rem;
}

/* Post body */
.ld-post-body { min-width: 0; }

.ld-breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--ld-text-3);
    margin-bottom: 1.25rem;
}

.ld-breadcrumb a { color: var(--ld-text-3); }
.ld-breadcrumb a:hover { color: var(--ld-accent); }

.ld-lang-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: var(--ld-text-3);
    margin-bottom: 1rem;
}

.ld-lang-pill {
    background: var(--ld-bg-3);
    color: var(--ld-text-2);
    font-size: .7rem;
    font-weight: 700;
    padding: .2em .55em;
    border-radius: 4px;
    border: 1px solid var(--ld-border);
    text-decoration: none;
}

.ld-lang-pill:hover { background: var(--ld-accent); color: #fff; border-color: var(--ld-accent); }

.ld-post-hero-img {
    width: 100%;
    height: 380px;
    border-radius: var(--ld-radius);
    background-size: cover;
    background-position: center;
    margin-bottom: 1.75rem;
}

.ld-post-header { margin-bottom: 1.75rem; }

.ld-post-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.2;
    margin: .5rem 0 1rem;
    color: var(--ld-text);
}

.ld-author-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--ld-text-2) !important;
    text-decoration: none;
}

.ld-author-link:hover { color: var(--ld-accent) !important; }

/* ---- Post content typography ---- */
.ld-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ld-text);
}

.ld-content h1, .ld-content h2, .ld-content h3,
.ld-content h4, .ld-content h5 {
    font-weight: 700;
    letter-spacing: -.025em;
    margin: 2.25rem 0 .75rem;
    color: var(--ld-text);
    scroll-margin-top: 5rem;
}

.ld-content h2 { font-size: 1.6rem; }
.ld-content h3 { font-size: 1.3rem; }
.ld-content h4 { font-size: 1.1rem; }

.ld-content p { margin: 0 0 1.4rem; }

.ld-content a { color: var(--ld-accent); text-underline-offset: 3px; }

.ld-content blockquote {
    border-left: 4px solid var(--ld-accent);
    margin: 1.75rem 0;
    padding: .75rem 1.5rem;
    background: var(--ld-bg-2);
    border-radius: 0 var(--ld-radius) var(--ld-radius) 0;
    color: var(--ld-text-2);
    font-style: italic;
}

.ld-content pre {
    background: var(--ld-bg-2);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    font-size: .875rem;
    line-height: 1.6;
    margin: 1.5rem 0;
    font-family: var(--ld-font-mono);
}

.ld-content code {
    background: var(--ld-bg-2);
    padding: .15em .45em;
    border-radius: 5px;
    font-size: .875em;
    font-family: var(--ld-font-mono);
    color: #d63384;
    border: 1px solid var(--ld-border);
}

[data-theme="dark"] .ld-content code { color: #f472b6; }

.ld-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
    font-size: inherit;
}

.ld-content img {
    max-width: 100%;
    border-radius: var(--ld-radius);
    margin: 1rem 0;
}

.ld-content ul, .ld-content ol {
    padding-left: 1.5rem;
    margin: 0 0 1.4rem;
}

.ld-content li { margin-bottom: .35rem; }

.ld-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    margin-bottom: 1.4rem;
}

.ld-content th, .ld-content td {
    padding: .55rem .8rem;
    border: 1px solid var(--ld-border);
    text-align: left;
}

.ld-content th {
    background: var(--ld-bg-2);
    font-weight: 600;
}

.ld-content hr {
    border: none;
    border-top: 1px solid var(--ld-border);
    margin: 2rem 0;
}

/* ---- Tags bar ---- */
.ld-tags-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 2rem 0 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ld-border);
}

/* ---- Share bar ---- */
.ld-share-bar {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    margin: 2rem 0;
    padding: 1.3rem 1.4rem;
    background: var(--ld-bg-2);
    border-radius: var(--ld-radius);
    border: 1px solid var(--ld-border);
}

.ld-share-label {
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--ld-text-3);
}

.ld-share-btns {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.ld-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .58rem 1.05rem;
    border-radius: 9px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
    border: 1.5px solid var(--ld-border);
    background: var(--ld-bg);
    color: var(--ld-text-2);
}

.ld-share-btn:hover { border-color: var(--ld-text-3); color: var(--ld-text); transform: translateY(-1px); }
.ld-share-btn svg { width: 16px; height: 16px; }

/* Brand-tinted hovers (theme-aware): X = monochrome, LinkedIn = blue, Copy = accent */
.ld-share-btn--twitter:hover { border-color: var(--ld-text); color: var(--ld-text); }
.ld-share-btn--linkedin:hover { border-color: #0a66c2; color: #0a66c2; }
.ld-share-btn--copy:hover { border-color: var(--ld-accent); color: var(--ld-accent); }

/* Stack the share buttons one below the other on phones */
@media (max-width: 575.98px) {
    .ld-share-btns { flex-direction: column; }
    .ld-share-btn { width: 100%; }
}

/* ---- Newsletter inline ---- */
.ld-newsletter-inline {
    background: linear-gradient(135deg, var(--ld-accent) 0%, var(--ld-accent-2) 100%);
    border-radius: var(--ld-radius);
    padding: 2rem;
    color: #fff;
    margin: 2.5rem 0;
}

.ld-newsletter-inline h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 .35rem;
}

.ld-newsletter-inline p {
    font-size: .9rem;
    opacity: .85;
    margin: 0;
}

.ld-newsletter-inline .ld-input {
    border-color: rgba(255,255,255,.3);
    background: rgba(255,255,255,.1);
    color: #fff;
}

.ld-newsletter-inline .ld-input::placeholder { color: rgba(255,255,255,.6); }
.ld-newsletter-inline .ld-input:focus { border-color: rgba(255,255,255,.7); }

.ld-newsletter-inline .ld-btn-primary {
    background: #fff;
    color: var(--ld-accent);
}

.ld-newsletter-inline .ld-btn-primary:hover { background: #f0f4ff; }

/* ---- Related posts ---- */
.ld-related { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--ld-border); }

/* ---- Category / Tag pages ---- */
.ld-page-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.04em;
    margin: 0 0 .5rem;
}

/* ---- Search page ---- */
.ld-search-page { max-width: 760px; }

.ld-search-bar--page { max-width: 100%; margin-bottom: 1.5rem; }

.ld-search-summary { color: var(--ld-text-2); margin: .5rem 0 1.5rem; }

.ld-search-results { display: flex; flex-direction: column; gap: 0; }

.ld-search-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--ld-border);
    align-items: center;
}

@media (max-width: 600px) {
    .ld-search-item { grid-template-columns: 1fr; }
    .ld-search-thumb { display: none; }
}

.ld-search-thumb {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    height: 80px;
    flex-shrink: 0;
}

.ld-search-thumb div {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--ld-bg-3);
    transition: opacity .2s;
}

.ld-search-thumb:hover div { opacity: .85; }

.ld-search-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: .3rem 0 .4rem;
}

.ld-search-title a { color: var(--ld-text); }
.ld-search-title a:hover { color: var(--ld-accent); }

.ld-search-excerpt {
    font-size: .875rem;
    color: var(--ld-text-2);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Author page ---- */
.ld-author-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--ld-border);
}

.ld-author-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ld-accent), var(--ld-accent-2));
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ld-author-name { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; margin: 0 0 .35rem; }
.ld-author-bio { color: var(--ld-text-2); margin: 0 0 .5rem; }
.ld-author-stat { font-size: .875rem; color: var(--ld-text-3); margin: 0; }

/* ---- Empty state ---- */
.ld-empty {
    text-align: center;
    padding: 3rem;
    color: var(--ld-text-3);
    font-size: 1rem;
}

/* ---- Footer (uniform with the main site auth/marketing footer) ---- */
.ld-footer {
    background: linear-gradient(165deg, #101c25 0%, #172735 72%, #1c3346 100%);
    color: #bdd0db;
    padding: 2.6rem 1.5rem 2.8rem;
    margin-top: 0;
}

.ld-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.ld-footer-brand { margin-bottom: 0.65rem; }
.ld-footer-lockup { height: 34px; width: auto; display: inline-block; }

.ld-footer-tag {
    font-size: 0.84rem;
    color: #92a8b6;
    line-height: 1.5;
    max-width: 24rem;
    margin: 0 auto 1.15rem;
}

.ld-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.3rem;
    margin-bottom: 1rem;
}
.ld-footer-links a {
    color: #c8d8e2;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}
.ld-footer-links a:hover { color: #ffffff; text-decoration: underline; }

/* Social icons - dark variant, identical treatment to the main site footer */
.ld-social {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 1.1rem;
}
.ld-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    color: #cfe1ea;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: all .15s ease;
}
.ld-social a:hover { color: #fff; background: #1e7d99; border-color: #1e7d99; transform: translateY(-1px); }
.ld-social svg { width: 16px; height: 16px; display: block; }

.ld-footer-copy {
    font-size: 0.76rem;
    color: #7a8d99;
    max-width: 20rem;
    margin: 0 auto;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 575.98px) {
    /* Nav: condense so it never overflows on phones (the logo already links home) */
    .ld-nav-inner { padding: 0 1rem; gap: 0.5rem; }
    .ld-nav-brand { font-size: 1.02rem; gap: 0.4rem; }
    .ld-nav-logo { width: 28px; height: 28px; }
    .ld-nav-links { gap: 0.1rem; }
    .ld-nav-links .ld-nav-link:not(.ld-nav-cta) { display: none; }
    .ld-nav-cta { padding: 0.35rem 0.55rem; font-size: 0.85rem; }

    .ld-footer { padding: 1.8rem 1.1rem 2.4rem; }
    .ld-footer-lockup { height: 28px; }
    .ld-footer-tag { font-size: 0.8rem; }
    .ld-footer-links { gap: 0.45rem 0.9rem; }
    .ld-footer-links a { font-size: 0.82rem; }
}

/* Very small phones (<=359px): drop the secondary nav search (the home hero
   has a full search bar) and shrink the brand so the nav never overflows. */
@media (max-width: 359.98px) {
    .ld-nav-search { display: none; }
    .ld-nav-brand { font-size: 0.95rem; }
}

/* Featured-card + post hero images: on small screens show the full 1200x630
   graphic at its own ratio instead of center-cropping the headline. Placed at
   the end so it overrides the base .ld-featured-img min-height + .ld-post-hero-img
   fixed height (which otherwise force a tall crop). */
@media (max-width: 768px) {
    .ld-featured-img { min-height: 0; aspect-ratio: 120 / 63; }
    .ld-post-hero-img { height: auto; aspect-ratio: 120 / 63; }
}

/* "Stay in the loop" newsletter form: stack name / email / button vertically
   on phones instead of cramming the inputs side by side. */
@media (max-width: 575.98px) {
    .ld-newsletter-form { flex-direction: column; align-items: stretch; }
    .ld-newsletter-form .ld-input { flex: 0 0 auto; width: 100%; }
    .ld-newsletter-form .ld-btn-primary { width: 100%; }
}

/* Nav link to the main product site */
.ld-nav-cta { color: var(--ld-accent) !important; font-weight: 700; }
.ld-nav-cta:hover { color: var(--ld-accent-hover) !important; }

/* ---- Toast (newsletter feedback) ---- */
.ld-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--ld-text);
    color: var(--ld-bg);
    padding: .8rem 1.25rem;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 500;
    box-shadow: var(--ld-shadow-md);
    z-index: 9999;
    animation: ldSlideIn .25s ease;
}

@@keyframes ldSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
