:root {
  color-scheme: light;
  --background: #ebe9e4;
  --surface: #f7f6f2;
  --text: #20201d;
  --muted: #696a62;
  --line: #9d9d91;
  --accent: #d95f4c;
  --leaf: #7c8b65;
  --gold: #d9a84e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 26px;
}

.profile {
  position: relative;
  width: min(390px, 100%);
  min-height: auto;
  overflow: hidden;
  border-radius: 32px;
  background: var(--surface);
  padding: 54px 30px 76px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(43, 42, 34, 0.14);
}

.language-switch {
  position: absolute;
  top: auto;
  bottom: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(157, 157, 145, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.language-switch button {
  min-width: 36px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
}

.language-switch button.is-active {
  background: var(--text);
  color: #ffffff;
}

.avatar {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 18px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  box-shadow: 0 10px 28px rgba(43, 42, 34, 0.16);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.statement {
  margin: 12px auto 12px;
  max-width: 318px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  font-weight: 650;
  line-height: 1.35;
}

.story-gallery {
  width: 100%;
  margin: 0 auto 26px;
}

.gallery-track {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
  border-radius: 8px;
  background: #e7e4dc;
}

.gallery-strip {
  display: flex;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
  transition: transform 400ms ease;
}

.gallery-slide {
  position: relative;
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.gallery-slide img {
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
}

.gallery-slide figcaption {
  flex: 0 0 auto;
  padding: 10px 12px;
  background: var(--text);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
}

.gallery-slide figcaption a {
  color: inherit;
}

.links {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
}

.links > a {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.36);
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.links > a:hover {
  border-color: var(--text);
  background: #ffffff;
  transform: translateY(-1px);
}

.socials {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  margin-top: 28px;
  background: transparent;
}

.socials a {
  display: inline-block;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 430px) {
  .shell {
    padding: 0;
  }

  .profile {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    padding-right: 22px;
    padding-left: 22px;
  }
}
