:root {
  color-scheme: light;
  --background: #f5f7f9;
  --surface: #ffffff;
  --surface-muted: #f8fafb;
  --text: #17191d;
  --muted: #69727d;
  --border: #e1e6ea;
  --primary: #2675e8;
  --primary-dark: #185fc4;
  --primary-soft: #eaf2ff;
  --success: #17834f;
  --success-soft: #e8f7ef;
  --warning: #9a6300;
  --shadow: 0 16px 45px rgba(20, 28, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  width: min(1180px, calc(100% - 28px));
  min-height: 62px;
  margin: 0 auto;
  align-items: center;
  gap: 10px;
}

.brand {
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  margin-left: auto;
  white-space: nowrap;}

.hero {
  padding: 34px 0 24px;
  background:
    radial-gradient(
      circle at top right,
      rgba(38, 117, 232, 0.16),
      transparent 42%
    ),
    var(--surface);
  border-bottom: 1px solid var(--border);}

.hero-inner {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(34px, 3.7vw, 52px);
  font-weight: 620;
  line-height: 1.04;
  letter-spacing: -0.03em;
  white-space: nowrap;}

.hero-copy {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  margin-top: 16px;
  margin-bottom: 24px;}

.filters {
  display: grid;
  margin-top: 28px;
  gap: 10px;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  outline: none;
  background: var(--surface);
  color: var(--text);
}

.search-field input:focus,
.select-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.today-filter {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 650;
}

.today-filter input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.category-chips {
  display: flex;
  margin-top: 15px;
  padding-bottom: 2px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: none;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.category-chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.marketplace-shell,
.profile-page {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 54px;
}

.marketplace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.marketplace-toolbar h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.result-summary {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.view-switcher {
  display: flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.view-button {
  min-width: 66px;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.view-button.active {
  background: var(--primary);
  color: #ffffff;
}

.status-message {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status-message.error {
  color: #a02929;
}

.specialist-grid {
  display: grid;
  margin-top: 14px;
  gap: 14px;
}

.specialist-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 15px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(20, 28, 38, 0.03);
  color: inherit;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.specialist-card:hover {
  transform: translateY(-2px);
  border-color: #c7d8f2;
  box-shadow: var(--shadow);
}

.specialist-avatar,
.specialist-initials {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 22px;
  font-weight: 850;
  object-fit: cover;
}

.specialist-main {
  min-width: 0;
}

.specialist-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.specialist-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.specialist-headline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.specialist-location {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.specialist-badges,
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  margin-top: 11px;
  gap: 7px;
}

.small-badge,
.profile-badge,
.verified-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 750;
}

.small-badge.available,
.profile-badge.available {
  background: var(--success-soft);
  color: var(--success);
}

.verified-badge {
  flex: none;
}

.map-panel {
  margin-top: 16px;
}

.map {
  width: 100%;
  height: min(66vh, 660px);
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #e9edf1;
}

.map-note {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.map-popup {
  min-width: 180px;
}

.map-popup strong {
  display: block;
  margin-bottom: 3px;
}

.map-popup span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.map-popup a {
  display: inline-block;
  margin-top: 9px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.profile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-button,
.secondary-button {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 700;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
}

.secondary-button {
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.profile-card {
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-header {
  display: grid;
  padding: 24px;
  gap: 19px;
}

.profile-avatar,
.profile-initials {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 32px;
  font-weight: 850;
  object-fit: cover;
}

.profile-heading {
  min-width: 0;
}

.profile-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.profile-title-row h1 {
  margin: 0;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.profile-headline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 650;
}

.profile-location {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.profile-biography {
  max-width: 760px;
  margin: 18px 0 0;
  color: #343a41;
  white-space: pre-line;
}

.profile-section {
  padding: 23px;
  border-top: 1px solid var(--border);
}

.profile-section h2 {
  margin: 0 0 15px;
  font-size: 19px;
  font-weight: 620;
}

.service-grid,
.review-grid,
.portfolio-grid {
  display: grid;
  gap: 12px;
}

.service-card,
.review-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface-muted);
}

.service-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding-right: 46px;
  color: var(--text);
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.service-card:visited {
  color: var(--text);
}

.service-card::after {
  position: absolute;
  top: 50%;
  right: 17px;
  content: "→";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  transition:
    color 150ms ease,
    transform 150ms ease;
}

.service-card:hover {
  transform: translateY(-1px);
  border-color: #c7d8f2;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 28, 38, 0.06);
}

.service-card:hover::after {
  color: var(--primary);
  transform: translate(2px, -50%);
}

.service-card h3,
.portfolio-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.service-card p,
.portfolio-card p,
.review-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
}

.portfolio-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.portfolio-card:hover {
  transform: translateY(-1px);
  border-color: #c7d8f2;
  box-shadow: 0 8px 24px rgba(20, 28, 38, 0.06);
}

.portfolio-image,
.portfolio-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  background: #edf1f4;
  color: var(--muted);
  object-fit: cover;
}

.portfolio-body {
  padding: 14px;
}

.review-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.review-name {
  font-weight: 750;
}

.review-rating {
  color: var(--warning);
  font-weight: 800;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 680px) {
  .filters {
    grid-template-columns:
      minmax(260px, 1fr)
      minmax(190px, 250px)
      auto;
  }

  .specialist-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .profile-header {
    grid-template-columns: 112px minmax(0, 1fr);
    padding: 32px;
  }

  .profile-section {
    padding: 28px 32px;
  }

  .service-grid,
  .review-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .portfolio-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .specialist-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .portfolio-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero h1 {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .brand-label {
    font-size: 14px;
  }

  .hero {
    padding-top: 26px;
  }
}

.location-filter {
  display: grid;
  grid-template-columns:
    auto
    minmax(170px, 260px)
    minmax(150px, 1fr);
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
}

.location-button,
.manual-location-field input {
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.location-button {
  padding: 0 15px;
  font-weight: 600;
  cursor: pointer;
}

.location-button:hover {
  border-color: var(--primary);
}

.location-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.manual-location-field input {
  width: 100%;
  padding: 0 13px;
  outline: none;
}

.manual-location-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.location-status {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.location-status.active {
  color: var(--primary);
}

.location-status.error {
  color: #b42318;
}

@media (max-width: 760px) {
  .location-filter {
    grid-template-columns: 1fr 1fr;
  }

  .location-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .location-filter {
    grid-template-columns: 1fr;
  }

  .location-status {
    grid-column: auto;
  }
}

.service-results-section {
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.results-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.service-result-grid {
  display: grid;
  margin-top: 14px;
  gap: 14px;
}

.service-result-card {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.service-result-card:hover {
  transform: translateY(-2px);
  border-color: #c7d8f2;
  box-shadow: var(--shadow);
}

.service-result-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.service-result-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.service-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

@media (min-width: 680px) {
  .service-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .service-result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
