/* ==========================================================================
   Components: buttons, cards, chips, icon boxes, form controls
   ========================================================================== */

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-align: center;
  transition: all 0.15s var(--ease);
}

.btn i {
  font-size: 0.75rem;
}

.btn--primary {
  background: var(--indigo-600);
  color: #fff;
  box-shadow: 0 10px 15px -3px rgb(79 70 229 / 0.25), 0 4px 6px -4px rgb(79 70 229 / 0.25);
}

.btn--primary:hover {
  background: var(--indigo-700);
  transform: translateY(-0.125rem);
}

.btn--lg {
  padding: 1rem 2rem;
  box-shadow: 0 20px 25px -5px rgb(79 70 229 / 0.25), 0 8px 10px -6px rgb(79 70 229 / 0.25);
}

.btn--secondary {
  padding: 1rem 2rem;
  background: var(--surface);
  color: var(--slate-800);
  border: 1px solid var(--border);
}

:root.dark .btn--secondary {
  color: var(--slate-200);
}

.btn--secondary:hover {
  border-color: #6366f1;
}

.btn--block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  background: var(--control-bg);
  color: var(--control-text);
  transition: all 0.15s var(--ease);
}

.icon-btn:hover {
  box-shadow: 0 0 0 2px #6366f1;
}

/* Cards -------------------------------------------------------------------- */

.card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s var(--ease), background-color 0.3s, border-color 0.3s;
}

.card--hover:hover {
  box-shadow: var(--shadow-md);
}

.card__title {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
  color: var(--heading);
}

.card__text {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted);
}

/* Icon boxes (colour variants) ------------------------------------------- */

.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-box--md {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
}

.icon-box--lg {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-xl);
  font-size: 1.25rem;
}

.icon-box--violet {
  background: var(--violet-soft);
  color: var(--violet-text);
}

.icon-box--pink {
  background: var(--pink-soft);
  color: var(--pink-text);
}

.icon-box--green {
  background: rgb(16 185 129 / 0.1);
  color: #10b981;
}

/* Chips ------------------------------------------------------------------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips--skills {
  gap: 0.625rem;
}

.chip {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
}

.chip--neutral {
  border-radius: var(--radius-sm);
  background: var(--chip-bg);
  color: var(--muted);
}

:root.dark .chip--neutral {
  color: var(--slate-300);
}

.chip--skill {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-lg);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-weight: 600;
}

/* Form controls ---------------------------------------------------------- */

.field > * + * {
  margin-top: 0.5rem;
}

.field__label {
  display: block;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--chip-text);
}

.field__control {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--heading);
  transition: border-color 0.15s var(--ease);
}

.field__control::placeholder {
  color: var(--faint);
}

.field__control:focus {
  outline: none;
  border-color: #6366f1;
}

textarea.field__control {
  resize: none;
}
