/* ==========================================================================
   Блок преподавателя на профессиях — dark tech, в духе chrome ТЕРАКОР
   ========================================================================== */

html body.profession-page.course-page main > section#teacher.instructor,
html body.profession-page main > section#teacher.instructor,
html body.course-page main > section#teacher.instructor,
html body section#teacher.instructor,
html body #teacher.instructor,
.instructor {
  --ins-bg: #0b1120;
  --ins-bg-2: #0f172a;
  --ins-cyan: #22d3ee;
  --ins-cyan-soft: rgba(34, 211, 238, 0.14);
  --ins-orange: #f39c12;
  --ins-text: #e2e8f0;
  --ins-muted: #94a3b8;
  --ins-glass: rgba(255, 255, 255, 0.045);
  --ins-line: rgba(255, 255, 255, 0.1);
  --ins-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  padding: clamp(3.25rem, 6vw, 5rem) 0;
  background:
    radial-gradient(ellipse 70% 55% at 12% 20%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(ellipse 55% 50% at 88% 78%, rgba(46, 125, 110, 0.16), transparent 52%),
    radial-gradient(ellipse 40% 35% at 55% 0%, rgba(243, 156, 18, 0.08), transparent 60%),
    linear-gradient(165deg, var(--ins-bg) 0%, var(--ins-bg-2) 55%, #090f1c 100%) !important;
  background-color: var(--ins-bg) !important;
  background-image:
    radial-gradient(ellipse 70% 55% at 12% 20%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(ellipse 55% 50% at 88% 78%, rgba(46, 125, 110, 0.16), transparent 52%),
    radial-gradient(ellipse 40% 35% at 55% 0%, rgba(243, 156, 18, 0.08), transparent 60%),
    linear-gradient(165deg, var(--ins-bg) 0%, var(--ins-bg-2) 55%, #090f1c 100%) !important;
  color: var(--ins-text);
  font-family: var(--ins-font);
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

.instructor::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.instructor.instructor--on-gray,
html body #teacher.instructor.instructor--on-gray {
  background:
    radial-gradient(ellipse 70% 55% at 12% 20%, rgba(34, 211, 238, 0.1), transparent 55%),
    linear-gradient(165deg, #0d1526 0%, #111a2e 100%) !important;
}

.instructor__container {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

/* Заголовок */
.instructor__head {
  text-align: left;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 40rem;
}

.instructor__title {
  margin: 0;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.instructor__accent {
  display: block;
  width: 3.25rem;
  height: 0.2rem;
  margin: 0.85rem 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ins-cyan), var(--ins-orange));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
}

/* Сетка */
.instructor__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  align-items: start;
}

@media (min-width: 1025px) {
  .instructor__grid {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    column-gap: clamp(1.75rem, 3vw, 2.75rem);
  }
}

.instructor__left {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.instructor__right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Фото */
.instructor__photo-wrap {
  position: relative;
  margin: 0;
  width: 100%;
  padding: 0.4rem;
  border-radius: 1.25rem;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.22), transparent 42%),
    linear-gradient(320deg, rgba(243, 156, 18, 0.18), transparent 48%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.instructor__photo-wrap::after {
  content: "";
  position: absolute;
  inset: auto 12% -20% 12%;
  height: 40%;
  background: radial-gradient(ellipse at center, rgba(34, 211, 238, 0.28), transparent 70%);
  filter: blur(22px);
  pointer-events: none;
  z-index: 0;
}

.instructor__photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  object-fit: contain;
  object-position: center 12%;
  background: rgba(8, 14, 28, 0.55);
}

.instructor__identity {
  padding: 0.15rem 0.15rem 0;
}

.instructor__name {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.instructor__role {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ins-muted) !important;
  -webkit-text-fill-color: var(--ins-muted) !important;
}

/* Бейджи */
.instructor__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

a.instructor__badge:hover {
  background: #f8fafc;
  border-color: rgba(34, 211, 238, 0.45);
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.instructor__badge-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #0e7490;
}

.instructor__badge-ext {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  opacity: 0.75;
}

/* Рейтинг */
.instructor__rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ins-muted);
}

.instructor__rating-stars {
  color: #fbbf24;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.35));
}

.instructor__rating-score {
  font-weight: 800;
  color: #fff;
}

.instructor__rating-link {
  color: var(--ins-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  text-underline-offset: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.instructor__rating-link:hover {
  color: var(--ins-cyan);
  border-bottom-color: rgba(34, 211, 238, 0.55);
}

/* CTA */
.instructor__cta-block {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.instructor__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #ffd166 0%, var(--ins-orange) 48%, #e67e22 100%);
  color: #0b1120 !important;
  -webkit-text-fill-color: #0b1120 !important;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none !important;
  box-shadow:
    0 12px 28px rgba(243, 156, 18, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.instructor__cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow:
    0 16px 34px rgba(243, 156, 18, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #0b1120 !important;
  -webkit-text-fill-color: #0b1120 !important;
}

.instructor__cta:focus-visible {
  outline: 2px solid var(--ins-cyan);
  outline-offset: 3px;
}

.instructor__cta--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none;
}

.instructor__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(34, 211, 238, 0.45);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none;
  filter: none;
}

.instructor__cta-hint {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ins-muted);
}

.instructor__schedule-note {
  margin: 0.45rem 0 0;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--ins-muted);
  opacity: 0.92;
}

/* Лид / founder copy */
.instructor__founder-copy {
  display: grid !important;
  gap: 0.85rem;
  margin: 0;
  padding: 1.2rem 1.25rem;
  border-radius: 1.15rem;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-left: 3px solid var(--ins-cyan);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  opacity: 1 !important;
  visibility: visible !important;
}

.instructor__lead {
  margin: 0 !important;
  font-size: 1.02rem !important;
  font-weight: 500;
  line-height: 1.7 !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.instructor__lead--second {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

.instructor__lead strong {
  font-weight: 800 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* Practice triad */
.instructor__practice {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1.05rem 1.15rem;
  border-radius: 1.15rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.instructor__practice-triad {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0;
}

.instructor__practice-triad span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.72rem;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 999px;
  background: #f0fdfa;
  color: #0e7490 !important;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.instructor__practice-triad span::before {
  flex: 0 0 auto;
  width: 0.38rem;
  height: 0.38rem;
  content: "";
  border-radius: 50%;
  background: var(--ins-cyan);
}

.instructor__practice-triad span:last-child::before {
  background: var(--ins-orange);
}

.instructor__practice-text {
  margin: 0;
  color: #475569 !important;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Метрики */
.instructor__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.15rem 0;
  padding: 0;
  list-style: none;
}

.instructor__metric {
  text-align: center;
  padding: 1rem 0.65rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.instructor__metric:hover {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  transform: translateY(-2px);
}

.instructor__metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 0.55rem;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.instructor__metric-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.instructor__metric-value {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.instructor__metric-label {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

/* Текстовый блок */
.instructor__block {
  margin: 0;
  padding: 1.05rem 1.15rem;
  border-radius: 1.15rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.instructor__block-title {
  display: flex;
  align-items: center;
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.3;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.instructor__block-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-right: 0.5rem;
  color: #0e7490;
}

.instructor__block-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #475569 !important;
}

.instructor__block-text + .instructor__block-text {
  margin-top: 0.65rem;
}

/* Компетенции */
.instructor__competencies {
  border-top: none;
  padding: 1.05rem 1.15rem;
  margin-top: 0.15rem;
  border-radius: 1.15rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.instructor__competencies-title {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 750;
  color: #0f172a !important;
}

.instructor__competencies-list {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 1.25rem;
  row-gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .instructor__competencies-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.instructor__competencies-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.instructor__check {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  color: #0e7490;
}

.instructor__comp-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a !important;
}

.instructor__comp-desc {
  font-size: 0.84rem;
  color: #64748b !important;
}

/* Mobile */
@media (max-width: 768px) {
  .instructor {
    padding: 2.75rem 0;
  }

  .instructor__head {
    text-align: center;
    max-width: none;
  }

  .instructor__accent {
    margin-left: auto;
    margin-right: auto;
  }

  .instructor__photo-wrap {
    max-width: 22rem;
    margin-inline: auto;
  }

  .instructor__identity,
  .instructor__badge,
  .instructor__rating {
    text-align: center;
  }

  .instructor__badge {
    margin-inline: auto;
  }

  .instructor__rating {
    justify-content: center;
  }

  .instructor__metrics {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .instructor__metric {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    align-items: center;
    text-align: left;
    padding: 0.85rem 1rem;
  }

  .instructor__metric-icon {
    grid-row: 1 / span 2;
    margin: 0;
  }

  .instructor__metric-value {
    font-size: 1.25rem;
  }

  .instructor__practice-triad span {
    font-size: 0.72rem;
  }
}

@media (max-width: 1024px) {
  .instructor__cta-block {
    margin-top: 0.5rem;
  }
}

/* Тёмный модификатор — уже тёмный по умолчанию */
.instructor--dark {
  color: var(--ins-text);
}

#teacher.instructor,
#teacher.instructor * {
  text-shadow: none;
}

/* Гарантированная читаемость на профессиях / курсах */
html body #teacher.instructor .instructor__title,
html body.course-page #teacher.instructor .instructor__title,
html body.profession-page #teacher.instructor .instructor__title {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html body #teacher.instructor .instructor__founder-copy,
html body #teacher.instructor .instructor__practice,
html body #teacher.instructor .instructor__block,
html body #teacher.instructor .instructor__metric {
  background: #ffffff !important;
}

html body #teacher.instructor .instructor__lead,
html body #teacher.instructor .instructor__lead--second,
html body.course-page #teacher.instructor .instructor__lead,
html body.profession-page #teacher.instructor .instructor__lead {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html body #teacher.instructor .instructor__lead--second,
html body.course-page #teacher.instructor .instructor__lead--second,
html body.profession-page #teacher.instructor .instructor__lead--second {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

html body #teacher.instructor .instructor__lead strong,
html body.course-page #teacher.instructor .instructor__lead strong,
html body.profession-page #teacher.instructor .instructor__lead strong {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 800 !important;
}

html body #teacher.instructor .instructor__name {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html body #teacher.instructor .instructor__role {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html body #teacher.instructor .instructor__block-title,
html body #teacher.instructor .instructor__metric-value {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

html body #teacher.instructor .instructor__block-text,
html body #teacher.instructor .instructor__practice-text,
html body #teacher.instructor .instructor__metric-label {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

html body #teacher.instructor .instructor__photo {
  object-fit: contain !important;
  object-position: center 12% !important;
  max-height: none;
}

/* Corporate dark instructor — final lock (courses + professions) */
html body section#teacher.instructor,
html body #teacher.instructor,
html body.course-page #teacher.instructor {
  background:
    radial-gradient(ellipse 70% 55% at 12% 20%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(ellipse 55% 50% at 88% 78%, rgba(46, 125, 110, 0.16), transparent 52%),
    radial-gradient(ellipse 40% 35% at 55% 0%, rgba(243, 156, 18, 0.08), transparent 60%),
    linear-gradient(165deg, #0b1120 0%, #0f172a 55%, #090f1c 100%) !important;
  background-color: #0b1120 !important;
  color: #e2e8f0 !important;
}

html body #teacher.instructor .instructor__name,
html body.course-page #teacher.instructor .instructor__name,
html body.profession-page #teacher.instructor .instructor__name {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body #teacher.instructor .instructor__role,
html body.course-page #teacher.instructor .instructor__role {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html body #teacher.instructor .instructor__title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

