/* ==========================================================================
   Neer Bappoo — Portfolio
   Design concept: a personal dev environment. The whole page reads as one
   long terminal / editor session — window chrome up top, content rendered
   as command output below (git log, cat, ls, man pages). Warm amber-phosphor
   accent on a warm near-black, evoking old CRT terminals rather than the
   generic near-black + acid-green combo.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Surfaces */
  --bg-void: #0f0d0a;
  --bg-surface: #17140f;
  --bg-surface-hover: #1f1a13;
  --bg-inset: #0b0a08;
  --border: #2a251c;
  --border-bright: #3d3524;

  /* Text */
  --fg-primary: #f2ead8;
  --fg-secondary: #b7ab95;
  --fg-muted: #786c5a;

  /* Accents */
  --accent: #ffb000;          /* phosphor amber — signature color */
  --accent-dim: #b8830a;
  --accent-teal: #6fbfae;     /* links, strings, secondary accent */
  --diff-add: #7ec699;
  --diff-remove: #e0766c;

  /* Type */
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Scale */
  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.06rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.28rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.85rem, 1.6rem + 1.2vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.9rem + 2.4vw, 3.75rem);

  --radius: 4px;
  --radius-sm: 2px;
  --maxw: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.5s;
}

/* ---- Reset ---------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-void);
  color: var(--fg-primary);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 900px 600px at 15% -10%, rgba(255,176,0,0.06), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 20%, rgba(111,191,174,0.05), transparent 60%);
  background-attachment: fixed;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-mono); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

::selection { background: var(--accent); color: var(--bg-void); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border: 2px solid var(--bg-void); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ---- Layout helpers ------------------------------------------------------*/
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-inner { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; background: var(--accent); color: var(--bg-void);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-family: var(--font-mono);
  font-size: var(--step--1); font-weight: 600; z-index: 200; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---- Section furniture ---------------------------------------------------*/
.section-head { margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-path {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.85rem;
}
.section-path::before { content: '#'; color: var(--fg-muted); }
.section-title {
  font-size: var(--step-3);
  color: var(--fg-primary);
}
.section-sub {
  margin-top: 0.6rem;
  color: var(--fg-secondary);
  font-size: var(--step-0);
  max-width: 60ch;
}

/* ---- Terminal window chrome (used for nav + code-style panels) -----------*/
.term-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.term-titlebar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--fg-muted);
}
.term-dots { display: flex; gap: 0.4rem; flex-shrink: 0; }
.term-dots span { width: 10px; height: 10px; border-radius: 50%; display: block; }
.term-dots span:nth-child(1) { background: #e0766c; }
.term-dots span:nth-child(2) { background: #ffb000; }
.term-dots span:nth-child(3) { background: #7ec699; }
.term-path { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Site header / nav ----------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem var(--gutter);
  background: rgba(15, 13, 10, 0.82);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--fg-primary);
}
.brand .dots { display: flex; gap: 0.3rem; }
.brand .dots span { width: 7px; height: 7px; border-radius: 50%; }
.brand .dots span:nth-child(1) { background: #e0766c; }
.brand .dots span:nth-child(2) { background: #ffb000; }
.brand .dots span:nth-child(3) { background: #7ec699; }
.brand-path { color: var(--fg-muted); }
.brand-path .seg-current { color: var(--accent); }

.nav-links { display: none; align-items: center; gap: 1.6rem; }
.nav-links a {
  color: var(--fg-secondary);
  position: relative;
  padding: 0.2rem 0;
  transition: color 0.2s;
}
.nav-links a::before { content: '~/'; color: var(--fg-muted); }
.nav-links a:hover, .nav-links a.is-active { color: var(--accent); }
.nav-links a.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent);
}
.nav-cta {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--bg-void);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,176,0,0.25); }

.nav-toggle {
  display: inline-flex;
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  color: var(--fg-primary);
  cursor: pointer;
}
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--bg-void);
  padding: 6rem 1.5rem 2rem;
  display: flex; flex-direction: column; gap: 1.75rem;
  font-family: var(--font-mono); font-size: var(--step-2);
  transform: translateY(-100%);
  transition: transform 0.35s var(--ease);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu a { color: var(--fg-secondary); }
.mobile-menu a::before { content: '~/'; color: var(--fg-muted); }
.mobile-menu .nav-cta { display: inline-flex; margin-top: 1rem; align-self: flex-start; }

/* ---- Hero -----------------------------------------------------------------*/
.hero {
  padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 7vw, 5rem);
}
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: start;
}
.hero-kicker {
  font-family: var(--font-mono);
  color: var(--accent-teal);
  font-size: var(--step--1);
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.hero-kicker .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--diff-add);
  box-shadow: 0 0 0 0 rgba(126,198,153,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(126,198,153,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(126,198,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(126,198,153,0); }
}
.hero-title {
  font-size: var(--step-4);
  color: var(--fg-primary);
}
.hero-title .accent { color: var(--accent); }
.hero-role {
  font-family: var(--font-mono);
  color: var(--fg-secondary);
  font-size: var(--step-1);
  margin-top: 0.9rem;
}
.hero-desc {
  margin-top: 1.25rem;
  color: var(--fg-secondary);
  max-width: 56ch;
  font-size: var(--step-0);
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 0.85rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  background: var(--bg-surface);
  color: var(--fg-primary);
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent-dim); background: var(--bg-surface-hover); }
.btn-primary { background: var(--accent); color: var(--bg-void); border-color: var(--accent); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(255,176,0,0.25); }
.btn-whatsapp { border-color: #3fae5c55; }
.btn-whatsapp:hover { border-color: #3fae5c; box-shadow: 0 8px 24px rgba(63,174,92,0.18); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---- Mini CLI (hero signature element) ------------------------------------*/
.cli {
  font-family: var(--font-mono);
  font-size: var(--step--1);
}
.cli-body {
  padding: 1.1rem 1.15rem 1.3rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cli-line { color: var(--fg-secondary); white-space: pre-wrap; word-break: break-word; }
.cli-line .prompt { color: var(--accent-teal); }
.cli-line .prompt-user { color: var(--accent); }
.cli-out { color: var(--fg-secondary); }
.cli-out .k { color: var(--accent-teal); }
.cli-hint { color: var(--fg-muted); margin-top: auto; padding-top: 0.75rem; font-size: var(--step--1); }
.cli-input-row {
  display: flex; align-items: center; gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding: 0.7rem 1.15rem;
  background: var(--bg-inset);
}
.cli-input-row .prompt { color: var(--accent); flex-shrink: 0; }
.cli-input {
  flex: 1; background: none; border: none; color: var(--fg-primary);
  font-family: var(--font-mono); font-size: var(--step--1);
  caret-color: var(--accent);
}
.cli-input:focus { outline: none; }
.cursor-blink {
  display: inline-block; width: 8px; height: 1.1em; background: var(--accent);
  animation: blink 1s steps(1) infinite; vertical-align: text-bottom; margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

/* ---- Prose block (about / cat about.md) -----------------------------------*/
.prose-term .term-body { padding: 1.4rem clamp(1.1rem, 3vw, 1.8rem); }
.prose {
  color: var(--fg-secondary);
  font-size: var(--step-0);
  max-width: 68ch;
}
.prose p + p { margin-top: 1rem; }
.prose strong { color: var(--fg-primary); font-weight: 600; }
.about-grid { display: grid; gap: 2.5rem; }
.about-facts {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  font-family: var(--font-mono); font-size: var(--step--1);
}
.fact { padding: 0.85rem 0.9rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); }
.fact .fk { color: var(--fg-muted); display: block; margin-bottom: 0.3rem; }
.fact .fv { color: var(--fg-primary); }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.3fr 0.7fr; align-items: start; }
}

/* ---- Experience: git log timeline -----------------------------------------*/
.gitlog { font-family: var(--font-mono); font-size: var(--step--1); }
.gitlog .term-body { padding: 0.4rem 0; }
.commit {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.9rem;
  padding: 1.1rem clamp(1.1rem, 3vw, 1.8rem);
  border-bottom: 1px solid var(--border);
}
.commit:last-child { border-bottom: none; }
.commit-graph { display: flex; flex-direction: column; align-items: center; }
.commit-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.commit-line { width: 1px; flex: 1; background: var(--border-bright); margin-top: 4px; }
.commit-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin-bottom: 0.4rem; }
.commit-hash { color: var(--accent-teal); }
.commit-role { color: var(--fg-primary); font-weight: 600; font-size: var(--step-0); }
.commit-meta { color: var(--fg-muted); font-size: var(--step--1); margin-bottom: 0.55rem; display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; }
.commit-body { color: var(--fg-secondary); font-family: var(--font-sans); font-size: var(--step-0); line-height: 1.65; max-width: 68ch; }
.commit-tag {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.15rem 0.45rem; border: 1px solid var(--border-bright); border-radius: 999px; color: var(--fg-muted);
}
.commit-tag.is-current { color: var(--diff-add); border-color: #7ec69955; }

/* ---- Skills: package.json style --------------------------------------------*/
.skills-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.skill-group {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.skill-group h3 {
  font-size: var(--step--1); color: var(--accent-teal); margin-bottom: 0.9rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.skill-group h3::before { content: '"'; color: var(--fg-muted); }
.skill-group h3::after { content: '":'; color: var(--fg-muted); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-primary);
  background: var(--bg-inset); border: 1px solid var(--border-bright);
  padding: 0.35rem 0.65rem; border-radius: var(--radius-sm);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
@media (min-width: 700px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Projects: repo cards ---------------------------------------------------*/
.repo-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.repo-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.8rem;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
  position: relative;
}
.repo-card:hover { transform: translateY(-3px); border-color: var(--accent-dim); background: var(--bg-surface-hover); }
.repo-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.repo-name { font-family: var(--font-mono); font-weight: 600; color: var(--fg-primary); font-size: var(--step-0); display: flex; align-items: center; gap: 0.5rem; }
.repo-name svg { width: 15px; height: 15px; color: var(--fg-muted); flex-shrink: 0; }
.repo-visibility { font-family: var(--font-mono); font-size: 0.7rem; color: var(--fg-muted); border: 1px solid var(--border-bright); border-radius: 999px; padding: 0.1rem 0.55rem; flex-shrink: 0; }
.repo-desc { color: var(--fg-secondary); font-size: var(--step--1); line-height: 1.6; flex: 1; }
.repo-meta { display: flex; align-items: center; gap: 1rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); flex-wrap: wrap; }
.lang-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 0.4rem; }
.repo-link { color: var(--accent-teal); font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; }
.repo-card:hover .repo-link { color: var(--accent); }

.repo-card.is-empty {
  border-style: dashed; align-items: flex-start; justify-content: center; min-height: 190px;
  color: var(--fg-muted); background: transparent;
}
.repo-card.is-empty:hover { transform: none; border-color: var(--border-bright); background: transparent; }
.repo-card.is-empty .comment { color: var(--fg-muted); font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.7; }
.repo-card.is-empty .comment .c { color: #55503f; }

@media (min-width: 700px) { .repo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .repo-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Testimonials -------------------------------------------------------*/
.quote-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.quote-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.quote-tag { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); margin-bottom: 0.8rem; }
.quote-tag .c { color: var(--fg-muted); }
.quote-body { color: var(--fg-primary); font-size: var(--step-0); line-height: 1.7; font-style: normal; }
.quote-body::before { content: '\201C'; color: var(--accent); font-size: 1.4em; line-height: 0; vertical-align: -0.35em; margin-right: 0.15em; }
.quote-who { margin-top: 1rem; font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-secondary); }
.quote-who .role { color: var(--fg-muted); }
@media (min-width: 700px) { .quote-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Blog preview list ---------------------------------------------------*/
.post-log { font-family: var(--font-mono); }
.post-log .term-body { padding: 0.2rem 0; }
.post-row {
  display: grid; grid-template-columns: 1fr; gap: 0.35rem;
  padding: 1.05rem clamp(1.1rem, 3vw, 1.8rem); border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.post-row:last-child { border-bottom: none; }
.post-row:hover { background: var(--bg-surface-hover); }
.post-row-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1rem; }
.post-date { color: var(--fg-muted); font-size: var(--step--1); }
.post-title { color: var(--fg-primary); font-weight: 600; font-size: var(--step-0); }
.post-row:hover .post-title { color: var(--accent); }
.post-excerpt { color: var(--fg-secondary); font-family: var(--font-sans); font-size: var(--step--1); max-width: 68ch; }
.post-tags { display: flex; gap: 0.5rem; margin-top: 0.35rem; }
.post-tag { font-size: 0.72rem; color: var(--accent-teal); }
.post-tag::before { content: '#'; }

/* ---- Contact ---------------------------------------------------------------*/
.contact-panel { text-align: left; }
.contact-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s;
}
.contact-card:hover { transform: translateY(-2px); border-color: var(--accent-dim); background: var(--bg-surface-hover); }
.contact-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-inset); border: 1px solid var(--border-bright);
  color: var(--accent);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-copy .cmd { font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent-teal); margin-bottom: 0.2rem; }
.contact-copy .val { font-family: var(--font-mono); font-size: var(--step-0); color: var(--fg-primary); font-weight: 600; }
.contact-copy .sub { font-size: var(--step--1); color: var(--fg-muted); margin-top: 0.15rem; }
@media (min-width: 700px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Footer ---------------------------------------------------------------*/
.site-footer { border-top: 1px solid var(--border); padding-block: 2.5rem; }
.footer-inner {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-muted);
}
.footer-inner a { color: var(--fg-secondary); }
.footer-inner a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 1.25rem; }

/* ---- WhatsApp floating action button --------------------------------------*/
.fab-whatsapp {
  position: fixed; right: clamp(1rem, 4vw, 2rem); bottom: clamp(1rem, 4vw, 2rem); z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; color: #06210f;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37,211,102,0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.fab-whatsapp:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 36px rgba(37,211,102,0.45); }
.fab-whatsapp svg { width: 26px; height: 26px; }

/* ---- Scroll-to-top FAB -----------------------------------------------------*/
.fab-top {
  position: fixed; right: clamp(1rem, 4vw, 2rem); bottom: calc(clamp(1rem, 4vw, 2rem) + 64px); z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg-surface); color: var(--accent);
  border: 1px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  cursor: pointer;
}
.fab-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.fab-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.fab-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .fab-top { transition: opacity 0.2s; } }

/* ---- Scroll reveal ---------------------------------------------------------*/
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---- Blog post / article typography ----------------------------------------*/
.article-header { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.breadcrumb { font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-muted); display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--accent-teal); }
.breadcrumb .sep { color: var(--fg-muted); }
.article-title { font-size: var(--step-3); color: var(--fg-primary); max-width: 24ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 1.25rem; font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-muted); }
.article-meta strong { color: var(--fg-secondary); font-weight: 500; }
.article-body { max-width: 68ch; color: var(--fg-secondary); font-size: var(--step-0); line-height: 1.75; }
.article-body h2 { font-size: var(--step-2); color: var(--fg-primary); margin-top: 2.4em; margin-bottom: 0.7em; }
.article-body h3 { font-size: var(--step-1); color: var(--fg-primary); margin-top: 1.9em; margin-bottom: 0.6em; }
.article-body p { margin-top: 1.1em; }
.article-body p:first-of-type { margin-top: 0; }
.article-body ul, .article-body ol { margin-top: 1.1em; padding-left: 1.4em; }
.article-body li { margin-top: 0.5em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body a { color: var(--accent-teal); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent); }
.article-body code { font-family: var(--font-mono); background: var(--bg-surface); border: 1px solid var(--border); padding: 0.15em 0.4em; border-radius: var(--radius-sm); font-size: 0.88em; color: var(--accent-teal); }
.article-body pre { margin-top: 1.3em; background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1em 1.3em; overflow-x: auto; }
.article-body pre code { background: none; border: none; padding: 0; color: var(--fg-secondary); }
.article-body blockquote { margin-top: 1.3em; padding-left: 1.1em; border-left: 2px solid var(--accent); color: var(--fg-primary); font-style: italic; }
.article-body strong { color: var(--fg-primary); }
.article-body hr { border: none; border-top: 1px solid var(--border); margin-block: 2.4em; }
.article-body table {
  margin-top: 1.3em;
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: var(--step--1);
}
.article-body table thead th {
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border-bright);
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.article-body table tbody th {
  text-align: left;
  padding: 0.7rem 0.85rem;
  font-weight: 500;
  color: var(--fg-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-body table td {
  padding: 0.7rem 0.85rem;
  color: var(--fg-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-body table tbody tr:last-child > * { border-bottom: none; }
.article-body table tbody tr:hover { background: var(--bg-surface-hover); }
@media (max-width: 640px) {
  .article-body table thead { display: none; }
  .article-body table, .article-body table tbody, .article-body table tr, .article-body table td, .article-body table tbody th { display: block; width: 100%; }
  .article-body table tr { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  .article-body table tr:last-child { border-bottom: none; }
  .article-body table td::before, .article-body table tbody th::before { content: attr(data-label) ": "; color: var(--fg-muted); font-family: var(--font-mono); margin-right: 0.4rem; }
}
.article-cta {
  margin-top: 3.5rem; padding: 1.6rem clamp(1.2rem, 4vw, 2rem); background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
}
.article-cta p { color: var(--fg-secondary); max-width: 40ch; }
.article-cta strong { color: var(--fg-primary); display: block; font-family: var(--font-mono); margin-bottom: 0.3rem; }

.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: var(--accent);
  z-index: 150; transition: width 0.1s linear;
}

/* ---- Blog index empty-state / notice ----------------------------------------*/
.notice {
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-muted);
  border: 1px dashed var(--border-bright); border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1.5rem;
}
.notice .c { color: #55503f; }

/* ---- 404 -------------------------------------------------------------------*/
.error-page { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.error-inner { max-width: 560px; text-align: left; }
.error-code { font-family: var(--font-mono); color: var(--diff-remove); font-size: var(--step--1); margin-bottom: 1rem; }
