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

:root {
  --color-white: #ffffff;
  --color-blue: #0039a6;
  --color-blue-dark: #002766;
  --color-blue-light: #e8eef7;
  --color-green: #3d9b35;
  --color-green-light: #e8f5e7;
  --color-red: #d52b1e;
  --color-text: #1a2332;
  --color-text-muted: #5a6578;
  --color-border: #d8dee8;
  --shadow-sm: 0 2px 8px rgba(0, 57, 166, 0.08);
  --shadow-md: 0 8px 32px rgba(0, 57, 166, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 57, 166, 0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --header-height: 80px;
  --font: "Finlandica", "Segoe UI", system-ui, sans-serif;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(1200px, 100% - 2rem);
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-blue-dark);
  margin-bottom: 1rem;
}

.section-text {
  color: var(--color-text-muted);
  max-width: 640px;
}

.section-text--center {
  margin-inline: auto;
  text-align: center;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .section-label,
.section-header .section-title,
.section-header .section-text {
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

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

.btn--primary {
  background: var(--color-blue);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-blue-dark);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo__emblem {
  flex-shrink: 0;
  height: 56px;
  width: auto;
  object-fit: contain;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-blue);
}

.logo__subtitle {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  max-width: 180px;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__list a {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav__list a:hover,
.nav__list a.active {
  color: var(--color-blue);
  background: var(--color-blue-light);
}

.cabinet-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-blue);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.cabinet-btn:hover {
  background: var(--color-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.cabinet-btn__icon {
  width: 22px;
  height: 22px;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-blue);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(0, 57, 166, 0.78) 0%,
    rgba(0, 39, 102, 0.72) 50%,
    rgba(61, 155, 53, 0.65) 100%
  );
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__overlay::before {
  content: "";
  position: absolute;
  inset: -12px;
  background: url("../assets/eventImage.jpg") center / cover no-repeat;
  filter: blur(4px);
  transform: scale(1.04);
}

.hero__overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
  color: var(--color-white);
}

.hero__title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  max-width: 720px;
}

.hero__lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  opacity: 0.92;
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__stats li {
  display: flex;
  flex-direction: column;
}

.hero__stats strong {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero__stats span {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* About */
.about {
  background: var(--color-white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__media {
  position: relative;
  min-height: 420px;
}

.about__photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__photo--main {
  width: 85%;
  aspect-ratio: 4 / 3;
}

.about__photo--secondary {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 55%;
  aspect-ratio: 4 / 3;
  border: 4px solid var(--color-white);
}

.about__emblem-card {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 160px;
  text-align: center;
}

.about__emblem-card p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.about__features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.about__features li {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-blue-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-green);
}

.about__feature-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.about__features strong {
  display: block;
  color: var(--color-blue-dark);
  margin-bottom: 0.25rem;
}

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

/* Gallery */
.gallery {
  background: var(--color-blue-light);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery__item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 39, 102, 0.85));
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 500;
  transform: translateY(100%);
  transition: transform var(--transition);
}

.gallery__item:hover .gallery__caption {
  transform: translateY(0);
}

/* Courses tracks — road map layout */
.courses-preview {
  background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 40%, var(--color-white) 100%);
}

.courses-roadmap {
  position: relative;
  padding-top: 0.5rem;
}

.courses-roadmap__junction {
  position: relative;
  height: 90px;
  margin-bottom: -1px;
}

.courses-roadmap__approach {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 36px;
  background: #5f6b7a;
  border-radius: 4px 4px 0 0;
  z-index: 2;
}

.courses-roadmap__approach::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.7) 0 8px,
    transparent 8px 16px
  );
}

.courses-roadmap__fork {
  display: block;
  width: 100%;
  height: 90px;
}

.courses-roadmap__fork .road-path {
  fill: none;
  stroke: #5f6b7a;
  stroke-width: 22;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.courses-roadmap__fork .road-mark {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 2;
  stroke-dasharray: 10 12;
  stroke-linecap: round;
}

.courses-tracks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.course-track {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.course-track__sign {
  position: relative;
  z-index: 2;
  margin: 0 0.5rem 1.25rem;
  padding: 1rem 1.125rem;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.course-track--activist .course-track__sign {
  border: 2px solid var(--color-blue);
  border-top: 5px solid var(--color-blue);
}

.course-track--staff .course-track__sign {
  border: 2px solid var(--color-green);
  border-top: 5px solid var(--color-green);
}

.course-track--teacher .course-track__sign {
  border: 2px solid var(--color-red);
  border-top: 5px solid var(--color-red);
}

.course-track__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  margin-bottom: 0.375rem;
  line-height: 1.25;
}

.course-track__desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.course-track__path {
  position: relative;
  flex: 1;
  padding: 0 0.75rem 1rem;
}

.course-track__road {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  background: #5f6b7a;
  border-radius: 11px;
  z-index: 0;
}

.course-track__road::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.65) 0 14px,
    transparent 14px 28px
  );
}

.course-track--activist .course-track__road {
  box-shadow: inset 0 0 0 3px rgba(0, 57, 166, 0.35);
}

.course-track--staff .course-track__road {
  box-shadow: inset 0 0 0 3px rgba(61, 155, 53, 0.35);
}

.course-track--teacher .course-track__road {
  box-shadow: inset 0 0 0 3px rgba(213, 43, 30, 0.35);
}

.course-track__stops {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.course-card--milestone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.course-card__dot {
  display: block;
  width: 16px;
  height: 16px;
  margin-bottom: 0.625rem;
  background: var(--color-white);
  border: 4px solid #5f6b7a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--color-white);
  flex-shrink: 0;
}

.course-track--activist .course-card__dot {
  border-color: var(--color-blue);
}

.course-track--staff .course-card__dot {
  border-color: var(--color-green);
}

.course-track--teacher .course-card__dot {
  border-color: var(--color-red);
}

.course-card {
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.course-card__body {
  padding: 1rem;
}

.course-card__tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-blue);
  background: var(--color-blue-light);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.course-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

.course-card__desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.course-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

/* News feed */
.news {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-blue-light) 100%);
}

.news__feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-blue);
}

.news-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.75rem;
  background: var(--color-blue);
  color: var(--color-white);
  border-radius: var(--radius);
  text-align: center;
}

.news-card__day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.news-card__month {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.9;
}

.news-card__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 0.375rem;
}

.news-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  margin-bottom: 0.375rem;
}

.news-card__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.news-card__link {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-blue);
  border: 2px solid var(--color-blue);
  border-radius: 999px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.news-card__link:hover {
  background: var(--color-blue);
  color: var(--color-white);
}

/* User rating leaderboard */
.rating {
  background: #eef2f7;
}

.rating__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: rating;
}

.rating__footer {
  text-align: center;
  margin-top: 2rem;
}

.rating-card {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.rating-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.rating-card--gold {
  border-color: #d4a017;
  background: linear-gradient(135deg, #fffdf5 0%, var(--color-white) 100%);
}

.rating-card--silver {
  border-color: #a8b0bc;
  background: linear-gradient(135deg, #f8f9fb 0%, var(--color-white) 100%);
}

.rating-card--bronze {
  border-color: #c17f4a;
  background: linear-gradient(135deg, #fff9f4 0%, var(--color-white) 100%);
}

.rating-card--highlight {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 2px rgba(0, 57, 166, 0.12), var(--shadow-md);
}

.rating-card--activist { --rating-accent: var(--color-blue); }
.rating-card--staff { --rating-accent: var(--color-green); }
.rating-card--teacher { --rating-accent: var(--color-red); }

.rating-card__rank {
  position: absolute;
  top: 0.75rem;
  right: 0.875rem;
  min-width: 28px;
  height: 28px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--color-blue-light);
  color: var(--color-blue-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}

.rating-card--gold .rating-card__rank {
  background: #fff3c4;
  color: #9a7200;
}

.rating-card--silver .rating-card__rank {
  background: #e8ebef;
  color: #5a6578;
}

.rating-card--bronze .rating-card__rank {
  background: #fde8d8;
  color: #8b5a2b;
}

.rating-card__avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 39, 102, 0.12);
}

.rating-card__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rating-accent, var(--color-blue)), var(--color-blue-dark));
  color: var(--color-white);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rating-card__body {
  flex: 1;
  min-width: 0;
  padding-right: 1.75rem;
}

.rating-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.rating-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  line-height: 1.3;
}

a.rating-card__name:hover {
  color: var(--color-blue);
  text-decoration: underline;
}

.rating-card__level {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rating-accent, var(--color-blue));
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 36px;
  text-align: center;
}

.rating-card__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.rating-card__score {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.625rem;
}

.rating-card__score strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  line-height: 1.1;
}

.rating-card__score span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.rating-card__bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

.rating-card__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rating-accent, var(--color-green)), var(--color-blue));
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Calendar */
.calendar {
  background: var(--color-blue-dark);
  color: var(--color-white);
}

.calendar .section-label {
  color: #7dd3fc;
}

.calendar .section-title {
  color: var(--color-white);
}

.calendar .section-text {
  color: rgba(255, 255, 255, 0.75);
}

.calendar__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.calendar__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calendar__item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-green);
}

.calendar__item-date {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-green);
  min-width: 80px;
}

.calendar__item-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.calendar__item-place {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Contacts */
.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contacts__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.contacts__list li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contacts__list strong {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-green);
}

.contacts__list a {
  color: var(--color-blue);
  font-weight: 500;
}

.contacts__list a:hover {
  text-decoration: underline;
}

.contacts__form {
  padding: 2rem;
  background: var(--color-blue-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contacts__form h3 {
  font-size: 1.25rem;
  color: var(--color-blue-dark);
  margin-bottom: 0.5rem;
}

.contacts__form label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.contacts__form span {
  font-size: 0.875rem;
  font-weight: 500;
}

.contacts__form input,
.contacts__form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9375rem;
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contacts__form input:focus,
.contacts__form textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(0, 57, 166, 0.15);
}

.form-message {
  font-size: 0.875rem;
  padding: 0.75rem;
  border-radius: 8px;
}

.form-message--success {
  background: var(--color-green-light);
  color: #1a5c16;
}

/* Footer */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.8);
  padding: 2.5rem 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer__brand strong {
  display: block;
  color: var(--color-white);
  font-size: 0.9375rem;
}

.footer__brand span {
  font-size: 0.8125rem;
}

.footer__nav {
  display: flex;
  gap: 1.5rem;
}

.footer__nav a {
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer__nav a:hover {
  color: var(--color-white);
}

.footer__copy {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.6;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 20, 50, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.lightbox--open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: var(--color-white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .courses-tracks {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .courses-roadmap__junction {
    height: 70px;
  }

  .courses-roadmap__fork {
    height: 70px;
  }

  .about__grid,
  .calendar__inner,
  .contacts__grid {
    grid-template-columns: 1fr;
  }

  .about__media {
    min-height: 320px;
  }

  .rating__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .burger {
    display: flex;
    margin-left: auto;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .nav--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav__list a {
    padding: 0.875rem 1rem;
  }

  .cabinet-btn {
    margin-left: auto;
  }

  .logo__subtitle {
    display: none;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }

  .gallery__item--wide,
  .gallery__item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .course-track__sign {
    margin-inline: 0;
  }

  .news-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .news-card__date {
    margin-inline: auto;
  }

  .news-card__link {
    justify-self: center;
  }

  .hero__stats {
    gap: 1.5rem;
  }

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

.course-card--linked .course-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.course-card--linked:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.course-card--linked .course-card__body {
  cursor: pointer;
}

.course-card__more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-blue);
}

.course-card--linked:hover .course-card__more {
  text-decoration: underline;
}

/* Course detail page */
.course-page {
  padding-top: var(--header-height);
}

.course-hero {
  background: linear-gradient(135deg, var(--color-blue-dark) 0%, var(--color-blue) 55%, var(--color-green) 100%);
  color: var(--color-white);
  padding: 3rem 0;
}

.course-hero__back {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition);
}

.course-hero__back:hover {
  color: var(--color-white);
}

.course-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 820px;
}

.course-hero__lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  opacity: 0.92;
  max-width: 720px;
  margin-bottom: 2rem;
}

.course-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
}

.course-hero__meta li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.course-hero__meta strong {
  font-size: 1.25rem;
}

.course-hero .section-label {
  color: rgba(255, 255, 255, 0.9);
}

.course-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

.course-block {
  margin-bottom: 2.5rem;
}

.course-block__title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  margin-bottom: 1rem;
}

.course-block__text {
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.course-block__text--muted {
  font-size: 0.9375rem;
}

.course-curriculum {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  counter-reset: module;
  list-style: none;
  padding: 0;
}

.course-curriculum li {
  counter-increment: module;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.125rem 1.25rem 1.125rem 3.5rem;
  background: var(--color-blue-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-green);
  position: relative;
}

.course-curriculum li::before {
  content: counter(module);
  position: absolute;
  left: 1rem;
  top: 1.125rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-blue);
  color: var(--color-white);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 50%;
}

.course-curriculum li strong {
  color: var(--color-blue-dark);
  font-size: 0.9375rem;
}

.course-curriculum li span {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.course-speakers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
}

.course-speaker {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.course-speaker__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-blue);
  color: var(--color-white);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 50%;
}

.course-speaker strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-blue-dark);
  margin-bottom: 0.2rem;
}

.course-speaker span {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.course-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}

.course-enroll {
  padding: 1.75rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.course-enroll__format {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.course-enroll__format-icon {
  font-size: 1.25rem;
}

.course-enroll__note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.course-enroll__actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.btn--enroll {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn--enroll:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--enroll-free {
  background: var(--color-green);
  color: var(--color-white);
}

.btn--enroll-free:hover {
  background: #2d7a28;
}

.btn--enroll-paid {
  background: var(--color-white);
  color: var(--color-blue);
  border-color: var(--color-blue);
}

.btn--enroll-paid:hover {
  background: var(--color-blue);
  color: var(--color-white);
}

.course-enroll__legal {
  margin-top: 1rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .course-layout {
    grid-template-columns: 1fr;
  }

  .course-sidebar {
    position: static;
  }
}

@media (max-width: 480px) {
  .course-hero {
    padding: 2rem 0;
  }

  .course-enroll__actions .btn--enroll {
    font-size: 0.9375rem;
    padding: 0.875rem 1rem;
  }
}

/* Profile / Personal cabinet */
.cabinet-btn--active {
  box-shadow: 0 0 0 3px rgba(0, 57, 166, 0.25);
}

.profile-page {
  padding-top: var(--header-height);
  background: #eef2f7;
  min-height: 100vh;
}

.profile-cover {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.profile-cover__gradient {
  height: 100%;
  background: linear-gradient(135deg, #0039a6 0%, #1a5fbf 40%, #3d9b35 100%);
}

.profile-head {
  margin-top: -72px;
  position: relative;
  z-index: 2;
  padding-bottom: 1.5rem;
}

.profile-head__card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.profile-head__main {
  display: flex;
  gap: 1.25rem;
  align-items: flex-end;
  flex: 1;
  min-width: 280px;
}

.profile-head__avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-white);
  box-shadow: var(--shadow-md);
  margin-top: -48px;
  flex-shrink: 0;
}

.profile-head__name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  margin-bottom: 0.375rem;
}

.profile-head__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.profile-head__work {
  font-size: 0.9375rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.profile-head__vk {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-blue);
}

.profile-head__vk:hover {
  text-decoration: underline;
}

.profile-rating {
  min-width: 260px;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--color-blue-light), #f0f7ff);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.profile-rating__badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-blue);
  color: var(--color-white);
  border-radius: 50%;
  float: left;
  margin-right: 1rem;
}

.profile-rating__level {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.profile-rating__level-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  opacity: 0.85;
}

.profile-rating__score {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.profile-rating__score strong {
  font-size: 1.75rem;
  color: var(--color-blue-dark);
  line-height: 1.1;
}

.profile-rating__score span {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.profile-rating__bar {
  clear: both;
  height: 8px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.profile-rating__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-green), var(--color-blue));
  border-radius: 999px;
}

.profile-rating__next {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.profile-panel {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.profile-panel__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  margin-bottom: 1rem;
}

.profile-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.profile-panel__header .profile-panel__title {
  margin-bottom: 0;
}

.profile-panel__badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-green);
  background: var(--color-green-light);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.profile-details dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.profile-details dd {
  font-size: 0.875rem;
  color: var(--color-text);
}

.profile-details a {
  color: var(--color-blue);
  font-weight: 500;
}

.profile-status {
  color: var(--color-green) !important;
  font-weight: 600;
}

.profile-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-summary li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.profile-summary li:last-child {
  border-bottom: none;
}

.profile-summary strong {
  font-size: 1.125rem;
  color: var(--color-blue);
}

.profile-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--color-border);
}

.stat-card__icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.375rem;
}

.stat-card strong {
  display: block;
  font-size: 1.375rem;
  color: var(--color-blue-dark);
  margin-bottom: 0.2rem;
}

.stat-card span:last-child {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.stat-card--blue { background: var(--color-blue-light); }
.stat-card--green { background: var(--color-green-light); }
.stat-card--red { background: #fdecea; }
.stat-card--gold { background: #fff8e6; }

.profile-chart__grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  height: 200px;
  padding-top: 1rem;
}

.profile-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.profile-chart__bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.profile-chart__bar {
  width: 70%;
  max-width: 48px;
  background: linear-gradient(180deg, var(--color-blue), var(--color-green));
  border-radius: 6px 6px 0 0;
  min-height: 8px;
}

.profile-chart__value {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-blue-dark);
  margin-top: 0.375rem;
}

.profile-chart__label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.profile-achievements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  list-style: none;
}

.profile-achievement {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-white);
}

.profile-achievement--earned {
  border-color: var(--color-green);
  background: var(--color-green-light);
}

.profile-achievement--locked {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.profile-achievement__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.profile-achievement strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-blue-dark);
}

.profile-achievement span {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.profile-achievement__points {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-green);
  flex-shrink: 0;
}

.profile-courses {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.course-item {
  padding: 1.125rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-blue-light);
}

.course-item--done {
  border-left: 4px solid var(--color-green);
}

.course-item--active {
  border-left: 4px solid var(--color-blue);
  background: var(--color-white);
}

.course-item__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.course-item__title,
.course-item__title-link {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  line-height: 1.3;
}

.course-item__title-link:hover {
  color: var(--color-blue);
  text-decoration: underline;
}

.course-item__track {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-blue);
  background: var(--color-white);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.course-item__progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.course-item__progress-bar {
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

.course-item__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue), var(--color-green));
  border-radius: 999px;
}

.course-item__progress > span {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  min-width: 36px;
}

.course-item__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  list-style: none;
}

.course-item__stats li {
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-size: 0.6875rem;
}

.course-item--active .course-item__stats li {
  background: var(--color-blue-light);
}

.course-item__stats span {
  display: block;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.course-item__stats strong {
  color: var(--color-text);
  font-size: 0.8125rem;
}

/* ——— Job offers mini-chat (profile) ——— */
@keyframes job-chat-pop-in {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.85);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes job-chat-panel-rise {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes job-chat-message-in {
  0% {
    opacity: 0;
    transform: translateX(28px) scale(0.94);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  40% {
    opacity: 0.6;
    max-height: 200px;
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 200px;
  }
}

@keyframes job-chat-badge-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(213, 43, 30, 0.5);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgba(213, 43, 30, 0);
  }
}

@keyframes job-chat-toggle-glow {
  0%, 100% {
    box-shadow: 0 8px 28px rgba(0, 57, 166, 0.35);
  }
  50% {
    box-shadow: 0 8px 32px rgba(0, 57, 166, 0.55), 0 0 0 4px rgba(61, 155, 53, 0.25);
  }
}

@keyframes job-chat-status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.job-chat {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.job-chat:not([hidden]) {
  pointer-events: auto;
}

.job-chat__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
  color: var(--color-white);
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 57, 166, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.job-chat__toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 57, 166, 0.45);
}

.job-chat--intro .job-chat__toggle {
  animation: job-chat-pop-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.job-chat--has-unread .job-chat__toggle {
  animation: job-chat-toggle-glow 2s ease-in-out infinite;
}

.job-chat__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-red);
  color: var(--color-white);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.job-chat--has-unread .job-chat__badge,
.job-chat__badge:not(:empty):not([data-count="0"]) {
  opacity: 1;
  transform: scale(1);
}

.job-chat__badge--pulse {
  animation: job-chat-badge-pulse 0.6s ease-out;
}

.job-chat__panel {
  width: min(380px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 8rem));
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: 16px;
  box-shadow:
    0 4px 6px rgba(0, 39, 102, 0.06),
    0 20px 48px rgba(0, 39, 102, 0.18);
  border: 1px solid var(--color-border);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.95);
  transform-origin: bottom right;
  transition:
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
    visibility 0.35s;
}

.job-chat--open .job-chat__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: job-chat-panel-rise 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.job-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  background: linear-gradient(135deg, var(--color-blue) 0%, #0048c9 100%);
  color: var(--color-white);
}

.job-chat__header-info {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.job-chat__header-info strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.job-chat__header-info span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.85;
}

.job-chat__status {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 0 3px rgba(61, 155, 53, 0.35);
  animation: job-chat-status-blink 2s ease-in-out infinite;
}

.job-chat__minimize {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.job-chat__minimize:hover {
  background: rgba(255, 255, 255, 0.28);
}

.job-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: linear-gradient(180deg, #f4f7fb 0%, var(--color-white) 100%);
  scroll-behavior: smooth;
}

.job-chat__message {
  padding: 0.75rem 0.875rem;
  background: var(--color-white);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-blue);
  box-shadow: 0 2px 8px rgba(0, 39, 102, 0.06);
  opacity: 0;
  transform: translateX(24px);
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.2s ease;
}

.job-chat__message--visible {
  opacity: 1;
  transform: translateX(0);
  animation: job-chat-message-in 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.job-chat__message:hover {
  box-shadow: 0 4px 14px rgba(0, 39, 102, 0.1);
}

.job-chat__message-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.job-chat__org {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-blue-dark);
  line-height: 1.35;
}

.job-chat__time {
  flex-shrink: 0;
  font-size: 0.625rem;
  color: var(--color-text-muted);
}

.job-chat__offer {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.job-chat__offer strong {
  color: var(--color-text);
  font-weight: 600;
}

.job-chat__salary {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-green);
  margin-bottom: 0.625rem;
}

.job-chat__reply {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: var(--color-blue-light);
  color: var(--color-blue);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.job-chat__reply:hover {
  background: var(--color-blue);
  color: var(--color-white);
  transform: translateY(-1px);
}

.job-chat__footer {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
}

.job-chat__hint {
  font-size: 0.625rem;
  color: var(--color-text-muted);
}

@media (max-width: 1024px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-achievements {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .profile-head__card {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-head__main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-head__meta {
    justify-content: center;
  }

  .profile-rating {
    width: 100%;
  }

  .course-item__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .profile-cover {
    height: 160px;
  }

  .profile-head__avatar {
    width: 110px;
    height: 110px;
    margin-top: -36px;
  }

  .profile-stats__grid {
    grid-template-columns: 1fr;
  }

  .job-chat {
    right: 1rem;
    bottom: 1rem;
  }

  .job-chat__panel {
    width: calc(100vw - 2rem);
  }
}
