/* ═══════════════════════════════════════════════════════════════════════
   PORTFOLIO · SYSTEM STYLESHEET

   Three-layer token system (primitives → semantic → component) + SOLID.
   Each component section maps its HTML hook and the JS that runs it —
   a component lives in exactly one section; theme switching lives only
   in the SEMANTIC-SCHEME blocks.

   COMPONENT MAP (html · css · js)
   ───────────────────────────────────────────────────────────────────
   Top bar + nav   · header.top-bar            · loader.js (boot)
   Hero + typing   · section#inicio/.hero      · app.js (typing, lightbox,
   Certs + preview · section#certifications    · app.js (media, lightbox)
   Posts           · section#posts             · app.js (media states)
   Chatbot         · #chatbot-toggle/panel/log · chatbot.js
   i18n            · [data-i18n] anywhere      · i18n.js
   Skeletons boot  · [data-boot][data-boot-hide] · loader.js
   Media states    · .media-loading/.media-error · app.js
   Scroll reveal   · .reveal → .visible        · app.js
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   PRIMITIVES · raw values, theme-independent
   ═══════════════════════════════════════════ */
:root {
  /* Fonts */
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

  /* Fixed identity colors (macOS terminal traffic lights, paper) */
  --traffic-red: #ff5f56;
  --traffic-yellow: #ffbd2e;
  --traffic-green: #27c93f;
  --white: #ffffff;

  /* Theme-independent translucent fills */
  --scanline: rgba(0, 0, 0, 0.03);
  --glare-white: rgba(255, 255, 255, 0.07);

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Radius */
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 50%;

  /* Motion */
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.45s;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════════════════════════════════════════
   SEMANTIC · purpose aliases — THE ONLY PLACE
   THE THEME (dark/light) IS DEFINED
   ═══════════════════════════════════════════ */
:root {
  /* Surfaces */
  --color-bg: #0c0c0c;
  --color-surface: #111111;
  --color-surface-2: #1a1a1a;
  --color-border: #2a2a2a;
  --color-text: #e0e0e0;
  --color-muted: #8a8a8a;

  /* Accent */
  --color-accent: #00ff41;
  --color-accent-dim: #00cc33;
  --color-accent-hover: #33ff66;
  --color-glow: rgba(0, 255, 65, 0.15);

  /* System roles */
  --color-danger: #ff3333;
  --color-warning: #ffcc00;
  --color-info: #00d4ff;

  /* Terminal identity (fixed dots, theme-independent) */
  --color-dot-red: var(--traffic-red);
  --color-dot-yellow: var(--traffic-yellow);
  --color-dot-green: var(--traffic-green);

  /* Chips */
  --color-chip-bg: rgba(0, 255, 65, 0.06);
  --color-chip-border: rgba(0, 255, 65, 0.12);
  --color-chip-border-strong: rgba(0, 255, 65, 0.25);

  /* Surfaces for media / overlays */
  --color-paper: var(--white);
  --color-overlay: rgba(8, 10, 13, 0.85);
  --color-scrim: rgba(0, 0, 0, 0.55);

  /* Shimmer / glare fills */
  --color-skel-shimmer: rgba(0, 255, 65, 0.1);
  --color-post-glare: rgba(0, 255, 65, 0.06);
  --color-scan-a: rgba(0, 255, 65, 0.14);
  --color-scan-b: rgba(0, 212, 255, 0.14);

  /* Shadows (purpose-based; consume --color-glow) */
  --shadow-focus: 0 0 8px var(--color-glow);
  --shadow-hover: 0 0 14px var(--color-glow);
  --shadow-strong: 0 0 22px var(--color-glow);
  --shadow-panel: 0 0 24px var(--color-glow);
  --shadow-toggle: 0 0 0 1px var(--color-glow), 0 0 18px var(--color-glow);
  --shadow-pop: 0 0 26px var(--color-glow), 0 14px 46px var(--color-scrim);
  --shadow-image: 0 10px 40px var(--color-scrim);

  color-scheme: dark;
}

/* Light scheme: the terminal identity stays, only semantics swap. */
@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f4f1ea;
    --color-surface: #ffffff;
    --color-surface-2: #ebe8df;
    --color-border: #d8d3c8;
    --color-text: #1a1a1a;
    --color-muted: #6b675e;

    --color-accent: #008c31;
    --color-accent-dim: #007028;
    --color-accent-hover: #00591f;
    --color-glow: rgba(0, 140, 49, 0.15);

    --color-danger: #c2180c;
    --color-warning: #946600;
    --color-info: #00718f;

    --color-dot-red: var(--traffic-red);
    --color-dot-yellow: var(--traffic-yellow);
    --color-dot-green: var(--traffic-green);

    --color-chip-bg: rgba(0, 140, 49, 0.08);
    --color-chip-border: rgba(0, 140, 49, 0.18);
    --color-chip-border-strong: rgba(0, 140, 49, 0.3);

    --color-paper: var(--white);
    --color-overlay: rgba(8, 10, 13, 0.85);
    --color-scrim: rgba(0, 0, 0, 0.55);

    --color-skel-shimmer: rgba(0, 140, 49, 0.1);
    --color-post-glare: rgba(0, 140, 49, 0.06);
    --color-scan-a: rgba(0, 140, 49, 0.14);
    --color-scan-b: rgba(0, 113, 143, 0.14);

    --shadow-focus: 0 0 8px var(--color-glow);
    --shadow-hover: 0 0 14px var(--color-glow);
    --shadow-strong: 0 0 22px var(--color-glow);
    --shadow-panel: 0 0 24px var(--color-glow);
    --shadow-toggle: 0 0 0 1px var(--color-glow), 0 0 18px var(--color-glow);
    --shadow-pop: 0 0 26px var(--color-glow), 0 14px 46px var(--color-scrim);
    --shadow-image: 0 10px 40px var(--color-scrim);

    color-scheme: light;
  }
}

/* ═══════════════════════════════════════════
   COMPONENT TOKENS · shared contracts consumed
   by the sections below (btn, card, chip, skel)
   ═══════════════════════════════════════════ */
:root {
  /* BUTTON */
  --btn-padding: 10px 20px;
  --btn-font-size: 0.8rem;
  --btn-radius: var(--radius-xs);
  --btn-border: 1px solid var(--color-border);
  --btn-fg: var(--color-text);
  --btn-gap: 8px;
  --btn-icon-size: 14px;
  --btn-fill-bg: var(--color-accent);
  --btn-fill-fg: var(--color-bg);

  /* CARD (skill-item, social-item) */
  --card-bg: var(--color-surface);
  --card-border: 1px solid var(--color-border);
  --card-padding: 12px 16px;
  --card-radius: var(--radius-sm);
  --card-hover-border: var(--color-accent);
  --card-hover-shadow: var(--shadow-focus);

  /* CHIP (tech-tag, chatbot-chip) */
  --chip-bg: var(--color-chip-bg);
  --chip-border: 1px solid var(--color-chip-border);
  --chip-border-strong: 1px solid var(--color-chip-border-strong);
  --chip-fg: var(--color-accent);
  --chip-font-size: 0.7rem;
  --chip-padding: 2px 8px;
  --chip-padding-lg: 3px 8px;
  --chip-radius: var(--radius-xs);
  --chip-gap: 6px;

  /* SKELETON */
  --skel-base: var(--color-surface-2);
  --skel-shimmer: var(--color-skel-shimmer);
  --skel-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

a:hover {
  color: var(--color-accent-hover);
  text-shadow: 0 0 8px var(--color-glow);
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: 2px;
}

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

  .cursor-blink {
    display: none;
  }
}

/* CRT scanline overlay: fixed, purely decorative */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    var(--scanline) 0px,
    var(--scanline) 1px,
    transparent 1px,
    transparent 2px
  );
}

/* ═══════════════════════════════════════════
   LAYOUT · terminal window
   html: index.html · .terminal-window (wraps all)
   ═══════════════════════════════════════════ */
.terminal-window {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-6);
}

/* ═══════════════════════════════════════════
   TOP BAR · window chrome + nav
   html: index.html · header.top-bar, nav.top-bar-right
   js:   assets/js/loader.js (boot reveal)
   ═══════════════════════════════════════════ */
.top-bar {
  position: relative;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.dot-red {
  background: var(--color-dot-red);
}

.dot-yellow {
  background: var(--color-dot-yellow);
}

.dot-green {
  background: var(--color-dot-green);
}

.top-bar-title {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.top-bar-right {
  display: flex;
  gap: var(--space-4);
}

.top-bar-right a {
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 400;
  transition: color var(--duration-fast) ease;
}

.top-bar-right a:hover {
  color: var(--color-accent);
}

/* ═══════════════════════════════════════════
   PROMPT · terminal-read colors (hero + comments)
   html: index.html · .prompt-*, .cmd, .comment, .flag
   ═══════════════════════════════════════════ */
.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--color-accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.prompt-user {
  color: var(--color-info);
}

.prompt-path {
  color: var(--color-warning);
}

.prompt-symbol {
  color: var(--color-muted);
}

.cmd {
  color: var(--color-text);
}

.comment {
  color: var(--color-muted);
}

.flag {
  color: var(--color-info);
}

/* ═══════════════════════════════════════════
   BUTTONS
   html: index.html · .btn, .btn-primary (+ .icon)
   js:   — (pure CSS)
   Variants open via modifier classes; base stays closed (O).
   ═══════════════════════════════════════════ */
.btn {
  font-family: var(--font-mono);
  font-size: var(--btn-font-size);
  padding: var(--btn-padding);
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  border: var(--btn-border);
  display: inline-flex;
  align-items: center;
  gap: var(--btn-gap);
  background: transparent;
  color: var(--btn-fg);
}

/* Sprite icon inside hero buttons (social icons size themselves) */
.icon {
  width: var(--btn-icon-size);
  height: var(--btn-icon-size);
  display: inline-block;
  flex-shrink: 0;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.btn:hover .icon {
  transform: translateY(-1px) scale(1.12);
  filter: drop-shadow(0 0 4px var(--color-glow));
}

.btn-primary:hover .icon {
  filter: drop-shadow(0 0 5px var(--color-bg));
}

/* Fill hover: shared fill contract (--btn-fill-*) */
.btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-focus);
}

.btn-primary {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--btn-fill-bg);
  color: var(--btn-fill-fg);
}

/* ═══════════════════════════════════════════
   HERO · intro + avatar
   html: index.html · section.hero, #typing, figure.hero-avatar-wrap
   js:   assets/js/app.js (typing, media states, lightbox)
   Concerns split: layout / theme / motion / media state (S).
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  padding: var(--space-12) 0 64px;
}

.hero-line {
  margin-bottom: 6px;
  min-height: 1.7em;
}

.hero-name {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  margin: var(--space-3) 0 8px;
}

.hero-role {
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 4px;
}

.hero-tagline {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: var(--space-4) 0 var(--space-8);
  min-height: 1.5em;
}

.typing-text {
  color: var(--color-text);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

/* Layout: two-column flex */
.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.hero-main {
  min-width: 0;
}

/* Avatar container: frame, pulse, hover scan */
.hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  overflow: hidden;
  animation: avatar-pulse 4s ease-in-out infinite;
  transition: transform 0.2s ease;
}

/* Scanning sheen over the photo */
.hero-avatar-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--color-scan-a) 45%,
    var(--color-scan-b) 55%,
    transparent 100%
  );
  transform: translateY(-100%);
  pointer-events: none;
}

.hero-avatar-wrap:hover {
  border-color: var(--color-info);
  transform: scale(1.05);
}

.hero-avatar-wrap:hover::after {
  animation: avatar-scan 0.4s linear infinite;
}

.hero-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  transition:
    filter var(--duration-fast) ease,
    transform var(--duration-fast) ease,
    opacity 0.25s ease;
}

.hero-avatar-full {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  opacity: 0;
}

/* Hover: full artwork replaces the cropped base */
.hero-avatar-wrap:hover .hero-avatar-base {
  opacity: 0;
}

.hero-avatar-wrap:hover .hero-avatar-full {
  opacity: 1;
}

.hero-avatar-wrap:hover .hero-avatar {
  filter: drop-shadow(1.5px 0 0 var(--color-info)) drop-shadow(-1.5px 0 0 var(--color-danger));
  transform: translate(0.5px, -0.5px);
}

@keyframes avatar-pulse {
  0%,
  100% {
    box-shadow: 0 0 10px var(--color-glow);
  }

  50% {
    box-shadow: var(--shadow-strong);
  }
}

@keyframes avatar-scan {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(100%);
  }
}

/* ═══════════════════════════════════════════
   SECTIONS · shared section header
   html: index.html · section.section > .section-header
   ═══════════════════════════════════════════ */
.section {
  position: relative;
  padding: var(--space-12) 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.section-label {
  color: var(--color-muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.section-label::before {
  content: "# ";
  color: var(--color-muted);
}

/* ═══════════════════════════════════════════
   CARD · shared box contract (skills + socials)
   Contracts: .skill-item and .social-item are interchangeable card
   variants — never break the card contract in one of them (L).
   ═══════════════════════════════════════════ */
.skill-item,
.social-item {
  display: flex;
  padding: var(--card-padding);
  border: var(--card-border);
  border-radius: var(--card-radius);
  transition:
    border-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

.skill-item:hover,
.social-item:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}

/* ───────────────────────────────────────────
   SKILLS (grid of cards)
   html: index.html · ul.skills-list > li.skill-item > h3 + p
   ═────────────────────────────────────────── */
.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-2);
  list-style: none;
}

.skill-item {
  flex-direction: column;
  gap: var(--space-1);
}

.skill-name {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.skill-desc {
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════
   TIMELINE · experience
   html: index.html · ol.timeline > li > h3 + p + ul.tech
   ═══════════════════════════════════════════ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-item {
  padding: var(--space-4) 20px;
  border-left: 2px solid var(--color-border);
  transition: border-color var(--duration-fast) ease;
}

.timeline-item:hover {
  border-left-color: var(--color-accent);
}

.timeline-role {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.timeline-meta {
  color: var(--color-muted);
  font-size: 0.75rem;
  margin-bottom: var(--space-2);
}

.timeline-desc {
  color: var(--color-text);
  font-size: 0.8rem;
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--chip-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tech-tag {
  font-size: var(--chip-font-size);
  color: var(--chip-fg);
  background: var(--chip-bg);
  border: var(--chip-border);
  padding: var(--chip-padding);
  border-radius: var(--chip-radius);
}

/* ═══════════════════════════════════════════
   CERTIFICATIONS · collapsible grid + hover preview
   html: index.html · details.certs-details > .certs-grid
   js:   assets/js/app.js (lightbox, media states)
   Closed interface: a new cert = HTML only (O) — stagger via
   inline --stagger, never nth-child rules.
   ═══════════════════════════════════════════ */
.certs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0 var(--space-1);
}

.cert-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  transition:
    transform var(--duration-normal) ease,
    border-color var(--duration-normal) ease,
    box-shadow var(--duration-normal) ease;
  transition-delay: var(--stagger, 0s);
  text-align: left;
  width: 100%;
}

.cert-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-hover);
}

/* Collapsible <details>: hidden by default, grid fades in on open */
.certs-details summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  margin-bottom: 20px;
}

.certs-details summary::-webkit-details-marker {
  display: none;
}

.certs-details summary::after {
  content: " ▸";
  opacity: 0.7;
}

.certs-details[open] summary::after {
  content: " ▾";
}

.certs-details[open] .certs-grid {
  animation: certsFadeIn 0.25s ease;
}

@keyframes certsFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover preview: fixed, centred on screen, "photo size" */
.cert-preview {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: min(560px, 90vw);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.cert-item:hover .cert-preview {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cert-preview-img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
}

.cert-preview-name {
  color: var(--color-accent);
  font-size: 0.78rem;
  text-align: center;
}

.cert-item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.cert-item img {
  width: 76px;
  height: 100px;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  transition:
    transform var(--duration-normal) ease,
    filter var(--duration-normal) ease,
    opacity var(--duration-normal) ease,
    box-shadow var(--duration-normal) ease;
}

/* Grid hover: dim/blur neighbours, keep hovered sharp + grown */
.certs-grid:hover .cert-item img {
  filter: blur(1.5px);
  opacity: 0.75;
}

.certs-grid:hover .cert-item:hover img {
  filter: blur(0);
  opacity: 1;
  transform: scale(1.18);
  z-index: 40;
  box-shadow: var(--shadow-focus);
}

.cert-name {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.cert-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.cert-desc {
  color: var(--color-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}


/* ═══════════════════════════════════════════
   POSTS · photo grid
   html: index.html · figure.post-item > .post-frame > img
   js:   assets/js/app.js (media states)
   Variants --left/--right/--up only change the entry direction;
   every variant still reveals via .reveal.visible (L).
   ═══════════════════════════════════════════ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.post-item {
  margin: 0;
}

.post-item--left,
.post-item--right,
.post-item--up {
  opacity: 0;
  transition:
    transform var(--duration-slow) var(--ease-out),
    opacity 0.45s ease,
    filter var(--duration-normal) ease;
  transition-delay: var(--stagger, 0s);
}

.post-item--left {
  transform: translateX(-36px);
}

.post-item--right {
  transform: translateX(36px);
}

.post-item--up {
  transform: translateY(34px);
}

.post-item.visible {
  transform: none;
  opacity: 1;
}

.post-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  transition:
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    filter var(--duration-normal) ease;
}

/* Soft glare sweep — pauses only under reduced-motion */
.post-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    var(--glare-white) 45%,
    var(--color-post-glare) 52%,
    transparent 64%
  );
  transform: translateX(-130%);
  animation: post-glare 7s ease-in-out infinite;
}

.post-frame:hover::after {
  animation-duration: 2.5s;
}

@keyframes post-glare {
  0%,
  58% {
    transform: translateX(-130%);
  }
  78%,
  100% {
    transform: translateX(130%);
  }
}

/* Grid hover "focus": neighbours blur, hovered snaps sharp */
.posts-grid:hover .post-img {
  filter: blur(4px);
}

.posts-grid:hover .post-item:hover .post-img {
  filter: blur(0);
  transform: scale(1.035);
}

.post-item:hover .post-frame {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-strong);
  animation: avatar-pulse 2.2s ease-in-out infinite;
}

.post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    filter var(--duration-normal) ease,
    transform var(--duration-normal) ease;
  will-change: filter;
}

/* Object positioning: center for landscape, top for portraits */
.post-img-center {
  object-position: center;
}

.post-img-top {
  object-position: center top;
}

.post-caption {
  margin-top: var(--space-2);
  color: var(--color-muted);
  font-size: 0.72rem;
}

.post-caption::before {
  content: "# ";
  color: var(--color-muted);
}

/* ═══════════════════════════════════════════
   CONTACT · social cards
   html: index.html · #contact > .socials > a.social-item
   ═══════════════════════════════════════════ */
.socials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-2);
}

.social-item {
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-size: 0.8rem;
}

.social-item:hover {
  color: var(--color-accent);
}

.social-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-muted);
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    filter 0.18s ease;
}

.social-item:hover svg {
  color: var(--color-accent);
  transform: scale(1.18) translateY(-1px);
  filter: drop-shadow(0 0 5px var(--color-glow));
}

.social-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.social-label {
  color: var(--color-muted);
  font-size: 0.7rem;
}

.social-handle {
  color: var(--color-text);
  font-weight: 500;
}

.social-item:hover .social-handle {
  color: var(--color-accent);
}

/* ════════════════════════════════════════════
   HIRE ME · employer lead capture form
   html: index.html · #hire-me > .hire-form
   js:   — (form posts to Formspree / endpoint externo)
   ═════════════════════════════════════════════ */
.hire-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  max-width: 560px;
}

.hire-label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 0.75rem;
  color: var(--color-muted);
}

.hire-label input,
.hire-label textarea {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  color: var(--color-text);
  padding: 8px 10px;
  outline: none;
  transition: border-color var(--duration-fast) ease;
}

.hire-label input:focus,
.hire-label textarea:focus {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-focus);
}

.hire-status {
  font-size: 0.72rem;
  color: var(--color-muted);
  min-height: 1.2em;
}

.hire-note {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: var(--space-4);
}


/* ════════════════════════════════════════════
   PROJECTS · project cards with stack tags
   html: index.html · #projects > .projects-list > li.project-item
   ═════════════════════════════════════════════ */
.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--card-padding);
  border: var(--card-border);
  border-radius: var(--card-radius);
  transition:
    border-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

.project-item:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.project-name {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.project-desc {
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--chip-gap);
  margin-top: var(--space-1);
}

.project-link {
  color: var(--color-text);
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: auto;
  align-self: flex-start;
}

.project-link:hover {
  color: var(--color-accent);
}

/* ═══════════════════════════════════════════
   FOOTER
   html: index.html · footer > .footer-copy + .footer-links
   js:   assets/js/i18n.js (texts)
   ═══════════════════════════════════════════ */
.footer {
  position: relative;
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0;
  margin-top: var(--space-12);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--color-muted);
}

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

/* ═══════════════════════════════════════════
   SCROLL REVEAL · entry contract
   html: [any] · .reveal → .visible
   js:   assets/js/app.js
   Base hides, .visible shows; per-component variants only change
   HOW an item enters, never whether it reveals (L).
   ═══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--duration-normal) ease,
    transform var(--duration-normal) ease;
}

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

/* ═══════════════════════════════════════════
   CHATBOT WIDGET
   html: index.html · #chatbot-toggle, #chatbot-panel, #chatbot-log
   js:   assets/js/chatbot.js (rows, chips, cursor)
   Class names here are the chatbot.js contract — extend, never rename (O).
   ═══════════════════════════════════════════ */
.chatbot-toggle {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 9000;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-toggle);
  transition: all var(--duration-fast) ease;
}

.chatbot-toggle:hover {
  color: var(--btn-fill-fg);
  background: var(--btn-fill-bg);
  box-shadow: var(--shadow-strong);
}

.chatbot-panel {
  position: fixed;
  right: var(--space-6);
  bottom: 92px;
  z-index: 9000;
  width: min(340px, calc(100vw - 32px));
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-accent-dim);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  animation: chatbot-in 0.12s ease-out;
}

.chatbot-panel[hidden] {
  display: none;
}

@keyframes chatbot-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
}

.chatbot-title {
  font-size: 0.8rem;
  color: var(--color-text);
}

.chatbot-prompt {
  color: var(--color-accent-dim);
}

.chatbot-close {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-muted);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: color var(--duration-fast) ease;
}

.chatbot-close:hover {
  color: var(--color-accent);
}

.chatbot-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  min-height: 180px;
  max-height: 300px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent-dim) var(--color-surface-2);
}

.chatbot-msg {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.75rem;
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.chatbot-msg-bot {
  color: var(--color-text);
}

.chatbot-msg-bot .chatbot-prefix {
  color: var(--color-accent-dim);
}

.chatbot-msg-user {
  color: var(--color-muted);
}

.chatbot-msg-user .chatbot-prefix {
  color: var(--color-warning);
}

.chatbot-bullets {
  flex-basis: 100%;
  list-style: none;
  margin: var(--space-1) 0 0 var(--space-4);
  padding: 0;
}

.chatbot-bullets li {
  position: relative;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--color-text);
  padding-left: 14px;
}

/* Terminal bullet: cyan prompt dot, matches the palette */
.chatbot-bullets li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--color-info);
}

.chatbot-bullets li strong {
  color: var(--color-accent);
  font-weight: 600;
}

.chatbot-msg-actions {
  flex-basis: 100%;
  margin-top: var(--space-1);
}

.chatbot-email-btn {
  display: inline-block;
  font-size: 0.7rem;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  transition: all var(--duration-fast) ease;
}

.chatbot-email-btn:hover {
  background: var(--btn-fill-bg);
  color: var(--btn-fill-fg);
  box-shadow: var(--shadow-focus);
}

.chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--chip-gap);
  padding: 0 14px 10px;
}

.chatbot-chip {
  font-family: var(--font-mono);
  font-size: var(--chip-font-size);
  color: var(--chip-fg);
  background: var(--chip-bg);
  border: var(--chip-border-strong);
  border-radius: var(--chip-radius);
  padding: var(--chip-padding-lg);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.chatbot-chip:hover {
  background: var(--btn-fill-bg);
  color: var(--btn-fill-fg);
  box-shadow: var(--shadow-focus);
}

.chatbot-form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 14px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.chatbot-input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  outline: none;
  transition: border-color var(--duration-fast) ease;
}

.chatbot-input::placeholder {
  color: var(--color-muted);
}

.chatbot-input:focus {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-focus);
}

.chatbot-send {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-accent);
  background: none;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-xs);
  padding: 6px 12px;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.chatbot-send:hover {
  background: var(--btn-fill-bg);
  color: var(--btn-fill-fg);
}

.chatbot-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* "Thinking" indicator: terminal block cursor reusing blink */
.chatbot-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--color-accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ═══════════════════════════════════════════
   CERT LIGHTBOX
   html: index.html · #cert-lightbox, #cert-lightbox-close, figure
   js:   assets/js/app.js (.lightbox-open, media states)
   ═══════════════════════════════════════════ */
body.lightbox-open {
  overflow: hidden;
}

.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--color-overlay);
  backdrop-filter: blur(4px);
}

.cert-lightbox[hidden] {
  display: none;
}

.cert-lightbox-figure {
  position: relative;
  max-width: 92vw;
  max-height: 86vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

#cert-lightbox-img {
  max-width: 92vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-paper);
  box-shadow: var(--shadow-image);
}

.cert-lightbox-caption {
  color: var(--color-accent);
  font-size: 0.85rem;
  text-align: center;
}

.cert-lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: 22px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.cert-lightbox-close:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ═══════════════════════════════════════════
   MEDIA STATES · shared image loading/error handling
   js:   assets/js/app.js (.media-loading/.media-error toggles)
   Gated on html.js — no-JS renders images directly (contract).
   Uses only ::before + background-position; ornament ::after
   (avatar scan, post glare) stays untouched.
   ═══════════════════════════════════════════ */
html.js .media-loading::before,
html.js .media-skel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(
      105deg,
      transparent 25%,
      var(--skel-shimmer) 50%,
      transparent 75%
    )
    0 0 / 200% 100% no-repeat,
    var(--skel-base);
  animation: skel-shift 1.6s ease-in-out infinite;
}

@keyframes skel-shift {
  from {
    background-position: 120% 0;
  }

  to {
    background-position: -120% 0;
  }
}

html.js .media-skel {
  display: block;
  position: absolute;
  top: 6px;
  left: 6px;
  width: 76px;
  height: 100px;
  z-index: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--skel-base);
}

html.js .media-skel.media-loaded {
  opacity: 0;
  pointer-events: none;
}

html.js .media-skel.media-error {
  display: grid;
  place-items: center;
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 10%, var(--color-bg));
  border: 1px dashed var(--color-danger);
}

html.js .media-skel.media-error::after {
  content: "✕";
  position: static;
  transform: none;
  font-size: 1.1rem;
}

html.js .hero-avatar-wrap.media-loading .hero-avatar {
  opacity: 0;
}

html.js .post-frame.media-loading .post-img {
  opacity: 0;
}

html.js .cert-item img.media-error {
  opacity: 0;
}

html.js .cert-lightbox-figure.media-loading #cert-lightbox-img,
html.js .cert-lightbox-figure.media-error #cert-lightbox-img {
  opacity: 0;
}

/* Generic container error: flat red "✕" replaces ornament, shimmer stops */
html.js .media-error::before {
  animation: none;
  background: var(--skel-base);
}

html.js .media-error::after {
  content: "✕";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 10%, var(--color-bg));
}

/* ═══════════════════════════════════════════
   LOADING / SKELETON STATES
   html: index.html · .skel-section + [data-boot-hide] per section
   js:   assets/js/loader.js (preboot, skel-solved)
   Static + hidden by default; inline head script adds .preboot/.js
   so no-JS renders straight to real content. Skeletons share TOKENS
   with the real layouts, never selectors (DRY, decoupled).
   ═══════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skel-section {
  display: none;
  position: absolute;
  inset: 0;
  padding: inherit;
  z-index: 2;
}

html.js.preboot .skel-section {
  display: block;
}

html.js.preboot [data-boot-hide] {
  visibility: hidden;
}

.skel {
  position: relative;
  overflow: hidden;
  background: var(--skel-base);
  border-radius: var(--skel-radius);
}

.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(
    105deg,
    transparent 25%,
    var(--skel-shimmer) 50%,
    transparent 75%
  );
  animation: skel-sweep 1.6s ease-in-out infinite;
}

@keyframes skel-sweep {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(120%);
  }
}

.skel-section.skel-solved {
  opacity: 0;
  transition: opacity 0.18s ease;
}

.skel-line {
  height: 12px;
}

.skel-title {
  height: 34px;
  border-radius: 5px;
}

.skel-btn {
  height: 38px;
  border-radius: var(--radius-sm);
}

.skel-chip {
  width: 70px;
  height: 20px;
  border-radius: var(--radius-xs);
}

.skel-avatar {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.skel-thumb {
  width: 76px;
  height: 100px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.skel-box {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
}

.skel-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.skel-circle {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.skel-nav-line {
  width: 46px;
  height: 10px;
}

/* Width utilities: they ARE the value carriers (KISS) */
.skel-w-18 {
  width: 18%;
}
.skel-w-25 {
  width: 25%;
}
.skel-w-28 {
  width: 28%;
}
.skel-w-30 {
  width: 30%;
}
.skel-w-40 {
  width: 40%;
}
.skel-w-45 {
  width: 45%;
}
.skel-w-55 {
  width: 55%;
}
.skel-w-60 {
  width: 60%;
}
.skel-w-70 {
  width: 70%;
}
.skel-w-85 {
  width: 85%;
}

.skel-header {
  margin-bottom: 26px;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.skel-hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.skel-hero-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: 10px;
}

.skel-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.skel-topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.skel-dots {
  display: flex;
  gap: 6px;
}

.skel-nav {
  display: flex;
  gap: var(--space-4);
}

.skel-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skel-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-1) 20px;
  border-left: 2px solid var(--color-border);
}

.skel-chips {
  display: flex;
  gap: var(--chip-gap);
}

.skel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-2);
}

.skel-cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--card-padding);
  border: var(--card-border);
  border-radius: var(--card-radius);
}

.skel-certs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skel-cert-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.skel-cert-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--chip-gap);
}

.skel-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.skel-post {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skel-socials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-2);
}

.skel-social {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 16px;
  border: var(--card-border);
  border-radius: var(--card-radius);
}

.skel-social-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--chip-gap);
}

.skel-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* ═══════════════════════════════════════════
   RESPONSIVE · breakpoints consolidated (768/480)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .terminal-window {
    padding: var(--space-4);
  }

  .top-bar-right {
    display: none;
  }

  .hero-layout {
    flex-direction: column-reverse;
    align-items: center;
    gap: var(--space-6);
  }

  .hero-avatar-wrap {
    width: 150px;
    height: 150px;
  }

  .skills-list,
  .socials {
    grid-template-columns: 1fr;
  }

  /* The snake pointer is decorative: keep the cert section clean */
  .cert-pointer {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .section {
    padding: var(--space-8) 0;
  }

  .hero {
    padding: var(--space-8) 0 var(--space-12);
  }

  /* Skeleton mirrors follow the same mobile collapse */
  .skel-hero-layout {
    flex-direction: column-reverse;
    align-items: center;
  }

  .skel-avatar {
    width: 150px;
    height: 150px;
  }

  .skel-nav {
    display: none;
  }

  /* Skeleton mirrors for the new sections */
  .skel-cert-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .hire-form .skel-section {
    gap: var(--space-2);
  }

  .skel-posts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hire-form {
    max-width: 100%;
  }

  .hire-label input,
  .hire-label textarea {
    font-size: 0.75rem;
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .chatbot-toggle {
    right: var(--space-4);
    bottom: var(--space-4);
  }

  .chatbot-panel {
    right: var(--space-4);
    bottom: 84px;
    max-height: 60vh;
  }

  .chatbot-log {
    max-height: 40vh;
  }
}

