/* ===== Переменные и сброс ===== */
:root {
  --bg-dark: #1a0a0a;
  --bg-card: #2a1212;
  --red: #8b0000;
  --red-bright: #c41e3a;
  --gold: #d4af37;
  --gold-light: #f0d77b;
  --cream: #f5e6c8;
  --cream-dark: #e8d5a3;
  --black: #0d0505;
  --text: #f5e6c8;
  --text-muted: #c9b896;
  --stripe: repeating-linear-gradient(
    90deg,
    var(--red) 0px,
    var(--red) 12px,
    var(--cream) 12px,
    var(--cream) 24px
  );
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Special Elite', 'Courier New', monospace;
  background-color: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Фоновая текстура */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(139, 0, 0, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ===== Плавающие клоуны ===== */
.floating-clowns {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.clown {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0.12;
  animation: float 18s ease-in-out infinite;
  filter: grayscale(30%);
}

.clown.c1 { top: 8%; left: 5%; animation-delay: 0s; font-size: 2.8rem; }
.clown.c2 { top: 25%; right: 8%; animation-delay: -3s; font-size: 2rem; }
.clown.c3 { top: 55%; left: 3%; animation-delay: -7s; font-size: 2.5rem; }
.clown.c4 { top: 70%; right: 5%; animation-delay: -12s; font-size: 1.8rem; }
.clown.c5 { top: 40%; left: 15%; animation-delay: -5s; font-size: 1.6rem; }
.clown.c6 { top: 15%; right: 20%; animation-delay: -9s; font-size: 2.3rem; }
.clown.c7 { top: 85%; left: 25%; animation-delay: -15s; font-size: 2rem; }
.clown.c8 { top: 60%; right: 18%; animation-delay: -2s; font-size: 1.7rem; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-25px) rotate(5deg); }
}

/* ===== Шапка ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: linear-gradient(180deg, rgba(26, 10, 10, 0.95) 0%, rgba(26, 10, 10, 0.8) 100%);
  border-bottom: 3px solid var(--gold);
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Rye', serif;
  font-size: 1.15rem;
  color: var(--gold);
  letter-spacing: 1px;
}

.logo-clown {
  font-size: 1.5rem;
  animation: bounce 2.5s ease-in-out infinite;
}

.logo-clown:last-child {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.nav {
  display: flex;
  gap: 1.8rem;
}

.nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 1px;
  position: relative;
  transition: color 0.3s;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav a:hover {
  color: var(--gold);
}

.nav a:hover::after {
  width: 100%;
}

.menu-btn {
  display: none;
  background: none;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 1.4rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  border-radius: 4px;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 1.5rem 4rem;
  z-index: 2;
}

.hero-content {
  text-align: center;
  max-width: 800px;
}

.circus-banner {
  background: linear-gradient(180deg, #3d1515 0%, #2a0e0e 100%);
  border: 4px solid var(--gold);
  box-shadow: 
    0 0 0 8px var(--red),
    0 0 40px rgba(212, 175, 55, 0.25),
    inset 0 0 30px rgba(0,0,0,0.4);
  padding: 2.5rem 2rem;
  position: relative;
  transform: perspective(800px) rotateX(2deg);
}

.banner-stripe {
  height: 10px;
  background: var(--stripe);
  margin: 0 -2rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner-stripe:last-of-type {
  margin: 1.5rem -2rem 0;
}

.hero-title {
  font-family: 'Limelight', cursive;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  color: var(--gold);
  text-shadow: 
    3px 3px 0 var(--red),
    6px 6px 0 rgba(0,0,0,0.4),
    0 0 30px rgba(212, 175, 55, 0.4);
  letter-spacing: 6px;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--cream);
  letter-spacing: 2px;
  opacity: 0.9;
}

.hero-clowns {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  font-size: 2.8rem;
}

.hero-clowns span {
  animation: float 4s ease-in-out infinite;
}

.hero-clowns span:nth-child(2) {
  animation-delay: 0.5s;
  font-size: 3.2rem;
}

.hero-clowns span:nth-child(3) {
  animation-delay: 1s;
}

.btn-circus {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.9rem 2.2rem;
  background: var(--red);
  color: var(--cream);
  text-decoration: none;
  font-family: 'Rye', serif;
  font-size: 1.1rem;
  letter-spacing: 2px;
  border: 3px solid var(--gold);
  box-shadow: 4px 4px 0 var(--black);
  transition: all 0.25s;
  position: relative;
}

.btn-circus:hover {
  background: var(--red-bright);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--black);
}

.hero-decoration {
  position: absolute;
  font-size: 4rem;
  opacity: 0.2;
  animation: float 7s ease-in-out infinite;
}

.hero-decoration.left {
  left: 5%;
  top: 40%;
}

.hero-decoration.right {
  right: 5%;
  top: 55%;
  animation-delay: -3s;
}

/* ===== Секции общие ===== */
section {
  position: relative;
  z-index: 2;
  padding: 5rem 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: 'Rye', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--gold);
  letter-spacing: 3px;
  text-align: center;
  text-shadow: 2px 2px 0 var(--red);
}

.section-clown {
  font-size: 2rem;
  animation: bounce 2.8s ease-in-out infinite;
}

.section-clown:last-child {
  animation-delay: 0.5s;
}

/* ===== О себе ===== */
.about {
  background: linear-gradient(180deg, transparent 0%, rgba(42, 18, 18, 0.6) 50%, transparent 100%);
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  color: var(--cream);
}

.about-text strong {
  color: var(--gold);
}

.about-quote {
  margin-top: 2rem !important;
  padding: 1.2rem 1.5rem;
  border-left: 4px solid var(--gold);
  background: rgba(139, 0, 0, 0.25);
  font-style: italic;
  color: var(--gold-light);
  font-size: 1.15rem;
}

.about-card {
  background: var(--bg-card);
  border: 3px solid var(--gold);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.4);
  position: relative;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  pointer-events: none;
}

.clown-face {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.about-card h3 {
  font-family: 'Rye', serif;
  color: var(--gold);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.about-card ul {
  list-style: none;
  text-align: left;
}

.about-card li {
  padding: 0.45rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--cream);
}

.about-card li::before {
  content: '🤡';
  position: absolute;
  left: 0;
  font-size: 0.9rem;
}

/* ===== Работы ===== */
.works-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.work-card {
  background: var(--bg-card);
  border: 3px solid var(--red);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.35);
}

.work-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 8px 12px 0 rgba(0,0,0,0.4);
  border-color: var(--gold);
}

.work-image {
  height: 200px;
  background: linear-gradient(135deg, #3d1515 0%, #1a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 3px solid var(--gold);
  overflow: hidden;
}

.work-clown {
  font-size: 5rem;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3));
  transition: transform 0.4s;
}

.work-card:hover .work-clown {
  transform: scale(1.15) rotate(8deg);
}

.work-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: var(--gold);
  font-family: 'Rye', serif;
  font-size: 0.9rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--gold);
  letter-spacing: 1px;
}

.work-info {
  padding: 1.4rem 1.3rem 1.6rem;
}

.work-info h3 {
  font-family: 'Rye', serif;
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 0.6rem;
  letter-spacing: 0.5px;
}

.work-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.work-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  background: rgba(139, 0, 0, 0.5);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  letter-spacing: 1px;
}

/* ===== Контакты ===== */
.contact {
  background: linear-gradient(180deg, transparent 0%, rgba(42, 18, 18, 0.5) 100%);
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-intro {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  color: var(--cream);
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: var(--bg-card);
  border: 2px solid var(--gold);
  color: var(--cream);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.25s;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.contact-card:hover {
  background: var(--red);
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 rgba(0,0,0,0.4);
  color: var(--gold);
}

.contact-icon {
  font-size: 1.5rem;
}

.contact-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ===== Подвал ===== */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 3px solid var(--gold);
  background: var(--black);
}

.footer-clowns {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  letter-spacing: 1rem;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-small {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ===== Адаптив ===== */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-bottom: 3px solid var(--gold);
    padding: 1.5rem;
    gap: 1.2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .circus-banner {
    padding: 1.8rem 1.2rem;
  }

  .hero-decoration {
    display: none;
  }

  .header {
    padding: 0.9rem 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    letter-spacing: 3px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Новые стили для фото и текста Ансора ===== */

.about-main {
  max-width: 1100px;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-photo-wrap {
  position: relative;
}

.about-photo {
  width: 100%;
  height: auto;
  display: block;
  border: 4px solid var(--gold);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.45);
  object-fit: cover;
  max-height: 420px;
}

.photo-clown {
  position: absolute;
  bottom: -15px;
  right: -15px;
  font-size: 3rem;
  background: var(--bg-dark);
  border-radius: 50%;
  padding: 0.2rem;
  border: 3px solid var(--gold);
  animation: bounce 2.5s ease-in-out infinite;
}

.about-text-block {
  background: var(--bg-card);
  border: 3px solid var(--red);
  padding: 1.8rem 1.6rem;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.35);
}

.about-name {
  font-family: 'Rye', serif;
  color: var(--gold);
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
  line-height: 1.3;
}

.about-text-block p {
  margin-bottom: 1.1rem;
  font-size: 1.05rem;
  color: var(--cream);
  line-height: 1.65;
}

.about-text-block p:last-child {
  margin-bottom: 0;
}

/* Повтор блока */
.about-repeat {
  max-width: 900px;
  margin: 0 auto;
}

.repeat-card {
  display: flex;
  gap: 1.5rem;
  background: rgba(42, 18, 18, 0.7);
  border: 2px dashed var(--gold);
  padding: 1.5rem;
  align-items: flex-start;
}

.repeat-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 3px solid var(--gold);
  flex-shrink: 0;
}

.repeat-text h4 {
  font-family: 'Rye', serif;
  color: var(--gold);
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}

.repeat-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Работы с фото */
.work-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0.85;
  transition: transform 0.4s, opacity 0.4s;
}

.work-card:hover .work-photo {
  transform: scale(1.08);
  opacity: 1;
}

.work-image {
  position: relative;
  overflow: hidden;
}

.work-image .work-clown {
  display: none;
}

/* Контакты с фото */
.contact-with-photo {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 900px;
  margin: 0 auto 2.5rem;
  background: var(--bg-card);
  border: 3px solid var(--gold);
  padding: 1.5rem;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.35);
  text-align: left;
}

.contact-photo {
  width: 100%;
  height: auto;
  border: 3px solid var(--red);
  object-fit: cover;
  max-height: 260px;
}

.contact-text h3 {
  font-family: 'Rye', serif;
  color: var(--gold);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.contact-text p {
  font-size: 0.98rem;
  color: var(--cream);
  line-height: 1.6;
}

/* Адаптив для новых блоков */
@media (max-width: 768px) {
  .about-main {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-height: 360px;
    margin: 0 auto;
  }

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

  .contact-with-photo {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-photo {
    max-width: 220px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .about-photo-wrap {
    max-width: 280px;
    margin: 0 auto;
  }
}
