:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211d;
  background: #f5f8f6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f5f8f6;
}

button,
a {
  font: inherit;
}

.profile-topbar {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(220, 231, 224, 0.9);
  background: rgba(255, 255, 255, 0.92);
  padding: 0 max(1rem, calc((100% - 1020px) / 2));
  box-shadow: 0 5px 20px rgba(20, 48, 32, 0.035);
  backdrop-filter: blur(16px);
}

.brand,
.profile-topbar nav {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  color: #17211d;
  font-size: 1.08rem;
  font-weight: 780;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.72rem;
  background: linear-gradient(145deg, #13a176, #087351);
  color: #fff;
  box-shadow: 0 4px 10px rgba(11, 123, 91, 0.22);
}

.profile-topbar .profile-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid #edf1ee;
  border-radius: 999px;
  background: #f8faf9;
}

.profile-topbar .nav-link {
  display: inline-flex;
  min-height: 2.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  color: #64736c;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.profile-topbar .nav-link:hover,
.profile-topbar .nav-link:focus-visible {
  background: #eaf4ee;
  color: #0b7b5b;
  outline: none;
}

.profile-topbar .nav-link[aria-current="page"] {
  background: #fff;
  color: #0b7b5b;
  box-shadow: 0 1px 4px rgba(20, 48, 32, 0.1);
}

.profile-topbar .nav-button {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  margin-left: 0.45rem;
  border: 1px solid #087351;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b8a65, #087351);
  padding: 0.58rem 1.1rem;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(11, 123, 91, 0.16);
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.profile-topbar .nav-button:hover,
.profile-topbar .nav-button:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #0b7b5b, #075f45);
  box-shadow: 0 6px 14px rgba(11, 123, 91, 0.22);
  outline: none;
}

.primary-button:hover {
  background: #08674c;
}

.profile-logout-button {
  border: 1px solid #f1d2d0;
  border-radius: 0.7rem;
  background: #fff7f6;
  padding: 0.6rem 0.9rem;
  color: #a43a32;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
}

.profile-logout-button:hover,
.profile-logout-button:focus-visible {
  border-color: #e8b6b2;
  background: #fff0ee;
  outline: 2px solid rgba(164, 58, 50, 0.12);
  outline-offset: 1px;
}

.profile-logout-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.profile-page {
  width: min(900px, 100% - 2rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: #526159;
  font-size: 0.87rem;
  text-decoration: none;
}

.back-link:hover {
  color: #0b7b5b;
}

.profile-status,
.connections-status {
  padding: 2.5rem 1rem;
  color: #718078;
  text-align: center;
}

.profile-status.is-error {
  color: #b42318;
}

.profile-content {
  overflow: hidden;
  border: 1px solid #e4ebe7;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 12px 36px rgba(15, 40, 28, 0.06);
}

.hidden {
  display: none !important;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, #f1f8f4, #fff 75%);
  padding: clamp(1.5rem, 5vw, 3rem);
}

.profile-photo-button {
  position: relative;
  display: block;
  width: clamp(112px, 20vw, 176px);
  height: clamp(112px, 20vw, 176px);
  flex: none;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #dfeee7;
  padding: 0;
  box-shadow: 0 4px 18px rgba(20, 60, 40, 0.13);
  cursor: zoom-in;
}

.profile-photo,
.profile-initial {
  width: 100%;
  height: 100%;
}

.profile-photo {
  display: block;
  object-fit: cover;
}

.profile-initial {
  display: grid;
  place-items: center;
  color: #0b7b5b;
  font-size: 3.5rem;
  font-weight: 700;
}

.photo-hint {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(15, 35, 26, 0.67);
  padding: 0.35rem;
  color: #fff;
  font-size: 0.68rem;
  opacity: 0;
  transition: opacity 120ms ease;
}

.profile-photo-button:hover .photo-hint,
.profile-photo-button:focus-visible .photo-hint {
  opacity: 1;
}

.profile-hero-copy {
  min-width: 0;
}

.profile-eyebrow {
  margin: 0 0 0.55rem;
  color: #0b7b5b;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.profile-hero-copy h1 {
  overflow-wrap: anywhere;
  margin: 0;
  color: #17211d;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.04em;
}

.profile-presence {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.5rem 0 0;
  color: #64736c;
  font-size: 0.84rem;
}

.presence-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #aab4ae;
}

.presence-dot.is-online {
  background: #12a36f;
}

.profile-bio {
  max-width: 42rem;
  margin: 0.7rem 0 0;
  color: #4b5b52;
  font-size: 0.95rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.profile-stat-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.profile-stat {
  display: inline-flex;
  min-width: 7.5rem;
  align-items: baseline;
  gap: 0.4rem;
  border: 1px solid #dce9e1;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.55rem 0.8rem;
  color: #26382e;
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.profile-stat:hover,
.profile-stat:focus-visible {
  transform: translateY(-1px);
  border-color: #8bb9a0;
  background: #f6fbf7;
  outline: none;
}

.profile-stat strong {
  color: #0b7b5b;
  font-size: 1.1rem;
}

.profile-stat span,
.profile-stat-note {
  color: #718078;
  font-size: 0.78rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.primary-button,
.secondary-button {
  min-height: 2.55rem;
  border-radius: 0.65rem;
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
}

.primary-button {
  border: 0;
  background: #0b7b5b;
  color: #fff;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e3dc;
  background: #fff;
  color: #3c5146;
  text-decoration: none;
}

.secondary-button:hover {
  background: #f5f9f6;
}

.copy-status {
  color: #0b7b5b;
  font-size: 0.8rem;
}

.profile-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  max-height: min(68vh, 620px);
  overflow-y: auto;
  padding: 0.25rem 0.15rem 0.5rem 0;
}

.edit-profile-dialog {
  position: fixed;
  z-index: 7;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(13, 24, 18, 0.56);
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.edit-profile-dialog.hidden {
  display: none;
}

.profile-editor-panel {
  width: min(760px, 100%);
  max-height: min(86vh, 780px);
  overflow: hidden;
  border: 1px solid #e1e9e4;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 24px 80px rgba(10, 25, 17, 0.25);
}

.profile-editor-panel .section-heading {
  margin: -1.25rem -1.25rem 1rem;
  border-bottom: 1px solid #e9efec;
  background: #fff;
  padding: 1rem 1.25rem;
}

.edit-photo-field {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 1rem;
  border: 1px solid #e5ece8;
  border-radius: 0.8rem;
  background: #f8fbf9;
  padding: 0.85rem;
}

.edit-profile-photo-preview {
  width: 4.5rem;
  height: 4.5rem;
  flex: none;
  border-radius: 50%;
  background: #e5efe9;
  object-fit: cover;
}

.edit-photo-field strong {
  color: #26382e;
  font-size: 0.9rem;
}

.edit-photo-field p {
  margin: 0.25rem 0 0.6rem;
  color: #718078;
  font-size: 0.78rem;
}

.profile-edit-form label {
  display: grid;
  gap: 0.4rem;
  color: #42544a;
  font-size: 0.82rem;
  font-weight: 650;
}

.profile-edit-form label span {
  color: #829088;
  font-weight: 400;
}

.profile-edit-form input,
.profile-edit-form textarea,
.profile-edit-form select {
  width: 100%;
  border: 1px solid #d7e3dc;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.65rem 0.75rem;
  color: #23342b;
  font: inherit;
  font-weight: 400;
}

.profile-edit-form textarea {
  resize: vertical;
}

.profile-edit-form label:nth-child(2),
.profile-edit-form label:nth-child(3),
.profile-edit-form label:nth-child(4),
.edit-profile-status,
.profile-edit-actions {
  grid-column: 1 / -1;
}

.profile-edit-actions {
  display: flex;
  gap: 0.6rem;
}

.edit-profile-status {
  margin: 0;
  color: #0b7b5b;
  font-size: 0.84rem;
}

.personal-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
}

.personal-details div {
  min-width: 0;
  border-radius: 0.65rem;
  background: #f7faf8;
  padding: 0.85rem;
}

.personal-details dt {
  color: #78867f;
  font-size: 0.74rem;
}

.personal-details dd {
  overflow-wrap: anywhere;
  margin: 0.25rem 0 0;
  color: #26382e;
  font-size: 0.88rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.social-links a {
  color: #0b7b5b;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.profile-section {
  border-top: 1px solid #e9efec;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem);
}

.profile-details {
  border-top: 1px solid #e9efec;
  padding: 0 clamp(1rem, 3vw, 1.75rem) 1.25rem;
}

.profile-posts-section {
  padding: 1.25rem 0.5rem;
}

.profile-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.profile-post-tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 0.65rem;
  background: #edf4ef;
}

.profile-post-tile::after {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 13, 0.42);
  content: "";
  opacity: 0;
  transition: opacity 160ms ease;
}

.profile-post-tile img,
.profile-post-tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.profile-post-tile:hover img,
.profile-post-tile:hover video {
  transform: scale(1.04);
}

.profile-post-tile:hover::after,
.profile-post-tile:focus-visible::after {
  opacity: 1;
}

.profile-post-tile:focus-visible {
  outline: 3px solid #0b7b5b;
  outline-offset: 2px;
}

.profile-post-visibility {
  position: absolute;
  z-index: 1;
  top: 0.35rem;
  right: 0.35rem;
  border-radius: 999px;
  background: rgba(23, 33, 29, 0.75);
  padding: 0.18rem 0.45rem;
  color: #fff;
  font-size: 0.62rem;
  text-transform: capitalize;
}

.profile-post-stats {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.55rem, 2vw, 1.1rem);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.profile-post-tile:hover .profile-post-stats,
.profile-post-tile:focus-visible .profile-post-stats {
  opacity: 1;
}

.profile-post-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  font-weight: 750;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.profile-post-stat svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: #fff;
  stroke: #fff;
  stroke-width: 1.5;
}

.profile-posts-status {
  margin: 0.75rem 0 0;
  color: #718078;
  font-size: 0.82rem;
  text-align: center;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.25rem clamp(0.35rem, 2vw, 1.25rem);
  overflow: hidden;
  border-bottom: 1px solid #e7eeea;
}

.profile-tab {
  position: relative;
  flex: none;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0.85rem 0.6rem;
  color: #718078;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
}

.profile-tab:hover {
  color: #26382e;
}

.profile-tab.is-active {
  color: #0b7b5b;
}

.profile-tab.is-active::after {
  position: absolute;
  right: 0.35rem;
  bottom: -1px;
  left: 0.35rem;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #0b7b5b;
  content: "";
}

.profile-tab:focus-visible {
  border-radius: 0.45rem;
  outline: 2px solid #0b7b5b;
  outline-offset: -3px;
}

.profile-tab-panel {
  min-height: 7rem;
  padding: 1.25rem 0.5rem;
}

.details-privacy-note {
  margin: 0 0 0.9rem;
  color: #718078;
  font-size: 0.78rem;
}

.tab-empty-state {
  margin: 0;
  color: #718078;
  font-size: 0.88rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
  color: #17211d;
  font-size: 1.1rem;
  font-weight: 720;
}

.section-heading p {
  margin: 0.35rem 0 0;
  color: #78867f;
  font-size: 0.82rem;
}

.connection-search {
  flex: 0 1 15rem;
}

.connection-search input {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid #dce6e0;
  border-radius: 999px;
  background: #f8faf9;
  padding: 0.55rem 0.9rem;
  color: #26382e;
  font: inherit;
  font-size: 0.82rem;
}

.connection-search input:focus {
  border-color: #0b7b5b;
  outline: 3px solid rgba(11, 123, 91, 0.12);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.about-copy {
  margin: 0;
  color: #4b5b52;
  font-size: 0.92rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.skill-chip {
  border: 1px solid #dfeae4;
  border-radius: 999px;
  background: #f5f9f6;
  padding: 0.45rem 0.75rem;
  color: #3d594a;
  font-size: 0.8rem;
}

.connection-total {
  display: grid;
  min-width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 999px;
  background: #eaf4ee;
  color: #0b7b5b;
  font-size: 0.85rem;
  font-weight: 700;
}

.connections-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.connection-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid #e8eeeb;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.75rem;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.connection-card:hover,
.connection-card:focus-visible {
  transform: translateY(-2px);
  border-color: #b8d4c4;
  box-shadow: 0 8px 22px rgba(15, 40, 28, 0.08);
  outline: none;
}

.connection-avatar {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #e6f2ed;
  color: #0b7b5b;
  font-weight: 700;
}

.connection-avatar img {
  display: block;
}

.connection-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.connection-copy {
  min-width: 0;
  flex: 1;
}

.connection-name {
  display: block;
  overflow: hidden;
  color: #23342b;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-name:hover {
  color: #0b7b5b;
}

.connection-presence {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  color: #849088;
  font-size: 0.72rem;
}

.connection-chat-link {
  flex: none;
  border-radius: 0.5rem;
  padding: 0.4rem 0.55rem;
  color: #0b7b5b;
  font-size: 0.75rem;
  font-weight: 650;
  text-decoration: none;
}

.connection-chat-link:hover {
  background: #edf7f1;
}

.connections-status {
  padding: 1.5rem 0 0;
  font-size: 0.84rem;
}

.dialog-open {
  overflow: hidden;
}

.connections-dialog {
  position: fixed;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(13, 24, 18, 0.56);
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.connections-dialog.hidden {
  display: none;
}

.connections-section {
  width: min(720px, 100%);
  max-height: min(80vh, 720px);
  overflow-y: auto;
  border: 1px solid #e1e9e4;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 24px 80px rgba(10, 25, 17, 0.25);
}

.connections-section .section-heading {
  position: sticky;
  z-index: 1;
  top: -1.25rem;
  margin: -1.25rem -1.25rem 1rem;
  border-bottom: 1px solid #e9efec;
  background: #fff;
  padding: 1rem 1.25rem;
}

.close-connections-dialog {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: none;
  place-items: center;
  border: 1px solid #e0e8e3;
  border-radius: 50%;
  background: #fff;
  color: #44564b;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.close-connections-dialog:hover {
  background: #f2f7f4;
}

.connections-empty {
  display: grid;
  justify-items: center;
  border: 1px dashed #d5e3da;
  border-radius: 1rem;
  background: #f9fbfa;
  padding: 2rem 1rem;
  text-align: center;
}

.connections-empty-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: #eaf4ee;
  color: #0b7b5b;
  font-size: 1.5rem;
}

.connections-empty h3 {
  margin: 0.8rem 0 0;
  color: #26382e;
  font-size: 0.95rem;
}

.connections-empty p {
  max-width: 28rem;
  margin: 0.4rem 0 0.9rem;
  color: #718078;
  font-size: 0.82rem;
  line-height: 1.5;
}

.connections-empty a {
  border-radius: 0.55rem;
  background: #0b7b5b;
  padding: 0.55rem 0.8rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.load-connections-button {
  display: block;
  margin: 1rem auto 0;
  border: 1px solid #d7e3dc;
  border-radius: 0.6rem;
  background: #fff;
  padding: 0.65rem 1rem;
  color: #3c5146;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 650;
}

.load-connections-button:hover {
  border-color: #0b7b5b;
}

.joined-date {
  margin: 0;
  border-top: 1px solid #e9efec;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  color: #849088;
  font-size: 0.78rem;
}

.photo-viewer {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 10, 7, 0.92);
  padding: 3rem 1rem;
}

.photo-viewer.hidden {
  display: none;
}

.photo-viewer img {
  max-width: min(92vw, 900px);
  max-height: 88vh;
  border-radius: 0.6rem;
  object-fit: contain;
}

.close-photo-viewer {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 2.4rem;
  line-height: 1;
}

@media (max-width: 600px) {
  .profile-topbar {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    padding: 0 0.65rem;
  }

  .brand {
    gap: 0.45rem;
    font-size: 0.98rem;
  }

  .brand-mark {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.62rem;
  }

  .profile-topbar .profile-nav {
    width: 100%;
    min-width: 0;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.2rem;
  }

  .profile-topbar .nav-link {
    min-height: 2.15rem;
    flex: 1 1 auto;
    padding: 0.45rem 0.55rem;
    font-size: 0.73rem;
  }

  .profile-topbar .nav-button {
    min-height: 2.2rem;
    flex: 1 1 auto;
    margin-left: 0.15rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.73rem;
  }

  .profile-page {
    width: min(100% - 1rem, 520px);
    padding-top: 1.2rem;
  }

  .profile-tab {
    padding: 0.75rem 0.35rem;
    font-size: 0.82rem;
  }

  .profile-details {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .profile-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .profile-edit-form,
  .personal-details {
    grid-template-columns: 1fr;
  }

  .profile-edit-form label:nth-child(2),
  .profile-edit-form label:nth-child(3),
  .profile-edit-form label:nth-child(4),
  .edit-profile-status,
  .profile-edit-actions {
    grid-column: auto;
  }

  .profile-photo-button {
    width: 112px;
    height: 112px;
  }

  .profile-stat-row {
    flex-wrap: wrap;
  }

  .connections-list {
    grid-template-columns: 1fr;
  }

  .connections-dialog {
    align-items: end;
    padding: 0;
  }

  .edit-profile-dialog {
    align-items: end;
    padding: 0;
  }

  .profile-editor-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 1.15rem 1.15rem 0 0;
    padding: 1rem;
  }

  .profile-editor-panel .section-heading {
    margin: -1rem -1rem 1rem;
    padding: 0.85rem 1rem;
  }

  .profile-edit-form {
    max-height: calc(88vh - 5rem);
  }

  .connections-section {
    width: 100%;
    max-height: 82vh;
    border-radius: 1.15rem 1.15rem 0 0;
    padding: 1rem;
  }

  .connections-section .section-heading {
    top: -1rem;
    margin: -1rem -1rem 1rem;
    padding: 0.85rem 1rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .connection-search {
    width: 100%;
    flex-basis: auto;
  }

  .connections-list {
    grid-template-columns: 1fr;
  }
}
