*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f9f7f2;
  --bg-box: #f3efe8;
  --text: #2c2825;
  --text-muted: #6b6560;
  --border: rgba(44, 40, 37, 0.08);
  --placeholder: #e8e4dc;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --max-width: 56rem;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* Hero */
.hero {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  margin-top: -0.35rem;
}

.hero-photo {
  flex-shrink: 0;
  width: 7.5rem;
  height: 7.5rem;
  margin-top: -0.15rem;
  border-radius: 1.25rem;
  border: 3px solid #fff;
  box-shadow: 0 4px 20px rgba(44, 40, 37, 0.1);
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.hero-text {
  padding-top: 0;
}

.hero-greeting {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.hero-name {
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-meta {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Bio */
.bio {
  margin-bottom: 3rem;
}

.bio p {
  margin-bottom: 1.25rem;
}

.bio p:last-child {
  margin-bottom: 0;
}

.bio em {
  font-style: italic;
}

/* Platform buttons (Instagram/TikTok style) */
.platform-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2.75rem;
}

.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 0.6rem;
  border-radius: 0.6rem;
  text-decoration: none;
  color: var(--text);
  background: #f1efe9;
  border: 1px solid rgba(44, 40, 37, 0.14);
  box-shadow: 0 1px 5px rgba(44, 40, 37, 0.07);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.platform-btn:hover {
  background: #ebe8e1;
  box-shadow: 0 2px 8px rgba(44, 40, 37, 0.1);
}

.platform-btn__icon {
  flex-shrink: 0;
  display: block;
}

.platform-btn__icon--of {
  height: 0.95rem;
  width: auto;
  filter: brightness(0);
  opacity: 0.88;
}

.platform-btn__icon--telegram {
  width: 1rem;
  height: 1rem;
  color: var(--text);
}

.platform-btn__label {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* Gallery */
.gallery {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.65rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.section-subtitle {
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem 0.35rem;
  padding: 1rem 0 0.5rem;
  align-items: start;
}

.gallery-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-item:nth-child(1) {
  padding-top: 0.6rem;
}

.gallery-item:nth-child(2) {
  padding-top: 0;
}

.gallery-item:nth-child(3) {
  padding-top: 1rem;
}

.gallery-item:nth-child(4) {
  padding-top: 0.25rem;
}

.gallery-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1.25rem;
  border: 4px solid #fff;
  box-shadow: 0 8px 28px rgba(44, 40, 37, 0.14);
  margin-bottom: 0.6rem;
  transform-origin: center center;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-item:nth-child(1) .gallery-photo {
  transform: rotate(-3deg);
}

.gallery-item:nth-child(2) .gallery-photo {
  transform: rotate(2.5deg);
}

.gallery-item:nth-child(3) .gallery-photo {
  transform: rotate(-2deg);
}

.gallery-item:nth-child(4) .gallery-photo {
  transform: rotate(3.5deg);
}

.gallery-item figcaption {
  font-style: italic;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
  padding: 0 0.15rem;
}

/* Placeholders */
.placeholder {
  background: linear-gradient(145deg, var(--placeholder) 0%, #ddd8cf 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-label {
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Currently box */
.currently {
  background: var(--bg-box);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 3rem;
}

.currently-title {
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.currently-list {
  list-style: none;
  font-size: 1.05rem;
  line-height: 1.85;
}

.currently-list em {
  font-style: italic;
}

.visitor-city {
  visibility: hidden;
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-cta {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--text);
  opacity: 0.65;
  transition: opacity 0.2s ease;
  line-height: 0;
}

.socials a:hover {
  opacity: 1;
}

.socials svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.socials__of {
  display: block;
  height: 0.82rem;
  width: auto;
  max-width: 1.35rem;
  filter: brightness(0);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1rem;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-legal span {
  color: var(--border);
}

.footer-signoff {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Mobile */
@media (max-width: 540px) {
  .page {
    padding: 2rem 1.25rem 3rem;
  }

  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-photo {
    width: 8rem;
    height: 8rem;
  }

  .hero-name {
    font-size: 2.25rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 1rem;
    max-width: 22rem;
    margin: 0 auto;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(4) {
    padding-top: 0;
  }

  .gallery-item:nth-child(3) {
    padding-top: 0.5rem;
  }

  .gallery-item:nth-child(4) {
    padding-top: 0.15rem;
  }

  .platform-buttons {
    gap: 0.45rem;
    margin-bottom: 2.25rem;
  }

  .platform-btn {
    padding: 0.4rem 0.75rem 0.4rem 0.5rem;
    gap: 0.4rem;
  }

  .platform-btn__icon--of {
    height: 0.8rem;
  }

  .platform-btn__icon--telegram {
    width: 0.85rem;
    height: 0.85rem;
  }

  .platform-btn__label {
    font-size: 0.8rem;
  }
}

@media (min-width: 541px) and (max-width: 720px) {
  .gallery-grid {
    gap: 0.4rem 0.25rem;
  }

  .gallery-item figcaption {
    font-size: 0.72rem;
  }
}
