/* BUTTONS */
.btn {
  padding: 13px 26px;
  border-radius: 10px;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: transform .15s ease, box-shadow .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
}

.btn:hover::before {
  animation: shine .8s ease forwards;
}

@keyframes shine {
  to {
    left: 130%;
  }
}

.btn:active {
  transform: translateY(0) scale(.97);
}

.btn-primary {
  background: var(--violet);
  color: #140c22;
  animation: pulse-glow 2.6s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(139, 108, 242, .6);
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 108, 242, .45);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(139, 108, 242, 0);
  }
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--violet-bright);
  transform: translateY(-2px);
}

/* TAGS */
.skill-groups {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media(min-width: 640px) {
  .skill-groups {
    grid-template-columns: 1fr 1fr;
  }
}

.skill-group h3 {
  font-size: .95rem;
  color: var(--violet-bright);
  margin: 0 0 12px;
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .85rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  animation: tag-in .5s ease both;
}

.tag:hover {
  background: var(--violet);
  color: #140c22;
  border-color: var(--violet);
  transform: translateY(-2px);
}

.skill-group:nth-child(1) .tag {
  animation-delay: calc(var(--i, 0) * .05s);
}

.skill-groups .tag:nth-child(1) {
  --i: 1;
}

.skill-groups .tag:nth-child(2) {
  --i: 2;
}

.skill-groups .tag:nth-child(3) {
  --i: 3;
}

.skill-groups .tag:nth-child(4) {
  --i: 4;
}

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

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

@media (prefers-reduced-motion: reduce) {

  .btn-primary,
  .tag {
    animation: none;
  }
}

/* PLACEHOLDERS & ICONS */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--ink-dim);
  font-size: .82rem;
  text-align: center;
  padding: 14px;
}

.img-placeholder svg {
  opacity: .6;
}

.event-card .img-placeholder {
  height: 220px;
  z-index: 2;
  margin-bottom: 18px;
  padding: 0;
  overflow: hidden;
}

.img-placeholder img {
  width: 120%;
  height: 120%;
  object-fit: cover;
}

@media(max-width: 420px) {
  .event-card .img-placeholder {
    height: 160px;
  }
}

.avatar-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  overflow: hidden;
  border: 1.5px dashed var(--line);
  background: var(--bg-2);
  color: var(--ink-dim);
  font-size: .75rem;
}

.avatar-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%; /* keeps the face in frame */
  border-radius: 50%;
}

.avatar-placeholder:has(img) {
  border: 0;
  background: none;
}

@media(max-width: 420px) {
  .avatar-placeholder {
    width: 140px;
    height: 140px;
  }
}

.badge-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 2px;
  flex-shrink: 0;
  font-size: .62rem;
}

.badge-placeholder {
  padding: 0;
  overflow: hidden;
}

.badge-placeholder a {
  display: block;
  width: 100%;
  height: 100%;
}

.badge-placeholder img {
  object-fit: contain; /* mostra o badge inteiro, sem cortar */
}

.badge-placeholder:has(img) {
  border: 0;
  background: none;
}

.icon-placeholder {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1.5px dashed var(--ink-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .55rem;
  color: var(--ink-dim);
  transition: border-color .2s ease, color .2s ease;
}

.btn-ghost:hover .icon-placeholder {
  border-color: #140c22;
  color: #140c22;
}

.img-placeholder,
.avatar-placeholder,
.badge-placeholder {
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}

.img-placeholder:hover,
.avatar-placeholder:hover,
.badge-placeholder:hover {
  border-color: var(--violet-bright);
  background: rgba(139, 108, 242, .08);
  transform: translateY(-2px);
}

/* LISTS (Certificates / Languages) */
.split {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

@media(min-width: 760px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.cert-item,
.lang-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cert-item {
  display: flex;
  gap: 16px;
  align-items: center;
}

.cert-issuer {
  color: var(--ink-dim);
  font-size: .9rem;
}

.cert-item:last-child,
.lang-item:last-child {
  border-bottom: none;
}

.lang-item .name {
  display: flex;
  justify-content: space-between;
  font-size: .98rem;
}

/* BACK TO TOP BUTTON */
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: .85rem;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.to-top:hover {
  border-color: var(--violet-bright);
  color: var(--lilac);
  transform: translateY(-3px);
}

.to-top svg {
  transition: transform .2s ease;
}

.to-top:hover svg {
  transform: translateY(-2px);
}

/* TIMELINE (Secção Experience) */
.timeline {
  border-left: 2px solid var(--line);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.tl-item {
  position: relative;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -33.5px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--violet-bright);
  box-shadow: 0 0 0 4px rgba(139, 108, 242, .18);
  transition: box-shadow .3s ease, transform .3s ease;
}

.tl-item:hover::before {
  box-shadow: 0 0 0 6px rgba(139, 108, 242, .28);
  transform: scale(1.15);
}

.tl-item .when {
  color: var(--violet-bright);
  font-size: .85rem;
  margin: 0 0 4px;
}

.tl-item h3 {
  margin: 0 0 2px;
  font-size: 1.15rem;
  transition: color .2s ease;
}

.tl-item:hover h3 {
  color: var(--violet-bright);
}

.tl-item .where {
  color: var(--ink-dim);
  font-size: .9rem;
  margin: 0 0 10px;
}

.tl-item ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-dim);
  font-size: .95rem;
  line-height: 1.6;
}