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

:root {
  --navy: #0f172a;
  --navy-mid: #1e293b;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --gray-100: #f8fafc;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #64748b;
  --white: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --radius: 10px;
  --max-w: 960px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* ── NAVBAR ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 max(2rem, calc((100% - var(--max-w)) / 2));
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

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

.nav-links a {
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-mid);
  transition: color 0.15s;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width 0.2s;
}

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

.nav-links a.active::after { width: 100%; }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s, width 0.25s;
  transform-origin: center;
}

.hamburger span:nth-child(2) { width: 70%; }

nav.open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.open .hamburger span:nth-child(2) { opacity: 0; width: 0; }
nav.open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── SECTIONS ── */
section { padding: 5rem max(2rem, calc((100% - var(--max-w)) / 2)); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.5px;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── HERO ── */
#hero {
  background: var(--gray-100);
  padding: 4rem 2rem;
}

.hero-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 3.5rem 3rem;
  text-align: center;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}

.hero-card h1 {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.hero-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
  min-height: 3.4em;
}

/* Typing animation */
#typed-role {
  color: var(--blue);
  font-weight: 600;
  border-right: 2px solid var(--blue);
  padding-right: 2px;
  white-space: nowrap;
}

#typed-role.blink { animation: blink 0.7s step-end infinite; }

@keyframes blink {
  50% { border-color: transparent; }
}

.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* ── ABOUT ── */
#about { background: var(--white); }

.about-content {
  max-width: 680px;
  margin: 0 auto;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.check-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.check-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--blue);
}

/* ── SPECIALIZATIONS ── */
#specializations { background: var(--gray-100); }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.spec-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.spec-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.spec-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  color: var(--navy-mid);
}

.spec-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.spec-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── SKILLS ── */
#skills { background: var(--white); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skill-group { text-align: center; }

.skill-group-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.75rem;
  color: var(--navy-mid);
}

.skill-group h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

/* ── BLOG ── */
#blog { background: var(--gray-100); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.blog-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blog-thumb-text {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.12);
  letter-spacing: -2px;
  user-select: none;
}

.blog-thumb-icon {
  position: absolute;
  color: rgba(255,255,255,0.7);
  width: 48px;
  height: 48px;
}

.blog-body { padding: 1.25rem; }

.blog-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.blog-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.blog-tag + .blog-tag::before {
  content: ' | ';
  color: var(--gray-400);
  margin-right: 0.4rem;
}

.blog-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

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

.blog-excerpt {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.9rem;
}

.read-more {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.read-more:hover { text-decoration: underline; }

/* ── CONTACT ── */
#contact { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 780px;
  margin: 0 auto;
}

.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-mid);
  margin-bottom: 0.35rem;
}

.form-group label span { color: var(--blue); }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group textarea { height: 100px; resize: vertical; }

.form-status {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  display: none;
}

.form-status.success { color: #16a34a; display: block; }
.form-status.error   { color: #dc2626; display: block; }

.contact-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.contact-detail svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--blue);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-mid);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.social-link:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

.social-link svg { width: 16px; height: 16px; }

/* ── BLOG POST PAGE ── */
.post-header {
  background: var(--gray-100);
  padding: 3.5rem 2rem 3rem;
  border-bottom: 1px solid var(--gray-200);
}

.post-header .container { max-width: 740px; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.post-back:hover { color: var(--blue); }

.post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.75px;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.post-header .blog-tags { margin-bottom: 0.75rem; }
.post-header .blog-meta { font-size: 0.82rem; color: var(--text-muted); }

.post-content { padding: 3rem 2rem 5rem; }
.post-content .container { max-width: 740px; }

.post-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.3px;
}

.post-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2rem 0 0.6rem;
}

.post-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.25rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
  font-size: 0.85em;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  color: var(--navy-mid);
}

.post-content pre {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.875rem;
  line-height: 1.7;
}

.post-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--blue-pale);
  border-radius: 0 6px 6px 0;
}

.post-content blockquote p {
  color: var(--navy-mid);
  margin-bottom: 0;
  font-style: italic;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 2.5rem 0;
}

/* ── FOOTER ── */
footer {
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

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

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.75rem 2rem;
    font-size: 0.8rem;
  }

  .nav-links a::after { display: none; }

  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 2.5rem 1.5rem; }
  .hero-card h1 { font-size: 1.75rem; }
  .post-header h1 { font-size: 1.5rem; }
}

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

/* ── DARK MODE ── */
[data-theme="dark"] {
  --navy: #e2e8f0;
  --navy-mid: #cbd5e1;
  --blue: #60a5fa;
  --blue-light: #93c5fd;
  --blue-pale: #1e3a5f;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-400: #64748b;
  --gray-600: #94a3b8;
  --white: #0f172a;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
}

[data-theme="dark"] .post-content pre { background: #020617; }
[data-theme="dark"] .hamburger span { background: var(--navy); }

/* Ensure white text on colored backgrounds in dark mode */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .social-link:hover,
[data-theme="dark"] .tag-filter-btn:hover,
[data-theme="dark"] .tag-filter-btn.active,
[data-theme="dark"] #back-to-top { color: #ffffff; }

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy-mid);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle:hover {
  background: var(--gray-100);
  color: var(--blue);
}

.theme-toggle svg { width: 16px; height: 16px; pointer-events: none; }

.icon-moon { display: block; }
.icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: block; }

/* ── COPY BUTTON ── */
.pre-wrap { position: relative; }

.copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1.4;
}

.copy-btn:hover { background: rgba(255,255,255,0.16); color: #e2e8f0; }
.copy-btn.copied { color: #4ade80; border-color: rgba(74,222,128,0.25); }

/* ── TABLE OF CONTENTS ── */
.toc {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 2.5rem;
}

.toc-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--navy-mid);
  margin-bottom: 0.65rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc-counter;
}

.toc li {
  counter-increment: toc-counter;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.toc li::before {
  content: counter(toc-counter);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--blue);
  min-width: 1.1em;
  text-align: right;
}

.toc a {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.toc a:hover { color: var(--blue); }

/* ── RELATED POSTS ── */
.related-posts {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--gray-200);
}

.related-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--navy-mid);
  margin-bottom: 1.1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.related-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  text-decoration: none;
  display: block;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.related-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: var(--blue);
}

.related-card-tags {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.35rem;
}

.related-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 38px;
  height: 38px;
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, background 0.15s;
  z-index: 99;
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
  pointer-events: none;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover { background: #1d4ed8; }
#back-to-top svg { width: 17px; height: 17px; }

/* ── TAG FILTER ── */
.tag-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.tag-filter-btn {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.tag-filter-btn:hover,
.tag-filter-btn.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

.blog-card[data-hidden] { display: none; }

/* ── BLOG ARCHIVE PAGE ── */
.archive-hero {
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  padding: 3rem 2rem 2.5rem;
}

.archive-hero .container { max-width: 680px; }

.archive-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.archive-hero p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.archive-section { padding: 2.5rem 2rem 5rem; }
.archive-section .container { max-width: 680px; }

.archive-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--gray-200);
  text-decoration: none;
}

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

.archive-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  padding-top: 0.15rem;
  min-width: 88px;
  flex-shrink: 0;
}

.archive-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.3rem;
  line-height: 1.35;
  transition: color 0.15s;
}

.archive-item:hover .archive-body h3 { color: var(--blue); }

.archive-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

/* ── BLOG HEADER: RSS + ARCHIVE LINK ── */
.blog-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.blog-header-row .section-title { margin-bottom: 0; }

.blog-header-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-link-small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s;
}

.blog-link-small:hover { color: var(--blue); }
.blog-link-small svg { width: 13px; height: 13px; }

/* ── READING TIME IN POST HEADER ── */
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.reading-time svg { width: 13px; height: 13px; }

/* ── SEARCH ── */
.search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.search-input {
  width: 100%;
  padding: 0.6rem 0.9rem 0.6rem 2.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.search-input::placeholder { color: var(--gray-400); }

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--gray-400);
  pointer-events: none;
}

.search-count {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 1.2em;
}

.archive-item[data-hidden] { display: none; }

.no-results {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3rem 0;
  display: none;
}

.no-results.visible { display: block; }

/* Search icon in navbar (link to archive) */
.nav-search-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--navy-mid);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.nav-search-link:hover {
  background: var(--gray-100);
  color: var(--blue);
}

.nav-search-link svg { width: 16px; height: 16px; }

@media (max-width: 768px) {
  .related-grid { grid-template-columns: 1fr; }
  #back-to-top { bottom: 1.25rem; right: 1.25rem; }
  .blog-header-row { justify-content: center; }
}
