:root { --teachers-content: min(1380px, calc(100% - 64px)); }

.teachers-public-page { background: #011b35; }
.teachers-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(1, 27, 53, .12), #011b35 76%),
    url("/assets/academy-raww-tech-background.png") center top / cover no-repeat,
    #011b35;
}
.teachers-page { isolation: isolate; }

.teachers-hero {
  width: var(--teachers-content);
  min-height: 270px;
  margin: 0 auto;
  padding: clamp(44px, 5vw, 72px) 0 clamp(20px, 2.5vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .72fr);
  align-items: start;
  gap: clamp(48px, 8vw, 128px);
}
.teachers-page .eyebrow {
  margin: 0 0 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.teachers-page .eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  flex: 0 0 auto;
  background: var(--signal);
}
.teachers-page h1, .teachers-page h3 { font-family: var(--font-display); }
.teachers-page h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(30px, 2.15vw, 36px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.teachers-page h1 span { color: var(--accent); }
.hero-copy { max-width: 470px; padding-top: 20px; border-top: 1px solid var(--border); }
.hero-copy p { margin: 0; color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.62; text-wrap: pretty; }
.hero-copy strong { display: block; margin-top: 24px; color: var(--fg); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.teachers-directory {
  position: relative;
  width: var(--teachers-content);
  margin: 0 auto;
  padding: clamp(14px, 2vw, 28px) 0 clamp(96px, 10vw, 150px);
}
.teacher-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 42px); align-items: start; }
.teacher-card {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  animation: teacher-card-enter 440ms var(--ease-standard) both;
}
.teacher-card:nth-child(3n + 2) { margin-top: 46px; }
.teacher-card:nth-child(3n + 3) { margin-top: 0; }
.teacher-meta {
  min-height: 30px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font: 600 10px/1.35 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.teacher-meta span:last-child { max-width: 70%; text-align: right; }
.teacher-photo { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 9px; background: #143d5a; }
.teacher-photo::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, .14); border-radius: inherit; pointer-events: none; }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.teacher-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2f6589, #133a58);
  color: rgba(241, 246, 251, .88);
  font: 600 clamp(34px, 5vw, 62px)/1 var(--font-display);
  letter-spacing: -.04em;
}
.teacher-name { margin: 22px 0 0; font-size: clamp(22px, 2vw, 30px); font-weight: 600; line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.teacher-surname, .teacher-name-rest { display: block; }
.teacher-name-word + .teacher-name-word::before { content: " "; }
.teacher-description { margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.teacher-description > :first-child { margin-top: 0; }
.teacher-description > :last-child { margin-bottom: 0; }
.teacher-description p, .teacher-description ul, .teacher-description ol, .teacher-description blockquote { margin: 0 0 12px; }
.teacher-description ul, .teacher-description ol { padding-left: 20px; }
.teacher-description h2, .teacher-description h3 { margin: 18px 0 8px; color: var(--fg); line-height: 1.15; }
.teacher-description h2 { font-size: 22px; }
.teacher-description h3 { font-size: 18px; }
.teacher-description blockquote { padding-left: 14px; border-left: 2px solid var(--accent); }
.teacher-description a { color: var(--accent); }
.teachers-state { padding: 34px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); font-size: 17px; }

@keyframes teacher-card-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
  :root { --teachers-content: min(100% - 40px, 860px); }
  .teachers-hero { min-height: 520px; grid-template-columns: 1fr; align-items: start; gap: 44px; }
  .teachers-page h1 { max-width: 13ch; font-size: clamp(30px, 2.15vw, 36px); }
  .teacher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-card:nth-child(3n + 2) { margin-top: 36px; }
  .teacher-card:nth-child(3n + 3) { margin-top: 0; }
}
@media (max-width: 640px) {
  :root { --teachers-content: calc(100% - 28px); }
  .teachers-shell { background-size: auto 720px; }
  .teachers-hero { min-height: 0; padding: 44px 0 76px; }
  .teachers-page h1 { font-size: clamp(42px, 13vw, 66px); line-height: 1.03; }
  .teachers-directory { padding-top: 44px; }
  .teacher-grid { grid-template-columns: 1fr; gap: 52px; }
  .teacher-card:nth-child(3n + 2), .teacher-card:nth-child(3n + 3) { margin-top: 0; }
  .teacher-meta span:last-child { max-width: 75%; }
  .teacher-name-word { display: block; }
  .teacher-name-word + .teacher-name-word::before { content: none; }
}
@media (prefers-reduced-motion: reduce) { .teacher-card { animation: none; } }
