/*
Theme Name: eSIMGlobo Blog
Theme URI: https://esimglobo.com/blog/
Author: eSIMGlobo
Description: Blog theme sharing the "Signal Atlas" design language of esimglobo.com — system fonts, hairline borders, signal-blue accent, automatic light/dark.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary
Text Domain: esimglobo
*/

/* ── Tokens (mirror esimglobo.com global.css) ─────────────────── */
:root {
  --ink: #10234a; --signal: #1769e0; --cyan: #0e9fd8;
  --page: #f7f9fc; --surface: #ffffff; --muted-surface: #eef3f8;
  --body: #182230; --muted: #526173; --hairline: #d7e0ea;
  --on-signal: #ffffff; --radius: 12px; --radius-sm: 6px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6edf5; --signal: #4a90ff; --cyan: #38c0ef;
    --page: #0b1220; --surface: #0e1726; --muted-surface: #131f33;
    --body: #dbe4ee; --muted: #93a4b8; --hairline: #1e2b40; --on-signal: #04122b;
  }
}

/* ── Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--body); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { line-height: 1.2; text-wrap: balance; color: var(--ink); margin: 0 0 .5em; }
a { color: var(--signal); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
:where(a, button, input, summary):focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
::selection { background: #1769e0; color: #fff; }
.shell { max-width: 1200px; margin-inline: auto; padding-inline: 1.25rem; }
.shell.narrow { max-width: 760px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.surface { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); }
.mono-label { font: .7rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .75rem; }
.mono-label a { color: inherit; text-decoration: none; } .mono-label a:hover { color: var(--signal); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #10234a; color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 8px; border: 1px solid transparent; font: 600 .9rem var(--font); text-decoration: none; cursor: pointer; line-height: 1.2; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--signal); color: var(--on-signal); }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--muted-surface); text-decoration: none; }

/* ── Header (mirrors main site) ───────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--hairline); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; gap: 1rem; height: 4rem; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 6px; background: #10234a; }
.brand-name { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.brand-name span { color: var(--signal); } .brand-name.big { font-size: 1.25rem; }
.nav-desktop { display: none; align-items: center; gap: .25rem; margin-left: .75rem; }
.nav-desktop a { padding: .5rem .75rem; border-radius: 6px; font-size: .875rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.nav-desktop a:hover { color: var(--ink); background: var(--muted-surface); }
.nav-desktop a.is-current { color: var(--signal); background: var(--muted-surface); }
.header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.menu { position: relative; } .menu summary { list-style: none; cursor: pointer; padding: .5rem; border-radius: 8px; color: var(--ink); display: grid; } .menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--muted-surface); }
.nav-mobile { position: absolute; right: 0; top: calc(100% + .75rem); width: min(18rem, 86vw); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: .5rem; display: flex; flex-direction: column; box-shadow: 0 12px 32px rgb(0 0 0 / .12); }
.nav-mobile a { padding: .65rem .75rem; color: var(--ink); font-weight: 500; text-decoration: none; border-radius: 6px; } .nav-mobile a:hover { background: var(--muted-surface); }
@media (min-width: 860px) { .nav-desktop { display: flex; } .menu { display: none; } }
@media (max-width: 520px) { .hide-sm { display: none; } }

/* ── Hero / page head ─────────────────────────────────────────── */
.hero { padding: 4rem 0 2.5rem; border-bottom: 1px solid var(--hairline); background:
  radial-gradient(60rem 22rem at 85% -10%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 70%), var(--surface); }
.hero h1, .page-head h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.02em; max-width: 20ch; }
.hero .lede, .page-head .lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0 0 1.5rem; }
.page-head { padding: 2.75rem 0 1.75rem; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.page-head .lede { margin-bottom: 0; }
.search { display: flex; gap: .5rem; max-width: 30rem; }
.search input { flex: 1; min-width: 0; padding: .65rem .9rem; border: 1px solid var(--hairline); border-radius: 8px; background: var(--page); color: var(--body); font: inherit; }
.search input::placeholder { color: var(--muted); }

/* ── Listing / cards ──────────────────────────────────────────── */
.listing { padding-block: 2rem 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chips a { padding: .35rem .85rem; border: 1px solid var(--hairline); border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--muted); text-decoration: none; background: var(--surface); }
.chips a:hover { color: var(--ink); border-color: var(--signal); }
.chips a[aria-current] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--signal); transform: translateY(-2px); }
.card-cover { display: block; } .cover { aspect-ratio: 16 / 9; overflow: hidden; } .cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.cat { text-decoration: none; margin-bottom: .5rem; }
.card-title { font-size: 1.2rem; margin: 0 0 .5rem; letter-spacing: -.01em; } .card-title a { color: var(--ink); text-decoration: none; } .card-title a:hover { color: var(--signal); }
.card-excerpt { color: var(--muted); font-size: .95rem; margin: 0 0 1rem; flex: 1; }
.meta { font-size: .8rem; color: var(--muted); margin: 0; font-family: var(--mono); }
.card-featured { margin-bottom: 1.5rem; }
@media (min-width: 800px) {
  .card-featured { flex-direction: row; } .card-featured .card-cover { flex: 1.2; } .card-featured .cover { height: 100%; aspect-ratio: auto; min-height: 18rem; }
  .card-featured .card-body { flex: 1; padding: 2rem; justify-content: center; } .card-featured .card-title { font-size: 1.75rem; }
}
.card:hover .cover svg { transform: scale(1.04); } .cover svg { transition: transform .4s; }

/* Generated covers (when no featured image) */
.cover svg { width: 100%; height: 100%; display: block; }
.cv0 { background: linear-gradient(135deg, #10234a, #1769e0); color: rgb(255 255 255 / .3); }
.cv1 { background: linear-gradient(135deg, #0b3a5c, #0e9fd8); color: rgb(255 255 255 / .32); }
.cv2 { background: linear-gradient(135deg, #14305f, #0e9fd8 130%); color: rgb(255 255 255 / .28); }
.cv3 { background: linear-gradient(135deg, #0a1a38, #087f75); color: rgb(255 255 255 / .3); }

.navigation.pagination { margin: 2.5rem 0 1rem; } .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.page-numbers { padding: .45rem .85rem; border: 1px solid var(--hairline); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: .9rem; }
.page-numbers.current { background: var(--ink); color: var(--page); border-color: var(--ink); } a.page-numbers:hover { border-color: var(--signal); }
.empty { padding: 2rem; text-align: center; }

/* ── Single article ───────────────────────────────────────────── */
.article-head { padding: 3rem 0 1.5rem; }
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.02em; }
.article-head .lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 1rem; }
.crumbs { margin-bottom: 1rem; } .wide-cover { margin-bottom: 1.5rem; } .wide-cover img { border-radius: var(--radius); }
.entry { font-size: 1.08rem; line-height: 1.75; padding-bottom: 1rem; }
.entry > * { margin-block: 0 1.25em; }
.entry h2 { font-size: 1.6rem; margin-top: 2.2em; letter-spacing: -.01em; } .entry h3 { font-size: 1.25rem; margin-top: 1.8em; }
.entry ul, .entry ol { padding-left: 1.4em; } .entry li { margin-bottom: .45em; } .entry li::marker { color: var(--signal); }
.entry blockquote, .entry .wp-block-quote { margin-inline: 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--signal); color: var(--muted); font-style: normal; }
.entry code { font-family: var(--mono); font-size: .9em; background: var(--muted-surface); padding: .12em .4em; border-radius: 4px; }
.entry pre { background: var(--muted-surface); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto; } .entry pre code { background: none; padding: 0; }
.entry table, .entry .wp-block-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry th, .entry td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--hairline); vertical-align: top; } .entry th { background: var(--muted-surface); color: var(--ink); font-weight: 600; }
.entry hr, .entry .wp-block-separator { border: 0; border-top: 1px solid var(--hairline); margin-block: 2.5em; }
.entry figure { margin-inline: 0; } .entry figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.entry img { border-radius: var(--radius-sm); }
.entry .note { background: var(--muted-surface); border: 1px solid var(--hairline); border-left: 3px solid var(--cyan); border-radius: var(--radius-sm); padding: 1rem 1.25rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; } .tags a { font: .8rem var(--mono); color: var(--muted); text-decoration: none; } .tags a:hover { color: var(--signal); }
.callout { padding: 1.5rem; margin: 2.5rem 0; } .callout p { margin: 0 0 .75rem; } .callout p:last-child { margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.post-nav { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 3rem; }
.post-nav a { padding: 1rem 1.25rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .35rem; } .post-nav a:hover { border-color: var(--signal); }
.post-nav .right { text-align: right; grid-column: 2; } .post-nav .mono-label { margin: 0; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav .right { grid-column: 1; text-align: left; } }
.related { border-top: 1px solid var(--hairline); padding-block: 2.5rem 1rem; background: var(--surface); } .related .mono-label { margin-bottom: 1.25rem; }

/* ── Footer (mirrors main site) ───────────────────────────────── */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 4rem; background: var(--surface); padding-block: 3rem 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; }
.footer-grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr .9fr; } .footer-grid > :first-child { grid-column: auto; } }
.footer-blurb { margin: .5rem 0 0; max-width: 34ch; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; } .footer-grid li { margin-bottom: .4rem; }
.footer-grid li a { font-size: .875rem; color: var(--muted); text-decoration: none; } .footer-grid li a:hover { color: var(--signal); }
.footer-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline); font-size: .75rem; } .footer-legal p { margin: 0 0 .5rem; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .related, .callout, .post-nav { display: none; } body { background: #fff; } }
