/**
 * About Section — премиальный минимализм + editorial typography
 */

.about {
  background: var(--color-bg);
  color: var(--color-text);
  position: relative;
}

/* Мягкий переход снизу к Problems */
.about::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(80px, 12vh, 160px);
  background: linear-gradient(
    to top,
    var(--color-deep) 0%,
    rgba(7, 7, 7, 0.5) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-gap);
  align-items: start;
}

/* Card */
.aboutCard {
  background: var(--color-glass-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
}

.aboutCard h2 {
  margin: 0 0 var(--space-5);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.about-title-main {
  font-size: 1em;
  font-weight: var(--font-weight-black);
}

.about-title-role {
  font-size: 0.65em;
  font-weight: var(--font-weight-bold);
  opacity: 0.85;
  text-transform: lowercase;
}

.about-title-name {
  font-size: 0.85em;
  font-weight: var(--font-weight-extrabold);
  opacity: 0.95;
}

.aboutCard p {
  margin: 0 0 var(--space-5);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted-strong);
}

.aboutCard p:last-of-type {
  margin-bottom: var(--space-6);
}

/* Speech bubble */
.bubbleWrap {
  margin: var(--space-6) 0;
  display: flex;
  justify-content: flex-end;
}

.speech {
  background: var(--color-white);
  border: var(--border-width-thicker) solid var(--color-black);
  border-radius: var(--border-radius-lg);
  padding: var(--space-4) var(--space-5);
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  position: relative;
  color: var(--color-black);
}

.speech::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -18px;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 18px solid var(--color-black);
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.15));
}

.speech::before {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -14px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 16px solid var(--color-white);
  z-index: 2;
}

.speech p {
  margin: 0;
  font-weight: var(--font-weight-extrabold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
  color: var(--color-black);
}

/* Chips (теги) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
  list-style: none;
  padding: 0;
}

.chips li {
  margin: 0;
  padding: 0;
}

.chip {
  background: var(--color-white);
  border: var(--border-width-thick) solid var(--color-black);
  border-radius: var(--border-radius-full);
  padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + var(--space-5));
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  position: relative;
  white-space: nowrap;
  transition: transform var(--transition-base);
  color: var(--color-black);
  display: inline-block;
}

.chip::before {
  content: "";
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: var(--border-radius-full);
  background: var(--color-black);
}

.chip:hover {
  transform: translateY(-2px);
}

/* Portrait */
.portrait {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  min-height: 420px;
  border: var(--border-width) solid var(--color-border);
  background: radial-gradient(
      900px 500px at 30% 30%,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0) 60%
    ),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0));
  box-shadow: var(--shadow-xl);
  margin-bottom: var(--space-4);
}

.portraitImg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  clip-path: inset(7.5% round 0px);
  transform: scale(1.18);
  transition: opacity var(--transition-slower), transform var(--transition-slower);
}

.portraitImg--a {
  opacity: 1;
}

.portraitImg--b {
  opacity: 0;
}

/* Swap эффекты только для двух картинок */
.portrait.hasImg:not(.isSingle).swap .portraitImg--a {
  opacity: 0;
}

.portrait.hasImg:not(.isSingle).swap .portraitImg--b {
  opacity: 1;
}

@media (hover: hover) {
  /* Hover эффекты только для двух картинок */
  .portrait.hasImg:not(.isSingle):hover {
    cursor: pointer;
  }

  .portrait.hasImg:not(.isSingle):hover .portraitImg--a {
    opacity: 0;
  }

  .portrait.hasImg:not(.isSingle):hover .portraitImg--b {
    opacity: 1;
  }

  /* Для одиночного портрета - никаких hover эффектов */
  .portrait.isSingle:hover .portraitImg--a {
    opacity: 1;
  }
}

/* Text boxes */
.textBox {
  border: var(--border-width-thick) solid var(--color-black);
  border-radius: var(--border-radius-lg);
  padding: var(--space-6);
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
  color: var(--color-black);
  margin-top: var(--space-4);
}

.textBox:first-of-type {
  margin-top: 0;
}

.textBox h3 {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-black);
}

.textBox p {
  margin: 0;
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  opacity: 0.95;
  color: var(--color-black);
}

.textBox .helpList {
  margin: var(--space-4) 0 0 0;
  padding-left: var(--space-6);
  list-style: decimal;
  color: var(--color-black);
}

.textBox .helpList li {
  margin-bottom: var(--space-3);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  opacity: 0.95;
}

/* Reveal animation */
.about .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--animation-duration-slow) var(--animation-easing),
    transform var(--animation-duration-slow) var(--animation-easing);
}

.about .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile optimizations */
@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-gap);
  }

  .bubbleWrap {
    justify-content: flex-start;
  }

  .speech {
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  .aboutCard {
    padding: var(--space-5);
  }

  .aboutCard h2 {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: var(--space-4);
  }

  .aboutCard p {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-4);
  }

  .chips {
    gap: var(--space-2);
  }

  .chip {
    white-space: normal;
    line-height: 1.25;
    padding: var(--space-2) var(--space-3) var(--space-2) calc(var(--space-3) + var(--space-4));
    font-size: 11px;
  }

  .portrait {
    min-height: 320px;
  }

  .textBox {
    padding: var(--space-4);
  }

  .textBox h3 {
    font-size: var(--font-size-base);
  }

  .textBox p {
    font-size: var(--font-size-sm);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .about .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .portraitImg {
    transition: none;
  }
}

