* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

body.dark-mode {
  background: #111827;
  color: #e5e7eb;
}

a {
  color: inherit;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 64px);
  background: #ffffff;
  border-bottom: 1px solid #d9e1ec;
}

.navbar__brand {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.navbar__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 6px;
  color: #334155;
  font-weight: 600;
  text-decoration: none;
}

.navbar__links a:hover,
.navbar__links a:focus-visible,
.navbar__links a.active {
  background: #e8eef7;
  color: #0f172a;
  outline: none;
}

.theme-toggle {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: #2563eb;
  outline: none;
}

main {
  padding: 48px clamp(20px, 5vw, 64px);
}

.hero,
.page-header {
  max-width: 820px;
}

.hero {
  padding: 32px 0 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: #0f172a;
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  line-height: 1.05;
}

h2 {
  color: #0f172a;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  color: #0f172a;
  font-size: 1.08rem;
}

p {
  color: #475569;
  line-height: 1.7;
}

.hero__text,
.page-header p {
  max-width: 680px;
  font-size: 1.1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: #1d4ed8;
  outline: none;
}

.section {
  margin-top: 48px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card,
.course,
.contact-form,
.contact-card,
.stats article,
.notice,
.signup-panel {
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.card {
  padding: 24px;
}

.card__image {
  display: block;
  width: 100%;
  height: 128px;
  margin-bottom: 18px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef6ff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stats article {
  padding: 22px;
}

.stats strong {
  display: block;
  margin-bottom: 6px;
  color: #2563eb;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.stats span {
  color: #475569;
  font-weight: 700;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.notice-list {
  display: grid;
  gap: 14px;
}

.notice {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.notice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  background: #eef6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.notice h3,
.notice p {
  margin-bottom: 4px;
}

.signup-panel {
  align-self: start;
  padding: 24px;
}

.signup-form {
  display: grid;
  gap: 10px;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: #16a34a;
  font-weight: 700;
}

.course-list {
  display: grid;
  gap: 16px;
  max-width: 940px;
}

.course {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
}

.course h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.course p {
  margin-bottom: 0;
}

.course span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 24px;
  margin-top: 36px;
  max-width: 980px;
}

.contact-form,
.contact-card {
  padding: 24px;
}

.contact-form {
  display: grid;
  gap: 10px;
}

label {
  color: #0f172a;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 5vw, 64px);
  background: #0f172a;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #dbe4f0;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

.social-links a:hover,
.social-links a:focus-visible {
  background: #2563eb;
  outline: none;
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

body.dark-mode .navbar,
body.dark-mode .card,
body.dark-mode .course,
body.dark-mode .contact-form,
body.dark-mode .contact-card,
body.dark-mode .stats article,
body.dark-mode .notice,
body.dark-mode .signup-panel {
  background: #1f2937;
  border-color: #374151;
  box-shadow: none;
}

body.dark-mode .navbar__brand,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode label {
  color: #f9fafb;
}

body.dark-mode p,
body.dark-mode .stats span {
  color: #cbd5e1;
}

body.dark-mode .navbar__links a {
  color: #d1d5db;
}

body.dark-mode .navbar__links a:hover,
body.dark-mode .navbar__links a:focus-visible,
body.dark-mode .navbar__links a.active,
body.dark-mode .notice span {
  background: #243b63;
  color: #bfdbfe;
}

body.dark-mode .theme-toggle,
body.dark-mode input,
body.dark-mode textarea {
  background: #111827;
  border-color: #4b5563;
  color: #f9fafb;
}

@media (max-width: 760px) {
  .navbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .navbar__actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .navbar__links {
    width: 100%;
    flex-wrap: wrap;
  }

  .navbar__links li {
    flex: 1 1 110px;
  }

  .navbar__links a {
    justify-content: center;
    width: 100%;
  }

  .card-grid,
  .stats,
  .feature-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .course {
    flex-direction: column;
  }

  .card__image {
    height: 150px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .notice {
    grid-template-columns: 1fr;
  }
}
