/* ============================= */
/* HABILIDADES (explorador estilo IDE) */
/* ============================= */
.skills {
  width: 90%;
  max-width: 1100px;
  margin: 120px auto;
}

.skills-ide {
  border-radius: 26px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.skills-ide .window-bar {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

[data-theme="light"] .skills-ide .window-title {
  color: var(--muted);
}

.ide-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 460px;
}

/* Barra lateral com as pastas */
.ide-explorer {
  padding: 18px 12px;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 3%, transparent);
}

.explorer-title {
  display: block;
  margin: 0 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.explorer-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.explorer-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  overflow: hidden;

  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-align: left;
  color: var(--muted);

  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}

.explorer-item .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: color 0.25s ease;
}

.explorer-item:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.explorer-item.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.explorer-item.is-active .icon {
  color: var(--accent);
}

.explorer-count {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Barra de progresso da troca automatica de pasta */
.skills-ide.is-autoplay .explorer-item.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transform-origin: left;
  animation: progressFill var(--autoplay-ms, 5000ms) linear forwards;
}

/* Painel com os cards */
.ide-panel {
  min-width: 0;
  padding: 22px 24px 26px;
}

.ide-command {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
}

.ide-command-text::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: caretBlink 1s steps(1) infinite;
}

.ide-count {
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--muted);
}

.skill-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.skill-tile {
  --brand: var(--accent);

  position: relative;
  padding: 18px 14px 16px;
  border-radius: 18px;
  text-align: center;
  cursor: default;

  background: color-mix(in srgb, var(--brand) 7%, var(--surface-strong));
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);

  animation: tileIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--n, 0) * 55ms);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-tile:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--brand) 28%, transparent);
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 18px;
  font-size: 2.1rem;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 15%, transparent);
}

.tile-icon .icon {
  width: 28px;
  height: 28px;
}

/* inline-block para o "transform" da animacao funcionar no icone */
.tile-icon i {
  display: inline-block;
}

.tile-icon.is-mono {
  color: var(--text);
}

.skill-tile:hover .tile-icon i,
.skill-tile:hover .tile-icon .icon {
  animation: iconWiggle 0.6s ease;
}

.tile-name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.tile-note {
  display: block;
  margin-top: 4px;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--muted);
}
