:root { --bg:#0b0c10; --card:#111318; --ink:#e6e7eb; --muted:#a3a7b3; --pri:#7aa2f7; }
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 system-ui,Segoe UI,Roboto,Ubuntu}

.container{width:min(100%,1000px);margin-inline:auto;padding:24px}
.nav{display:flex;gap:18px;justify-content:flex-end}
.nav a{color:var(--muted);text-decoration:none}
.card{background:var(--card);border:1px solid #1b1e26;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.25)}

.intro{display:grid;grid-template-columns:160px 1fr;gap:24px;align-items:center}
#foto{width:160px;height:160px;border-radius:16px;object-fit:cover;border:1px solid #242733}
.subtitle{color:var(--muted);margin-top:-6px}
.btn{display:inline-block;background:var(--pri);color:#0b0c10;padding:10px 14px;border-radius:10px;text-decoration:none;font-weight:600}
.btn.ghost{background:transparent;border:1px solid #2a2e3a;color:var(--ink)}
.cta-row{display:flex;gap:12px;margin-top:12px}

/* Proyectos */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.card-proy{background:var(--card);border:1px solid #1b1e26;border-radius:14px;overflow:hidden;display:flex;flex-direction:column}
.card-proy img{width:100%;height:150px;object-fit:cover}
.card-proy .p{padding:14px}
.card-proy h3{margin:0 0 6px}
.card-proy a{color:var(--pri)}

/* Chat */
.chatbox{display:flex;flex-direction:column;gap:10px;max-height:420px;overflow:auto;margin:14px 0;padding-right:6px}
.msg{padding:10px 12px;border-radius:12px;max-width:85%}
.msg.user{background:#2a2e3a;margin-left:auto}
.msg.bot{background:#1a1d26;border:1px solid #232735}
.chat-form{display:flex;gap:10px}
.chat-form input{flex:1;padding:10px;border-radius:10px;border:1px solid #232735;background:#0f1116;color:var(--ink)}
.chat-form button{padding:10px 14px;border-radius:10px;border:0;background:var(--pri);color:#0b0c10;font-weight:700}
.muted{color:var(--muted)}
.center{text-align:center}

/* Responsive */
@media (max-width:700px){
  .intro{grid-template-columns:1fr}
  #foto{width:120px;height:120px}
}

/* --- Pequeñas mejoras de accesibilidad/UX --- */
:root { --focus:#9bb8ff; }
html { scroll-behavior:smooth; }
body { -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
a:hover { text-decoration:underline; }
.btn { cursor:pointer; transition:transform .08s ease; }
.btn:hover { transform:translateY(-1px); }
.btn:active { transform:translateY(0); }
.btn:focus-visible,
.nav a:focus-visible,
.chat-form input:focus-visible,
.btn.ghost:focus-visible {
  outline:2px solid var(--focus);
  outline-offset:2px;
  border-radius:12px;
}
.msg { white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; }
#send-btn[disabled] { opacity:.7; cursor:not-allowed; }
.chatbox::-webkit-scrollbar{ width:10px; }
.chatbox::-webkit-scrollbar-thumb{ background:#232735; border-radius:8px; }

