/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --foreground: #1a1f2e;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #4285f4;
  --primary-fg: #ffffff;
  --primary-light: #e8f0fe;
  --primary-dark: #1a56db;
  --accent: #e8f0fe;
  --accent-fg: #1a56db;
  --success: #22c55e;
  --destructive: #ef4444;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --navy: #1e3a5f;
  --navy-dark: #152d4a;
  --blue: #1a73e8;
  --blue-hover: #1557b0;
  --blue-light: #e8f0fe;
  --green: #34a853;
  --orange: #fa7b17;
  --red: #d93025;
  --white: #ffffff;
  --card-bg: #ffffff;
  --text: #202124;
  --muted2: #9aa0a6;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

/* ===== Shared Layout ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  flex: 1;
  padding: 24px 0 0;
}

/* ===== Header ===== */
.site-header {
  background: var(--navy);
  padding: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 0;
}

.logo-box {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
  flex-shrink: 0;
}

.logo-box span {
  border-radius: 2px;
}

.logo-box .b1,
.logo-box .b2,
.logo-box .b3 {
  background: var(--blue);
}

.logo-box .b4 {
  background: var(--green);
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
  min-width: 0;
  justify-content: flex-end;
}

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, #1e3a5f 0%, #1a4f8a 55%, #1e5ea8 100%);
  padding: 26px 0 24px;
  text-align: center;
  border-bottom: 4px solid #2563c8;
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  margin-top: 8px;
}

h1 {
  text-align: center;
}

/* ===== Blog Listing ===== */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.blog-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #111;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.blog-card h3 {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.blog-card span {
  font-size: 12px;
  color: gray;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy);
  padding: 18px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}

.footer-logo-box {
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
}

.footer-logo-box span {
  border-radius: 1px;
}

.footer-logo-box .b1,
.footer-logo-box .b2,
.footer-logo-box .b3 {
  background: rgba(255, 255, 255, 0.9);
}

.footer-logo-box .b4 {
  background: var(--green);
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 0.18s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
  outline: none;
}

.footer-copy {
  margin-left: auto;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== Single Blog Page ===== */
.blog-single-container {
  padding-top: 24px;
  padding-bottom: 40px;
}

.blog-back {
  max-width: 1168px;
  margin: 0 auto 16px;
  padding: 0 20px;
}

.blog-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #1a56db;
  text-decoration: none;
}

.blog-back a:hover,
.blog-back a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.blog-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.blog-page-layout > * {
  min-width: 0;
}

.blog-post-single {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 18px;
  padding: 34px 40px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.blog-post-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #111827;
  margin-bottom: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.blog-post-meta {
  color: #64748b;
  font-size: 0.98rem;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}

.blog-featured-image {
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 0 0 28px;
  border: 1px solid #e5eaf1;
  display: block;
}

.blog-content {
  font-size: 1.05rem;
  color: #1f2937;
  min-width: 0;
}

.blog-content > * {
  min-width: 0;
}

.blog-content p,
.blog-content li,
.blog-content a,
.blog-content h2,
.blog-content h3,
.blog-content td,
.blog-content th,
.blog-content figcaption {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.blog-content p {
  margin: 0 0 18px;
  line-height: 1.85;
}

.blog-content h2 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 38px 0 14px;
  color: #0f172a;
  font-weight: 800;
  scroll-margin-top: 90px;
}

.blog-content h3 {
  font-size: 1.35rem;
  margin: 26px 0 10px;
  color: #0f172a;
  font-weight: 700;
  scroll-margin-top: 90px;
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 22px 24px;
  padding: 0;
}

.blog-content li {
  margin-bottom: 10px;
  line-height: 1.75;
}

.blog-content strong {
  color: #111827;
}

.blog-content a {
  color: #1a73e8;
  font-weight: 600;
  text-underline-offset: 3px;
}

.blog-content pre,
.blog-content code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.blog-content .toc {
  background: #eef4ff;
  border: 1px solid #d8e5ff;
  border-radius: 14px;
  padding: 18px;
  margin: 24px 0;
}

.blog-content .toc strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.blog-content .toc p {
  margin: 0;
  color: #334155;
  line-height: 1.75;
}

.blog-content .toc a {
  color: #1a56db;
  font-weight: 700;
  text-decoration: none;
}

.blog-content .toc a:hover,
.blog-content .toc a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.blog-content .cta-box {
  margin-top: 34px;
  background: linear-gradient(160deg, #1e3a5f 0%, #1a4f8a 55%, #1e5ea8 100%);
  border-radius: 18px;
  padding: 28px;
  color: #fff;
}

.blog-content .cta-box h3 {
  color: #fff;
  margin-bottom: 10px;
}

.blog-content .cta-box p {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 14px;
}

.blog-content .btn {
  display: inline-block;
  background: #fff;
  color: #1a56db;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.blog-content .btn:hover,
.blog-content .btn:focus-visible {
  background: #eef4ff;
  outline: none;
}

/* ===== TOC Sidebar ===== */
.blog-toc-sidebar {
  position: sticky;
  top: 90px;
}

.blog-toc-box {
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.blog-toc-title {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 12px;
}

.toc-nav {
  width: 100%;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-item {
  margin-bottom: 8px;
}

.toc-subitem {
  padding-left: 14px;
}

.toc-link {
  display: block;
  color: #475569;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 6px 8px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.toc-link:hover,
.toc-link.active,
.toc-link:focus-visible {
  background: #e8f0fe;
  color: #1a56db;
  outline: none;
}

.mobile-toc-wrap {
  display: none;
  margin-bottom: 18px;
}

.toc-toggle {
  width: 100%;
  text-align: left;
  border: 1px solid #dfe5ee;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 800;
  color: #111827;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.mobile-toc-nav {
  display: none;
  margin-top: 12px;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  padding: 12px;
}

.mobile-toc-nav.is-open {
  display: block;
}

/* ===== Author Box ===== */
.author-bio-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 38px;
  padding: 22px;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  background: #f8fbff;
}

.author-bio-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #dbe4f0;
}

.author-bio-content {
  flex: 1;
  min-width: 0;
}

.author-bio-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}

.author-bio-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.author-bio-role {
  font-size: 0.96rem;
  font-weight: 600;
  color: #1a56db;
  margin: 0 0 10px;
}

.author-bio-text {
  margin: 0 0 10px;
  color: #334155;
  line-height: 1.75;
}

.author-bio-expertise {
  margin: 0;
  color: #334155;
  line-height: 1.6;
}

.author-linkedin-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #0a66c2;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.author-linkedin-btn:hover,
.author-linkedin-btn:focus-visible {
  background: #084a8c;
  outline: none;
}

/* ===== Figures / Images ===== */
.blog-tool-shot {
  margin: 16px 0 18px;
}

.blog-tool-shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid #e5eaf1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.blog-tool-shot figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
  text-align: center;
}

.img-proof {
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #94a3b8;
  text-align: center;
}

/* ===== Tables ===== */
.blog-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  background: #fff;
}

.blog-content thead {
  background: #f1f5f9;
}

.blog-content th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid #e5e7eb;
}

.blog-content td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
}

.blog-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

.blog-content tbody tr:hover {
  background: #eef4ff;
}

.blog-content tbody tr:last-child td {
  border-bottom: none;
}

/* ===== Misc ===== */
.tips-grid {
  margin-bottom: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .blog-page-layout {
    grid-template-columns: 1fr;
  }

  .blog-toc-sidebar {
    display: none;
  }

  .mobile-toc-wrap {
    display: block;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  main {
    padding-top: 18px;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .header-nav {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 8px;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 0.84rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-copy {
    margin-left: 0;
  }

  .blog-post-single {
    padding: 22px 16px;
    border-radius: 14px;
  }

  .blog-post-title {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  .blog-post-meta {
    font-size: 0.92rem;
    margin-bottom: 18px;
  }

  .blog-content {
    font-size: 1rem;
  }

  .blog-content h2 {
    font-size: 1.5rem;
    margin-top: 28px;
  }

  .blog-content h3 {
    font-size: 1.15rem;
    margin-top: 22px;
  }

  .blog-content ul,
  .blog-content ol {
    margin-left: 20px;
  }

  .blog-content .toc {
    padding: 15px;
    border-radius: 12px;
  }

  .blog-tool-shot img,
  .blog-featured-image {
    border-radius: 12px;
  }

  .author-bio-box {
    flex-direction: column;
    padding: 18px;
  }

  .author-bio-image {
    width: 72px;
    height: 72px;
  }

  .blog-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .logo-text {
    font-size: 1rem;
  }

  .hero {
    padding: 22px 0 20px;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .blog-list {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    gap: 12px 18px;
  }
}

@media (max-width: 480px) {
  .container,
  .blog-back {
    padding-left: 12px;
    padding-right: 12px;
  }

  .blog-post-single {
    padding: 18px 14px;
  }

  .blog-post-title {
    font-size: 1.55rem;
  }

  .blog-content h2 {
    font-size: 1.35rem;
  }

  .blog-content h3 {
    font-size: 1.08rem;
  }

  .blog-post-meta,
  .blog-content,
  .blog-content p,
  .blog-content li,
  .blog-tool-shot figcaption {
    font-size: 0.96rem;
  }
}
