* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #555;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 24px;
}

.hero-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: bold;
  line-height: 1.1;
  text-shadow: 1px 1px #fff, -1px 1px #fff, 1px -1px #fff, -1px -1px #fff, 1px 1px 5px #555;
}

.hero-title svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  color: #16a085;
}

.catalog {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 18px;
}

.sidebar-title {
  margin: 0 0 14px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-title svg {
  width: 1em;
  height: 1em;
  color: #16a085;
  flex-shrink: 0;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tab {
  transform: rotate(-3deg);
  position: relative;
  width: 100%;
  padding: 16px 20px;
  border: 1px solid #16a085;
  border-radius: 14px;
  background: #fff;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: .25s ease;
}

.tab:nth-child(odd) {
  transform: rotate(-2deg);
  box-shadow:
    -5px 5px 0 0 #16a085;
}

.tab:nth-child(even) {
  transform: rotate(2deg);
  box-shadow:
    5px 5px 0 0 #16a085;
}

.tab.active {
  transform: rotate(0);
  background: #16a085;
  color: #fff;
  box-shadow:
    5px 5px 0 0 #0e6f5f;
}

.tab:active {
  transform: translateY(5px) scale(0.97);
  box-shadow: 0 3px 0 #148f77;
}

.content {
  min-width: 0;
}

.course {
  display: block;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 24px;
  animation: fadeIn .25s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.course-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.course-title {
  margin: 0;
  font-size: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.course-title svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  color: #16a085;
}

.course-desc {
  margin: 10px 0 0;
  color: #7c7c7c;
  line-height: 1.5;
  max-width: 760px;
}

.load-more {
  display: block;
  text-decoration: none;
  text-align: center;
  position: relative;
  width: fit-content;
  margin: 24px auto 0;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: white;
  background: #16a085;
  border-radius: 18px;
  box-shadow: 0 8px 0 #0e6b5c;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.load-more:hover {
  color: white;
  filter: brightness(1.05);
}

.load-more:active {
  transform: translateY(5px) scale(0.97);
  box-shadow: 0 3px 0 #148f77;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.lesson {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #16a085;
  border-radius: 18px;
  padding: 18px;
  min-height: 170px;
  background: #fff;
  box-shadow: 10px 10px 0 0 #16a085;
  transition: transform .25s ease, box-shadow .25s ease;
}

.lesson:hover {
  transform: translate(-4px, -4px);
  box-shadow: 14px 14px 0 0 #16a085;
}

.lesson-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.lesson-desc {
  margin: 0;
  color: #7c7c7c;
  line-height: 1.45;
  flex: 1;
}

.lesson-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7c7c7c;
  font-size: 14px;
  margin-top: 4px;
}

.lesson-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #16a085;
  font-weight: bold;
}

.lesson-open svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.footer {
  margin-top: 40px;
  padding: 16px 0;
  text-align: center;
  color: #777;
  font-size: 14px;
  border-top: 1px solid #eee;
}

.footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #999;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.footer a:hover {
  color: #222;
  border-bottom-color: #222;
}

code {
  color: #c52600;
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: Consolas, monospace;
}

@media (max-width: 980px) {
  .catalog {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .tab {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 8px;
  }

  .lesson-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 14px;
  }

  .hero,
  .course,
  .sidebar {
    border-radius: 18px;
  }

  .hero {
    padding: 20px;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .course {
    padding: 18px;
  }

  .course-title {
    font-size: 24px;
  }

  .lesson {
    min-height: auto;
  }
}