/* ================================================================
   Videolink2me Blog — stylesheet
   Slate neutrals + indigo accent (oklch). Adapted from the design
   prototype; Tweaks-panel / edit-mode styling has been removed.
   ================================================================ */

:root {
    --accent-hue: 262;
    --accent: oklch(0.55 0.17 var(--accent-hue));
    --accent-hover: oklch(0.48 0.18 var(--accent-hue));
    --accent-soft: oklch(0.96 0.03 var(--accent-hue));
    --accent-ring: oklch(0.55 0.17 var(--accent-hue) / 0.25);

    --bg: oklch(0.995 0.003 250);
    --bg-subtle: oklch(0.975 0.005 250);
    --surface: #fff;
    --border: oklch(0.92 0.008 250);
    --border-strong: oklch(0.86 0.01 250);

    --text: oklch(0.22 0.015 250);
    --text-muted: oklch(0.5 0.015 250);
    --text-subtle: oklch(0.62 0.012 250);

    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Source Serif 4', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius: 10px;
    --radius-lg: 14px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

::selection {
    background: var(--accent-ring);
}

/* ================================================================
   Navigation
   ================================================================ */
.site-nav {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: saturate(1.5) blur(8px);
}

.site-nav__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.site-nav__logo span {
    color: var(--text);
}

.site-nav__links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.site-nav__link {
    font-size: 14.5px;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.15s;
}

.site-nav__link:hover {
    color: var(--text);
}

.site-nav__link--active {
    color: var(--accent);
    font-weight: 600;
}

/* ================================================================
   Page container
   ================================================================ */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page__main {
    flex: 1;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 72px 32px 120px;
}

/* ================================================================
   Listing page
   ================================================================ */
.listing__header {
    max-width: 100%;
    margin-bottom: 64px;
}

.listing__eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
}

.listing__title {
    font-family: var(--font-body);
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
    color: var(--text);
    text-wrap: balance;
}

.listing__lede {
    font-size: 18px;
    color: var(--text-muted);
    margin: 0;
    text-wrap: pretty;
}

.listing__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.listing__empty {
    padding: 48px 0;
    color: var(--text-muted);
    font-size: 16px;
}

.row {
    display: block;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    position: relative;
}

.row:first-child {
    padding-top: 0;
}

.row:last-child {
    border-bottom: none;
}

.row:hover .row__title {
    color: var(--accent);
}

.row:hover .row__more {
    gap: 8px;
}

.row__thumb {
    border-radius: var(--radius);
    overflow: hidden;
}

.row__title {
    font-family: var(--font-body);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin: 0 0 12px;
    color: var(--text);
    transition: color 0.15s;
    text-wrap: balance;
}

.row__intro {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0 0 18px;
    line-height: 1.55;
    text-wrap: pretty;
}

.row__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.2s;
}

/* ================================================================
   Hero placeholder (striped SVG with monospace label)
   ================================================================ */
.hero-ph {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bg-subtle);
    border-radius: var(--radius);
}

.hero-ph svg {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

.hero-ph__label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(15, 23, 42, 0.55);
    padding: 6px 10px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-align: center;
    max-width: 85%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================================
   Article page
   ================================================================ */
.article {
    max-width: 720px;
    margin: 0 auto;
}

.article__topbar {
    margin-bottom: 40px;
}

.article__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.15s, gap 0.2s;
}

.article__back:hover {
    color: var(--accent);
    gap: 10px;
}

.article__header {
    margin-bottom: 40px;
}

.article__title {
    font-family: var(--font-body);
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 20px;
    text-wrap: balance;
    color: var(--text);
}

.article__intro {
    font-size: 20px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    text-wrap: pretty;
}

.article__hero {
    margin: 0 0 48px;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 8;
}

.article__body {
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.7;
    color: var(--text);
    max-width: 100%;
    margin: 0 auto;
}

.article__body p {
    margin: 0 0 24px;
    text-wrap: pretty;
}

.article__body h2 {
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin: 48px 0 18px;
    color: var(--text);
    text-wrap: balance;
}

.article__body h3 {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    margin: 36px 0 14px;
    color: var(--text);
}

.article__body ul,
.article__body ol {
    margin: 0 0 28px;
    padding-left: 22px;
}

.article__body li {
    margin-bottom: 10px;
}

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

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

.article__body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
}

.article__body pre {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    overflow-x: auto;
    margin: 0 0 28px;
}

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

.article__body blockquote {
    border-left: 3px solid var(--accent);
    margin: 0 0 28px;
    padding: 2px 0 2px 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Article tables — rendered from markdown GFM tables. Mirrors the design. */
.article__body table {
    display: block;
    width: 100%;
    margin: 36px 0 40px;
    overflow-x: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.5;
}

.article__body table thead th {
    text-align: left;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.01em;
    color: var(--text);
    padding: 16px 20px;
    background: var(--bg-subtle);
    border-bottom: 2px solid var(--border-strong);
    border-right: 1px solid var(--border);
    white-space: nowrap;
}

.article__body table thead th:last-child {
    border-right: none;
}

.article__body table thead th:first-child {
    width: 28%;
    color: var(--text-subtle);
    font-size: 12px;
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article__body table tbody td,
.article__body table tbody th {
    padding: 14px 20px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
}

.article__body table tbody th {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--text);
    width: 28%;
    background: var(--bg-subtle);
}

.article__body table tbody td:last-child,
.article__body table tbody th:last-child {
    border-right: none;
}

.article__body table tbody tr:nth-child(even) td,
.article__body table tbody tr:nth-child(even) th {
    background: color-mix(in oklch, var(--bg-subtle) 45%, var(--surface));
}

.article__body table tbody tr:nth-child(even) th {
    background: color-mix(in oklch, var(--bg-subtle) 90%, var(--surface));
}

.article__body table tbody tr:last-child td,
.article__body table tbody tr:last-child th {
    border-bottom: none;
}

.article__body table tbody tr:hover td {
    background: color-mix(in oklch, var(--accent) 6%, var(--surface));
    color: var(--text);
}

.article__body table tbody tr:hover th {
    background: color-mix(in oklch, var(--accent) 10%, var(--bg-subtle));
}

/* CTA block */
.article__cta {
    margin: 72px auto 0;
    max-width: 680px;
}

.article__cta-inner {
    background: var(--accent-soft);
    border: 1px solid color-mix(in oklch, var(--accent) 20%, transparent);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.article__cta-text h3 {
    font-family: var(--font-ui);
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--text);
}

.article__cta-text p {
    font-family: var(--font-ui);
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    max-width: 420px;
}

.article__cta-btn {
    background: var(--accent);
    color: white;
    padding: 12px 22px;
    border-radius: 8px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.15s, transform 0.15s;
}

.article__cta-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Related articles */
.article__related {
    margin-top: 96px;
    padding-top: 56px;
    border-top: 1px solid var(--border);
    max-width: none;
}

.article__related-title {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 28px;
    color: var(--text);
}

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

@media (max-width: 800px) {
    .article__related-list {
        grid-template-columns: 1fr;
    }
}

.related-card {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.15s;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border-strong);
}

.related-card__thumb {
    aspect-ratio: 16 / 10;
    border-radius: 0;
}

.related-card__body {
    padding: 18px;
}

.related-card h4 {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--text);
    text-wrap: balance;
}

.related-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================================================
   Footer
   ================================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    margin-top: auto;
}

.site-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--accent);
}

.site-footer__brand span {
    color: var(--text);
}

.site-footer__tagline {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.site-footer__links {
    display: flex;
    gap: 24px;
    margin-top: 4px;
}

.site-footer__links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.site-footer__links a:hover {
    color: var(--accent);
}

.site-footer__copy {
    font-size: 13px;
    color: var(--text-subtle);
    margin: 8px 0 0;
}

/* Footer language switcher — mirrors the .language-links pattern in StartView.vue */
.language-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 6px;
    max-width: 900px;
}

.language-links a {
    font-size: 13.5px;
    color: var(--text-subtle);
    transition: color 0.15s;
}

.language-links a:hover,
.language-links a.active {
    color: var(--accent);
}

.language-links a.active {
    font-weight: 600;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 720px) {
    .page__main {
        padding: 48px 20px 80px;
    }

    .site-nav__inner {
        padding: 14px 20px;
    }

    .site-nav__links {
        gap: 16px;
    }

    .site-nav__links .site-nav__link:not(.site-nav__link--active) {
        display: none;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .row .row__thumb {
        max-width: 100%;
    }

    .article__cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   Floating "Try it yourself" CTA — sticky bottom-right (desktop) /
   bottom bar (mobile). Slides in after the user has scrolled past
   the first viewport. Dismissible per session.
   ============================================================ */
.floating-cta {
    position: fixed;
    z-index: 50;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.18), 0 4px 12px -4px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.floating-cta[data-hidden="true"] {
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
}

.floating-cta__text strong {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
    line-height: 1.3;
}

.floating-cta__text span {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.floating-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.floating-cta__btn:hover {
    background: var(--accent-hover);
}

.floating-cta__close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: var(--text-subtle);
    width: 24px;
    height: 24px;
    padding: 0;
}

.floating-cta__close:hover {
    color: var(--text);
}

/* Desktop: bottom-right card */
@media (min-width: 768px) {
    .floating-cta {
        right: 24px;
        bottom: 24px;
        width: 340px;
        padding: 18px 20px 18px 22px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .floating-cta__text {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding-right: 20px; /* room for close button */
    }
    .floating-cta__btn {
        align-self: flex-start;
    }
}

/* Mobile: full-width slim bar */
@media (max-width: 767px) {
    .floating-cta {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 12px 36px 12px 14px;
        display: flex;
        align-items: center;
        gap: 12px;
        border-radius: var(--radius);
    }
    .floating-cta__text {
        flex: 1;
        min-width: 0;
    }
    .floating-cta__text strong {
        display: block;
        font-size: 14px;
    }
    .floating-cta__text span {
        display: none; /* keep the bar slim on small screens */
    }
    .floating-cta__btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* RTL */
[dir="rtl"] .floating-cta {
    right: auto;
    left: 24px;
}
[dir="rtl"] .floating-cta__close {
    right: auto;
    left: 8px;
}
@media (max-width: 767px) {
    [dir="rtl"] .floating-cta {
        left: 12px;
        right: 12px;
        padding: 12px 14px 12px 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .floating-cta {
        transition: opacity 0.15s ease;
    }
    .floating-cta[data-hidden="true"] {
        transform: none;
    }
}
