/* ── TECHMAN GHOST THEME ── */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;600;700;800;900&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0e0e0e;
  --black2: #1c1c1c;
  --blue-dark: #0a3d6b;
  --blue: #1261a0;
  --blue-mid: #1a7fc1;
  --blue-light: #deeef9;
  --blue-pale: #f2f8fd;
  --white: #ffffff;
  --off-white: #f7f9fb;
  --text: #111111;
  --muted: #52606d;
  --border: #d8e4ef;
  --radius: 8px;
  --max: 1280px;
  --pad: clamp(1.5rem, 5vw, 4rem);
}

html { scroll-behavior: smooth; }
body { font-family: 'Source Sans 3', sans-serif; color: var(--text); background: var(--white); overflow-x: hidden; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ── TOPBAR ── */
.topbar { background: var(--black); padding: .55rem 0; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.topbar-region { color: rgba(255,255,255,.45); font-size: .82rem; margin-right: auto; }
.topbar a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .85rem; display: flex; align-items: center; gap: .45rem; transition: color .2s; }
.topbar a:hover { color: #fff; }

/* ── HEADER ── */
header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 3px solid var(--blue); box-shadow: 0 2px 16px rgba(0,0,0,.07); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.logo img { height: 54px; display: block; }
nav { display: flex; align-items: center; gap: .25rem; }
nav a { color: var(--black2); text-decoration: none; font-size: .92rem; font-weight: 600; padding: .45rem 1rem; border-radius: var(--radius); transition: color .2s, background .2s; }
nav a:hover, nav a.active { color: var(--blue); background: var(--blue-pale); }
.nav-cta { background: var(--blue) !important; color: var(--white) !important; margin-left: .5rem; padding: .5rem 1.3rem !important; border-radius: var(--radius); }
.nav-cta:hover { background: var(--blue-dark) !important; }

/* ── CONTACT STRIP ── */
.contact-strip { background: var(--blue); padding: .9rem 0; }
.contact-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.contact-strip-label { color: rgba(255,255,255,.65); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.contact-strip a { color: var(--white); text-decoration: none; font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: .5rem; transition: opacity .2s; }
.contact-strip a:hover { opacity: .8; }
.book-link { margin-left: auto; background: rgba(255,255,255,.15); padding: .4rem 1.1rem; border-radius: 4px; font-size: .88rem !important; }

/* ── BLOG HERO ── */
.blog-hero { background: var(--black); padding: 4.5rem 0 4rem; position: relative; overflow: hidden; }
.blog-hero::after { content: ''; position: absolute; top: 0; right: 0; width: 40%; height: 100%; background: var(--blue-dark); clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%); opacity: .45; }
.blog-hero::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--blue-mid), var(--blue-dark)); z-index: 2; }
.blog-hero .wrap { position: relative; z-index: 1; }
.blog-hero-tag { display: inline-block; font-size: .73rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #70c0f0; border-left: 3px solid #70c0f0; padding-left: .6rem; margin-bottom: .9rem; }
.blog-hero h1 { font-family: 'Raleway', sans-serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: var(--white); letter-spacing: -.02em; margin-bottom: .9rem; }
.blog-hero p { color: rgba(255,255,255,.65); font-size: 1.05rem; font-weight: 300; max-width: 500px; line-height: 1.7; }

/* ── POST GRID ── */
.blog-section { background: var(--off-white); padding: 4rem 0; min-height: 400px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.post-card { background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, border-top-color .25s; box-shadow: 0 4px 16px rgba(10,61,107,.08); }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(10,61,107,.13); border-top-color: var(--blue-mid); }
.post-card-img { height: 200px; width: 100%; object-fit: contain; display: block; background: transparent; }
.post-card-img-placeholder { height: 200px; background: var(--blue-pale); }
.post-card-body { padding: 1.5rem 1.7rem; flex: 1; display: flex; flex-direction: column; }
.post-card-tag { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--blue-mid); margin-bottom: .6rem; display: block; }
.post-card-body h2 { font-family: 'Raleway', sans-serif; font-size: 1.05rem; font-weight: 800; color: var(--black); line-height: 1.3; margin-bottom: .6rem; }
.post-card-body p { font-size: .92rem; color: var(--muted); line-height: 1.65; flex: 1; font-weight: 300; }
.post-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.post-card-date { font-size: .8rem; color: var(--muted); }
.post-card-read { font-size: .82rem; font-weight: 700; color: var(--blue); }

/* ── SINGLE POST ── */
.post-hero { background: var(--black); padding: 4rem 0 3rem; position: relative; overflow: hidden; }
.post-hero::after { content: ''; position: absolute; top: 0; right: 0; width: 40%; height: 100%; background: var(--blue-dark); clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%); opacity: .4; }
.post-hero::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--blue-mid), var(--blue-dark)); z-index: 2; }
.post-hero .wrap { position: relative; z-index: 1; max-width: 860px; }
.post-breadcrumb { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.post-breadcrumb a { color: rgba(255,255,255,.5); text-decoration: none; font-size: .82rem; transition: color .2s; }
.post-breadcrumb a:hover { color: #5ab4f0; }
.post-breadcrumb span { color: rgba(255,255,255,.25); font-size: .82rem; }
.post-tag-badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .7rem; border-radius: 3px; margin-bottom: 1rem; background: rgba(26,127,193,.3); color: #70c0f0; border: 1px solid rgba(26,127,193,.4); }
.post-hero h1 { font-family: 'Raleway', sans-serif; font-size: clamp(1.7rem, 3.5vw, 2.8rem); font-weight: 900; color: var(--white); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 1.2rem; }
.post-meta-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; color: rgba(255,255,255,.45); font-size: .85rem; }
.post-featured-img { width: 100%; max-width: 760px; height: auto; max-height: 480px; object-fit: contain; display: block; margin: 0 auto 2.5rem; }

/* ── POST LAYOUT ── */
.post-layout { display: grid; grid-template-columns: 1fr 300px; gap: 4rem; padding: 4rem 0; max-width: 1100px; margin: 0 auto; }
.post-content { min-width: 0; }
.post-content p { font-size: 1.05rem; color: #2a2a2a; line-height: 1.85; margin-bottom: 1.4rem; }
.post-content h2 { font-family: 'Raleway', sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--black); margin: 2.2rem 0 .9rem; border-left: 4px solid var(--blue-mid); padding-left: .8rem; }
.post-content h3 { font-family: 'Raleway', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--black); margin: 1.8rem 0 .7rem; }
.post-content ul, .post-content ol { margin: 0 0 1.4rem 1.5rem; }
.post-content li { font-size: 1.02rem; color: #2a2a2a; line-height: 1.8; margin-bottom: .4rem; }
.post-content a { color: var(--blue-mid); }
.post-content a:hover { color: var(--blue-dark); }
.post-content strong { font-weight: 600; color: var(--black); }
.post-content img { max-width: 100%; border-radius: var(--radius); margin: 1.5rem 0; }
.post-content blockquote { border-left: 4px solid var(--blue-mid); padding: .8rem 1.2rem; background: var(--blue-pale); border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1.4rem; font-style: italic; color: var(--muted); }
.post-content code { background: var(--blue-pale); border: 1px solid var(--blue-light); padding: .15rem .4rem; border-radius: 3px; font-size: .88em; }
.post-content pre { background: var(--black); color: #e2e8f0; padding: 1.5rem; border-radius: var(--radius); overflow-x: auto; margin-bottom: 1.4rem; }
.post-content pre code { background: none; border: none; padding: 0; font-size: .9em; color: inherit; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── POST CTA ── */
.post-cta { background: var(--blue-pale); border: 1px solid var(--blue-light); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 1.5rem 1.8rem; margin-top: 2.5rem; }
.post-cta p { font-size: .97rem; color: var(--text); margin-bottom: .8rem; }
.post-cta a { display: inline-flex; align-items: center; gap: .4rem; background: var(--blue); color: var(--white); font-family: 'Raleway', sans-serif; font-weight: 700; font-size: .9rem; padding: .6rem 1.4rem; border-radius: var(--radius); text-decoration: none; transition: background .2s; }
.post-cta a:hover { background: var(--blue-dark); }

/* ── SIDEBAR ── */
.post-sidebar {}
.sidebar-card { background: var(--off-white); border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.5rem; position: sticky; top: 90px; }
.sidebar-card h4 { font-family: 'Raleway', sans-serif; font-size: .88rem; font-weight: 800; color: var(--black); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1rem; }
.sidebar-meta { font-size: .88rem; color: var(--muted); line-height: 1.7; }
.sidebar-meta strong { display: block; color: var(--black); font-weight: 700; margin-top: .5rem; }
.sidebar-contact-btn { display: block; text-align: center; background: var(--blue); color: var(--white) !important; font-family: 'Raleway', sans-serif; font-weight: 700; padding: .6rem 1rem; border-radius: 6px; text-decoration: none; margin-top: .8rem; transition: background .2s; }
.sidebar-contact-btn:hover { background: var(--blue-dark) !important; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--blue); font-weight: 700; font-size: .9rem; text-decoration: none; margin-top: 1rem; }
.back-link:hover { text-decoration: underline; }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 3rem 0; }
.pagination a { color: var(--blue); text-decoration: none; font-weight: 700; padding: .5rem 1.2rem; border: 2px solid var(--blue-light); border-radius: var(--radius); transition: all .2s; }
.pagination a:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pagination .page-number { color: var(--muted); font-size: .9rem; }

/* ── FOOTER ── */
footer { background: var(--black); border-top: 3px solid var(--blue); color: rgba(255,255,255,.45); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-logo { height: 46px; margin-bottom: 1.1rem; display: block; }
.footer-brand p { font-size: .88rem; line-height: 1.75; max-width: 290px; font-weight: 300; }
.footer-col h5 { font-family: 'Raleway', sans-serif; font-weight: 800; color: var(--white); font-size: .88rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-col a { display: block; color: rgba(255,255,255,.45); text-decoration: none; font-size: .88rem; margin-bottom: .55rem; transition: color .2s; }
.footer-col a:hover { color: #5ab4f0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .82rem; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
}
@media (max-width: 768px) {
  nav { display: none; }
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── KOENIG EDITOR REQUIRED CLASSES ── */
.kg-width-wide {
  margin-left: calc(50% - 50vw + 2rem);
  margin-right: calc(50% - 50vw + 2rem);
  max-width: 100vw;
}
.kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}
.kg-image { max-width: 100%; height: auto; border-radius: var(--radius); }
.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; gap: .5rem; margin-bottom: .5rem; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.kg-bookmark-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.kg-bookmark-container { display: flex; text-decoration: none; color: inherit; }
.kg-bookmark-content { padding: 1rem; flex: 1; }
.kg-bookmark-title { font-weight: 700; color: var(--black); margin-bottom: .3rem; }
.kg-bookmark-description { font-size: .88rem; color: var(--muted); }
.kg-bookmark-thumbnail img { width: 160px; object-fit: cover; }
.kg-video-card video { width: 100%; border-radius: var(--radius); }
.kg-audio-card { background: var(--blue-pale); border-radius: var(--radius); padding: 1rem; }
.kg-callout-card { display: flex; gap: 1rem; background: var(--blue-pale); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.4rem; }
.kg-callout-emoji { font-size: 1.5rem; }
.kg-toggle-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.kg-toggle-heading-text { font-weight: 700; cursor: pointer; }
.kg-toggle-content { margin-top: .8rem; }
.kg-button-card { text-align: center; margin: 1.5rem 0; }
.kg-button-card a { display: inline-block; background: var(--blue); color: var(--white); font-family: 'Raleway', sans-serif; font-weight: 700; padding: .7rem 1.8rem; border-radius: var(--radius); text-decoration: none; }

/* ── ATTRIBUTION / CREDIT LINES ── */
.post-content em a,
.post-content p:last-of-type em,
.post-content p em:only-child {
  font-size: .82rem;
  color: var(--muted);
  opacity: .75;
}

.post-content .kg-card + p > em,
.post-content p > em > a {
  font-size: .82rem;
  color: var(--muted);
}

/* Explicit attribution class for Ghost */
.post-attribution {
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1rem;
  font-style: italic;
}

/* ── TAG NAVIGATION ── */
.tag-nav { background: var(--white); border-bottom: 1px solid var(--border); padding: 0; overflow-x: auto; white-space: nowrap; }
.tag-nav .wrap { display: flex; align-items: center; gap: .25rem; padding-top: 0; padding-bottom: 0; }
.tag-nav-item { display: inline-block; color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 600; padding: .9rem 1rem; border-bottom: 3px solid transparent; transition: color .2s, border-color .2s; white-space: nowrap; flex-shrink: 0; }
.tag-nav-item:hover { color: var(--blue); border-bottom-color: var(--blue-light); }
.tag-nav-item.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── FEATURED POST ── */
.featured-section { background: var(--off-white); padding: 2.5rem 0 0; }
.featured-card { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; background: var(--white); border: 1px solid var(--border); border-top: 4px solid var(--blue-mid); box-shadow: 0 4px 24px rgba(10,61,107,.1); transition: transform .25s, box-shadow .25s; }
.featured-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(10,61,107,.15); }
.featured-img { min-height: 320px; display: flex; align-items: center; justify-content: center; background: transparent; overflow: hidden; }
.featured-img img { width: 100%; height: 100%; object-fit: contain; max-height: 360px; }
.featured-img-placeholder { background: var(--blue-pale); }
.featured-body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.featured-label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-mid); margin-bottom: .6rem; }
.featured-tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--white); background: var(--blue); padding: .2rem .6rem; border-radius: 3px; margin-bottom: .8rem; }
.featured-body h2 { font-family: 'Raleway', sans-serif; font-size: 1.6rem; font-weight: 900; color: var(--black); line-height: 1.2; margin-bottom: .9rem; letter-spacing: -.02em; }
.featured-body p { font-size: .97rem; color: var(--muted); line-height: 1.7; font-weight: 300; flex: 1; margin-bottom: 1.2rem; }
.featured-meta { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--muted); padding-top: 1rem; border-top: 1px solid var(--border); }
.featured-read { font-weight: 700; color: var(--blue); }
@media (max-width: 768px) { .featured-card { grid-template-columns: 1fr; } .featured-img { min-height: 220px; } }
