/* ==========================================================================
   wowbly.pk — dark layer over Future 2021
   Same structure as the murad.phd child theme ("murad"), re-coloured with the
   WhatsApp dark palette: blue-black surfaces, cool greys, WhatsApp green accent
   (close to the WOWBLY logo teal #0a9776), pill buttons.
   ========================================================================== */

:root {
  --bg: #0b141a;            /* WhatsApp dark background */
  --surface: #111b21;       /* panels */
  --surface-2: #1f2c34;     /* search-bar grey-blue */
  --surface-3: #2a3942;
  --border: rgba(233, 237, 239, 0.08);
  --border-strong: rgba(233, 237, 239, 0.16);
  --text: #e9edef;
  --text-strong: #ffffff;
  --muted: #8696a0;
  --faint: #667781;
  --accent: #21c063;        /* WhatsApp green (FAB / send) */
  --accent-hover: #25d366;
  --accent-teal: #00a884;   /* WhatsApp teal, matches logo #0a9776 */
  --accent-soft: #103529;   /* selected-chip background */
  --accent-soft-text: #d9fdd3;
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Geist", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-h: 56px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
html, body { background: var(--bg); }

body, input, select, textarea {
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.005em;
}

body { padding-top: var(--header-h); -webkit-font-smoothing: antialiased; }

::selection { background: rgba(33, 192, 99, 0.35); color: var(--text-strong); }

h1, h2, h3, h4, h5, h6 {
  color: var(--text-strong);
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-transform: none;
}
h1 { font-size: 2.5rem; letter-spacing: -0.025em; margin: 0 0 0.6em; }
h2 { font-size: 1.5rem; margin: 2.4em 0 0.8em; }
h3 { font-size: 1.15rem; margin: 2em 0 0.6em; }
h4, h5, h6 { font-size: 1rem; margin: 1.6em 0 0.5em; }

p, ul, ol, dl, table, blockquote { margin-bottom: 1.4em; }
strong, b { color: var(--text-strong); font-weight: 600; }
hr { border: 0; border-bottom: 1px solid var(--border); margin: 2.5em 0; }

a {
  color: var(--text);
  border-bottom: 0;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease, background-color 0.15s ease;
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; border-bottom: 0; }
a:before { display: none; }

ul, ol { padding-left: 1.2em; }
ul li, ol li { padding-left: 0.25em; margin-bottom: 0.35em; }
ul li::marker { color: var(--faint); }
ol li::marker { color: var(--muted); font-family: var(--mono); font-size: 0.85em; }

code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.15em 0.4em;
}
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1em 1.2em; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }

blockquote {
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-style: normal;
  margin-left: 0;
  padding: 0.2em 0 0.2em 1.2em;
}

img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

/* ---------- Header ---------- */
#header {
  background: rgba(11, 20, 26, 0.85);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  height: var(--header-h);
  line-height: var(--header-h);
  padding: 0 2rem;
}

#header .logo {
  border: 0;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 0;
  margin-right: 2rem;
  text-transform: none;
  white-space: nowrap;
}
#header .logo a { color: var(--text-strong); text-decoration: none; letter-spacing: -0.005em; font-size: 0.95rem; font-weight: 500; text-transform: none; }
#header .logo a::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: 1px;
}

#header .dropdown { border-left: 0; }
#header .dropdown > ul { justify-content: flex-end; gap: 0.15rem; }
#header .dropdown > ul > li { border: 0; padding: 0; }
#header .dropdown > ul > li:first-child { border: 0; }
#header .dropdown > ul > li > a {
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  padding: 0 0.7rem;
  text-decoration: none;
  text-transform: none;
}
#header .dropdown > ul > li > a:hover,
#header .dropdown > ul > li.active > a,
#header .dropdown > ul > li.selected > a { color: var(--text-strong); }

/* Last menu item (Contact) as the pill call-to-action */
#header .dropdown > ul > li { display: flex; align-items: center; height: var(--header-h); }
#header .dropdown > ul > li:last-child { margin-left: 0.6rem; }
#header .dropdown > ul > li:last-child > a {
  background: var(--accent);
  border-radius: 999px;
  color: var(--bg);
  display: inline-block;
  font-weight: 500;
  height: 32px;
  line-height: 32px;
  padding: 0 14px;
}
#header .dropdown > ul > li:last-child > a:hover { background: var(--accent-hover); color: var(--bg); }

#header .main { border-left: 0; }
#header .main ul li { border-left: 0; }
#header .main ul li > a { color: var(--muted); width: 3rem; }
#header .main ul li > a:hover { color: var(--text-strong); }
@media screen and (min-width: 1281px) {
  #header .main .menu { display: none; }
}

/* ---------- Slide-out menu (small screens) ---------- */
#menu {
  background: var(--surface);
  border-left: 1px solid var(--border);
  color: var(--text);
}
#menu .close:before { color: var(--muted); }
#sidebarmenu a, .menulink, #menu a {
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
}
#sidebarmenu a:hover, #menu a:hover { color: var(--accent-hover); }
#sidebarmenu li, #menu .links > li { border-top: 1px solid var(--border); }
body.is-menu-visible #wrapper { opacity: 0.25; }

/* ---------- Layout ---------- */
#wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  gap: 2.5rem;
}
#main { min-width: 0; }

/* Page panel */
.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3.25rem 3.75rem 2.5rem;
  margin-bottom: 1.5rem;
}
.post > header {
  border-bottom: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  display: block;
}
.post > header .title { border: 0; padding: 0; }
.post > header .title h1, .post > header .title h2 { font-size: 2.5rem; margin: 0; }
.post-body > h1:first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }

/* Paragraph right after the page H1 reads as a lead */
.post-body > h1:first-child + p { color: var(--muted); font-size: 1.1rem; }

/* Section headings get a hairline */
.post-body > h2 {
  border-top: 1px solid var(--border);
  padding-top: 1.6em;
}
.post-body > h1 + h2, .post-body > h1 + p + h2 { border-top: 0; padding-top: 0; }

/* "Label →" links read as accent links, like cursor.com */
.post-body a[href]:not([href^="http"]):not([href^="mailto"]) { text-decoration-color: rgba(33, 192, 99, 0.5); }

/* ---------- Tables ---------- */
.post-body table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 100%;
  font-size: 0.95rem;
}
table tbody tr, table tbody tr:nth-child(2n+1) { background: transparent; border: 0; }
table thead { border-bottom: 0; }
table th {
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.75rem 1rem;
  text-align: left;
  text-transform: none;
  border-bottom: 1px solid var(--border);
}
table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table tbody tr:last-child td { border-bottom: 0; }
table tbody tr:hover td { background: rgba(233, 237, 239, 0.025); }
/* Header rows that are entirely empty (e.g. "| | |") are hidden */
table thead:not(:has(th:not(:empty))) { display: none; }

@media screen and (max-width: 736px) {
  .post-body table { display: block; overflow-x: auto; white-space: normal; }
}

/* ---------- Buttons ---------- */
.button, button, input[type="submit"], input[type="reset"], input[type="button"] {
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  color: var(--bg) !important;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  letter-spacing: 0;
  line-height: 2.5rem;
  padding: 0 1.15rem;
  text-decoration: none;
  text-transform: none;
}
.button:hover, button:hover { background: var(--accent-hover); color: var(--bg) !important; box-shadow: none; }
.button.secondary { background: var(--surface-3); color: var(--text) !important; }
.button.secondary:hover { background: #33444f; color: var(--text-strong) !important; }

/* ---------- Sidebar (inner pages) ---------- */
#sidebar {
  margin-right: 0;
  min-width: 260px;
  width: 280px;
  flex-shrink: 0;
}
#sidebar > * { border-top: 0; margin: 0 0 1rem; }
#sidebar > .profile-card { padding: 1.5rem; }
@media screen and (min-width: 1281px) {
  #sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: flex-start; }
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.profile-name {
  color: var(--text-strong);
  display: block;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-decoration: none;
}
.profile-name:hover { color: var(--text-strong); }
.profile-tagline { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin: 0.5rem 0 1.25rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.profile-actions li { margin: 0; padding: 0; }
.profile-actions .button { font-size: 0.8125rem; height: 2.125rem; line-height: 2.125rem; padding: 0 0.95rem; }

.page-toc-card { padding: 0.25rem 0.25rem 0; }
.page-toc-card .toc-label { color: var(--faint); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; margin: 0 0 0.6rem 0.75rem; }
.page-toc-card ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.page-toc-card li { margin: 0; padding: 0; }
.page-toc-card a {
  border-left: 1px solid transparent;
  color: var(--muted);
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-left: -1px;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
}
.page-toc-card a:hover { color: var(--text-strong); }
.page-toc-card a.active { border-left-color: var(--accent); color: var(--text-strong); }
.post-body > h2 { scroll-margin-top: calc(var(--header-h) + 1.5rem); }

@media screen and (max-width: 1280px) {
  #wrapper { display: flex; flex-direction: column; }
  #sidebar { border-top: 0; margin: 0; padding: 0; width: 100%; min-width: 0; order: 2; }
  .page-toc-card { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  color: var(--faint);
  display: flex;
  font-size: 0.85rem;
  justify-content: space-between;
  padding: 1rem 0.25rem 0;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text-strong); }

/* ---------- Home: hero, stat cards, link grid ---------- */
body.is-home #wrapper { max-width: 1080px; display: block; }
body.is-home .post { background: transparent; border: 0; padding: 4rem 0 1rem; }
body.is-home .post-body > h1:first-child {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.5em;
  max-width: 14ch;
}
body.is-home .post-body > h1:first-child + p {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.6rem;
}
body.is-home .post-body > h1:first-child + p strong { color: var(--muted); font-weight: 400; }
body.is-home .post-body > h1:first-child + p + p,
body.is-home .post-body > h1:first-child + p + p + p {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 46rem;
}
body.is-home .post-body > h1:first-child + p + p + p { color: var(--muted); font-size: 1.05rem; }
body.is-home .post-body > h2 {
  border-top: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-top: 4rem;
  padding-top: 0;
}

/* "At a glance" table as stat cards */
body.is-home .post-body table { border: 0; border-radius: 0; overflow: visible; }
body.is-home .post-body table tbody {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.is-home .post-body table tr {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.35rem;
}
body.is-home .post-body table tr:hover td { background: transparent; }
body.is-home .post-body table td { border: 0; padding: 0; }
body.is-home .post-body table td:first-child { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 0.35rem; }
body.is-home .post-body table td:first-child strong { font-weight: 500; }
body.is-home .post-body table td:last-child { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* "Latest" list as a quiet feed */
body.is-home .post-body > h2 + ul { border-top: 1px solid var(--border); list-style: none; padding: 0; }
body.is-home .post-body > h2 + ul > li {
  border-bottom: 1px solid var(--border);
  margin: 0;
  padding: 0.95rem 0.1rem;
}
body.is-home .post-body > h2 + ul > li > strong:first-child { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; font-weight: 400; margin-right: 0.4rem; }

/* "Explore" list (the last list on the page) as a link grid */
body.is-home .post-body > ul:last-of-type {
  border-top: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.is-home .post-body > ul:last-of-type > li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.1rem 1.25rem;
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
body.is-home .post-body > ul:last-of-type > li:hover { background: var(--surface-2); border-color: var(--border-strong); }
body.is-home .post-body > ul:last-of-type > li > a {
  color: var(--text-strong);
  display: block;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  text-decoration: none;
}
body.is-home .post-body > ul:last-of-type > li > a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
body.is-home .post-body > ul:last-of-type > li > a:hover { color: var(--text-strong); }

/* The "All news →" link */
body.is-home .post-body > p > a[href="/work"] { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
body.is-home .post-body > p > a[href="/work"]:hover { color: var(--accent-hover); }

body.is-home .site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding-top: 1.5rem; }

@media screen and (max-width: 980px) {
  body.is-home .post-body table tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 736px) {
  #header { padding: 0 1rem; }
  #wrapper { padding: 1.5rem 1rem 1.5rem; }
  .post { padding: 1.75rem 1.25rem 1.5rem; border-radius: 10px; }
  h1, .post > header .title h1 { font-size: 1.9rem; }
  h2 { font-size: 1.3rem; }
  body.is-home .post { padding-top: 2rem; }
  body.is-home .post-body table { display: table; }
  body.is-home .post-body table tbody,
  body.is-home .post-body > ul:last-of-type { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Misc theme bits ---------- */
#back-to-top { background: var(--surface-3); border-radius: 999px; color: var(--text); }
.image.featured, .post > a.image.featured { display: none; }

/* Future 2021 pulls the post panel edge-to-edge on small screens; keep it inset */
@media screen and (max-width: 980px) {
  .post { left: 0; width: auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .post > header { left: 0; width: auto; }
}
@media screen and (max-width: 736px) {
  .post { left: 0; width: auto; margin: 0 0 1.25rem; padding: 1.75rem 1.25rem 1.5rem; }
  body.is-home .post { border: 0; padding: 2rem 0 0.5rem; }
}


/* ==========================================================================
   wowbly.pk additions
   ========================================================================== */

/* Header: logo mark instead of the square dot */
#header .logo a::before {
  width: 18px; height: 18px; border-radius: 5px; vertical-align: -3px;
  background: url("../../images/favicon.svg") center / cover no-repeat;
}

/* Home: green mono tag line, green stat numbers */
body.is-home .post-body > h1:first-child + p { color: var(--accent); }
body.is-home .post-body > h1:first-child + p strong { color: var(--accent); }
body.is-home .post-body table td:first-child strong { color: var(--accent-hover); }
body.is-home .post-body > h1:first-child { max-width: 18ch; }

/* WhatsApp-style chips (Services > Our tools) */
ul.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0 0 1.4em; padding: 0; }
ul.chips li {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.85rem;
  margin: 0;
  padding: 0.3rem 0.9rem;
}
ul.chips li:first-child { background: var(--accent-soft); border-color: transparent; color: var(--accent-soft-text); }

/* Numbered process lists get green numerals */
.post-body ol li::marker { color: var(--accent); }

/* Blockquote / accent rules use the teal */
blockquote { border-left-color: var(--accent-teal); }
.page-toc-card a.active { border-left-color: var(--accent); }

/* Floating WhatsApp button (markup in THEME_NOTES.md) */
.wa-fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 10001;
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--accent); color: var(--bg) !important;
  border-radius: 16px; padding: 0.85rem 1.2rem;
  font-weight: 500; text-decoration: none; box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.wa-fab:hover { background: var(--accent-hover); color: var(--bg) !important; }
.wa-fab svg { width: 20px; height: 20px; fill: currentColor; }
@media screen and (max-width: 736px) { .wa-fab span { display: none; } .wa-fab { padding: 0.9rem; border-radius: 50%; } }

/* Contact form on the dark surface */
.post-body form input[type="text"], .post-body form input[type="email"], .post-body form textarea {
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text);
}
.post-body form input:focus, .post-body form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
