.profile-page {
  background: #090c0b;
}

.profile-main {
  width: min(calc(100% - 64px), 1500px);
  margin: 0 auto;
  padding: clamp(36px, 4vw, 64px) 0 96px;
}

.profile-identity .eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.profile-loading,
.profile-auth {
  min-height: 240px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-loading {
  display: grid;
  place-items: center;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.profile-auth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 44px;
}

.profile-auth[hidden],
.profile-layout[hidden],
.profile-loading[hidden] {
  display: none;
}

.profile-auth h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 62px);
  font-weight: 400;
  line-height: 1;
}

.profile-auth p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.profile-auth-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.profile-auth-details[hidden] {
  display: none;
}

.profile-auth-details div {
  display: grid;
  gap: 7px;
}

.profile-auth-details dt {
  color: var(--dim);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.profile-auth-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
}

.profile-auth-actions {
  display: grid;
  flex: 0 0 min(320px, 34vw);
  gap: 10px;
}

.profile-auth-actions .button {
  width: 100%;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.38fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 17, 16, 0.74);
  overflow: hidden;
}

.profile-identity {
  min-width: 0;
  padding: clamp(30px, 4vw, 54px);
  border-right: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(168, 219, 62, 0.05), transparent 48%);
}

.profile-identity-inner {
  position: sticky;
  top: 112px;
  width: 100%;
}

.profile-identity-head {
  display: grid;
  gap: 26px;
}

.profile-avatar {
  --avatar-accent: var(--green);
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--avatar-accent) 38%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--avatar-accent) 7%, #090d0b);
  box-shadow: inset 0 0 28px color-mix(in srgb, var(--avatar-accent) 7%, transparent);
}

.profile-avatar svg {
  width: 68%;
  height: 68%;
  overflow: visible;
  fill: var(--avatar-accent);
}

.profile-identity-name {
  min-width: 0;
}

.profile-identity h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(25px, 2vw, 34px);
  line-height: 1.1;
}

.profile-handle {
  margin: 10px 0 0;
  color: var(--green);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.04em;
}

.profile-account-details {
  margin: 34px 0 0;
  border-top: 1px solid var(--line);
}

.profile-account-details > div {
  display: grid;
  gap: 7px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.profile-account-details dt {
  color: var(--dim);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.profile-account-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.profile-source-note {
  margin-top: 30px;
}

.profile-source-note strong {
  color: var(--text);
  font-size: 14px;
}

.profile-source-note p {
  margin: 9px 0 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.55;
}

.profile-source-note p + p {
  margin-top: 12px;
}

.profile-logout {
  margin-top: 30px;
  padding: 0;
  border: 0;
  color: var(--dim);
  background: none;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-logout:hover,
.profile-logout:focus-visible {
  color: var(--white);
}

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

.profile-form-section {
  padding: clamp(30px, 4.2vw, 58px);
  border-bottom: 1px solid var(--line);
}

.profile-section-heading {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  margin-bottom: 34px;
}

.profile-section-heading > span {
  padding-top: 7px;
  color: var(--green);
  font: 500 10px/1 var(--mono);
}

.profile-section-heading h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(25px, 2.4vw, 38px);
  line-height: 1.1;
}

.profile-section-heading p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.5;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.profile-field {
  display: grid;
  gap: 9px;
  min-width: 0;
  color: var(--dim);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-field-wide {
  grid-column: 1 / -1;
}

.profile-field input,
.profile-field select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  color: var(--text);
  background: rgba(7, 10, 9, 0.56);
  font: 400 16px/1.2 var(--sans);
  text-transform: none;
}

.profile-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.profile-field input:focus,
.profile-field select:focus {
  border-color: rgba(168, 219, 62, 0.68);
}

.profile-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-interests label {
  position: relative;
  cursor: pointer;
}

.profile-interests input {
  position: absolute;
  opacity: 0;
}

.profile-interests span {
  display: block;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  transition: 160ms ease;
}

.profile-interests input:checked + span {
  border-color: rgba(168, 219, 62, 0.5);
  color: var(--green);
  background: rgba(168, 219, 62, 0.08);
}

.profile-interests input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.profile-personalisation {
  display: flex;
  gap: 14px;
  max-width: 680px;
  margin-top: 32px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.profile-personalisation input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.profile-personalisation span {
  display: grid;
  gap: 5px;
}

.profile-personalisation strong {
  color: var(--text);
  font-size: 15px;
}

.profile-personalisation small {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-height: 108px;
  padding: 24px clamp(30px, 4.2vw, 58px);
}

.profile-form-actions p {
  margin: 0 auto 0 0;
  color: var(--green);
  font-size: 14px;
}

.profile-form-actions .button {
  min-width: 170px;
}

@media (max-width: 900px) {
  .profile-main {
    width: min(calc(100% - 32px), 720px);
    padding-top: 96px;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-identity {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile-identity-inner {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.9fr);
    gap: 30px 42px;
    align-items: start;
  }

  .profile-identity-head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .profile-account-details {
    margin: 0;
  }

  .profile-source-note,
  .profile-logout {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .profile-main {
    width: calc(100% - 24px);
    padding: 88px 0 72px;
  }

  .profile-auth {
    align-items: stretch;
    flex-direction: column;
    padding: 30px 4px;
  }

  .profile-auth-actions {
    flex-basis: auto;
  }

  .profile-identity {
    padding: 26px 22px;
  }

  .profile-identity-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .profile-identity-head {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 18px;
  }

  .profile-avatar {
    width: 72px;
    height: 72px;
  }

  .profile-account-details {
    margin-top: 28px;
  }

  .profile-source-note,
  .profile-logout {
    grid-column: auto;
  }

  .profile-form-section {
    padding: 30px 22px;
  }

  .profile-section-heading {
    grid-template-columns: 1fr;
  }

  .profile-field-grid {
    grid-template-columns: 1fr;
  }

  .profile-field-wide {
    grid-column: auto;
  }

  .profile-form-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 22px;
  }

  .profile-form-actions .button {
    width: 100%;
  }
}
