/* MegaSocial blog — light styles inspired by the marketing landing page */
:root {
  --ms-violet: #7020f0;
  --ms-magenta: #d050f0;
  --ms-brand-gradient: linear-gradient(135deg, #7020f0 0%, #d050f0 100%);
  --accent: #7020f0;
  --accent-soft: rgba(112, 32, 240, 0.08);
  --accent-border: rgba(112, 32, 240, 0.2);
  --bg: #fbf8ff;
  --bg-card: #ffffff;
  --bg-card-hover: #fdfbff;
  --text-primary: #1a1228;
  --text-secondary: #5a5268;
  --text-muted: #7a7288;
  --border-color: rgba(112, 32, 240, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(112, 32, 240, 0.08);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(112, 32, 240, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(208, 80, 240, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 60%, rgba(112, 32, 240, 0.06), transparent 45%),
    var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.ms-brand-text {
  background-image: var(--ms-brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header / nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 248, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-brand img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  padding: 8px 16px;
  font-family: inherit;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
}

.btn-primary {
  background-image: var(--ms-brand-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(112, 32, 240, 0.25);
}

.btn-primary:hover {
  opacity: 0.95;
  color: #fff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent);
  border: 1px solid rgba(112, 32, 240, 0.35);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

/* Main */
.site-main,
main {
  flex: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  width: 100%;
}

.site-main {
  max-width: 1100px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.blog-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 8px;
}

.blog-page--wide {
  max-width: 1100px;
}

.blog-back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.blog-back:hover {
  color: var(--accent);
}

.blog-page h1,
.post-header h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.blog-lead {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.blog-meta-line {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  line-height: 1.65;
  max-width: 52ch;
}

/* Post body */
.post-body {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

.post-body h2 {
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
}

.post-body h3 {
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
}

.post-body p {
  margin-bottom: 1.25rem;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1.25rem 1.5rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body strong {
  color: var(--text-primary);
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1.25rem 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.post-body th,
.post-body td {
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.post-body th {
  background: var(--accent-soft);
}

.seo-go-toc {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: rgba(112, 32, 240, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.seo-go-toc h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.seo-go-toc ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.seo-go-faq {
  margin: 2rem 0;
}

.seo-go-faq h3 {
  margin-top: 1.25rem;
}

/* Layout hero (publish default) */
.layout-hero {
  max-width: 920px;
}

.layout-hero .post-header {
  text-align: center;
  margin-bottom: 2rem;
}

.layout-hero .post-header h1 {
  font-size: 2.2rem;
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
}

.layout-hero .blog-meta-line {
  text-align: center;
}

.layout-hero .post-lead {
  margin-left: auto;
  margin-right: auto;
  max-width: 42ch;
}

.layout-hero .post-body--hero,
.layout-hero .post-body--after-hero {
  max-width: 680px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .layout-hero .post-header h1 {
    font-size: 1.75rem;
    max-width: none;
  }
}

/* Blog list */
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
  align-items: center;
}

.subject-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.subject-filters-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.subject-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  transition: all var(--transition);
}

.subject-chip.active,
.subject-chip:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}

.blog-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.blog-card .blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.blog-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 100px;
}

.blog-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.blog-card h2,
.blog-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.blog-card h2 a:hover,
.blog-card h3 a:hover {
  color: var(--accent);
}

.blog-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.blog-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

.blog-card.is-hidden {
  display: none !important;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: linear-gradient(180deg, transparent, rgba(112, 32, 240, 0.05));
  padding: 28px 0;
  margin-top: auto;
}

.site-footer p {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 20px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-inner {
    position: relative;
  }
}
