:root {
  --page-bg: #d9d6d1;
  --bg: #f6f4f1;
  --ink: #141414;
  --muted: #5a5a5a;
  --ash: #d9d6d1;
  --peach: #e79a7f;
  --button: #fffdf9;
  --button-hover: #ffffff;
  --line: rgba(20, 20, 20, 0.14);
  --line-soft: rgba(255, 255, 255, 0.62);
  --shadow: 0 18px 44px rgba(20, 20, 20, 0.1);
  --focus: #141414;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 180ms;
  --motion-medium: 520ms;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(217, 214, 209, 0.2), rgba(217, 214, 209, 0.42)),
    url("/assets/site-bg.png") center / cover fixed,
    var(--page-bg);
  color: var(--ink);
}

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

button,
select {
  font: inherit;
}

.page {
  display: flex;
  width: 100%;
  min-height: 100svh;
  justify-content: center;
  padding: 24px;
}

.stack {
  position: relative;
  width: min(100%, 760px);
  min-height: calc(100svh - 48px);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 30px 30px 0 0;
  padding: 24px 72px 36px;
  background:
    linear-gradient(rgba(246, 244, 241, 0.84), rgba(246, 244, 241, 0.88)),
    url("/assets/panel-photo.png") center / cover,
    var(--bg);
  box-shadow: 0 28px 82px rgba(20, 20, 20, 0.22);
  animation: panelIn 720ms var(--ease-out) both;
}

.stack::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-top: 3px solid rgba(231, 154, 127, 0.72);
  background:
    linear-gradient(90deg, rgba(231, 154, 127, 0.12), transparent 22%, transparent 78%, rgba(20, 20, 20, 0.04)),
    linear-gradient(rgba(255, 255, 255, 0.34), transparent 28%);
  content: "";
  pointer-events: none;
}

.stack > *:not(.ambient-lottie) {
  position: relative;
  z-index: 1;
}

.ambient-lottie {
  position: absolute;
  z-index: 0;
  top: 64px;
  left: 50%;
  width: 520px;
  height: 520px;
  opacity: 0.055;
  pointer-events: none;
  transform: translateX(-50%);
  filter: blur(1px);
}

.language-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  animation: riseIn 560ms var(--ease-out) 90ms both;
}

.language-select {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  padding: 0 36px 0 15px;
  font-size: 0.82rem;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.6);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(20, 20, 20, 0.72) 50%),
    linear-gradient(135deg, rgba(20, 20, 20, 0.72) 50%, transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.48));
  background-position:
    calc(100% - 18px) 15px,
    calc(100% - 13px) 15px,
    0 0;
  background-size:
    5px 5px,
    5px 5px,
    100% 100%;
  background-repeat: no-repeat;
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(20, 20, 20, 0.08);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  appearance: none;
  cursor: pointer;
  transition:
    transform var(--motion-fast) var(--ease-soft),
    border-color var(--motion-fast) var(--ease-soft),
    box-shadow var(--motion-fast) var(--ease-soft),
    background-color var(--motion-fast) var(--ease-soft);
}

.language-select:hover {
  border-color: rgba(255, 255, 255, 0.92);
  background-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 24px rgba(20, 20, 20, 0.11);
  transform: translateY(-1px);
}

.profile {
  display: grid;
  justify-items: center;
  text-align: center;
  animation: riseIn 620ms var(--ease-out) 150ms both;
}

.avatar {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow);
  animation: avatarSettle 760ms var(--ease-out) 190ms both;
}

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

.profile h1 {
  margin: 14px 0 6px;
  font-size: clamp(1.7rem, 3.8vw, 2.12rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.profile h2 {
  max-width: 460px;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.38;
}

.profile p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.42;
}

.link-group {
  animation: riseIn 620ms var(--ease-out) both;
  animation-delay: calc(210ms + var(--group-delay, 0ms));
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 9px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-align: center;
  text-transform: uppercase;
}

.section-label::before,
.section-label::after {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 154, 127, 0.42));
  content: "";
}

.section-label::after {
  background: linear-gradient(90deg, rgba(231, 154, 127, 0.42), transparent);
}

.links {
  display: grid;
  width: min(100%, 430px);
  margin-inline: auto;
  gap: 10px;
}

.link-card {
  position: relative;
  display: grid;
  min-height: 58px;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 8px 13px 8px 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(246, 244, 241, 0.54)),
    rgba(246, 244, 241, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 24px rgba(20, 20, 20, 0.075);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  animation: cardIn 560ms var(--ease-out) both;
  animation-delay: calc(260ms + var(--group-delay, 0ms) + var(--item-delay, 0ms));
  transition:
    transform var(--motion-fast) var(--ease-soft),
    border-color var(--motion-fast) var(--ease-soft),
    background var(--motion-fast) var(--ease-soft),
    box-shadow var(--motion-fast) var(--ease-soft);
}

.link-card::before {
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.24), transparent 34%, rgba(255, 255, 255, 0.18)),
    radial-gradient(circle at 18% 0%, rgba(231, 154, 127, 0.18), transparent 34%);
  content: "";
  opacity: 0;
  transition: opacity var(--motion-fast) var(--ease-soft);
}

.link-card > * {
  position: relative;
  z-index: 1;
}

.link-card:hover {
  border-color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 244, 241, 0.68)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 34px rgba(20, 20, 20, 0.12);
  transform: translateY(-2px);
}

.link-card:hover::before {
  opacity: 1;
}

.link-card:active {
  transform: translateY(0) scale(0.995);
}

.link-card:focus-visible,
.social:focus-visible,
.language-select:focus-visible,
.app-tab:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.22);
  outline-offset: 3px;
}

.link-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  transition:
    transform var(--motion-fast) var(--ease-soft),
    box-shadow var(--motion-fast) var(--ease-soft);
}

.link-card:hover .link-icon {
  box-shadow: 0 8px 18px rgba(20, 20, 20, 0.08);
  transform: scale(1.035);
}

.link-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-icon.contain img {
  object-fit: contain;
}

.link-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.link-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.link-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow {
  color: var(--muted);
  font-size: 1.08rem;
  text-align: right;
  transition:
    color var(--motion-fast) var(--ease-soft),
    transform var(--motion-fast) var(--ease-soft);
}

.link-card:hover .arrow {
  color: var(--ink);
  transform: translateX(2px);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.social {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.09);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.social:hover {
  box-shadow: 0 14px 30px rgba(20, 20, 20, 0.13);
  transform: translateY(-2px);
}

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

.about {
  width: min(100%, 414px);
  margin-inline: auto;
  margin-top: 28px;
  border-top: 1px dotted rgba(20, 20, 20, 0.24);
  padding-top: 20px;
  color: var(--muted);
  text-align: center;
  animation: riseIn 620ms var(--ease-out) 520ms both;
}

.about h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 850;
}

.about p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.48;
}

.legal-layout {
  display: grid;
  align-content: start;
  gap: 14px;
}

.app-tabs {
  width: min(100%, 610px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.app-tab {
  min-height: 42px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(246, 244, 241, 0.58), rgba(217, 214, 209, 0.24)),
    rgba(246, 244, 241, 0.4);
  color: var(--muted);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 8px 18px rgba(20, 20, 20, 0.06);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  animation: cardIn 540ms var(--ease-out) both;
  animation-delay: calc(190ms + var(--item-delay, 0ms));
  transition:
    transform var(--motion-fast) var(--ease-soft),
    background var(--motion-fast) var(--ease-soft),
    color var(--motion-fast) var(--ease-soft),
    box-shadow var(--motion-fast) var(--ease-soft);
}

.app-tab:hover {
  background:
    linear-gradient(145deg, rgba(246, 244, 241, 0.72), rgba(231, 154, 127, 0.1)),
    rgba(246, 244, 241, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 12px 24px rgba(20, 20, 20, 0.09);
  transform: translateY(-1px);
}

.app-tab.active {
  border-color: rgba(231, 154, 127, 0.46);
  background:
    linear-gradient(145deg, rgba(231, 154, 127, 0.18), rgba(246, 244, 241, 0.64)),
    rgba(246, 244, 241, 0.58);
  color: var(--ink);
  font-weight: 800;
}

.legal-panel {
  width: min(100%, 610px);
  margin-inline: auto;
  border: 1px solid rgba(20, 20, 20, 0.09);
  border-radius: 18px;
  padding: 26px;
  background:
    linear-gradient(150deg, rgba(246, 244, 241, 0.72), rgba(217, 214, 209, 0.34)),
    rgba(246, 244, 241, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 22px 54px rgba(20, 20, 20, 0.12);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  animation: riseIn 620ms var(--ease-out) 310ms both;
  counter-reset: legal-section;
}

.legal-header {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.1);
  padding-bottom: 18px;
}

.legal-app-icon {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 10px 22px rgba(20, 20, 20, 0.08);
  object-fit: cover;
}

.legal-title-block {
  min-width: 0;
}

.legal-eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.legal-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.34rem, 3.2vw, 1.72rem);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.legal-intro {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.legal-panel .lead,
.legal-panel p,
.legal-panel li {
  color: var(--muted);
  line-height: 1.62;
}

.legal-panel .lead {
  margin: 0;
  color: #3d3d3d;
  font-size: 0.95rem;
}

.legal-meta {
  margin: 0;
  border-left: 2px solid rgba(231, 154, 127, 0.62);
  padding-left: 12px;
  font-size: 0.82rem;
}

.legal-section {
  position: relative;
  counter-increment: legal-section;
  border-top: 1px solid rgba(20, 20, 20, 0.09);
  padding: 18px 0 0 18px;
  margin-top: 18px;
}

.legal-section::before {
  position: absolute;
  top: 22px;
  bottom: 4px;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(var(--peach), rgba(231, 154, 127, 0));
  content: "";
}

.legal-section h2 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.28;
  text-align: left;
}

.legal-section h2::before {
  color: var(--peach);
  content: counter(legal-section, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.8;
}

.legal-section h2 span {
  min-width: 0;
  text-align: left;
}

.legal-section p {
  margin: 0;
  font-size: 0.9rem;
}

.back-link {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(231, 154, 127, 0.42);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  transition:
    border-color var(--motion-fast) var(--ease-soft),
    color var(--motion-fast) var(--ease-soft),
    transform var(--motion-fast) var(--ease-soft);
}

.back-link:hover {
  border-color: rgba(20, 20, 20, 0.42);
  color: var(--ink);
  transform: translateX(-2px);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes avatarSettle {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1.025);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 420px) {
  .page {
    padding: 0;
  }

  .stack {
    width: 100%;
    min-height: 100svh;
    border-radius: 0;
    padding: 24px 14px 28px;
    box-shadow: none;
  }

  .links,
  .about,
  .app-tabs,
  .legal-panel {
    width: 100%;
  }

  .ambient-lottie {
    top: 72px;
    width: 420px;
    height: 420px;
  }

  .link-card {
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    gap: 12px;
    min-height: 60px;
  }

  .link-icon {
    width: 42px;
    height: 42px;
  }

  .link-copy span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .ambient-lottie {
    display: none;
  }
}
