.profile-widget p { 
  margin-top: 0;
  margin-bottom: 0;
}

.profile-widget {
  border-radius: 14px;
  align-self: start; 
  padding: 10px;
  width: 100%; 
}
.profile-widget--overlay {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(0, 0);
  width: clamp(200px, 23vw, 260px);
  z-index: 10050;
  
  background: var(--background-color-overlay, rgba(12, 16, 24, 0.34));
  
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: var(--backdrop-filter, saturate(180%) blur(15px));
  backdrop-filter: var(--backdrop-filter, saturate(180%) blur(15px));
  box-shadow: var(--box-shadow-color, 0 8px 24px rgba(0, 0, 0, 0.7));
  background-clip: padding-box;
  cursor: pointer;
  
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 420ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-widget--overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--border-angle, 225deg),
    var(--teal-500) 0deg,
    var(--pink-500) 180deg,
    var(--teal-500) 360deg
  );
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: buttons-gradient-rotate 16s linear infinite;
}
.profile-widget.is-hidden { display: none; }


.profile-widget--overlay.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .profile-widget--overlay { transition: none; }
}
.profile-widget__header {
  font-family: var(--font-text);
  font-weight: var(--fw-title);
  font-size: clamp(24px, 1vw, 28px);
  background: var(--homepage-title-gradient);
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.profile-widget__avatar {
  width: var(--profile-avatar);
  height: var(--profile-avatar);
  border-radius: 999px; 
  object-fit: cover;
}
.profile-widget__name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.profile-widget__role {
  margin: 0;
  font-size: 13px;
  color: var(--text-1);
}
.profile-widget__based { margin: 0; font-size: 13px; color: var(--text-1); }
.profile-widget__rows {
  margin-top: 2px;
  display: grid;
  grid-template-columns: 18px auto; 
  grid-auto-rows: minmax(16px, auto);
  gap: 6px 8px; 
  align-items: center;
}

#profile-meta #skills-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 4px;
}
#profile-meta #skills-toggle.buttons__link.btn {
  padding: 4px 8px;
  min-height: 28px;
}
#profile-meta #skills-toggle .btn__label {
  font-size: 12px;
}
.profile-widget__icon {
  width: 18px;
  height: 12px;
  display: block;
  object-fit: cover;
  object-position: center;
  
  transform: scale(var(--profile-icon-zoom, 1.12));
  transform-origin: center;
}
.flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}
.profile-widget__heading {
  margin: 14px 0 6px 0;
  font-size: 14px;
  font-weight: 700;
}
.profile-widget__desc {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: var(--text-1);
}
.profile-widget__skills {
  display: grid;
  gap: 12px;
}


.profile-widget__skills {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 220ms ease;
}
.profile-widget__skills.is-collapsed {
  max-height: 0;
}

.profile-widget__controls { margin: 8px 0 0 0; }
.profile-widget__controls .buttons__link.btn { padding: 4px 8px; min-height: 28px; }
.profile-widget__controls .buttons__link .btn__label { font-size: 12px; }
.profile-widget__controls .fa-chevron-up { transition: transform 200ms ease; }
.profile-widget__controls .is-collapsed .fa-chevron-up { transform: rotate(180deg); }


#skills-heading.is-collapsed { display: none; }
#about-heading.is-collapsed { display: none; }
#about-desc.is-collapsed { display: none; }
#profile-meta > *:not(#skills-toggle).is-collapsed { display: none; }
#key-facts.is-collapsed { display: none; }
.skills__group { display: grid; gap: 8px; }
.skills__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.3px;
}
.skills__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-widget__skills img,
.skills__icons img {
  width: 26px;
  height: 26px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
  transition: transform 140ms ease, filter 140ms ease;
}
.profile-widget__skills img:hover,
.profile-widget__skills img:focus-visible,
.skills__icons img:hover,
.skills__icons img:focus-visible {
  transform: scale(1.32);
}

.skills__error {
  color: var(--text-1);
  font-size: 13px;
  opacity: 0.9;
}

@media (max-width: 780px) {
  .profile-widget { position: relative; top: 0; width: auto; margin-bottom: clamp(16px, 4vw, 24px); }
  
  /* Mobile overlay: original behavior */
  .profile-widget--overlay {
    position: absolute;
    /* about 25% narrower than before (was 95vw) */
    width: min(72vw, 480px);
    margin-bottom: 0;
  }
}