/* styles.css */
:root{ --accent:#3b82f6; --fg:#e6e6e6; }
body{ 
    background: #0b0f14 url("../images/background2.png") no-repeat center center fixed;
    background-size: cover;
    color: var(--fg);
    font: 16px/1.6 system-ui, sans-serif;
}
.navbar{ background:rgba(13,17,23,.6); backdrop-filter:blur(6px); }
.brand-dot{ width:10px; height:10px; border-radius:50%; background:var(--accent); display:inline-block; margin-left:.25rem; }
.hero-name{ font-size:clamp(2rem,5vw,3.25rem); font-weight:700; }
.hero-role a, .link-accent{ color:var(--accent); text-decoration:none; }
.hero-role a:hover, .link-accent:hover{ text-decoration:underline; }
.avatar{ width:112px; height:112px; border-radius:50%; object-fit:cover; background:#111; border:1px solid #1e293b; }
.section-title{ font-weight:700; }
.card{ background:#0f141b; border:1px solid #1f2937; }
.badge-tech{ background:#0d1b2a; border:1px solid #1e3a8a; color:#cfe1ff; }
.badge-languages{ background:#1e293b; border:1px solid #85235c; color:#cfe1ff; }
.muted{ color:#93a4b3; }
footer{ border-top:1px solid #1f2937; }
a:focus{ outline:2px solid var(--accent); outline-offset:2px; }

/* Home page (index.html) */
html, body { height: 100%; }
.home { margin: 0; opacity: 0; transition: opacity .45s ease; }
.home.visible { opacity: 1; }
.home.leaving { opacity: 0; }
.reset { padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; }
.link-like { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.photo { width: clamp(140px, 28vw, 200px); height: clamp(140px, 28vw, 200px); object-fit: cover; border-radius: 50%; border:1px solid #1e293b; transition: transform .25s ease, box-shadow .25s ease; }
.link-like:hover .photo, .link-like:focus-visible .photo { transform: translateY(-2px); box-shadow: 0 1rem 2rem rgba(0,0,0,.35);} 
.name { margin: 18px 0 6px; letter-spacing: .2px; transition: transform .2s ease; position: relative; }
.name:hover, .name:focus-visible { transform: translateY(-1px); }
.hint { margin: 0; font-size: .95rem; opacity:.9; }

/* Subtle click animations */
@keyframes pop {
  0% { transform: scale(1) rotate(0); filter:none; }
  30% { transform: scale(1.06) rotate(-1deg); filter: saturate(1.15); }
  60% { transform: scale(0.98) rotate(0.5deg); }
  100% { transform: scale(1) rotate(0); filter:none; }
}
.photo.is-animating { animation: pop 420ms ease; }

/* Underline sweep for name */
.name::after { content:""; position:absolute; left:50%; bottom:-6px; height:2px; width:0; background: var(--accent); transform: translateX(-50%); transition: width .35s ease; border-radius: 2px; }
.name.is-animating::after { width: 52%; }

/* Accent ring pulse around photo */
#photoBtn { position: relative; }
#photoBtn::after { content:""; position:absolute; inset:0; border-radius:50%; transform: scale(0.85); opacity:0; border:2px solid var(--accent); box-shadow: 0 0 0 6px rgba(59,130,246,.15); pointer-events:none; }
@keyframes ringPulse { 0% { transform: scale(0.85); opacity:.35; } 60% { transform: scale(1.12); opacity:.18; } 100% { transform: scale(1.28); opacity:0; } }
#photoBtn.pulse::after { animation: ringPulse 520ms ease-out; }

/* (Removed confetti; using ring pulse & underline) */

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  .home { transition: none; opacity: 1; }
  .photo, .name { transition: none; animation: none !important; }
}

/* Chat widget */
.chat-launcher-wrapper{
  position: fixed; right: 20px; bottom: 20px; z-index: 1040;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.chat-launcher{
  width: 68px; height: 68px; border-radius: 50%;
  border: 1px solid #1f2937; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 26px; cursor: pointer;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.chat-launcher:focus{ outline: 2px solid #fff; outline-offset: 2px; }
.chat-hint{
  position: relative;
  background: rgba(13,17,23,.92);
  border: 1px solid #1f2937;
  color: var(--fg);
  padding: 10px 14px 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  max-width: 240px;
  box-shadow: 0 12px 26px rgba(0,0,0,.45);
  transition: opacity .25s ease, transform .25s ease;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.chat-hint::after{
  content:"";
  position: absolute;
  right: 26px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: rgba(13,17,23,.92);
  border-left: 1px solid #1f2937;
  border-bottom: 1px solid #1f2937;
  transform: rotate(45deg);
}
.chat-hint.hidden{
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.hint-close{
  background: none;
  border: 0;
  color: #9fb5d0;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.hint-close:hover,
.hint-close:focus{
  color: #fff;
}
.hint-close:focus{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 520px){
  .chat-hint{ font-size: 0.85rem; max-width: 200px; }
}

.chat-window{
  position: fixed; right: 20px; bottom: 95px; z-index: 1040;
  width: clamp(280px, 28vw, 360px); height: 420px;
  background: #0f141b; border:1px solid #1f2937; border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  display: none; overflow: hidden;
}
.chat-window.open{ display: flex; flex-direction: column; }
.chat-header{
  padding: 10px 12px; background: rgba(13,17,23,.6); backdrop-filter: blur(6px);
  border-bottom:1px solid #1f2937; display:flex; align-items:center; justify-content: space-between;
}
.chat-close{ background:none; border:0; color: var(--fg); font-size: 18px; cursor: pointer; }
.chat-messages{ flex:1; padding: 10px; overflow-y:auto; display:flex; flex-direction: column; gap: 8px; }
.msg{ max-width: 88%; padding: 8px 10px; border-radius: 10px; font-size: 0.95rem; line-height: 1.35; }
.msg.user{ margin-left: auto; background: #1e293b; border:1px solid #334155; }
.msg.bot{ margin-right: auto; background: #0d1b2a; border:1px solid #1e3a8a; color:#cfe1ff; }
.msg.typing{ opacity: .8; font-style: italic; }
.chat-input{ display:flex; gap:8px; padding:10px; border-top:1px solid #1f2937; background:#0f141b; }
.chat-input input{ flex:1; background:#0b0f14; border:1px solid #1f2937; color:var(--fg); border-radius: 8px; padding: 8px 10px; }
.chat-input input:focus{ outline:2px solid var(--accent); outline-offset: 2px; }
.send-btn{ background: var(--accent); color:#fff; border:1px solid #1f2937; border-radius:8px; padding: 8px 12px; cursor:pointer; }
.send-btn:disabled{ opacity:.7; cursor:not-allowed; }
