:root {
  color-scheme: dark;
  --green-950: #04190c;
  --green-900: #061f10;
  --green-800: #0a3b17;
  --green-700: #0d4f20;
  --mint: #e8ffec;
  --muted: rgba(232, 255, 236, 0.76);
  --violet: #7662ff;
  --blue: #3f65df;
  --panel: rgba(7, 37, 17, 0.78);
  --line: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--green-900);
}

body {
  color: #f7fff7;
  font-family: ui-rounded, "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.service-body,
.profile-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 70% 5%, rgba(221, 255, 196, 0.25), transparent 24rem),
    radial-gradient(circle at 12% 22%, rgba(44, 158, 74, 0.36), transparent 23rem),
    linear-gradient(140deg, var(--green-950) 0%, var(--green-800) 51%, var(--green-900) 100%);
}

.service-body::before,
.profile-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.11;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.service-shell,
.profile-card {
  width: min(100%, 42rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background:
    linear-gradient(145deg, rgba(5, 47, 17, 0.84), rgba(7, 69, 25, 0.62)),
    var(--panel);
  box-shadow:
    0 2rem 4.5rem rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(1rem);
}

.service-body {
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.service-shell {
  padding: clamp(1.4rem, 5vw, 3rem);
  text-align: center;
}

.service-mark,
.profile-mark {
  margin: 0 0 0.7rem;
  color: rgba(213, 255, 217, 0.72);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.service-shell h1 {
  margin: 0;
  font-size: clamp(2.3rem, 8vw, 4.6rem);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: 0;
  text-wrap: balance;
}

.service-copy {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 650;
  line-height: 1.55;
}

.service-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.service-button {
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.05rem;
  border-radius: 0.75rem;
  font-weight: 900;
}

.service-button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--violet) 0%, #4f57e5 100%);
}

.service-button-secondary {
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.profile-page {
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 3vw, 2.5rem);
}

.profile-card {
  padding: clamp(1.1rem, 4vw, 2rem);
}

.profile-loading,
.profile-missing {
  display: grid;
  place-items: center;
  min-height: 20rem;
  text-align: center;
}

.profile-missing h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 0.95;
}

.profile-missing p {
  color: var(--muted);
  font-weight: 650;
}

.profile-header {
  display: grid;
  justify-items: center;
  text-align: center;
}

.profile-avatar {
  width: clamp(8.5rem, 33vw, 12.25rem);
  aspect-ratio: 1;
  object-fit: cover;
  border: 0.45rem solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  box-shadow:
    0 1.1rem 2.4rem rgba(0, 0, 0, 0.3),
    0 0 0 0.55rem rgba(125, 103, 255, 0.18);
}

.profile-mark {
  margin-top: 1.1rem;
  margin-bottom: 0.45rem;
}

.profile-header h1 {
  margin: 0;
  max-width: 100%;
  color: #ffffff;
  font-size: clamp(2.1rem, 8vw, 3.45rem);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 0.15rem 1rem rgba(0, 0, 0, 0.22);
}

.profile-title {
  margin: 0.8rem 0 0;
  max-width: 32rem;
  color: rgba(240, 255, 241, 0.9);
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 850;
  line-height: 1.35;
  text-wrap: balance;
}

.profile-bio {
  margin: 0.85rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 620;
  line-height: 1.55;
}

.profile-meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.profile-meta span,
.profile-meta a {
  min-height: 2.2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.72rem;
  color: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 820;
}

.profile-socials {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.profile-social {
  width: 3.25rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 0.24rem solid rgba(255, 255, 255, 0.94);
  border-radius: 9999px;
  box-shadow: 0 0.75rem 1.45rem rgba(0, 0, 0, 0.25);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.profile-social:hover {
  transform: translateY(-0.16rem);
  box-shadow: 0 0.95rem 1.75rem rgba(0, 0, 0, 0.34);
}

.profile-social span {
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0;
}

.profile-social-website,
.profile-social-tiktok,
.profile-social-twitter {
  background: #050505;
}

.profile-social-instagram {
  background: radial-gradient(circle at 30% 110%, #feda75 0%, #fa7e1e 28%, #d62976 52%, #962fbf 74%, #4f5bd5 100%);
}

.profile-social-facebook {
  background: #1877f2;
}

.profile-social-youtube {
  background: #ff0000;
}

.profile-links {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.8rem;
}

.profile-link {
  --link-index: 0;
  min-height: 5.25rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  color: #ffffff;
  border-radius: 0.85rem;
  animation: link-enter 520ms ease both;
  animation-delay: calc(var(--link-index) * 65ms);
  box-shadow:
    0 0.95rem 1.8rem rgba(4, 15, 8, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.profile-link:hover {
  transform: translateY(-0.16rem);
  filter: saturate(1.1);
  box-shadow:
    0 1.2rem 2rem rgba(4, 15, 8, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.profile-link-highlight {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--violet) 0%, #4f57e5 100%);
}

.profile-link-highlight.profile-link-shimmer::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -25%;
  width: 35%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  animation: shimmer 3.4s ease-in-out infinite;
}

.profile-link-standard {
  background: linear-gradient(135deg, rgba(91, 77, 231, 0.94) 0%, rgba(45, 87, 207, 0.9) 100%);
}

.profile-link-pulse {
  animation:
    link-enter 520ms ease both,
    pulse-ring 2.8s ease-in-out infinite;
  animation-delay: calc(var(--link-index) * 65ms), 900ms;
}

.profile-link-icon {
  width: 2.85rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.16);
}

.profile-link-icon svg {
  width: 1.48rem;
  height: 1.48rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-link-copy {
  min-width: 0;
}

.profile-link-copy strong {
  display: block;
  font-size: clamp(1.05rem, 4vw, 1.4rem);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
}

.profile-link-copy small {
  display: block;
  margin-top: 0.33rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}

.profile-footer {
  margin-top: 1rem;
  text-align: center;
}

.profile-footer a {
  color: rgba(230, 255, 233, 0.72);
  font-size: 0.82rem;
  font-weight: 850;
  border-bottom: 1px solid rgba(230, 255, 233, 0.35);
}

@keyframes link-enter {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%,
  45% {
    transform: translateX(0) rotate(18deg);
  }

  100% {
    transform: translateX(420%) rotate(18deg);
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    box-shadow:
      0 0.95rem 1.8rem rgba(4, 15, 8, 0.18),
      0 0 0 0 rgba(127, 109, 255, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }

  50% {
    box-shadow:
      0 1.05rem 2rem rgba(4, 15, 8, 0.24),
      0 0 0 0.45rem rgba(127, 109, 255, 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
}

@media (max-width: 560px) {
  .profile-page {
    align-items: start;
    padding: 0.8rem;
  }

  .service-shell,
  .profile-card {
    border-radius: 1.05rem;
  }

  .profile-meta {
    gap: 0.4rem;
  }

  .profile-meta span,
  .profile-meta a {
    max-width: 100%;
    font-size: 0.75rem;
  }

  .profile-social {
    width: 3rem;
  }

  .profile-link {
    min-height: 5rem;
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .profile-link-icon {
    width: 2.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-link,
  .profile-link-pulse,
  .profile-link-highlight::after {
    animation: none;
  }

  .profile-link,
  .profile-social {
    transition: none;
  }
}

.profile-page {
  background:
    radial-gradient(circle at 70% 5%, color-mix(in srgb, var(--page-accent, #7662ff) 28%, transparent), transparent 24rem),
    radial-gradient(circle at 12% 22%, rgba(44, 158, 74, 0.36), transparent 23rem),
    linear-gradient(140deg, var(--page-bg-start, var(--green-950)) 0%, var(--page-bg-end, var(--green-800)) 55%, var(--green-900) 100%);
  font-family: var(--page-font-body, ui-rounded, "Avenir Next", "Trebuchet MS", Verdana, sans-serif);
}

.profile-card {
  color: var(--page-text, #f7fff7);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--page-card, var(--panel)) 92%, black), var(--page-card, var(--panel))),
    var(--page-card, var(--panel));
}

.profile-mark {
  color: color-mix(in srgb, var(--page-text, #f7fff7) 72%, var(--page-accent, #7662ff));
  font-family: var(--page-font-meta, ui-rounded, "Avenir Next", "Trebuchet MS", Verdana, sans-serif);
}

.profile-header h1,
.profile-link-copy strong,
.profile-missing h1 {
  font-family: var(--page-font-heading, ui-rounded, "Avenir Next", "Trebuchet MS", Verdana, sans-serif);
}

.profile-title {
  color: color-mix(in srgb, var(--page-text, #f7fff7) 92%, transparent);
}

.profile-bio {
  color: var(--page-muted, var(--muted));
}

.profile-avatar-frame {
  width: min(var(--avatar-size, 196px), 62vw);
  aspect-ratio: 1;
  display: block;
  overflow: hidden;
  border: 0.45rem solid rgba(255, 255, 255, 0.95);
  border-radius: var(--avatar-radius, 9999px);
  box-shadow:
    0 1.1rem 2.4rem rgba(0, 0, 0, 0.3),
    0 0 0 0.55rem color-mix(in srgb, var(--page-accent, #7662ff) 24%, transparent);
}

.profile-avatar-frame .profile-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--avatar-x, 50%) var(--avatar-y, 50%);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: scale(var(--avatar-scale, 1));
}

.profile-social {
  background: var(--social-bg, #050505);
}

.profile-link {
  color: var(--link-text, var(--page-button-text, #ffffff));
}

.profile-link-highlight {
  background: linear-gradient(135deg, var(--link-color, var(--page-button, var(--violet))) 0%, var(--link-color-alt, var(--page-button-alt, #4f57e5)) 100%);
}

.profile-link-standard {
  background: linear-gradient(135deg, var(--link-color, var(--page-button-alt, rgba(91, 77, 231, 0.94))) 0%, var(--link-color-alt, #315fce) 100%);
}

.profile-link-pulse {
  animation:
    link-enter 520ms ease both,
    pulse-ring 2.8s ease-in-out infinite;
  animation-delay: calc(var(--link-index) * 65ms), 900ms;
}

.profile-link-shimmer {
  position: relative;
  overflow: hidden;
}

.profile-link-shimmer::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -25%;
  width: 35%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  animation: shimmer 3.4s ease-in-out infinite;
}

.profile-footer a {
  color: color-mix(in srgb, var(--page-text, #f7fff7) 72%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .profile-link-pulse,
  .profile-link-shimmer,
  .profile-link-shimmer::after {
    animation: none;
  }
}

.editor-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 0%, rgba(118, 98, 255, 0.18), transparent 24rem),
    linear-gradient(140deg, #061f10 0%, #0c2c16 100%);
}

.editor-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(22rem, 34rem) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.editor-panel,
.editor-preview {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(7, 37, 17, 0.78);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.24);
}

.editor-panel {
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
}

.editor-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.editor-heading p:not(.service-mark) {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.editor-status-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.editor-status-grid div,
.editor-profile-tools,
.editor-commit-label {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.055);
}

.editor-status-grid div {
  min-width: 0;
  padding: 0.65rem;
}

.editor-status-grid span,
.editor-commit-label {
  color: rgba(213, 255, 217, 0.66);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-status-grid strong {
  margin-top: 0.22rem;
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-profile-tools {
  margin-top: 0.75rem;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 0.55rem;
  align-items: end;
}

.editor-profile-tools label {
  display: grid;
  gap: 0.35rem;
  color: rgba(247, 255, 247, 0.82);
  font-size: 0.78rem;
  font-weight: 850;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.editor-actions-top {
  position: sticky;
  top: -1rem;
  z-index: 3;
  margin: 1rem -1rem 1rem;
  padding: 0.75rem 1rem;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 37, 17, 0.94);
  backdrop-filter: blur(0.8rem);
}

.editor-actions button,
.editor-profile-tools button,
.editor-file-button,
.editor-add,
.editor-repeat-row button {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.78rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.editor-actions button:disabled,
.editor-profile-tools button:disabled,
.editor-add:disabled,
.editor-repeat-row button:disabled {
  cursor: wait;
  opacity: 0.54;
}

.editor-actions button:first-child,
.editor-add {
  background: linear-gradient(135deg, var(--violet), #4f57e5);
}

.editor-actions button:nth-child(2) {
  background: linear-gradient(135deg, #19a15f, #2867d9);
}

.editor-commit-label {
  min-width: min(100%, 18rem);
  padding: 0.42rem 0.55rem 0.55rem;
  display: grid;
  gap: 0.32rem;
  text-transform: uppercase;
}

.editor-file-button input {
  display: none;
}

.editor-file-wide {
  width: fit-content;
}

.editor-form {
  display: grid;
  gap: 1rem;
}

.editor-form fieldset {
  margin: 0;
  padding: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.8rem;
}

.editor-form legend {
  padding: 0 0.35rem;
  color: rgba(213, 255, 217, 0.8);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.editor-form label {
  display: grid;
  gap: 0.35rem;
  color: rgba(247, 255, 247, 0.82);
  font-size: 0.8rem;
  font-weight: 820;
}

.editor-form input,
.editor-form textarea,
.editor-form select,
.editor-profile-tools select,
.editor-commit-label input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.65rem;
  color: #f7fff7;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  font-size: 0.9rem;
}

.editor-profile-tools select,
.editor-commit-label input {
  min-width: 0;
}

.editor-commit-label input {
  letter-spacing: 0;
  text-transform: none;
}

.editor-form textarea,
.editor-link-row label:nth-child(3) {
  grid-column: 1 / -1;
}

.editor-form input[type="color"] {
  padding: 0.2rem;
}

.editor-form input[type="range"] {
  padding-inline: 0;
  accent-color: var(--violet);
}

.editor-repeat-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.75rem;
}

.editor-repeat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
}

.editor-checkbox {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem !important;
}

.editor-checkbox input {
  width: auto;
  min-height: auto;
}

.editor-repeat-row button {
  align-self: end;
}

.editor-help {
  grid-column: 1 / -1;
  margin: -0.15rem 0 0;
  color: rgba(213, 255, 217, 0.68);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.45;
}

.editor-add {
  width: fit-content;
}

.editor-preview {
  min-height: calc(100vh - 2rem);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.editor-preview-bar {
  min-height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.editor-preview-bar p,
.editor-preview-bar span {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 900;
}

.editor-preview-bar span {
  color: rgba(213, 255, 217, 0.72);
}

.editor-preview-bar span[data-tone="ok"] {
  color: #78ffb3;
}

.editor-preview-bar span[data-tone="warn"] {
  color: #f4d86b;
}

.editor-preview-bar span[data-tone="error"] {
  color: #ff9b9b;
}

.editor-preview-page {
  min-height: 100%;
  padding: 1rem;
}

.editor-preview-page::before {
  position: absolute;
}

.editor-preview-page .profile-card {
  max-width: 40rem;
}

@media (max-width: 980px) {
  .editor-app {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    max-height: none;
  }

  .editor-preview {
    min-height: 80vh;
  }
}

@media (max-width: 620px) {
  .editor-app {
    padding: 0.5rem;
  }

  .editor-status-grid,
  .editor-profile-tools {
    grid-template-columns: 1fr;
  }

  .editor-form fieldset,
  .editor-repeat-row {
    grid-template-columns: 1fr;
  }

  .editor-panel,
  .editor-preview {
    border-radius: 0.85rem;
  }
}
