
:root {
  --bg: #F3F7EF;
  --bg-alt: #EEF5E8;
  --card: #FFFFFF;
  --card-soft: #FAFCF7;
  --text: #263528;
  --muted: #6F7F6F;
  --soft: #8A9988;
  --accent: #6FA56B;
  --button: #7EB77A;
  --button-hover: #6AA767;
  --border: #D8E6D0;
  --divider: #E5EEDC;
  --surface: #EDF5E6;
  --dark: #4F7D4A;
  --cream: #FFF8E7;
  --shadow: 0 16px 36px rgba(38, 53, 40, 0.08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  line-height: 1.65;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--dark);
  color: white;
}

.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(216, 230, 208, 0.9);
  background: rgba(243, 247, 239, 0.94);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
}

.brand-mini img,
.avatar,
.selector-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.brand-mini img {
  border: 2px solid white;
  box-shadow: 0 6px 16px rgba(38, 53, 40, 0.08);
}

.anchor-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.anchor-tabs a,
.language-switch a,
.small-button,
.primary-button,
.language-card {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.anchor-tabs a {
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.91rem;
}

.anchor-tabs a:hover,
.language-switch a:hover,
.language-switch a[aria-current="true"] {
  border-color: var(--accent);
  color: var(--dark);
  background: var(--surface);
}

.site-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  padding: 26px 0 18px;
}

.hero-banner,
.section-banner,
.selector-visual,
.error-visual {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-banner img {
  width: 100%;
  height: auto;
}

.profile-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 144px 1fr;
  gap: 24px;
  align-items: center;
}

.avatar {
  width: 144px;
  height: 144px;
  border: 6px solid white;
  box-shadow: var(--shadow);
}

.profile-copy h1,
.selector-copy h1,
.error-copy h1 {
  margin: 4px 0 10px;
  font-size: 2.35rem;
  line-height: 1.08;
}

.profile-copy,
.section-heading,
.about-copy,
.card-body {
  min-width: 0;
}

.profile-copy p,
.home-description,
.section-heading p,
.about-copy p,
.selector-copy p,
.selector-hint,
.error-copy p {
  color: var(--muted);
}

.handle,
.section-kicker {
  margin: 0;
  color: var(--dark);
  font-weight: 800;
}

.profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-button,
.small-button {
  border-color: transparent;
  background: var(--button);
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(111, 165, 107, 0.18);
}

.primary-button {
  padding: 11px 16px;
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

.small-button {
  width: max-content;
  padding: 9px 12px;
  font-size: 0.92rem;
}

.primary-button:hover,
.small-button:hover {
  background: var(--button-hover);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.language-switch a {
  width: 44px;
  background: white;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.home-description {
  max-width: 820px;
  margin: 24px 0 0;
  font-size: 1.05rem;
}

.archive-section {
  padding: 50px 0 16px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 5px 0 8px;
  font-size: 2rem;
}

.section-heading p {
  margin: 0;
}

.section-banner {
  margin-bottom: 22px;
}

.section-banner img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  object-position: center;
}

.soft-note {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: var(--cream);
  color: var(--muted);
}

.card-grid,
.review-grid,
.meme-grid {
  display: grid;
  gap: 16px;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.music-grid,
.posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meme-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-card,
.review-card,
.meme-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--surface);
  cursor: zoom-in;
}

.image-button img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  transition: transform 180ms ease;
}

.post-card .image-button img {
  height: 360px;
  object-position: top center;
}

.meme-card .image-button img {
  height: 210px;
}

.image-button:hover img {
  transform: scale(1.025);
}

.card-body {
  padding: 14px;
}

.card-body h3,
.group-title,
.contact-list h3 {
  margin: 0 0 10px;
}

.card-body h3 {
  font-size: 1.04rem;
  line-height: 1.25;
}

.review-group {
  margin-top: 24px;
}

.group-title {
  color: var(--dark);
  font-size: 1.35rem;
}

.review-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-card .image-button img {
  height: 260px;
}

.review-text p {
  margin: 0 0 10px;
  color: var(--muted);
}

.about-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.about-copy-contacts {
  display: flex;
  justify-content: flex-end;
}

.about-copy-contacts .contact-list {
  width: min(100%, 360px);
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-list a {
  display: grid;
  gap: 2px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.contact-list span {
  color: var(--soft);
  font-size: 0.9rem;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 42px auto 32px;
  padding-top: 22px;
  border-top: 1px solid var(--divider);
  color: var(--muted);
}

.site-footer p {
  margin: 4px 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(38, 53, 40, 0.78);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.lightbox p {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 16px;
  margin: 0;
  text-align: center;
  color: white;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

.selector-body,
.error-body {
  min-height: 100vh;
}

.selector-shell,
.error-page {
  min-height: 100vh;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 32px 0;
}

.selector-hero,
.error-copy {
  text-align: center;
}

.selector-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border: 5px solid white;
  box-shadow: var(--shadow);
}

.selector-visual img,
.error-visual img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  object-position: center;
}

.selector-copy {
  max-width: 720px;
  margin: 22px auto 18px;
}

.language-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.language-card {
  min-height: 82px;
  padding: 14px;
  display: grid;
  gap: 4px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.language-card span {
  color: var(--dark);
  font-weight: 900;
}

.language-card strong {
  color: var(--muted);
  font-size: 0.95rem;
}

.language-card:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.selector-hint {
  margin-top: 18px;
}

.error-page {
  grid-template-columns: 1fr;
  gap: 22px;
}

.error-copy {
  max-width: 720px;
  margin: 0 auto;
}

.error-copy .language-switch {
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 920px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .anchor-tabs {
    width: 100%;
  }

  .profile-row,
  .about-copy {
    grid-template-columns: 1fr;
  }

  .avatar {
    width: 118px;
    height: 118px;
  }

  .card-grid,
  .music-grid,
  .posts-grid,
  .review-grid,
  .meme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .language-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 132px;
  }

  .site-shell,
  .site-footer,
  .selector-shell,
  .error-page {
    width: 100%;
    padding-left: 11px;
    padding-right: 11px;
  }

  .profile-copy h1,
  .selector-copy h1,
  .error-copy h1 {
    font-size: 1.8rem;
  }

  .section-heading h2 {
    font-size: 1.55rem;
  }

  .section-banner img {
    height: 190px;
  }

  .card-grid,
  .music-grid,
  .posts-grid,
  .review-grid,
  .meme-grid,
  .language-cards {
    grid-template-columns: 1fr;
  }

  .image-button img,
  .meme-card .image-button img {
    height: 230px;
  }

  .post-card .image-button img {
    height: 340px;
  }

  .profile-actions,
  .language-switch {
    width: 100%;
  }

  .primary-button {
    width: 100%;
  }
}
