/* ==========================================================================
   profile-card.css
   --------------------------------------------------------------------------
   Purpose
   - A composable professional identity card with room for growth, iteration,
     and stateful profile development.
   - Regions: header / badges / sections / footer / wizard / export actions.
   - This file should encourage deeper profile development by making maturity,
     completeness, openness, focus, and motion visible in subtle ways.

   Notes
   - Variants are additive and can be combined:
       .profile-card--screenshot
       .profile-card--compact
       .profile-card--feature
       .profile-card--resume
       .profile-card--explorer
       .profile-card--draft
   - JS can drive development and responsiveness through:
       [data-status]
       [data-profile-depth]
       [data-profile-completeness]
       [data-profile-focus]
       [data-profile-state]
       [data-card-charge]
       [data-section-state]
       [data-field-state]
       [data-state]
   ========================================================================== */

/* ==========================================================================
   1. Root card variables
   ========================================================================== */

.profile-card {
  --card-charge: 0;
  --profile-accent: var(--active-op-color, var(--teal));
  --profile-accent-soft:
    color-mix(in srgb, var(--profile-accent) 12%, transparent);
  --profile-accent-line:
    color-mix(in srgb, var(--profile-accent) calc(18% + (var(--card-charge) * 24%)), transparent);

  --profile-surface: var(--surface-strong);
  --profile-surface-soft: var(--surface-soft, rgba(255, 255, 255, 0.72));
  --profile-line: rgba(14, 18, 20, 0.10);
  --profile-line-soft: rgba(14, 18, 20, 0.06);
  --profile-line-strong: rgba(14, 18, 20, 0.14);

  --profile-ink: var(--ink, rgba(14, 18, 20, 0.92));
  --profile-ink-soft: var(--ink-soft, rgba(14, 18, 20, 0.68));
  --profile-ink-mid: var(--ink-mid, rgba(14, 18, 20, 0.52));
  --profile-ink-faint: var(--ink-faint, rgba(14, 18, 20, 0.25));

  --profile-radius: var(--radius, 10px);
  --profile-radius-tight: calc(var(--profile-radius) * 0.5);
  --profile-radius-pill: var(--radius-pill, 999px);

  --profile-pad-inline: 1.1rem;
  --profile-pad-block: 0.9rem;
  --profile-gap-1: 0.2rem;
  --profile-gap-2: 0.3rem;
  --profile-gap-3: 0.4rem;
  --profile-gap-4: 0.5rem;
  --profile-gap-5: 0.75rem;

  --profile-shadow-rest: 0 1px 3px rgba(14, 18, 20, 0.04);
  --profile-shadow-active:
    0 0 0 1px color-mix(in srgb, var(--profile-accent) 14%, transparent),
    0 8px 28px color-mix(in srgb, var(--profile-accent) 10%, transparent);
  --profile-shadow-focus:
    0 0 0 3px color-mix(in srgb, var(--profile-accent) 16%, transparent);

  --profile-duration-fast: var(--duration-fast, 120ms);
  --profile-duration-base: var(--duration-base, 180ms);
  --profile-duration-deliberate: var(--duration-deliberate, 320ms);
  --profile-ease: var(--ease-mechanical, ease);
  --profile-settle-ease: var(--brace-settle-ease, cubic-bezier(0.22, 0, 0.15, 1));

  width: min(480px, 100%);
  margin-inline: auto;
  position: relative;
  overflow: hidden;
  isolation: isolate;

  display: grid;
  grid-template-rows: auto auto auto auto auto;

  background: var(--profile-surface);
  border: var(--line-thin, 1px) solid var(--profile-line);
  border-left: 2px solid color-mix(
    in srgb,
    var(--profile-accent) calc(20% + var(--card-charge) * 50%),
    transparent
  );
  border-radius: var(--profile-radius);
  box-shadow: var(--profile-shadow-rest);
  transition:
    border-color var(--profile-duration-base) var(--profile-ease),
    box-shadow var(--profile-duration-deliberate) var(--profile-settle-ease),
    background-color var(--profile-duration-fast) var(--profile-ease),
    transform var(--profile-duration-fast) var(--profile-settle-ease);
}

/* grain */
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>");
  background-size: 200px 200px;
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: calc(0.14 + (var(--card-charge) * 0.12));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--profile-accent) 5%, transparent),
      transparent 38%
    );
}

.profile-card > * {
  position: relative;
  z-index: 1;
}

.profile-card:is(:hover, :focus-within) {
  box-shadow: var(--profile-shadow-active);
}

/* ==========================================================================
   2. Card development states
   ========================================================================== */

.profile-card[data-profile-state="draft"],
.profile-card--draft {
  --card-charge: 0.08;
  border-style: dashed;
}

.profile-card[data-profile-state="active"],
.profile-card[data-profile-focus="on"] {
  --card-charge: 0.34;
}

.profile-card[data-profile-state="polished"],
.profile-card[data-profile-completeness="high"] {
  --card-charge: 0.5;
}

.profile-card[data-profile-depth="1"] {
  --card-charge: max(var(--card-charge), 0.12);
}

.profile-card[data-profile-depth="2"] {
  --card-charge: max(var(--card-charge), 0.22);
}

.profile-card[data-profile-depth="3"] {
  --card-charge: max(var(--card-charge), 0.34);
}

.profile-card[data-profile-depth="4"] {
  --card-charge: max(var(--card-charge), 0.48);
}

/* ==========================================================================
   3. Variants
   ========================================================================== */

.profile-card--compact {
  --profile-pad-inline: 0.85rem;
  --profile-pad-block: 0.72rem;
  --profile-gap-5: 0.55rem;
  width: min(420px, 100%);
}

.profile-card--feature {
  width: min(560px, 100%);
  border-left-width: 3px;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--profile-accent) 10%, transparent),
    0 12px 34px color-mix(in srgb, var(--profile-accent) 10%, transparent);
}

.profile-card--resume {
  --profile-surface: color-mix(in srgb, var(--surface-strong) 94%, white);
  border-left-width: 1px;
  box-shadow: none;
}

.profile-card--explorer {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--profile-accent) 6%, transparent),
      transparent 44%
    ),
    var(--profile-surface);
}

.profile-card--screenshot {
  background: #f6f2eb;
  border: var(--line-thin, 1px) solid rgba(14, 18, 20, 0.15);
  box-shadow: 0 3px 32px rgba(14, 18, 20, 0.1);
}

/* ==========================================================================
   4. Header region
   ========================================================================== */

.profile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--profile-gap-5);
  padding: var(--profile-pad-block) var(--profile-pad-inline) 0.7rem;
  border-bottom: var(--line-hair, 0.5px) solid var(--profile-line-soft);
}

.profile-identity {
  display: flex;
  flex-direction: column;
  gap: var(--profile-gap-1);
  min-width: 0;
}

.profile-sigil {
  color: var(--profile-accent);
  opacity: 0.7;
  user-select: none;
  letter-spacing: 0.01em;
  font-family: var(--site-mono-font, monospace);
  font-size: 0.65rem;
  transition:
    opacity var(--profile-duration-fast) var(--profile-ease),
    color var(--profile-duration-fast) var(--profile-ease);
}

.profile-card:is(:hover, :focus-within) .profile-sigil {
  opacity: 0.92;
}

.profile-name-role {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.profile-name {
  color: var(--profile-ink);
  font-family: var(--site-mono-font, monospace);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    color var(--profile-duration-fast) var(--profile-ease),
    transform var(--profile-duration-fast) var(--profile-settle-ease);
}

.profile-card:is(:hover, :focus-within) .profile-name {
  transform: translateY(-0.5px);
}

.profile-name--empty {
  opacity: 0.25;
  font-weight: 400;
}

.profile-role {
  color: var(--profile-ink-soft);
  font-family: var(--site-mono-font, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

/* Status pill */
.profile-status {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 0.65rem;
  transition:
    transform var(--profile-duration-fast) var(--profile-settle-ease),
    box-shadow var(--profile-duration-base) var(--profile-settle-ease),
    opacity var(--profile-duration-fast) var(--profile-ease);
}

.profile-status:is(:hover, :focus-visible) {
  transform: translateY(-1px);
}

.profile-status[data-status="available"] {
  border-color: rgba(0, 128, 128, 0.4);
  color: var(--teal);
}

.profile-status[data-status="looking"] {
  border-color: rgba(0, 128, 128, 0.5);
  color: var(--teal);
  font-weight: 500;
}

.profile-status[data-status="consulting"] {
  border-color: rgba(120, 100, 60, 0.3);
  color: color-mix(in srgb, var(--profile-ink) 78%, #6d5933);
}

.profile-status[data-status="open"] {
  border-color: rgba(14, 18, 20, 0.15);
}

.profile-status[data-status="building"] {
  border-color: rgba(14, 18, 20, 0.1);
  opacity: 0.78;
}

.profile-status[data-status="quiet"] {
  opacity: 0.58;
}

.profile-status[data-status="featured"] {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--profile-accent) 20%, transparent),
    0 0 12px color-mix(in srgb, var(--profile-accent) 12%, transparent);
}

/* ==========================================================================
   5. Tagline
   ========================================================================== */

.profile-tagline {
  margin: 0;
  padding: 0.55rem var(--profile-pad-inline);
  border-bottom: var(--line-hair, 0.5px) solid var(--profile-line-soft);
  color: var(--profile-ink-soft);
  font-family: var(--site-mono-font, monospace);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.5;
}

.profile-card[data-profile-state="draft"] .profile-tagline {
  opacity: 0.8;
}

.profile-card[data-profile-completeness="low"] .profile-tagline {
  border-bottom-style: dashed;
}

/* ==========================================================================
   6. Badge region
   ========================================================================== */

.profile-badges {
  display: flex;
  flex-direction: column;
  gap: var(--profile-gap-2);
  padding: 0.5rem var(--profile-pad-inline);
  border-bottom: var(--line-hair, 0.5px) solid var(--profile-line-soft);
}

.profile-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.profile-badge-group[data-badge-variant="primary"] .profile-tag {
  border-color: color-mix(in srgb, var(--profile-accent) 24%, transparent);
  color: color-mix(in srgb, var(--profile-accent) 84%, var(--profile-ink));
}

.profile-badge-group[data-badge-variant="secondary"] .profile-tag {
  opacity: 0.84;
}

.profile-badge-group[data-badge-variant="research"] .profile-tag {
  background: color-mix(in srgb, rgba(235, 244, 255, 0.9) 86%, transparent);
}

.profile-badge-group[data-badge-variant="craft"] .profile-tag {
  background: color-mix(in srgb, rgba(255, 248, 235, 0.9) 86%, transparent);
}

/* ==========================================================================
   7. Section region
   ========================================================================== */

.profile-sections {
  padding: 0.4rem 0;
}

.profile-section {
  position: relative;
  padding: 0.5rem var(--profile-pad-inline);
  border-left: 2px solid transparent;
  transition:
    border-color var(--touch-acknowledge, 90ms),
    background-color var(--profile-duration-fast) var(--profile-ease),
    transform var(--profile-duration-fast) var(--profile-settle-ease),
    box-shadow var(--profile-duration-base) var(--profile-settle-ease);
}

.profile-section:hover,
.profile-section:focus-within {
  border-left-color: rgba(0, 128, 128, 0.2);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--profile-accent) 4%, transparent),
      transparent 40%
    );
}

.profile-section[data-section-state="active"] {
  border-left-color: color-mix(in srgb, var(--profile-accent) 44%, transparent);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--profile-accent) 7%, transparent),
      transparent 46%
    );
}

.profile-section[data-section-state="complete"]::after {
  content: "";
  position: absolute;
  inset: 0.45rem 0.65rem auto auto;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--profile-accent) 68%, transparent);
  opacity: 0.72;
}

.profile-section[data-section-state="draft"] {
  opacity: 0.84;
}

.profile-section-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.3rem;
  color: var(--profile-ink-soft);
  font-family: var(--site-mono-font, monospace);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-section-op {
  color: var(--profile-accent);
  opacity: 0.6;
  font-weight: 400;
  transition: opacity var(--profile-duration-fast) var(--profile-ease);
}

.profile-section:hover .profile-section-op,
.profile-section:focus-within .profile-section-op,
.profile-section[data-section-state="active"] .profile-section-op {
  opacity: 1;
}

.profile-section-body {
  margin: 0;
  color: var(--profile-ink);
  font-family: var(--site-mono-font, monospace);
  font-size: 0.83rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.profile-section-body[data-profile-density="dense"] {
  font-size: 0.78rem;
  line-height: 1.48;
}

.profile-section-body[data-profile-density="airy"] {
  line-height: 1.7;
}

/* ==========================================================================
   8. Footer region
   ========================================================================== */

.profile-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.65rem var(--profile-pad-inline) 0.9rem;
  border-top: var(--line-hair, 0.5px) solid rgba(14, 18, 20, 0.08);
}

.profile-contact {
  color: var(--teal);
  opacity: 0.85;
  font-family: var(--site-mono-font, monospace);
  font-size: 0.75rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.profile-footer-link {
  font-size: 0.68rem;
  transition:
    transform var(--profile-duration-fast) var(--profile-settle-ease),
    opacity var(--profile-duration-fast) var(--profile-ease);
}

.profile-footer-link:hover,
.profile-footer-link:focus-visible {
  transform: translateY(-1px);
}

/* ==========================================================================
   9. Wizard layout
   ========================================================================== */

.profile-wizard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--surface-gap, 1rem);
  align-items: start;
}

@media (max-width: 720px) {
  .profile-wizard {
    grid-template-columns: 1fr;
  }
}

.profile-wizard-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-split-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.profile-section-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.4rem;
  align-items: center;
}

.profile-link-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
  gap: 0.3rem;
  align-items: center;
}

.profile-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.2rem 0 0.9rem;
}

.profile-preset-bar .profile-export-btn[aria-pressed="true"] {
  border-color: var(--teal);
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 7%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--teal) 14%, transparent);
}

.profile-tool-guide {
  display: grid;
  gap: 0.7rem;
}

.profile-tool-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.profile-tool-guide-grid > article {
  padding: 0.8rem 0.9rem;
  border: var(--line-thin, 1px) solid rgba(14, 18, 20, 0.1);
  border-radius: calc(var(--profile-radius) * 0.7);
  background: color-mix(in srgb, var(--surface-soft) 88%, white);
}

.profile-tool-guide-grid h3,
.profile-tool-guide-grid strong {
  margin: 0 0 0.3rem;
}

.profile-tool-guide-grid p,
.profile-tool-guide-grid ul {
  margin: 0;
}

.profile-example-list {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.1rem;
}

/* ==========================================================================
   10. Fields
   ========================================================================== */

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
}

.profile-field[data-field-state="active"] {
  --profile-field-line: color-mix(in srgb, var(--profile-accent) 42%, transparent);
}

.profile-field[data-field-state="complete"] {
  --profile-field-line: color-mix(in srgb, var(--profile-accent) 28%, transparent);
}

.profile-field-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
  color: var(--profile-ink-mid);
  font-family: var(--site-mono-font, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-field-op {
  color: var(--teal);
  opacity: 0.7;
  font-size: 0.72rem;
}

.profile-field-hint {
  color: var(--profile-ink-faint);
  font-family: var(--site-mono-font, monospace);
  font-size: 0.6rem;
  font-style: italic;
}

.profile-field input,
.profile-field textarea,
.profile-field select,
.badge-input-row input,
.badge-input-row select,
.profile-link-row input,
.profile-link-row select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.6rem;
  border: var(--line-thin, 1px) solid rgba(14, 18, 20, 0.12);
  border-radius: calc(var(--profile-radius) * 0.6);
  background: var(--surface, rgba(255, 255, 255, 0.62));
  color: var(--profile-ink);
  color-scheme: light;
  outline: none;
  font-family: var(--site-mono-font, monospace);
  font-size: 0.82rem;
  transition:
    border-color var(--touch-acknowledge, 90ms),
    box-shadow var(--profile-duration-base) var(--profile-settle-ease),
    background-color var(--profile-duration-fast) var(--profile-ease);
}

.profile-field input:hover,
.profile-field textarea:hover,
.profile-field select:hover,
.badge-input-row input:hover,
.badge-input-row select:hover,
.profile-link-row input:hover,
.profile-link-row select:hover {
  border-color: color-mix(in srgb, var(--profile-accent) 24%, transparent);
}

.profile-field input:focus,
.profile-field textarea:focus,
.profile-field select:focus,
.badge-input-row input:focus,
.badge-input-row select:focus,
.profile-link-row input:focus,
.profile-link-row select:focus {
  border-color: var(--teal);
  box-shadow: var(--profile-shadow-focus);
}

.profile-field[data-field-state="complete"] input,
.profile-field[data-field-state="complete"] textarea,
.profile-field[data-field-state="complete"] select {
  border-color: color-mix(in srgb, var(--profile-accent) 26%, transparent);
}

.profile-field[data-field-state="draft"] input,
.profile-field[data-field-state="draft"] textarea,
.profile-field[data-field-state="draft"] select {
  border-style: dashed;
}

.profile-field textarea {
  resize: vertical;
  min-height: 4rem;
  line-height: 1.5;
}

.profile-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='rgba(14,18,20,0.4)'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 1.8rem;
}

.badge-input-row select,
.profile-link-row select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='rgba(14,18,20,0.4)'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 1.8rem;
}

/* ==========================================================================
   11. Badge input row and actions
   ========================================================================== */

.badge-input-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.3rem;
  align-items: center;
}

.badge-input-row select {
  font-size: 0.72rem;
  padding: 0.4rem 1.6rem 0.4rem 0.5rem;
}

.badge-input-row button,
.profile-link-row button,
.profile-add-btn,
.profile-section-add-btn,
.profile-export-btn {
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  font-family: var(--site-mono-font, monospace);
  font-size: 0.68rem;
  transition:
    border-color 90ms,
    color 90ms,
    transform var(--profile-duration-fast) var(--profile-settle-ease),
    box-shadow var(--profile-duration-base) var(--profile-settle-ease),
    background-color var(--profile-duration-fast) var(--profile-ease);
}

.badge-input-row button,
.profile-link-row button,
.profile-add-btn,
.profile-section-add-btn {
  padding: 0.38rem 0.6rem;
  border: var(--line-thin, 1px) solid rgba(14, 18, 20, 0.12);
  border-radius: calc(var(--profile-radius) * 0.5);
  background: transparent;
  color: var(--profile-ink-soft);
}

.badge-input-row button:hover,
.profile-link-row button:hover,
.profile-add-btn:hover,
.profile-section-add-btn:hover,
.badge-input-row button:focus-visible,
.profile-link-row button:focus-visible,
.profile-add-btn:focus-visible,
.profile-section-add-btn:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

.profile-add-btn[data-state="encouraging"],
.profile-section-add-btn[data-state="encouraging"] {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--profile-accent) 18%, transparent),
    0 0 12px color-mix(in srgb, var(--profile-accent) 10%, transparent);
}

/* ==========================================================================
   12. Tag strip
   ========================================================================== */

.profile-tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-height: 1.5rem;
}

.profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border: var(--line-hair, 0.5px) solid rgba(14, 18, 20, 0.12);
  border-radius: var(--profile-radius-pill);
  background: var(--surface-soft);
  color: var(--profile-ink-soft);
  font-family: var(--site-mono-font, monospace);
  font-size: 0.68rem;
  transition:
    border-color var(--profile-duration-fast) var(--profile-ease),
    background-color var(--profile-duration-fast) var(--profile-ease),
    transform var(--profile-duration-fast) var(--profile-settle-ease);
}

.profile-tag:hover {
  transform: translateY(-1px);
}

.profile-tag[data-tag-variant="primary"] {
  border-color: color-mix(in srgb, var(--profile-accent) 24%, transparent);
}

.profile-tag[data-tag-variant="development"] {
  border-style: dashed;
}

.profile-tag-remove {
  display: flex;
  align-items: center;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.5;
  font-size: 0.75rem;
  line-height: 1;
  touch-action: manipulation;
  transition:
    opacity var(--profile-duration-fast) var(--profile-ease),
    transform var(--profile-duration-fast) var(--profile-settle-ease);
}

.profile-tag-remove:hover,
.profile-tag-remove:focus-visible {
  opacity: 1;
  transform: scale(1.06);
}

/* ==========================================================================
   13. Export actions
   ========================================================================== */

.profile-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.5rem;
}

.profile-export-btn {
  padding: 0.25rem 0.6rem;
  border: var(--line-thin, 1px) solid rgba(14, 18, 20, 0.12);
  border-radius: calc(var(--profile-radius) * 0.5);
  background: transparent;
  color: var(--profile-ink-soft);
}

.profile-export-btn:hover,
.profile-export-btn:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

.profile-export-btn[data-state="success"] {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--teal) 16%, transparent);
}

.profile-export-btn[data-state="working"] {
  opacity: 0.74;
}

.profile-export-btn[data-state="encouraging"] {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--profile-accent) 18%, transparent),
    0 0 10px color-mix(in srgb, var(--profile-accent) 10%, transparent);
}

/* ==========================================================================
   14. Development encouragement surfaces
   --------------------------------------------------------------------------
   These are meant to make progress and depth feel visible.
   ========================================================================== */

.profile-card[data-profile-completeness="low"] .profile-card-footer::before,
.profile-card[data-profile-completeness="medium"] .profile-card-footer::before,
.profile-card[data-profile-completeness="high"] .profile-card-footer::before {
  content: attr(data-profile-completeness);
  align-self: flex-start;
  padding: 0.14rem 0.42rem;
  border: 1px solid color-mix(in srgb, var(--profile-accent) 18%, transparent);
  border-radius: var(--profile-radius-pill);
  background: color-mix(in srgb, var(--profile-accent) 6%, transparent);
  color: var(--profile-ink-soft);
  font-family: var(--site-mono-font, monospace);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-card[data-profile-depth] .profile-card-header::after {
  content: "";
  position: absolute;
  right: var(--profile-pad-inline);
  bottom: -1px;
  height: 2px;
  width: calc(18% + (min(var(--card-charge), 1) * 42%));
  background: color-mix(in srgb, var(--profile-accent) 28%, transparent);
  border-radius: 999px;
  pointer-events: none;
}

/* ==========================================================================
   15. Responsive
   ========================================================================== */

@media (max-width: 560px) {
  .profile-card {
    --profile-pad-inline: 0.9rem;
  }

  .profile-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-status {
    align-self: flex-start;
  }

  .badge-input-row {
    grid-template-columns: 1fr;
  }

  .profile-split-row,
  .profile-link-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   16. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .profile-card,
  .profile-name,
  .profile-status,
  .profile-section,
  .profile-footer-link,
  .profile-field input,
  .profile-field textarea,
  .profile-field select,
  .profile-tag,
  .profile-tag-remove,
  .badge-input-row button,
  .profile-link-row button,
  .profile-add-btn,
  .profile-section-add-btn,
  .profile-export-btn {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}
