:root {
  --profile-bg: linear-gradient(180deg, color-mix(in srgb, var(--bg-secondary) 88%, var(--bg-primary) 12%) 0%, var(--bg-primary) 100%);
  --profile-ink: var(--text-primary);
  --profile-muted: var(--text-secondary);
  --profile-soft: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  --profile-line: color-mix(in srgb, var(--text-dark) 12%, transparent);
  --profile-shadow: 0 28px 52px color-mix(in srgb, var(--text-dark) 14%, transparent);
  --profile-radius: 26px;
  --profile-chip-bg: color-mix(in srgb, var(--accent-secondary) 16%, transparent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: var(--profile-bg);
  color: var(--profile-ink);
}

.profile {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 3.6rem) clamp(1.6rem, 6vw, 2.6rem) clamp(3rem, 7vw, 4rem);
  display: grid;
  gap: clamp(2.2rem, 4vw, 3rem);
}

.profile--empty {
  min-height: 70vh;
  place-items: center;
}

.profile-empty {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: var(--profile-radius);
  border: 1px solid var(--profile-line);
  background: var(--profile-soft);
  box-shadow: var(--profile-shadow);
  display: grid;
  gap: 1.4rem;
  justify-items: center;
  text-align: center;
}

.profile-empty__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-secondary) 24%, transparent);
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--accent-secondary) 82%, var(--accent-hover) 18%);
  box-shadow: 0 20px 42px color-mix(in srgb, var(--text-dark) 18%, transparent);
}

.profile-empty__icon i {
  width: 36px;
  height: 36px;
}

.profile-empty h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
}

.profile-empty p {
  margin: 0;
  max-width: 42ch;
  color: var(--profile-muted);
  line-height: 1.6;
}

.profile-header {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: clamp(1.6rem, 3vw, 2.6rem);
  background: var(--profile-soft);
  padding: clamp(1.8rem, 3vw, 2.4rem);
  border-radius: var(--profile-radius);
  border: 1px solid var(--profile-line);
  box-shadow: var(--profile-shadow);
  align-items: center;
}

.profile-header__avatar {
  width: clamp(120px, 18vw, 168px);
  height: clamp(120px, 18vw, 168px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid color-mix(in srgb, var(--accent-secondary) 22%, transparent);
  box-shadow: 0 18px 38px color-mix(in srgb, var(--text-dark) 16%, transparent);
}

.profile-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header__body {
  position: relative;
  display: grid;
  gap: 1rem;
  padding-top: 0.6rem;
}

.profile-header__actions {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  gap: 0.6rem;
}

.profile-header__actions--guest {
  position: static;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.profile-header__actions--viewer {
  position: static;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.profile-header__actions--viewer .profile-btn {
  min-width: 120px;
  justify-content: center;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--profile-line) 80%, transparent);
  background: color-mix(in srgb, var(--bg-secondary) 90%, transparent);
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.profile-btn i {
  width: 18px;
  height: 18px;
}

.profile-btn--primary {
  border-color: color-mix(in srgb, var(--accent-secondary) 40%, transparent);
  background: color-mix(in srgb, var(--accent-secondary) 20%, transparent);
  color: color-mix(in srgb, var(--accent-secondary) 90%, var(--accent-hover) 10%);
}

.profile-btn--ghost {
  background: transparent;
  border-color: var(--profile-line);
  color: var(--profile-ink);
}

.profile-btn:hover,
.profile-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px color-mix(in srgb, var(--text-dark) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent-secondary) 40%, transparent);
  outline: none;
}

.profile-btn.is-loading,
.profile-btn[disabled] {
  opacity: 0.65;
  pointer-events: none;
}

.profile-icon-btn {
  border: 1px solid var(--profile-line);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg-secondary) 86%, transparent);
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-icon-btn:hover,
.profile-icon-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px color-mix(in srgb, var(--text-dark) 16%, transparent);
}

.profile-icon-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-secondary) 35%, transparent);
  outline-offset: 2px;
}

.profile-header__username {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 600;
}

.profile-header__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  font-size: 0.95rem;
}

.profile-header__stats li {
  display: inline-flex;
  gap: 0.35rem;
  align-items: baseline;
}

.profile-header__stats span {
  font-weight: 600;
  font-size: 1.05rem;
}

.profile-header__name {
  margin: 0;
  font-weight: 600;
}

.profile-header__bio {
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.profile-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.88rem;
  color: var(--profile-muted);
}

.profile-header__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-header__link {
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
  text-decoration: none;
  font-size: 0.92rem;
}

.profile-header__link:hover,
.profile-header__link:focus-visible {
  text-decoration: underline;
}

.profile-schedule {
  background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
  border-radius: var(--profile-radius);
  border: 1px solid var(--profile-line);
  box-shadow: var(--profile-shadow);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: grid;
  gap: 1.4rem;
}

.profile-schedule header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.profile-schedule header h2 {
  margin: 0;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-schedule__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.profile-schedule__actions .profile-btn {
  min-width: 150px;
  justify-content: center;
}

.profile-link {
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-link:hover,
.profile-link:focus-visible {
  text-decoration: underline;
}

.profile-link--inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.profile-link--inline i {
  width: 16px;
  height: 16px;
}

.profile-schedule__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-schedule__empty {
  padding: 2.5rem 1.4rem;
  text-align: center;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.profile-schedule__empty i {
  width: 48px;
  height: 48px;
  color: color-mix(in srgb, var(--accent-secondary) 50%, transparent);
}

.profile-schedule__empty p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.94rem;
  line-height: 1.5;
  max-width: 48ch;
}

.profile-schedule__card {
  background: color-mix(in srgb, var(--bg-primary) 95%, transparent);
  border-radius: 22px;
  border: 1px solid var(--profile-line);
  padding: 1.3rem 1.4rem;
  display: grid;
  gap: 0.8rem;
}

.profile-schedule__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-schedule__date {
  font-weight: 600;
  font-size: 0.92rem;
}

.profile-schedule__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-schedule__tag--ready {
  background: color-mix(in srgb, var(--accent-secondary) 18%, transparent);
  color: color-mix(in srgb, var(--accent-hover) 88%, var(--accent-secondary) 12%);
}

.profile-schedule__tag--pending {
  background: color-mix(in srgb, var(--notify-warning) 22%, transparent);
  color: color-mix(in srgb, var(--notify-warning) 70%, var(--text-dark) 30%);
}

.profile-schedule__tag--open {
  background: color-mix(in srgb, var(--notify-success) 22%, transparent);
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
}

.profile-schedule__card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.profile-schedule__card p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.9rem;
}

.profile-schedule__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.88rem;
}

.profile-schedule__meta i {
  width: 16px;
  height: 16px;
}

.profile-schedule__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--profile-muted);
}

.profile-chip {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  background: var(--profile-chip-bg);
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.profile-chip--action:hover,
.profile-chip--action:focus-visible {
  background: color-mix(in srgb, var(--accent-secondary) 24%, transparent);
  transform: translateY(-1px);
}

.profile-insights {
  background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
  border-radius: var(--profile-radius);
  border: 1px solid var(--profile-line);
  box-shadow: var(--profile-shadow);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: grid;
  gap: 1.4rem;
}

.profile-insights header {
  display: grid;
  gap: 0.6rem;
}

.profile-insights header h2 {
  margin: 0;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-insights header p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.profile-insights__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-insight {
  background: color-mix(in srgb, var(--bg-primary) 95%, transparent);
  border-radius: 22px;
  border: 1px solid var(--profile-line);
  padding: 1.3rem 1.4rem;
  display: grid;
  gap: 0.8rem;
}

.profile-insight strong {
  font-size: 2rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--accent-secondary) 80%, var(--accent-hover) 20%);
}

.profile-insight p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.profile-chip--highlight {
  cursor: default;
}

.profile-pins {
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  border-radius: var(--profile-radius);
  border: 1px solid var(--profile-line);
  box-shadow: var(--profile-shadow);
  padding: clamp(1.6rem, 3vw, 2.3rem);
  display: grid;
  gap: 1.4rem;
}

.profile-pins header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.profile-pins header h2 {
  margin: 0;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.profile-pins__row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-pins__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-pins__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.profile-pin {
  border: 1px solid var(--profile-line);
  border-radius: 22px;
  margin-bottom: 10;
  padding: 1.3rem 1.4rem;
  background: color-mix(in srgb, var(--bg-primary) 96%, transparent);
  box-shadow: 0 20px 42px color-mix(in srgb, var(--text-dark) 12%, transparent);
  display: grid;
  gap: 0.8rem;
}

.profile-pin__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-secondary) 16%, transparent);
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-pin h3 {
  margin: 0;
  font-size: 1.08rem;
}

.profile-pin p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.profile-tabs {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  border-top: 1px solid var(--profile-line);
  border-bottom: 1px solid var(--profile-line);
  padding: 0.8rem 0;
  background: color-mix(in srgb, var(--bg-primary) 60%, transparent);
}

.profile-tab {
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--profile-muted);
  cursor: pointer;
}

.profile-tab.is-active {
  color: var(--profile-ink);
}

.profile-feed {
  display: none;
}

.profile-feed.is-active {
  display: block;
}

.profile-feed__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
}

.profile-feed__item {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: color-mix(in srgb, var(--accent-secondary) 12%, transparent);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--text-dark) 12%, transparent);
}

.profile-feed__empty {
  padding: 3rem 1.4rem;
  text-align: center;
  color: var(--profile-muted);
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

.profile-feed__empty i {
  color: color-mix(in srgb, var(--accent-secondary) 50%, transparent);
}

.profile-testimonials {
  background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
  border-radius: var(--profile-radius);
  border: 1px solid var(--profile-line);
  box-shadow: var(--profile-shadow);
  padding: clamp(1.6rem, 3vw, 2.3rem);
  display: grid;
  gap: 1.4rem;
}

.profile-testimonials header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.profile-testimonials header h2 {
  margin: 0;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.profile-testimonials__controls {
  display: inline-flex;
  gap: 0.6rem;
}

.profile-testimonials__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 1rem;
  overflow: hidden;
}

.profile-testimonial {
  border: 1px solid var(--profile-line);
  border-radius: 22px;
  padding: 1.4rem 1.6rem;
  background: color-mix(in srgb, var(--bg-primary) 96%, transparent);
  box-shadow: 0 18px 38px color-mix(in srgb, var(--text-dark) 12%, transparent);
  display: grid;
  gap: 0.8rem;
}

.profile-testimonial p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--profile-muted);
}

.profile-testimonial span {
  font-size: 0.85rem;
  color: var(--profile-muted);
}

@media (max-width: 720px) {
  .profile-header {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    padding-top: clamp(2.4rem, 6vw, 3rem);
  }

  .profile-header__actions {
    right: 50%;
    transform: translateX(50%);
  }

  .profile-header__stats {
    justify-content: center;
  }

  .profile-header__meta {
    justify-content: center;
  }

  .profile-feed__grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .profile-testimonials__track {
    grid-auto-columns: 100%;
  }
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.profile-tag {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-secondary) 14%, transparent);
  color: color-mix(in srgb, var(--accent-secondary) 80%, var(--accent-hover) 20%);
  font-size: 0.78rem;
  font-weight: 600;
}

.profile-schedule__tag--cancelled {
  background: color-mix(in srgb, var(--notify-error) 20%, transparent);
  color: color-mix(in srgb, var(--notify-error) 68%, var(--text-dark) 32%);
}

.profile-schedule__tag--archived {
  background: color-mix(in srgb, var(--text-dark) 10%, transparent);
  color: var(--profile-muted);
}

.profile-chip--meta {
  cursor: default;
  background: color-mix(in srgb, var(--bg-primary) 85%, transparent);
  color: var(--profile-muted);
}

.profile-feed__grid--posts {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.profile-feed__item--post {
  padding: 1.2rem 1.3rem;
  padding-bottom: 0;
  background: color-mix(in srgb, var(--bg-primary) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-dark) 10%, transparent);
  box-shadow: var(--profile-shadow);
  display: grid;
  gap: 0.75rem;
}

.profile-feed__item--post::before {
  content: none;
}

.profile-feed__item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
}

.profile-feed__item-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.profile-feed__item-head time {
  font-size: 0.82rem;
  color: var(--profile-muted);
}

.profile-feed__item--post p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--profile-ink);
  line-height: 1.5;
}

.profile-feed__item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--profile-muted);
}

.profile-feed__item-foot span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-feed__item-foot a {
  text-decoration: none;
  font-weight: 600;
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
}

.profile-feed__item-foot a:hover,
.profile-feed__item-foot a:focus-visible {
  text-decoration: underline;
}

.profile-empty {
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.9rem;
}

.profile-empty a {
  color: color-mix(in srgb, var(--accent-secondary) 70%, var(--accent-hover) 30%);
  font-weight: 600;
}
