* {
  box-sizing: border-box;
}

:root {
  --bg: #f7f2ed;
  --paper: #ffffff;
  --ink: #241f1d;
  --muted: #786e69;
  --line: rgba(64, 49, 43, 0.10);
  --accent: #9c6a5a;
  --accent-soft: #eadfd8;
  --shadow: 0 18px 50px rgba(53, 40, 33, 0.10);
  --radius-xl: 28px;
  --radius-lg: 22px;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.85), transparent 34%),
    linear-gradient(180deg, #fbf8f5 0%, var(--bg) 42%, #f4eee9 100%);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.intro {
  padding: 10px 4px 22px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .16em;
  font-weight: 750;
  color: var(--accent);
}

.intro h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 9vw, 46px);
  line-height: 1.02;
  letter-spacing: -.03em;
  font-weight: 600;
}

.intro-copy {
  margin: 14px 0 0;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.profile-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.profile-tab {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(63,46,38,.04);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.profile-tab:active {
  transform: scale(.985);
}

.profile-tab.active {
  border-color: rgba(156,106,90,.45);
  background: #fff;
}

.profile-tab img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 auto;
}

.profile-tab span {
  min-width: 0;
}

.profile-tab strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.profile-tab small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 430px;
  background: #ddd;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity .2s ease, transform .35s ease;
}

.hero-image.changing {
  opacity: .55;
  transform: scale(1.015);
}

.hero-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(18,13,11,.78), rgba(18,13,11,0));
  pointer-events: none;
}

.hero-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fff;
}

.hero-meta > div {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(255,255,255,.88);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9bd8b0;
  box-shadow: 0 0 0 5px rgba(155,216,176,.13);
}

.hero-meta h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.025em;
}

.hero-meta p {
  margin: 7px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,.82);
}

.gallery {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 12px 12px 4px;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.thumb {
  border: 0;
  padding: 0;
  flex: 0 0 64px;
  height: 78px;
  border-radius: 14px;
  overflow: hidden;
  background: #eee;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.thumb.active {
  outline-color: rgba(156,106,90,.72);
}

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

.content {
  padding: 20px 18px 22px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.fact {
  padding: 12px 8px;
  border-radius: 15px;
  background: #faf7f4;
  border: 1px solid rgba(64,49,43,.07);
  text-align: center;
}

.fact strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
  color: #4a3831;
}

.fact span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .02em;
}

.story-block h3 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: -.02em;
}

.story-block > p:last-child {
  margin: 0;
  font-size: 15px;
  line-height: 1.82;
  color: #5f5651;
}

.soft-divider {
  height: 1px;
  margin: 24px 0;
  background: linear-gradient(90deg, transparent, rgba(64,49,43,.14), transparent);
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.values span {
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #714b40;
  font-size: 11px;
  font-weight: 700;
}

.footer {
  padding: 18px 8px 2px;
  text-align: center;
}

.footer p {
  margin: 0 auto;
  max-width: 430px;
  font-size: 10px;
  line-height: 1.55;
  color: #9b918c;
}

@media (max-width: 370px) {
  .page-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .profile-tab img {
    width: 42px;
    height: 42px;
  }

  .profile-tab small {
    display: none;
  }

  .hero-wrap {
    min-height: 390px;
  }

  .fact strong {
    font-size: 16px;
  }
}
