:root {
    --teal: #4ecdc4;
    --teal-dark: #44a08d;
    --ink: #2d3748;
    --muted: #6b7684;
    --soft: #f3fbfa;
    --line: #e4efee;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Rubik', 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }

/* Header: same look as the home page (sizes and colours copied from /index.html) */
header {
    background: #fff;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    padding: .2rem 0;
}
header nav { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; }
.logo img { width: 100px; height: 100px; margin-left: 15px; object-fit: contain; border-radius: 8px; padding: 2px; display: block; }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { color: #333; text-decoration: none; font-weight: 500; font-size: 1.1rem; transition: opacity .3s ease; min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; }
.nav-links a:hover { opacity: .8; }
.nav-links a.current { color: var(--teal-dark); }
.nav-tools { display: flex; align-items: center; gap: 1rem; }
.lang-toggle { background: rgba(78,205,196,.1); border: 1px solid var(--teal); color: var(--teal); padding: .5rem 1rem; border-radius: 25px; text-decoration: none; font-family: 'Rubik', sans-serif; font-size: 13.333px; min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; }
.menu-toggle { display: none; background: none; border: none; color: #333; font-size: 1.5rem; cursor: pointer; min-height: 44px; min-width: 44px; }

main { padding-top: 108px; }

@media (max-width: 768px) {
    header nav { direction: ltr; position: relative; justify-content: center; min-height: 64px; }
    .logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
    .logo img { width: 60px; height: 60px; margin: 0; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 1101; }
    .lang-toggle { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
    .nav-links { direction: rtl; position: absolute; top: 100%; right: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); flex-direction: column; gap: 0; padding: 1rem; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); border: 1px solid #eee; transform: translateY(-10px); opacity: 0; visibility: hidden; transition: all .3s ease; }
    .nav-links.active { transform: translateY(0); opacity: 1; visibility: visible; }
    main { padding-top: 76px; }
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--teal);
    color: #fff;
    text-decoration: none;
    padding: .65rem 1.6rem;
    border-radius: 25px;
    font-weight: 500;
    transition: background .2s, transform .2s;
}
.btn:hover { background: var(--teal-dark); transform: translateY(-1px); }

.chip {
    display: inline-block;
    background: rgba(78,205,196,.14);
    color: var(--teal-dark);
    font-size: .8rem;
    font-weight: 500;
    padding: .1rem .75rem;
    border-radius: 14px;
}

/* ---------- Blog index ---------- */
.blog-hero {
    background: linear-gradient(135deg, rgba(78,205,196,.92), rgba(68,160,141,.92));
    color: #fff;
    text-align: center;
    padding: 70px 0 64px;
}
.blog-hero h1 { font-size: 3rem; font-weight: 300; margin-bottom: .4rem; }
.blog-hero p { max-width: 560px; margin: 0 auto; font-size: 1.2rem; opacity: .95; }

.list { list-style: none; max-width: 860px; padding-top: 24px; padding-bottom: 24px; }
.card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.7rem .5rem;
    border-bottom: 1px solid var(--line);
    transition: background .2s, padding .2s;
}
.card:hover { background: var(--soft); padding-inline: 1.2rem; border-radius: 10px; }
.card .txt { flex: 1; }
.card h2 { font-size: 1.55rem; font-weight: 500; line-height: 1.35; margin-bottom: .3rem; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card h2 a::after { content: ""; position: absolute; inset: 0; }   /* whole row is clickable */
.card h2 .chip { margin-inline-start: .8rem; vertical-align: middle; }
.card p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .arrow { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--teal); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: background .2s, color .2s; }
.card:hover .arrow { background: var(--teal); color: #fff; }

.cta { text-align: center; padding-top: 48px; padding-bottom: 72px; }
.cta h2 { font-size: 1.8rem; font-weight: 500; margin-bottom: .3rem; }
.cta p { color: var(--muted); margin-bottom: 1.2rem; }

/* ---------- Post page ---------- */
.post-hero { background: var(--soft); padding: 44px 0 36px; border-bottom: 1px solid var(--line); }
.post-hero .crumb { display: inline-block; font-size: .95rem; text-decoration: none; margin-bottom: 1rem; }
.post-hero .crumb:hover { text-decoration: underline; }
.post-hero h1 { font-size: 2.4rem; font-weight: 500; line-height: 1.3; margin-bottom: .6rem; }

.post { padding-top: 40px; padding-bottom: 24px; font-size: 1.22rem; line-height: 2; }
.post p { margin-bottom: 1.2em; }
.post a { text-underline-offset: 3px; }

.video { position: relative; aspect-ratio: 16 / 9; margin: 1.6rem 0 .6rem; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post .video-link { font-size: .95rem; text-align: center; color: var(--muted); }

.author {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    margin-top: 24px; margin-bottom: 24px;
    padding: 1.2rem 1.5rem;
    background: var(--soft);
    border-radius: 14px;
}
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; }
.author div { display: flex; flex-direction: column; flex: 1; min-width: 180px; line-height: 1.4; }
.author span { color: var(--muted); font-size: .95rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 72px; }
.pg { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .2s, background .2s; }
.pg:hover { border-color: var(--teal); background: var(--soft); }
.pg small { color: var(--teal-dark); font-weight: 500; }
.pg span { font-weight: 500; line-height: 1.4; }
.pg.next { text-align: left; }
.pg.empty { border: 0; }

footer { background: #2d3748; color: #cbd5e0; text-align: center; padding: 1.4rem 0; font-size: .9rem; }

@media (max-width: 768px) {
    .blog-hero h1 { font-size: 2.4rem; }
    .post-hero h1 { font-size: 1.8rem; }
    .post { font-size: 1.1rem; }
    .pager { grid-template-columns: 1fr; }
    .card h2 { font-size: 1.3rem; }
    .card .arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}

.post .listen { text-align: center; margin: 1.6rem 0; }
.post .listen .btn { color: #fff; }

/* ---------- Index variant: featured ---------- */
.featured { padding-top: 40px; }
.featured > div { background: var(--soft); border-radius: 18px; padding: 2.4rem 2.6rem; border-right: 6px solid var(--teal); }
.eyebrow { color: var(--teal-dark); font-weight: 500; font-size: .95rem; }
.featured h2 { font-size: 2.1rem; font-weight: 500; line-height: 1.3; margin: .3rem 0 .8rem; }
.featured h2 a { color: var(--ink); text-decoration: none; }
.featured p { color: var(--muted); font-size: 1.15rem; line-height: 1.9; margin-bottom: 1.3rem; max-width: 720px; }

/* ---------- Index variant: topics ---------- */
.topics { max-width: 960px; padding-top: 44px; padding-bottom: 12px; display: grid; gap: 40px; }
.topics h2 { font-size: 1.6rem; font-weight: 500; padding-bottom: .5rem; border-bottom: 2px solid var(--teal); margin-bottom: .6rem; }
.topics h2 small { color: var(--muted); font-size: .9rem; font-weight: 400; margin-inline-start: .4rem; }
.topics ul { list-style: none; columns: 2; column-gap: 40px; }
.topics li { break-inside: avoid; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.topics li a { color: var(--ink); text-decoration: none; }
.topics li a:hover { color: var(--teal-dark); text-decoration: underline; }
.topics li .chip { margin-inline-start: .6rem; }
@media (max-width: 768px) { .topics ul { columns: 1; } .featured > div { padding: 1.6rem 1.3rem; } .featured h2 { font-size: 1.6rem; } }

/* ---------- Variant 1: opening lines lead ---------- */
.hooks { list-style: none; max-width: 860px; padding-top: 24px; padding-bottom: 24px; }
.hook a { display: block; padding: 2rem .5rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background .2s, padding .2s; }
.hook a:hover { background: var(--soft); padding-inline: 1.2rem; border-radius: 10px; }
.hook-title { display: block; color: var(--teal-dark); font-weight: 500; font-size: 1rem; margin-bottom: .45rem; letter-spacing: .01em; }
.hook-title .chip { margin-inline-start: .7rem; }
.hook-text { display: block; font-size: 1.75rem; font-weight: 300; line-height: 1.5; }
.hook a:hover .hook-text { color: #000; }

/* ---------- Variant 2: table of contents ---------- */
.toc { list-style: none; counter-reset: n; max-width: 760px; padding-top: 36px; padding-bottom: 24px; }
.toc li { counter-increment: n; }
.toc a { display: flex; align-items: baseline; gap: .8rem; padding: .85rem 0; text-decoration: none; color: var(--ink); font-size: 1.3rem; }
.toc a::before { content: counter(n, decimal-leading-zero); color: var(--teal); font-weight: 300; font-size: 1.1rem; min-width: 2.2rem; font-variant-numeric: tabular-nums; }
.toc .dots { flex: 1; border-bottom: 2px dotted #cfe3e1; transform: translateY(-5px); min-width: 20px; }
.toc a:hover .t { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 4px; }
.toc .chip { flex: none; }
.toc a { flex-wrap: nowrap; }
.toc .t { order: 1; } .toc .chip { order: 2; } .toc .dots { order: 3; }

/* ---------- Variant 3: search + random ---------- */
.finder { max-width: 860px; display: flex; gap: 12px; padding-top: 32px; }
.finder input { flex: 1; font-family: inherit; font-size: 1.1rem; padding: .75rem 1.2rem; border: 1.5px solid var(--line); border-radius: 25px; outline: none; background: #fff; }
.finder input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(78,205,196,.2); }
.btn.ghost { background: transparent; color: var(--teal-dark); border: 1.5px solid var(--teal); display: flex; align-items: center; white-space: nowrap; }
.btn.ghost:hover { background: var(--teal); color: #fff; }
.none { max-width: 860px; color: var(--muted); padding-top: 24px; }
.card[hidden] { display: none; }

@media (max-width: 768px) { .hook-text { font-size: 1.35rem; } .toc a { font-size: 1.1rem; } .finder { flex-direction: column; } }

/* ---------- Variant 2: everything on one page ---------- */
.stream { padding-top: 24px; padding-bottom: 24px; }
.entry { padding: 3rem 0 2.4rem; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry h2 { font-size: 2rem; font-weight: 500; line-height: 1.3; margin-bottom: 1rem; }
.entry h2 a { color: var(--ink); text-decoration: none; }
.entry h2 a:hover { color: var(--teal-dark); }
.entry h2 .chip { margin-inline-start: .8rem; vertical-align: middle; }
.entry .post { padding: 0; }
.entry { scroll-margin-top: 90px; }

/* ---------- Post pictures (from the old Wix blog) ---------- */
.card .thumb, .hook .thumb { flex: none; width: 150px; height: 100px; border-radius: 8px; object-fit: cover; }
.card .thumb.ph, .hook .thumb.ph { display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--teal-dark); font-size: 1.6rem; }
.card .thumb.ph img, .hook .thumb.ph img { width: 56px; height: 56px; opacity: .8; }
.post .post-image { margin: 0 0 1.8rem; }
.post .post-image img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; border-radius: 12px; }
.hook a { display: flex; align-items: center; gap: 1.5rem; }
.hook-body { flex: 1; min-width: 0; }
@media (max-width: 768px) { .card .thumb, .hook .thumb { width: 96px; height: 72px; } }
