/* Yuzhao (David) Zhang — Executive personal site. Clean, minimal, white/dark. */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #4a4a4a;
  --accent: #1a1a1a;
  --border: #e5e5e5;
  --transition: 0.2s ease;
  /* Sticky header row (nav padding + type + border). Tune if .nav / .site-header changes. */
  --site-header-height: 3.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.nav-links a:hover {
  color: var(--text);
}

.nav-links a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

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

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child {
    border-bottom: none;
  }
}

/* Newsletter: hover dropdown (desktop); tap to expand on small screens */
.nav-item-dropdown {
  position: relative;
}

/* Desktop: extend the <li> hit area below the trigger so the pointer can reach the
   absolutely positioned panel without leaving :hover (gap used to kill the menu). */
@media (min-width: 769px) {
  .nav-item-dropdown {
    padding-bottom: 0.65rem;
  }
}

#newsletter-nav {
  scroll-margin-top: calc(var(--site-header-height) + 0.5rem);
}

.nav-dropdown-trigger {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition);
}

.nav-dropdown-trigger:hover,
.nav-item-dropdown:hover .nav-dropdown-trigger {
  color: var(--text);
}

.nav-dropdown-trigger::after {
  content: '';
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  display: inline-block;
  padding: 2.5px;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: 0.65;
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 110;
  margin-top: 0;
  padding: 1rem;
  min-width: min(300px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(26, 26, 26, 0.12);
}

/* Invisible hit bridge: keeps hover on the <li> while moving from trigger into the panel */
@media (min-width: 769px) {
  .nav-dropdown-panel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 0.75rem;
  }
}

.nav-newsletter-form.newsletter-form {
  flex-direction: column;
  max-width: none;
  gap: 0.6rem;
  margin: 0;
}

.nav-newsletter-form .newsletter-input {
  width: 100%;
  min-width: 0;
}

.nav-newsletter-form .newsletter-submit {
  width: 100%;
}

@media (min-width: 769px) {
  .nav-dropdown-panel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
  }

  .nav-item-dropdown:hover .nav-dropdown-panel,
  .nav-item-dropdown:focus-within .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 768px) {
  .nav-dropdown-panel::before {
    display: none;
  }

  .nav-dropdown-panel {
    position: static;
    margin-top: 0.75rem;
    padding: 0;
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-item-dropdown.is-open .nav-dropdown-panel {
    display: block;
  }

  .nav-newsletter-form.newsletter-form {
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--border);
  }
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--text);
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 2.5rem;
  max-width: 560px;
}

/* Hero */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 5rem 1.5rem 4rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

.hero-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.hero-subheadline {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.hero-location {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--text);
  color: var(--surface);
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--text);
}

/* LinkedIn (social follow CTA) */
.btn-linkedin {
  background: #0a66c2;
  color: #ffffff;
  border: 2px solid #0a66c2;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease;
}

.btn-linkedin:hover {
  background: #004182;
  border-color: #004182;
  color: #ffffff;
}

/* About */
.about-content p {
  margin: 0 0 1.25rem;
  color: var(--text);
  max-width: 680px;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Home intro (blog & newsletter) */
.section.intro .section-title {
  margin-bottom: 0.75rem;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.65;
  margin: 0 0 1.25rem;
  max-width: 640px;
}

.intro-links {
  margin: 0;
  font-size: 0.95rem;
}

.intro-links a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.intro-links a:hover {
  text-decoration: underline;
}

.intro-links-sep {
  color: var(--text-muted);
  margin: 0 0.35rem;
  user-select: none;
}

/* About page: title section with photo */
.page-hero .section-title {
  font-size: 1.75rem;
}

.page-hero .section-intro {
  margin-bottom: 0;
}

.page-hero-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.page-hero-content {
  flex: 1;
  min-width: 0;
}

.page-hero-photo {
  flex-shrink: 0;
}

.page-hero-photo img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

@media (max-width: 600px) {
  .page-hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .page-hero-photo img {
    width: 180px;
    height: 180px;
  }
}

/* Impact grid */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.impact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.impact-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.impact-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.impact-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Experience */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.exp-item {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.exp-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.exp-header {
  margin-bottom: 0.75rem;
}

.exp-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: var(--text);
}

.exp-company {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.exp-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

.exp-summary {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.exp-multi-role .exp-roles {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.exp-role h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.exp-role p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.exp-earlier .exp-bullets {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.exp-bullets li {
  margin-bottom: 0.35rem;
}

/* Competencies */
.competencies-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.comp-column h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.comp-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comp-column li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .competencies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Approach */
.approach-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.approach-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.approach-item:last-child {
  border-bottom: none;
}

.approach-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.approach-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Education */
.education-content {
  max-width: 560px;
}

.edu-main h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.edu-degree {
  font-size: 1rem;
  margin: 0;
  color: var(--text);
}

.edu-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

.edu-details {
  margin-top: 1rem;
}

.edu-details p {
  margin: 0.2rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.edu-positioning {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Newsletter */
.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 420px;
}

.newsletter-input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.newsletter-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.newsletter-input:hover {
  border-color: #ccc;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.newsletter-submit {
  flex-shrink: 0;
}

.newsletter-message {
  width: 100%;
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.newsletter-message.success {
  color: #0d9488;
}

.newsletter-message.error {
  color: #dc2626;
}

.newsletter-form.loading .newsletter-submit {
  opacity: 0.7;
  pointer-events: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* CTA */
.cta {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.cta-headline {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--text);
}

.cta-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 1.5rem;
  max-width: 560px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cta-email {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* Blog index — match article column width (920px) */
.blog-page main .container {
  max-width: 920px;
  width: 100%;
  box-sizing: border-box;
}

.blog-page .section-intro {
  max-width: none;
}

.blog-page .blog-toolbar {
  max-width: none;
}

.blog-index-header {
  padding-bottom: 1rem;
}

.blog-index-header .section-title {
  font-size: 1.75rem;
}

.blog-toolbar {
  margin-top: 1.5rem;
  max-width: 520px;
}

.blog-search-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-search-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.blog-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.blog-search-input:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.blog-search-clear {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.blog-search-clear:hover {
  color: var(--text);
  border-color: var(--text);
}

.blog-search-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.blog-results-count:empty {
  display: none;
}

.blog-list-section {
  padding-top: 0;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.blog-card--with-media {
  padding: 0;
  overflow: hidden;
}

.blog-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 920 / 360;
  max-height: 220px;
  background: var(--bg);
  overflow: hidden;
  line-height: 0;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-card--with-media .blog-card-inner {
  padding: 1.5rem;
}

.blog-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

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

.blog-meta {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.blog-card-title a {
  color: var(--text);
  text-decoration: none;
}

.blog-card-title a:hover {
  text-decoration: underline;
}

.blog-card-excerpt {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-tags li {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.blog-no-results {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.blog-link-button {
  display: inline;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.blog-link-button:hover {
  color: var(--text-muted);
}

/* Blog post (article pages) — full-width column aligned with site container */
.blog-post .container {
  max-width: 920px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.blog-post-hero {
  padding-bottom: 0.5rem;
}

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

.blog-post-breadcrumb a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.blog-post-breadcrumb a:hover {
  text-decoration: underline;
}

.blog-post-breadcrumb span {
  margin: 0 0.35rem;
  color: var(--text-muted);
}

.blog-post-meta {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.blog-post-title {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--text);
  max-width: none;
}

.blog-post-dek {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: none;
}

.blog-post-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.35rem 0 0;
  padding: 0;
}

.blog-post-author-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(26, 26, 26, 0.08);
}

.blog-post-author-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.blog-post-author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.blog-post-author-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.blog-post-cover {
  margin: 1.5rem 0 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(26, 26, 26, 0.08);
  background: var(--bg);
}

.blog-post-cover img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.blog-post-section {
  padding-top: 0;
}

.blog-post-body > *:first-child {
  margin-top: 0;
}

.blog-post-intro {
  margin: 0 0 1.75rem;
}

.blog-post-intro p {
  margin: 0 0 1.1rem;
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--text);
}

.blog-post-intro p:last-child {
  margin-bottom: 0;
}

.blog-intro-visual-figure {
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.blog-intro-visual-canvas-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #f4f7fb 0%, #e8eef6 100%);
  box-shadow: 0 2px 12px rgba(26, 26, 26, 0.06);
}

.blog-intro-visual-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.blog-intro-visual-caption {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.blog-intro-visual-figure--static img {
  display: block;
  width: 100%;
  max-width: 44rem;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .blog-intro-visual-figure {
    margin: 1.5rem 0 1.75rem;
  }

  .blog-intro-visual-caption {
    font-size: 0.92rem;
  }
}

.blog-post-lead {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 1.75rem;
}

.blog-post-body h2 {
  margin: 2.25rem 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
}

.blog-post-body h2:first-of-type {
  margin-top: 1.75rem;
}

.blog-post-body h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

.blog-post-body p {
  margin: 0 0 1.15rem;
  color: var(--text);
  line-height: 1.7;
}

.blog-post-body abbr {
  text-decoration: underline dotted;
  cursor: help;
}

/* Blog: dimensional / math formulas */
.blog-post-body .blog-formula {
  margin: 1.35rem auto 1.65rem;
  padding: 1.35rem 1.4rem;
  max-width: 44rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  text-align: center;
}

.blog-post-body .blog-formula-title {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.blog-post-body .blog-formula-math {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.08rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.blog-post-body .blog-formula-math + .blog-formula-math {
  margin-top: 0.75rem;
}

.blog-post-body .blog-formula-note {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
}

.blog-post-body .blog-formula--example {
  border: 1px solid var(--border);
  border-top: 4px solid rgba(13, 71, 161, 0.45);
}
.blog-post-body .blog-formula-figure {
  margin: 0 0 1.25rem;
  padding: 0;
  text-align: center;
}
.blog-post-body .blog-formula-figure img {
  display: block;
  width: 100%;
  max-width: 42rem;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--surface);
}
.blog-post-body .blog-formula-steps {
  margin-top: 0.25rem;
}
@media (min-width: 768px) {
  .blog-post-body .blog-formula-figure {
    margin-bottom: 1.45rem;
  }
  .blog-post-body .blog-formula-figure img {
    max-width: 44rem;
  }
}

.blog-post-close {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.blog-post-byline {
  margin: 1.25rem 0 0;
  font-size: 0.98rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .blog-post-intro p,
  .blog-post-lead {
    font-size: 1.15rem;
  }

  .blog-post-body h2 {
    font-size: 1.45rem;
  }

  .blog-post-body h3 {
    font-size: 1.12rem;
  }

  .blog-post-body .blog-formula {
    padding: 1.55rem 1.85rem;
    margin: 1.5rem auto 1.75rem;
  }

  .blog-post-body .blog-formula-title {
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
  }

  .blog-post-body .blog-formula-math {
    font-size: 1.22rem;
    line-height: 1.5;
  }

  .blog-post-body .blog-formula-math + .blog-formula-math {
    margin-top: 0.85rem;
  }

  .blog-post-body .blog-formula-note {
    font-size: 1.02rem;
    line-height: 1.6;
  }
}

/* Recruiter gate (About page) */
.recruiter-boundary {
  padding: 0;
}

.recruiter-gate-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 0;
}

.recruiter-gate-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.recruiter-gate-intro {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 560px;
}

.recruiter-gate-form {
  max-width: 420px;
}

.recruiter-gate-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.recruiter-gate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.recruiter-gate-input {
  flex: 1;
  min-width: 180px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.recruiter-gate-input:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.recruiter-gate-submit {
  flex-shrink: 0;
}

.recruiter-gate-error {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #dc2626;
}

.recruiter-boundary .recruiter-gate-panel.is-dismissed {
  display: none;
}

.recruiter-protected[hidden] {
  display: none !important;
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  margin: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.site-footer a:hover {
  text-decoration: underline;
}

/* Subtle scroll-in (optional, minimal motion) */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
