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

    body {
      font-family: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
      background: #ffffff;
      color: #2e2b23;
      line-height: 1.6;
      overflow-x: hidden;
      background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
                        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 45%);
    }

    :root {
      --paper: #ffffff;
      --ink: #2f2c1e;
      --gold: #ffffff;
      --gold-light: #ffffff;
      --sage: #7e8d6c;
      --shadow: 0 12px 28px rgba(60, 50, 30, 0.08);
      --shadow-hover: 0 20px 40px rgba(50, 40, 20, 0.14);
    }

    h1, h2, h3 {
      font-family: 'Playfair Display', 'Times New Roman', serif;
      font-weight: 700;
      color: var(--ink);
    }

    .container {
      max-width: 1280px;
      margin: 0 auto;
      padding: 2rem;
    }

    /* Hero – как титульная страница альбома */
    .hero {
      position: relative;
      min-height: 90vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(145deg, #ffffff 0%, #ffffff 40%, #ffffff 100%);
      overflow: hidden;
    }

    .hero::after {
      content: "";
      position: absolute;
      inset: 0;
      background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.08"><path d="M10 25 L90 25 M10 50 L90 50 M10 75 L90 75" stroke="%23554e2b" stroke-width="0.8"/><path d="M25 10 L25 90 M50 10 L50 90 M75 10 L75 90" stroke="%23554e2b" stroke-width="0.4"/></svg>');
      pointer-events: none;
    }

    .hero-content {
      position: relative;
      z-index: 2;
      text-align: center;
      max-width: 750px;
      padding: 3.5rem 3rem;
      background: rgba(255, 255, 255, 0.7);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-radius: 2.5rem;
      box-shadow: 0 35px 70px rgba(80, 60, 30, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.4);
      margin: 2rem;
      animation: fadeUp 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    }

    @keyframes fadeUp {
      0% { opacity: 0; transform: translateY(40px); }
      100% { opacity: 1; transform: translateY(0); }
    }

    .hero h1 {
      font-size: clamp(3rem, 8vw, 5.2rem);
      font-weight: 700;
      line-height: 1.1;
      letter-spacing: -0.3px;
      color: #3a351c;
      margin-bottom: 1.2rem;
    }

    .hero .date-badge {
      display: inline-block;
      background: #3a351c;
      color: #ffffff;
      padding: 0.7rem 2.8rem;
      border-radius: 3rem;
      font-size: 2rem;
      font-weight: 600;
      letter-spacing: 3px;
      margin: 1.2rem 0 1.8rem;
      box-shadow: 0 8px 24px rgba(0,0,0,0.15);
      font-family: 'Playfair Display', serif;
    }

    .subtitle {
      font-size: 1.4rem;
      font-style: italic;
      color: #4a4432;
      max-width: 550px;
      margin: 0 auto;
      opacity: 0.9;
    }

    /* Заголовки разделов с тонкой линией */
    .section-title {
      text-align: center;
      font-size: 2.8rem;
      margin: 4.5rem 0 2.5rem;
      position: relative;
      color: #3a351c;
      font-weight: 600;
    }

    .section-title::after {
      content: "";
      display: block;
      width: 60px;
      height: 2px;
      background: var(--gold);
      margin: 1rem auto 0;
      border-radius: 4px;
    }

    /* Компактные карточки персон */
    .xewex-history-people-section {
      margin: 0 0 4rem;
    }

    .xewex-history-people-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1.5rem;
      max-width: 900px;
      margin: 0 auto;
    }

    .xewex-history-person {
      min-width: 0;
      background: var(--paper);
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 1.5rem;
      padding: 1.5rem 1rem;
      box-shadow: var(--shadow);
      text-align: center;
      transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }

    .xewex-history-person__link {
      color: inherit;
      text-decoration: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      height: 100%;
      border-radius: 1rem;
    }

    .xewex-history-person:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow-hover);
      border-color: rgba(255, 255, 255, 0.5);
    }

    .xewex-history-person__link:focus-visible {
      outline: 3px solid #6f7f52;
      outline-offset: 5px;
    }

    .xewex-history-person__portrait {
      display: block;
      width: 132px;
      height: 132px;
      border-radius: 50%;
      overflow: hidden;
      margin: 0 auto 1rem;
      background: #ffffff;
      box-shadow: 0 0 0 4px #ffffff, 0 12px 28px rgba(80, 60, 20, 0.18);
      transition: transform 0.3s ease;
    }

    .xewex-history-person:hover .xewex-history-person__portrait {
      transform: scale(1.02);
    }

    .xewex-history-person__image {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center 18%;
    }

    .xewex-history-person__name {
      font-size: 1.25rem;
      line-height: 1.25;
      margin: 0;
      font-weight: 600;
      overflow-wrap: anywhere;
    }

    .xewex-history-person__years {
      margin: 0.45rem 0 0;
      color: #657050;
      font-size: 1rem;
      letter-spacing: 0.04em;
    }

    .xewex-history-people-section--forever .xewex-history-people-grid {
      grid-template-columns: minmax(220px, 280px);
      justify-content: center;
    }

    /* Блок документа */
    .document-preview {
      background: #ffffff;
      border-radius: 2rem;
      padding: 2.8rem 2.5rem;
      margin: 3rem 0;
      box-shadow: inset 0 0 0 1px #ffffff, var(--shadow);
      font-family: 'Playfair Display', serif;
      text-align: center;
      background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
      background-size: 100% 2.5rem;
    }

    .document-preview h3 {
      font-size: 2.2rem;
      margin-bottom: 1rem;
    }

    .document-preview-image {
      display: block;
      width: min(100%, 520px);
      max-height: 620px;
      object-fit: contain;
      margin: 0 auto 1.6rem;
      border-radius: 1rem;
      box-shadow: 0 18px 38px rgba(72, 55, 24, 0.18);
      border: 1px solid rgba(255, 255, 255, 0.35);
      background: #ffffff;
    }

    /* Галерея с фильтрами */
    .filter-bar {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.8rem;
      margin-bottom: 2.8rem;
    }

    .filter-btn {
      background: transparent;
      border: 1px solid #ffffff;
      color: #3f3b27;
      padding: 0.65rem 2rem;
      border-radius: 2.5rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s;
      font-size: 0.95rem;
      font-family: 'Source Serif Pro', serif;
      backdrop-filter: blur(4px);
    }

    .filter-btn.active, .filter-btn:hover {
      background: #3a351c;
      color: #ffffff;
      border-color: #3a351c;
      box-shadow: 0 4px 14px rgba(60, 50, 20, 0.2);
    }

    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.8rem;
    }

    .gallery-item {
      position: relative;
      border-radius: 1.8rem;
      overflow: hidden;
      background: #ffffff;
      box-shadow: 0 8px 18px rgba(0,0,0,0.06);
      cursor: pointer;
      transition: all 0.4s ease;
      aspect-ratio: 4/5;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.6s cubic-bezier(0.25, 0.45, 0.45, 0.95);
    }

    .gallery-item:hover img {
      transform: scale(1.07);
    }

    .gallery-item:hover {
      box-shadow: 0 22px 40px rgba(60, 50, 20, 0.2);
    }

    .gallery-caption {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(transparent, rgba(30, 30, 15, 0.75));
      color: #ffffff;
      padding: 1.5rem 1.2rem 1rem;
      font-weight: 500;
      font-size: 0.95rem;
      backdrop-filter: blur(3px);
      font-family: 'Source Serif Pro', serif;
    }

    /* Модальное окно */
    .modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(20, 20, 10, 0.85);
      backdrop-filter: blur(16px);
      z-index: 1000;
      align-items: center;
      justify-content: center;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      max-width: 750px;
      max-height: 85vh;
      border-radius: 2rem;
      overflow: hidden;
      box-shadow: 0 40px 80px rgba(0,0,0,0.5);
      position: relative;
    }

    .modal-content img {
      width: 100%;
      height: auto;
      display: block;
      max-height: 80vh;
      object-fit: contain;
      background: #1a1a15;
    }

    .close-modal {
      position: absolute;
      top: 15px;
      right: 20px;
      font-size: 2.2rem;
      color: #fff;
      background: rgba(0,0,0,0.5);
      border: none;
      width: 46px;
      height: 46px;
      border-radius: 50%;
      cursor: pointer;
      backdrop-filter: blur(8px);
      transition: background 0.3s;
    }

    .close-modal:hover {
      background: rgba(0,0,0,0.75);
    }

    .footer {
      text-align: center;
      padding: 2.5rem 1rem;
      color: #636148;
      border-top: 1px solid #ffffff;
      margin-top: 4rem;
      font-family: 'Source Serif Pro', serif;
      font-size: 0.95rem;
    }

    /* Адаптивность */
    @media (max-width: 1024px) {
      .container { padding: 1.5rem; }
      .hero-content { max-width: 90%; padding: 2.5rem 2rem; }
      .section-title { font-size: 2.4rem; }
      .xewex-history-people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .xewex-history-person__portrait { width: 116px; height: 116px; }
      .xewex-history-people-section--forever .xewex-history-people-grid { grid-template-columns: minmax(220px, 280px); }
    }

    @media (max-width: 768px) {
      .hero { min-height: 70vh; }
      .hero h1 { font-size: 2.8rem; }
      .hero .date-badge { font-size: 1.6rem; }
      .xewex-history-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .xewex-history-person { padding: 1.35rem 0.85rem; }
      .xewex-history-person__portrait { width: 110px; height: 110px; }
      .xewex-history-people-section--forever .xewex-history-people-grid { grid-template-columns: minmax(220px, 280px); }
      .gallery-grid { gap: 1.2rem; }
      .document-preview { padding: 2rem; font-size: 1.2rem; }
    }

    @media (max-width: 480px) {
      .hero-content { padding: 2rem 1.2rem; border-radius: 2rem; }
      .hero h1 { font-size: 2rem; }
      .hero .date-badge { font-size: 1.3rem; padding: 0.4rem 1.5rem; }
      .section-title { font-size: 2rem; }
      .xewex-history-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
      .xewex-history-person { padding: 1.2rem 0.65rem; }
      .xewex-history-person__portrait { width: 96px; height: 96px; }
      .xewex-history-person__name { font-size: 1.05rem; }
      .xewex-history-people-section--forever .xewex-history-people-grid { grid-template-columns: minmax(0, 250px); }
      .gallery-grid { grid-template-columns: 1fr; }
      .filter-btn { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
    }

    @media (max-width: 360px) {
      .xewex-history-people-grid { grid-template-columns: 1fr; }
      .xewex-history-person { max-width: 250px; width: 100%; margin: 0 auto; }
    }
