/* MaiTech blog pages — shared layout (uses maitech-tokens.css) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--canvas);
  color: var(--ink);
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* Nav (matches homepage) */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .4s var(--ease-out), box-shadow .4s;
}
.nav-wrap.scrolled {
  background: rgba(245,244,240,.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.logo {
  font-family: var(--f-display);
  font-weight: 800; font-size: 1.5rem;
  letter-spacing: -.02em;
  color: var(--ink);
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex; gap: 36px; list-style: none; align-items: center;
}
.nav-links a {
  font-size: .85rem; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: var(--white) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600 !important;
  font-size: .82rem !important;
  transition: background .2s, transform .15s !important;
}
.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
}
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: var(--canvas); flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--f-display);
  font-size: 2rem; font-weight: 700; color: var(--ink);
}
.mobile-menu a:hover { color: var(--accent); }

/* Page layout */
.blog-page { padding-top: 72px; }
.blog-wrap {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* Hero */
.blog-post-hero {
  padding: 120px 0 64px;
  color: var(--white);
}
.blog-post-hero--app {
  background: linear-gradient(120deg, #03a4ed 0%, #0173a7 55%, var(--accent) 100%);
}
.blog-post-hero--stack {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.blog-post-hero--parts {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.blog-post-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}
.blog-post-hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.blog-post-hero--app h1 em { color: #ffd4cc; }
.blog-post-hero--stack h1 em,
.blog-post-hero--parts h1 em { color: #ff9a7a; }
.blog-post-hero .meta {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  display: flex; flex-wrap: wrap; gap: 12px 20px;
}
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: rgba(255,255,255,.9);
  font-size: .9rem;
  font-weight: 600;
  transition: color .2s;
}
.back-link:hover { color: var(--white); }

/* Article */
.blog-content-section {
  padding: 64px 0 80px;
  background: var(--canvas);
}
.content-wrapper {
  background: var(--white);
  border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1.5px solid var(--mid);
  box-shadow: 0 16px 48px rgba(0,0,0,.06);
}
.content-wrapper p {
  color: var(--ink-soft);
  line-height: 1.85;
  margin-bottom: 18px;
}
.content-wrapper h2 {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin: 36px 0 14px;
}
.content-wrapper h2 span { color: var(--accent); }
.content-wrapper ul {
  padding-left: 1.25rem;
  margin-bottom: 22px;
}
.content-wrapper li {
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 8px;
}
.content-wrapper li::marker { color: var(--accent); }
.content-wrapper a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,76,41,.3);
  transition: border-color .2s;
}
.content-wrapper a:hover { border-color: var(--accent); }

.note-box {
  border-left: 4px solid var(--accent2);
  background: rgba(26,111,255,.06);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 24px 0;
}
.note-box p { margin: 0; color: var(--ink); font-weight: 500; }

.parts-highlight {
  border-left: 4px solid var(--accent);
  background: rgba(255,76,41,.06);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 24px 0;
}
.parts-highlight p { margin: 0; color: var(--ink); font-weight: 500; }

.post-featured-image {
  margin: 28px 0 34px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--mid);
  box-shadow: 0 14px 32px rgba(0,0,0,.08);
}
.post-featured-image img { width: 100%; height: auto; }

/* CTA */
.blog-cta {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding: 64px 0;
}
.blog-cta h3 {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.blog-cta p {
  color: rgba(255,255,255,.55);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s, transform .15s;
}
.btn-primary:hover {
  background: #e03a1a;
  transform: translateY(-1px);
}

/* Footer */
.blog-footer {
  background: var(--ink);
  padding: 32px 48px;
  text-align: center;
}
.blog-footer p {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-wrap { padding: 16px 24px; }
}
