/* ==========================================================================
   EXACT ARBATOV.DEV DESIGN SYSTEM (SCALE, AIR & TYPOGRAPHY TUNED)
   ========================================================================== */

.rh {
  --rh-bg: #0b0b0b;
  --rh-surface: #111111;
  --rh-text: #f5f5f2;
  --rh-muted: #92928c;
  --rh-quiet: #7c7c75;
  --rh-rule: #242424;
  --rh-rule-strong: #3f3f3c;

  /* Escala tipográfica equilibrada y natural */
  --rh-text-caption: .8rem;
  --rh-text-ui: .95rem;
  --rh-text-body: 1.05rem;
  --rh-text-lead: 1.25rem;
  --rh-text-intro: clamp(1.08rem, .75vw + 0.98rem, 1.22rem);
  --rh-text-display: clamp(3.8rem, 8vw, 5.6rem);

  --rh-mono: "Google Sans Code", "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  --rh-enter-ease: cubic-bezier(.16, 1, .3, 1);
  --rh-micro-ease: cubic-bezier(.32, .72, 0, 1);
  --rh-ui-ease: cubic-bezier(.23, 1, .32, 1);
  --rh-move-ease: cubic-bezier(.77, 0, .175, 1);

  min-height: 100dvh;
  background: var(--rh-bg);
  color: var(--rh-text);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   BASE & ZOOM PROPORTIONS
   ========================================================================== */

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

html {
  font-size: 15.5px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #0b0b0b;
}

@media (min-width: 1400px) {
  html {
    font-size: 16.5px;
  }
}

body.rh {
  margin: 0;
  position: relative;
  overflow-x: hidden;
}

.rh ::selection {
  background: var(--rh-text);
  color: var(--rh-bg);
}

.rh a, .rh button {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   BACKGROUND CANVAS (RADIAL MASK EXACTO DE ARBATOV.DEV)
   ========================================================================== */

.rh__background {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

.rh__background canvas {
  display: block;
  width: 100%;
  height: 100%;
  mask-image: radial-gradient(ellipse 75% 85% at 75% 42%, #000 56%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 75% 42%, #000 56%, transparent 100%);
}

/* ==========================================================================
   SHELL (ANCHO CONTENIDO Y MARGEN IZQUIERDO PROPORCIONALES)
   ========================================================================== */

.rh__shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1240px);
  margin-left: clamp(24px, 7.5vw, 150px);
  padding: 88px 56px 64px;
}

/* ==========================================================================
   HERO & SIGNATURE
   ========================================================================== */

.rh__hero {
  max-width: 960px;
  padding-bottom: 56px;
}

.rh__signature {
  display: flex;
  align-items: center;
  gap: 28px;
}

.rh__ask-agent {
  display: flex;
  align-items: center;
}

.rh__ask-trigger {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: none;
  color: var(--rh-muted);
  font-size: var(--rh-text-ui);
  transition: color .18s var(--rh-ui-ease);
  padding: 0;
}

.rh__ask-trigger:hover {
  color: var(--rh-text);
}

.rh__sigil-orb {
  animation: orb-spin 16s linear infinite;
  color: var(--rh-muted);
  transition: color .2s ease;
}

.rh__ask-trigger:hover .rh__sigil-orb {
  color: var(--rh-text);
}

@keyframes orb-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rh__ask-label {
  white-space: nowrap;
}

.rh__top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

/* SELECTOR DE IDIOMA ES / EN */
.rh__lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 36px;
  border: 1px solid var(--rh-rule);
  border-radius: 4px;
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  color: var(--rh-quiet);
}

.rh__lang-btn {
  background: transparent;
  border: none;
  color: var(--rh-quiet);
  font-family: inherit;
  font-size: inherit;
  padding: 2px 4px;
  cursor: pointer;
  transition: color .15s ease;
}

.rh__lang-btn:hover {
  color: var(--rh-text);
}

.rh__lang-btn.active {
  color: var(--rh-text);
  font-weight: 600;
}

.rh__lang-sep {
  color: var(--rh-rule-strong);
  user-select: none;
}

.rh__sound-toggle, .rh__copy-markdown {
  position: relative;
  display: inline-flex;
  white-space: nowrap;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--rh-rule);
  border-radius: 4px;
  background: transparent;
  color: var(--rh-quiet);
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  line-height: 1.4;
  letter-spacing: .04em;
  transition: background-color .15s var(--rh-ui-ease), border-color .15s var(--rh-ui-ease), color .16s var(--rh-ui-ease);
}

.rh__sound-toggle:hover, .rh__copy-markdown:hover {
  color: var(--rh-text);
  border-color: var(--rh-rule-strong);
}

.rh__caret {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* NOMBRE ENORME CON PESO 400 */
.rh__name {
  max-width: 10ch;
  margin: 64px 0 0;
  font-size: var(--rh-text-display);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.055em;
  text-wrap: balance;
  color: var(--rh-text);
}

/* BIO FLUIDA */
.rh__bio {
  max-width: 66ch;
  margin: 38px 0 0;
  color: var(--rh-muted);
  font-size: var(--rh-text-intro);
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: -.012em;
  text-wrap: pretty;
}

.rh__bio a {
  color: var(--rh-text);
  text-decoration: underline;
  text-decoration-color: var(--rh-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color .16s var(--rh-ui-ease);
}

.rh__bio a:hover {
  text-decoration-color: var(--rh-text);
}

/* ==========================================================================
   JUMP NAVIGATION TABS (STICKY BLURRED NAV)
   ========================================================================== */

.rh__jump-nav-slot {
  display: contents;
}

.rh__jump-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 960px;
  margin-top: 0;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  background: #0b0b0bf0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.rh__jump-nav::before, .rh__jump-nav::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--rh-rule);
  content: "";
}

.rh__jump-nav::before { top: -1px; }
.rh__jump-nav::after { bottom: -1px; }

.rh__jump-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rh__jump-links--primary {
  position: relative;
  isolation: isolate;
}

.rh__nav-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  width: 20%;
  background: var(--rh-surface);
  pointer-events: none;
  transform: translate(0);
  transition: transform .22s var(--rh-move-ease);
}

.rh__jump-links--primary[data-active-index="1"] .rh__nav-indicator { transform: translate(100%); }
.rh__jump-links--primary[data-active-index="2"] .rh__nav-indicator { transform: translate(200%); }
.rh__jump-links--primary[data-active-index="3"] .rh__nav-indicator { transform: translate(300%); }
.rh__jump-links--primary[data-active-index="4"] .rh__nav-indicator { transform: translate(400%); }

.rh__jump-link {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  color: var(--rh-muted) !important;
  font-size: var(--rh-text-ui);
  text-decoration: none;
  transition: color .16s var(--rh-ui-ease), background-color .16s var(--rh-ui-ease);
  text-align: left;
}

.rh__jump-link:hover {
  color: var(--rh-text) !important;
  background-color: var(--rh-surface);
}

.rh__jump-link[aria-current="location"] {
  color: var(--rh-text) !important;
}

/* ==========================================================================
   SECTIONS: DOS COLUMNAS (140px + 1fr) CON ESPACIADO GENEROSO
   ========================================================================== */

.rh__section {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 44px;
  max-width: 960px;
  margin-top: 120px;
  scroll-margin-top: 96px;
}

.rh__section-head {
  align-self: start;
  padding-top: 6px;
}

.rh__section-label {
  margin: 0;
  color: var(--rh-muted);
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* PÁRRAFO PRINCIPAL EN "NOW": AMPLIO Y CON AIRE */
.rh__paragraph {
  max-width: 66ch;
  margin: 0;
  font-size: var(--rh-text-lead);
  line-height: 1.68;
  letter-spacing: -.01em;
  text-wrap: pretty;
  color: var(--rh-text);
  font-weight: 400;
}

/* ==========================================================================
   RECORDS (WRITING ROW SYSTEM)
   ========================================================================== */

.rh__records, .rh__projects, .rh__skills {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rh__projects, .rh__skills, .rh__records li:first-child .rh__record-link {
  border-top: 1px solid var(--rh-rule);
}

.rh__record-link {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  margin: 0 -8px;
  padding: 20px 10px;
  border-bottom: 1px solid var(--rh-rule);
  text-decoration: none;
  transition: background-color .16s var(--rh-ui-ease);
  width: calc(100% + 16px);
}

.rh__record-link:hover {
  background-color: var(--rh-surface);
}

.rh__record-link time, .rh__skill-index, .rh__skill-value {
  color: var(--rh-quiet);
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.rh__record-link time {
  white-space: nowrap;
}

.rh__record-title {
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--rh-text);
  font-weight: 400;
}

.rh__arrow {
  color: var(--rh-quiet);
  font-size: 1rem;
  transition: color .18s var(--rh-ui-ease), transform .18s var(--rh-ui-ease);
}

.rh__record-link:hover .rh__arrow, .rh__projects a:hover .rh__arrow {
  color: var(--rh-text);
  transform: translate(2px, -2px);
}

.rh__writing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.rh__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--rh-rule);
  border-radius: 4px;
  color: var(--rh-muted);
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  cursor: pointer;
  transition: all .16s var(--rh-ui-ease);
}

.rh__more-btn:hover {
  color: var(--rh-text);
  border-color: var(--rh-rule-strong);
  background: var(--rh-surface);
}

.rh__writing-hint {
  font-family: var(--rh-mono);
  font-size: 0.8rem;
  color: var(--rh-quiet);
}

/* ==========================================================================
   SKILLS (TABLA DE 2 COLUMNAS AMPLIA, TÍTULOS ENFOCADOS)
   ========================================================================== */

.rh__skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rh__skills li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rh-rule);
}

.rh__skills li:nth-child(odd) {
  padding-right: 28px;
}

.rh__skills li:nth-child(2n) {
  padding-left: 28px;
  border-left: 1px solid var(--rh-rule);
}

.rh__skill-title {
  color: var(--rh-text);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.rh__skill-value {
  color: var(--rh-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   PROJECTS (GRILLA DE 3 COLUMNAS CON BORDES DE 1PX)
   ========================================================================== */

.rh__project-group + .rh__project-group {
  margin-top: 40px;
}

.rh__project-group-label {
  margin: 0 0 14px;
  color: var(--rh-quiet);
  font-family: var(--rh-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rh__projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rh__projects li {
  border-bottom: 1px solid var(--rh-rule);
}

.rh__projects li:not(:nth-child(3n+1)) {
  border-left: 1px solid var(--rh-rule);
}

.rh__projects a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 20px 18px 24px;
  text-decoration: none;
  transition: background-color .16s var(--rh-ui-ease);
}

.rh__projects a:hover {
  background-color: var(--rh-surface);
}

.rh__projects .rh__arrow {
  position: absolute;
  top: 20px;
  right: 18px;
}

.rh__project-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-wrap: break-word;
}

.rh__project-copy strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-right: 24px;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--rh-text);
}

.rh__project-copy > span {
  color: var(--rh-muted);
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.rh__more {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  margin-left: 14px;
  color: var(--rh-muted) !important;
  font-size: var(--rh-text-ui);
  text-decoration: none;
  transition: color .16s var(--rh-ui-ease);
}

.rh__more:hover {
  color: var(--rh-text) !important;
}

.rh__more > span[aria-hidden="true"] {
  transition: transform .18s var(--rh-ui-ease);
}

.rh__more:hover > span[aria-hidden="true"] {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   ELSEWHERE SECTION
   ========================================================================== */

.rh__elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: baseline;
}

.rh__elsewhere a, .rh__link-inline-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: baseline;
  gap: 6px;
  color: var(--rh-muted);
  font-size: var(--rh-text-body);
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  transition: color .16s var(--rh-ui-ease);
}

.rh__elsewhere a:hover, .rh__link-inline-btn:hover {
  color: var(--rh-text);
}

.rh__location-tag {
  color: var(--rh-quiet);
  font-family: var(--rh-mono);
  font-size: var(--rh-text-ui);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.rh__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 960px;
  margin-top: 130px;
  padding-top: 28px;
  border-top: 1px solid var(--rh-rule);
  color: var(--rh-quiet);
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  line-height: 1.4;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.rh__footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rh__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
}

.rh__footer a {
  text-decoration: none;
  color: var(--rh-quiet);
  transition: color .16s var(--rh-ui-ease);
}

.rh__footer a:hover {
  color: var(--rh-text);
}

.rh__footer-actions {
  display: flex;
  gap: 24px;
}

/* ==========================================================================
   MODALES (LECTOR ESPACIOSO Y FÓRMULAS MATEMÁTICAS CLARAS)
   ========================================================================== */

.rh-modal {
  margin: auto;
  padding: 0;
  border: 1px solid var(--rh-rule-strong);
  background: #0d0d0dfa;
  color: var(--rh-text);
  border-radius: 4px;
  max-width: 640px;
  width: 90%;
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(24px);
  scrollbar-width: thin;
  scrollbar-color: #2e2e2e #0b0b0b;
}

.rh-modal--reader, .rh-modal--writer {
  max-width: 920px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.rh-modal::-webkit-scrollbar,
.rh-modal--reader::-webkit-scrollbar,
.ai-chat-output::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.rh-modal::-webkit-scrollbar-track,
.rh-modal--reader::-webkit-scrollbar-track,
.ai-chat-output::-webkit-scrollbar-track {
  background: #0b0b0b;
}

.rh-modal::-webkit-scrollbar-thumb,
.rh-modal--reader::-webkit-scrollbar-thumb,
.ai-chat-output::-webkit-scrollbar-thumb {
  background: #2b2b2b;
  border-radius: 3px;
}

.rh-modal::-webkit-scrollbar-thumb:hover,
.rh-modal--reader::-webkit-scrollbar-thumb:hover,
.ai-chat-output::-webkit-scrollbar-thumb:hover {
  background: #444444;
}

.rh-modal::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.rh-modal-box {
  padding: 36px 44px;
}

.rh-modal-box--reader {
  padding-top: 0;
  padding-bottom: 48px;
}

.rh-modal-box--reader .modal-top {
  position: sticky;
  top: 0;
  background: #0d0d0df8;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 50;
  margin: 0 -44px 28px -44px;
  padding: 24px 44px 18px;
  border-bottom: 1px solid var(--rh-rule);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rh-rule);
}

.reader-meta-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  color: var(--rh-quiet);
}

.reader-divider {
  color: var(--rh-rule-strong);
}

.article-headline {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.03em;
  color: var(--rh-text);
  margin-top: 8px;
  margin-bottom: 28px;
  padding-top: 4px;
}

.article-markdown-prose {
  font-size: 1.15rem;
  line-height: 1.82;
  color: #ddddd8;
}

.article-markdown-prose h2 {
  font-size: 1.48rem;
  font-weight: 500;
  color: var(--rh-text);
  margin: 40px 0 16px;
  letter-spacing: -.02em;
}

.article-markdown-prose h3 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--rh-text);
  margin: 28px 0 12px;
}

.article-markdown-prose p {
  margin-bottom: 20px;
}

/* BLOQUE DE FÓRMULAS MATEMÁTICAS ELEGANTE Y CLARO */
.math-block {
  display: block;
  background: #060709;
  border: 1px solid var(--rh-rule);
  border-radius: 4px;
  padding: 18px 24px;
  margin: 24px 0;
  font-family: 'Cambria Math', 'Latin Modern Math', 'Times New Roman', serif;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-align: center;
  overflow-x: auto;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

.math-inline {
  font-family: 'Cambria Math', 'Times New Roman', serif;
  font-style: italic;
  padding: 0 3px;
  color: #f5f5f2;
}

.article-markdown-prose code {
  font-family: var(--rh-mono);
  font-size: 0.9em;
  background: #171717;
  padding: 3px 8px;
  border-radius: 3px;
  color: #f5f5f2;
  border: 1px solid var(--rh-rule);
}

.article-markdown-prose pre {
  background: #050505;
  border: 1px solid var(--rh-rule);
  padding: 20px;
  border-radius: 4px;
  overflow-x: auto;
  font-family: var(--rh-mono);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 22px 0;
  color: #e2e8f0;
}

.article-markdown-prose blockquote {
  border-left: 2px solid var(--rh-rule-strong);
  margin: 24px 0;
  padding-left: 20px;
  color: var(--rh-muted);
  font-style: italic;
}

.article-markdown-prose ul {
  margin: 20px 0 22px 28px;
  list-style: square;
}

.article-markdown-prose li {
  margin-bottom: 10px;
}

.reader-footer-actions {
  display: flex;
  gap: 14px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rh-rule);
}

/* WRITER FORM STYLING */
.writer-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.writer-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.writer-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.writer-label {
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  color: var(--rh-muted);
}

.writer-input, .writer-textarea {
  background: #050505;
  border: 1px solid var(--rh-rule);
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--rh-text);
  font-family: inherit;
  font-size: var(--rh-text-body);
  outline: none;
  transition: border-color .16s ease;
}

.writer-textarea {
  font-family: var(--rh-mono);
  font-size: 0.95rem;
  line-height: 1.65;
  resize: vertical;
}

.writer-input:focus, .writer-textarea:focus {
  border-color: var(--rh-rule-strong);
}

.writer-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--rh-quiet);
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--rh-text);
}

.modal-intro {
  font-size: var(--rh-text-ui);
  color: var(--rh-muted);
  margin-bottom: 16px;
  line-height: 1.55;
}

.ai-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip-btn {
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  padding: 8px 14px;
  background-color: var(--rh-surface);
  border: 1px solid var(--rh-rule);
  border-radius: 4px;
  color: var(--rh-muted);
  cursor: pointer;
  transition: all .16s var(--rh-ui-ease);
}

.chip-btn:hover {
  color: var(--rh-text);
  border-color: var(--rh-rule-strong);
}

.ai-chat-output {
  background-color: #050505;
  border: 1px solid var(--rh-rule);
  border-radius: 4px;
  padding: 16px;
  max-height: 280px;
  overflow-y: auto;
  font-size: var(--rh-text-ui);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg .msg-author {
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  color: #10b981;
  display: block;
  margin-bottom: 4px;
}

.chat-msg.user .msg-author {
  color: #38bdf8;
}

.chat-msg p {
  line-height: 1.6;
  color: var(--rh-text);
}

.ai-input-form {
  display: flex;
  gap: 10px;
}

.ai-input-form input {
  flex: 1;
  background: var(--rh-surface);
  border: 1px solid var(--rh-rule);
  border-radius: 4px;
  padding: 10px 14px;
  color: var(--rh-text);
  font-family: inherit;
  font-size: var(--rh-text-ui);
  outline: none;
}

.ai-input-form input:focus {
  border-color: var(--rh-rule-strong);
}

.ai-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 18px;
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  font-weight: 500;
  background-color: #f5f5f2;
  color: #0b0b0b;
  border: 1px solid #ffffff;
  border-radius: 4px;
  cursor: pointer;
  transition: all .16s ease;
}

.ai-send-btn span {
  color: #0b0b0b;
  font-weight: 600;
  display: inline-block;
  line-height: 1;
}

.ai-send-btn svg {
  stroke: #0b0b0b;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform .16s ease;
}

.ai-send-btn:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
}

.ai-send-btn:hover svg {
  transform: translateX(2px);
}

.modal-bullet-list {
  list-style-type: square;
  margin-left: 20px;
  margin-bottom: 22px;
  font-size: var(--rh-text-ui);
  color: var(--rh-muted);
  line-height: 1.65;
}

.modal-bullet-list li {
  margin-bottom: 8px;
}

.modal-bullet-list strong {
  color: var(--rh-text);
}

.modal-cta-row {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   TOAST
   ========================================================================== */

.rh__toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  transform: translateY(80px);
  opacity: 0;
  visibility: hidden;
  background: #111111fa;
  color: var(--rh-text);
  border: 1px solid var(--rh-rule-strong);
  padding: 12px 20px;
  border-radius: 4px;
  font-family: var(--rh-mono);
  font-size: var(--rh-text-caption);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
  z-index: 1000;
  transition: all .25s var(--rh-enter-ease);
}

.rh__toast.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
  .rh__shell {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 72px 28px 56px;
  }

  .rh__projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rh__projects li:not(:nth-child(3n+1)) {
    border-left: 0;
  }

  .rh__projects li:nth-child(2n) {
    border-left: 1px solid var(--rh-rule);
  }
}

@media (max-width: 640px) {
  .rh__shell {
    padding: 64px 20px 44px;
  }

  .rh__hero {
    padding-bottom: 44px;
  }

  .rh__name {
    margin-top: 44px;
    --rh-text-display: clamp(3.2rem, 16vw, 4.4rem);
  }

  .rh__bio {
    margin-top: 24px;
  }

  .rh__jump-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rh__nav-indicator {
    display: none;
  }

  .rh__section {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 80px;
  }

  .rh__section-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rh-rule);
  }

  .rh__record-link {
    grid-template-columns: 80px minmax(0, 1fr) auto;
    gap: 12px;
    margin: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .rh__skills {
    grid-template-columns: 1fr;
  }

  .rh__skills li:nth-child(odd), .rh__skills li:nth-child(2n) {
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }

  .rh__projects {
    grid-template-columns: 1fr;
  }

  .rh__projects li:not(:nth-child(3n+1)), .rh__projects li:nth-child(2n) {
    border-left: 0;
  }

  .rh__projects a {
    padding-right: 0;
    padding-left: 0;
  }

  .rh__footer {
    margin-top: 88px;
    flex-direction: column;
    align-items: flex-start;
  }

  .writer-field-row {
    grid-template-columns: 1fr;
  }
}
