/* ===========================================================================
   ArchitectForce — Chalamaiah Chinnam · Salesforce Developer & Architect
   One stylesheet, no framework. CSS custom props drive light/dark theming.
   =========================================================================== */

:root {
  /* brand — Salesforce blue → cyan */
  --accent: #1b96ff;          /* salesforce blue */
  --accent-2: #22d3ee;        /* cyan */
  --accent-grad: linear-gradient(135deg, #1b96ff 0%, #22d3ee 100%);

  /* dark theme (default) */
  --bg: #0a0e16;
  --bg-soft: #111722;
  --bg-card: #141b27;
  --border: #20293a;
  --text: #e7ecf3;
  --text-soft: #a6b1c4;
  --text-faint: #687388;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 760px;
  --maxw-wide: 1080px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --shadow: 0 10px 40px -12px rgba(0,0,0,0.55);
}

html[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-soft: #eef1f6;
  --bg-card: #ffffff;
  --border: #e1e6ef;
  --text: #0f1623;
  --text-soft: #47506280;
  --text-soft: #475062;
  --text-faint: #828ca0;
  --shadow: 0 10px 40px -16px rgba(20,40,80,0.18);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1 0 auto; }

body::before {
  content: "";
  position: fixed;
  top: -240px; left: 50%;
  width: 900px; height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(27,150,255,0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }
.wrap-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

/* ----------------------------------------------------------- header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: var(--maxw-wide); margin: 0 auto; padding: 0 22px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent-grad);
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .95rem;
  box-shadow: 0 4px 14px -3px rgba(27,150,255,0.6);
}
.brand b { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--text-soft); padding: 8px 12px; border-radius: 8px; font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); background: var(--bg-soft); }

.theme-toggle {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-soft);
  width: 38px; height: 38px; border-radius: 9px; cursor: pointer; font-size: 1.05rem;
  display: grid; place-items: center; transition: all .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }

/* ----------------------------------------------------------------- hero */
.hero { padding: 72px 0 36px; text-align: center; }
.hero .eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px;
  margin-bottom: 22px; background: var(--bg-soft);
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.03em; font-weight: 800; }
.hero h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.15rem; color: var(--text-soft); max-width: 580px; margin: 0 auto; }

/* ----------------------------------------------------------- search box */
.search-bar { margin: 34px auto 0; max-width: 480px; position: relative; }
.search-bar input {
  width: 100%; padding: 13px 16px 13px 44px; font-size: 1rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(27,150,255,0.18); }
.search-bar svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }

/* ---------------------------------------------------------------- tags */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 0; }
.tag-chip {
  font-size: .82rem; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text-soft); cursor: pointer; transition: all .15s; font-weight: 500;
}
.tag-chip:hover { border-color: var(--accent); color: var(--text); }
.tag-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --------------------------------------------------------------- post list */
.section-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--text-faint); margin: 56px 0 8px; }
.post-list { display: grid; gap: 18px; margin: 22px 0 80px; }
.post-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.post-card .meta { display: flex; gap: 12px; align-items: center; font-size: .82rem; color: var(--text-faint); margin-bottom: 10px; flex-wrap: wrap; }
.post-card .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.post-card h3 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--text); line-height: 1.25; }
.post-card:hover h3 { color: var(--accent); }
.post-card p { margin: 0; color: var(--text-soft); font-size: .98rem; }
.post-card .pills { margin-top: 14px; display: flex; gap: 7px; flex-wrap: wrap; }
.pill { font-size: .74rem; padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--text-faint); border: 1px solid var(--border); }
.no-results { text-align: center; color: var(--text-faint); padding: 40px; }

/* ------------------------------------------------------------- article page */
.article { padding: 28px 0 80px; }
.article .back { font-size: .9rem; color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 30px; }
.article .back:hover { color: var(--accent); }
.article-header { margin-bottom: 38px; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
.article-header .meta { display: flex; gap: 12px; align-items: center; font-size: .85rem; color: var(--text-faint); margin-bottom: 16px; flex-wrap: wrap; }
.article-header h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 14px; }
.article-header .lede { font-size: 1.15rem; color: var(--text-soft); margin: 0; }
.article-header .pills { margin-top: 18px; display: flex; gap: 7px; flex-wrap: wrap; }

.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.6rem; margin: 44px 0 14px; letter-spacing: -0.02em; line-height: 1.3; }
.prose h3 { font-size: 1.25rem; margin: 32px 0 10px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 20px; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 26px; color: var(--text); }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 24px 0; padding: 4px 22px; border-left: 3px solid var(--accent); color: var(--text-soft); font-style: italic; background: var(--bg-soft); border-radius: 0 8px 8px 0; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); color: var(--accent-2); }
.prose pre { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; overflow-x: auto; margin: 0 0 24px; font-size: .9rem; line-height: 1.6; }
.prose pre code { background: none; border: none; padding: 0; color: var(--text); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 8px 0 24px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 13px; text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 600; }

.article-footer { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--border); }
.author-box { display: flex; gap: 16px; align-items: center; }
.author-box .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-grad); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.author-box .who b { color: var(--text); }
.author-box .who span { color: var(--text-faint); font-size: .9rem; }

/* ------------------------------------------------------------------ about */
.about-hero { padding: 60px 0 10px; }
.about-hero h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); letter-spacing: -0.03em; margin: 0 0 16px; }
.about-hero .lede { font-size: 1.18rem; color: var(--text-soft); max-width: 640px; }
.about-card { display:flex; gap: 22px; align-items:center; background: var(--bg-card); border:1px solid var(--border); border-radius: var(--radius); padding: 26px; margin: 30px 0; }
.about-card .avatar { width:72px; height:72px; border-radius: 16px; background: var(--accent-grad); display:grid; place-items:center; color:#fff; font-weight:800; font-size:1.6rem; flex-shrink:0; }
.about-card .who b { font-size: 1.15rem; color: var(--text); }
.about-card .who span { color: var(--text-faint); font-size: .92rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 28px 0; }
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.stat .n { font-size: 1.7rem; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .l { font-size: .82rem; color: var(--text-faint); margin-top: 4px; }
.timeline { margin: 16px 0 40px; }
.timeline .job { padding: 18px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.timeline .job:last-child { border-bottom: none; }
.timeline .job .role b { color: var(--text); }
.timeline .job .role span { color: var(--text-faint); display: block; font-size: .92rem; }
.timeline .job .when { color: var(--text-faint); font-size: .9rem; white-space: nowrap; }
.cert-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 40px; }
.cert { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border); font-size: .9rem; color: var(--text-soft); }

/* --------------------------------------------------------------- CTA / contact */
.cta { margin: 20px 0 80px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 38px 32px; text-align: center; position: relative; overflow: hidden; }
.cta::before { content:""; position:absolute; inset:0; background: var(--accent-grad); opacity:.06; pointer-events:none; }
.cta h3 { margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -0.02em; }
.cta p { margin: 0 0 22px; color: var(--text-soft); }
.cta form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; }
.cta input { flex: 1; min-width: 200px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem; }
.cta input:focus { outline: none; border-color: var(--accent); }
.btn { padding: 12px 22px; border-radius: 10px; border: none; cursor: pointer; background: var(--accent-grad); color: #fff; font-weight: 600; font-size: 1rem; font-family: inherit; transition: transform .15s, box-shadow .15s; display: inline-block; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -6px rgba(27,150,255,0.6); color: #fff; }
.cta .note { font-size: .8rem; color: var(--text-faint); margin: 14px 0 0; }

/* ----------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-inner .links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-inner a { color: var(--text-faint); font-size: .9rem; }
.footer-inner a:hover { color: var(--accent); }
.footer-inner .copy { color: var(--text-faint); font-size: .88rem; }

@media (max-width: 600px) {
  .nav-links a:not(.theme-toggle) { display: none; }
  .hero { padding: 48px 0 30px; }
  .post-card { padding: 22px; }
}
