/* Gulab Prasad — Ghost theme */
@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Ubuntu:wght@500;700&family=Inter:wght@400;500;600;700&display=swap");


/* v1.0.19 — light/dark theme tokens */
:root {
  --bg: #0b1120;
  --surface: #162033;
  --surface-alt: #0f172a;
  --surface-2: #1e293b;
  --border: #334155;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --text: #ffffff;
  --accent: #ff5512;
}
html[data-theme="light"] {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-alt: #eef1f5;
  --surface-2: #e9edf2;
  --border: #d7dde5;
  --muted: #64748b;
  --soft: #475569;
  --text: #0f172a;
}
html, body { background: var(--bg); }
.theme-toggle {
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: var(--surface-2); color: var(--soft); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: background-color .2s, color .2s;
}
.theme-toggle:hover { background: #ff5512; color: #fff; }
.theme-toggle svg { width: 18px; height: 18px; }
html[data-theme="light"] .theme-toggle .icon-sun,
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon,
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .post-full-content img,
html[data-theme="light"] .gh-content img { box-shadow: 0 4px 14px rgba(15,23,42,0.12); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 60; }
@media (max-width: 900px) { .site-header { position: static; } }
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; padding: 1rem 0;
}
.brand { display: flex; align-items: center; gap: 1.25rem; }
.brand-logo { width: 4rem; height: 4rem; object-fit: contain; }
.brand-title {
  font-family: 'Ubuntu', sans-serif;
  font-size: 2rem; font-weight: 700; letter-spacing: -0.01em;
  text-transform: uppercase; margin: 0; color: var(--text); line-height: 1;
}
@media (min-width: 768px) { .brand-title { font-size: 2.25rem; } }
.brand-tagline { font-size: 1.15rem; color: var(--muted); margin: -0.08rem 0 0; line-height: 1.1; }

.social-icons { display: flex; align-items: center; gap: 0.75rem; }
.social-icons a {
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: var(--surface-2); color: var(--soft);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}
.social-icons a:hover { background: #ff5512; color: #fff; }
.social-icons svg { width: 18px; height: 18px; }

/* Sticky Nav */
.site-nav {
  background: #ff5512; color: #fff;
  z-index: 50;
}
.site-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 80rem; margin: 0 auto; padding: 0 1.5rem;
}
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
}
.site-nav li a {
  display: block; padding: 1rem 1.25rem;
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  transition: background-color 0.2s;
}
.site-nav li a:hover, .site-nav li a.is-active { background: rgba(0,0,0,0.2); }
.nav-search {
  background: transparent; border: 0; color: #fff;
  padding: 0.75rem; cursor: pointer; transition: background-color 0.2s;
}
.nav-search:hover { background: rgba(0,0,0,0.15); }

/* Main + sidebar */
.site-main {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  max-width: 80rem; margin: 0 auto; padding: 2.5rem 1.5rem;
}
@media (min-width: 1024px) {
  .site-main { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
}
.posts { display: flex; flex-direction: column; gap: 2.5rem; }

/* Post card */
.post-card {
  background: var(--surface); border: 1px solid var(--border);
  overflow: hidden;
}
.post-card-image img { width: 100%; height: auto; }
.post-card-body { padding: 1.5rem; }
.post-card-tags {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: #ff5512; font-weight: 700; margin-bottom: 0.5rem;
}
.post-card-title {
  font-family: 'Ubuntu', sans-serif;
  font-size: 1.5rem; font-weight: 700; margin: 0 0 0.75rem;
   line-height: 1.2;
}
.post-card-title a:hover { color: #ff5512; }
.post-card-excerpt { color: var(--soft); margin: 0 0 1rem; }
.post-card-meta {
  font-size: 0.8rem; color: var(--muted);
  display: flex; gap: 0.75rem; align-items: center;
}

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 2rem; position: sticky; top: 10rem; align-self: start; max-height: calc(100vh - 11rem); overflow-y: auto; }
@media (max-width: 900px) { .sidebar { position: static; max-height: none; overflow: visible; } }
.widget {
  background: var(--surface); border: 1px solid var(--border); padding: 1.5rem;
}
.widget h3 {
  font-size: 0.9rem; font-weight: 900; font-family: Ubuntu, sans-serif;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted); border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem; margin: 0 0 1rem;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.widget li:last-child { border-bottom: 0; }
.widget li a:hover { color: #ff5512; }
.widget p { font-size: 0.9rem; color: var(--soft); margin: 0 0 0.75rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list a {
  display: inline-block; padding: 0.25rem 0.625rem;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.tag-list a:hover { background: #ff5512; border-color: #ff5512; }

.subscribe-form { display: flex; flex-direction: column; gap: 0.5rem; }
.subscribe-form input {
  width: 100%; padding: 0.625rem 0.75rem;
  background: var(--bg); border: 1px solid var(--border);
  color: #fff; font-size: 0.875rem;
}
.subscribe-form input:focus { outline: none; border-color: #ff5512; }
.subscribe-form button {
  padding: 0.625rem 0.75rem; background: #ff5512; color: #fff;
  border: 0; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 0.75rem; cursor: pointer;
}
.subscribe-form button:hover { background: #e64b10; }

/* Pagination */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; gap: 1rem;
}
.pagination a, .pagination span {
  padding: 0.625rem 1rem; background: var(--surface);
  border: 1px solid var(--border); font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pagination a:hover { background: #ff5512; border-color: #ff5512; }

/* Single post / page */
.post-full { max-width: 55.5rem; margin: 0 auto; padding: 2.5rem 1.5rem; }
/* Pages fill the grid column so Explore/Contact/About/Partners match other pages */
.page-template .post-full,
body.page-template .post-full { max-width: 100%; margin: 0; padding: 0; }
.post-full-header { margin-bottom: 2rem; }
.post-full-title {
  font-family: 'Ubuntu', sans-serif;
  font-size: 2.25rem; 
  margin: 0.5rem 0; line-height: 1.15;
}
.post-full-meta { color: var(--muted); font-size: 0.85rem; }
.post-full-image { margin: 1.5rem 0; }
.post-full-content { font-size: 1.05rem; line-height: 1.75; color: var(--text); }
.post-full-content h1, .post-full-content h2, .post-full-content h3 {
  font-family: 'Ubuntu', sans-serif; margin-top: 2rem;
}
.post-full-content a { color: #ff5512; text-decoration: underline; }
.post-full-content blockquote {
  border-left: 3px solid #ff5512; padding-left: 1rem;
  color: var(--soft); margin: 1.5rem 0;
}
.post-full-content pre, .post-full-content code {
  background: var(--surface); border: 1px solid var(--border);
}
.post-full-content pre { padding: 1rem; overflow-x: auto; }
.post-full-content code { padding: 0.125rem 0.375rem; font-size: 0.9em; }
/* v1.0.22 — inline-code styling must NOT apply inside code blocks */
.post-full-content pre code,
.post-full-content pre[class*="language-"] code,
.gh-content pre code {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Footer */
.site-footer { background: var(--surface-alt); color: var(--muted); margin-top: 3rem; }
.site-footer-inner {
  max-width: 80rem; margin: 0 auto; padding: 2rem 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.site-footer-inner p { margin: 0; font-size: 0.875rem; }
.site-footer .social-icons a {
  width: auto; height: auto; background: transparent;
  color: var(--muted);
}
.site-footer .social-icons a:hover { background: transparent; color: #ff5512; }

/* Empty state */
.no-posts { color: var(--muted); text-align: center; padding: 3rem 1rem; }

/* Koenig editor card widths */
.kg-width-wide {
  position: relative;
  width: 85vw;
  max-width: 1140px;
  left: 50%;
  transform: translateX(-50%);
}
.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
}
.kg-width-full img {
  width: 100vw;
}

/* Social search button in header */
.social-search {
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: var(--surface-2); color: var(--soft); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s, color 0.2s;
  padding: 0;
}
.social-search:hover { background: #ff5512; color: #fff; }
.social-search svg { width: 18px; height: 18px; }

/* Partners widget image */
.widget-partners { padding: 0; overflow: hidden; }
.widget-partners h3 { padding: 1.5rem 1.5rem 0.75rem; margin: 0 0 0; }
.widget-partners .partners-link { display: block; background: #ffffff; padding: 1.25rem; }
.widget-partners .partners-image {
  width: 100%; height: auto; display: block;
}

/* Subscribe response messages */
.subscribe-message { display: none; font-size: 0.8rem; margin-top: 0.25rem; color: #34d399; }
.subscribe-message.subscribe-error { color: #f87171; }
.subscribe-form.success [data-members-success] { display: block; }
.subscribe-form.error [data-members-error] { display: block; }

/* Contact form */
.contact-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-form .form-row { display: flex; flex-direction: column; gap: .35rem; }
.contact-form label { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.contact-form input, .contact-form textarea {
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
    padding: .7rem .85rem; border-radius: 4px; font: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #ff5512; }
.contact-form button {
    background: #ff5512; color: #fff; border: none; padding: .75rem 1.25rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
    cursor: pointer; border-radius: 4px; align-self: flex-start;
}
.contact-form button:hover { background: #e64a0f; }
.contact-form .form-message { min-height: 1.2em; color: var(--soft); font-size: .9rem; margin: 0; }

/* Contact form v2 */
.page-contact .contact-intro { color: var(--soft); font-size: 1.05rem; margin-top: .5rem; }
.contact-form { max-width: 720px; margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form .form-row { display: flex; flex-direction: column; gap: .5rem; }
.contact-form label { font-size: 1rem; letter-spacing: .08em; color: var(--text); text-transform: uppercase; font-weight: 600; }
.contact-form .req { color: #ff5512; margin-left: 2px; }
.contact-form input, .contact-form textarea {
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
    padding: 1rem 1.15rem; border-radius: 6px; font: inherit; font-size: 1.05rem; width: 100%;
}
.contact-form textarea { min-height: 200px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #ff5512; box-shadow: 0 0 0 3px rgba(255,85,18,.25); }
.contact-form button {
    background: #ff5512; color: #fff; border: none; padding: 1rem 2rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    cursor: pointer; border-radius: 6px; align-self: flex-start; font-size: 1rem;
}
.contact-form button:hover { background: #e64a0f; }
.contact-form .form-message { min-height: 1.2em; color: var(--soft); font-size: .95rem; margin: 0; }

/* Prism code editor styling — themed to match #ff5512 */
pre[class*="language-"] {
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 1.5em 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  max-height: 500px;
  overflow: auto;
}
/* v1.0.16 — dark-theme scrollbars inside code blocks */
pre[class*="language-"]::-webkit-scrollbar { width: 10px; height: 10px; }
pre[class*="language-"]::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 8px; }
pre[class*="language-"]::-webkit-scrollbar-thumb { background: rgba(255,85,18,0.55); border-radius: 8px; }
pre[class*="language-"]::-webkit-scrollbar-thumb:hover { background: #ff5512; }
pre[class*="language-"] { scrollbar-width: thin; scrollbar-color: rgba(255,85,18,0.6) rgba(255,255,255,0.04); }
div.code-toolbar > .toolbar {
  opacity: 1;
  top: 0.5em;
  right: 0.5em;
}
div.code-toolbar > .toolbar .toolbar-item > button,
div.code-toolbar > .toolbar .toolbar-item > span {
  background: #ff5512 !important;
  color: #fff !important;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 0;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
div.code-toolbar > .toolbar .toolbar-item > button:hover {
  background: #e04810;
  color: #fff;
}

/* v1.0.22 — clean, framed code blocks */
div.code-toolbar {
  position: relative;
  margin: 1.75rem 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
}
div.code-toolbar > pre[class*="language-"] {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.post-full-content pre[class*="language-"],
.post-full-content pre,
.gh-content pre[class*="language-"],
.gh-content pre {
  position: relative;
  background: #1b2230;
  padding: 3rem 1.25rem 1.25rem;
  line-height: 1.55;
  tab-size: 4;
}
/* language badge — top-left in its own header strip */
.post-full-content pre[data-lang]::before,
.gh-content pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.25rem;
  display: flex;
  align-items: center;
  padding-left: 0.9rem;
  font-family: "Ubuntu", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  pointer-events: none;
  z-index: 2;
}
/* copy button — top-right of the same strip */
div.code-toolbar > .toolbar {
  opacity: 1 !important;
  top: 0.4rem !important;
  right: 0.6rem !important;
  z-index: 4 !important;
}
div.code-toolbar > .toolbar .toolbar-item > button,
div.code-toolbar > .toolbar .toolbar-item > span {
  background: #ff5512 !important;
  color: #fff !important;
  border-radius: 4px;
  padding: 3px 10px;
  font-family: "Ubuntu", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  border: 0;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
div.code-toolbar > .toolbar .toolbar-item > button:hover { background: #e04810 !important; color: #fff !important; }

/* v1.0.15 — Framed article images + lightbox affordance */
.post-full-content img,
.gh-content img {
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-full-content a.glightbox,
.gh-content a.glightbox {
  display: inline-block;
  cursor: zoom-in;
}
.post-full-content a.glightbox:hover img,
.gh-content a.glightbox:hover img {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 3px 8px rgba(0,0,0,0.3);
}


/* v1.0.26 — Article tables (spreadsheet-like) */
.post-full-content table:not(.line-numbers-rows),
.gh-content table:not(.line-numbers-rows) {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.95rem;
  background: var(--surface);
  display: table;
}
.post-full-content table th,
.gh-content table th {
  background: var(--surface-2);
  color: var(--text);
  font-family: "Ubuntu", system-ui, sans-serif;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.post-full-content table td,
.gh-content table td {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  color: var(--soft);
  vertical-align: top;
}
.post-full-content table tbody tr:nth-child(even),
.gh-content table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }
html[data-theme="light"] .post-full-content table tbody tr:nth-child(even),
html[data-theme="light"] .gh-content table tbody tr:nth-child(even) { background: rgba(15,23,42,0.03); }
.post-full-content table tbody tr:hover,
.gh-content table tbody tr:hover { background: rgba(255,85,18,0.08); }
.post-full-content table caption,
.gh-content table caption { caption-side: bottom; color: var(--muted); font-size: .85rem; padding-top: .5rem; }
/* keep wide tables scrollable instead of overflowing the column */
.post-full-content .kg-card.kg-table-card,
.gh-content .kg-card.kg-table-card,
.post-full-content figure.table,
.gh-content figure.table { overflow-x: auto; margin: 2rem 0; }
@media (max-width: 700px) {
  .post-full-content table, .gh-content table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Multi-tag display */
.post-card-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-card-tags a { color: #ff5512; }
.post-card-tags a:hover { text-decoration: underline; }

.post-full-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
}
.post-full-tags-label {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 700; margin-right: 0.25rem;
}
.post-full-tags a {
  display: inline-block; padding: 0.3rem 0.7rem;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.8rem; color: var(--soft); border-radius: 3px;
  font-family: 'Ubuntu', sans-serif;
}
.post-full-tags a:hover { border-color: #ff5512; color: #ff5512; }

/* ---- Table of Contents ---- */
.gp-toc {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  font-size: 0.95rem;
}
.gp-toc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: Ubuntu, system-ui, sans-serif;
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  font-size: .82rem; color: var(--muted);
}
.gp-toc-toggle {
  background: none; border: 0; color: var(--accent); cursor: pointer;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 0;
}
.gp-toc-list { list-style: none; margin: .85rem 0 0; padding: 0; }
.gp-toc.is-collapsed .gp-toc-list { display: none; }
.gp-toc-list li { margin: 0; padding: .18rem 0; line-height: 1.45; }
.gp-toc-list li.gp-toc-h3 { padding-left: 1.15rem; font-size: .9rem; }
.gp-toc-list a {
  color: var(--soft); text-decoration: none;
  border-left: 2px solid transparent; padding-left: .6rem; display: block;
  transition: color .15s, border-color .15s;
}
.gp-toc-list a:hover { color: var(--accent); }
.gp-toc-list a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.post-full-content .gp-toc-target { scroll-margin-top: 160px; }
@media (max-width: 700px) {
  .gp-toc { padding: .9rem 1rem; }
  .post-full-content .gp-toc-target { scroll-margin-top: 90px; }
}
.gp-toc-list { max-height: 65vh; overflow-y: auto; }
.gp-toc-list::-webkit-scrollbar { width: 8px; }
.gp-toc-list::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
