:root {
  --bg: #eef4fb;
  --ink: #0d223f;
  --muted: #5a6f8e;
  --line: #d4e2f2;
  --card: #ffffff;
  --brand: #0f74ff;
  --brand-deep: #0a54bf;
  --teal: #0eaead;
  --shadow-soft: 0 24px 42px -28px rgba(8, 33, 66, 0.5);
  --shadow-hover: 0 24px 40px -16px rgba(10, 75, 148, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(14, 174, 173, 0.12), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(15, 116, 255, 0.12), transparent 30%),
    var(--bg);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(6, 24, 47, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: #f4f9ff;
  letter-spacing: 0.2px;
  font-weight: 800;
  font-size: 1.22rem;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.home-nav a {
  text-decoration: none;
  color: rgba(244, 249, 255, 0.88);
  font-size: 0.92rem;
  font-weight: 600;
}

.home-nav a:hover {
  color: #ffffff;
}

.go-course {
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #f4f9ff;
  background: linear-gradient(120deg, rgba(15, 116, 255, 0.96), rgba(14, 174, 173, 0.9));
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.go-course:hover {
  filter: brightness(1.05);
}

.home-hero {
  padding: 4.1rem 0 2.8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.hero-copy {
  border-radius: 28px;
  padding: clamp(1.2rem, 2.8vw, 2rem);
  background:
    linear-gradient(132deg, rgba(9, 38, 70, 0.97), rgba(10, 82, 132, 0.9), rgba(14, 174, 173, 0.84)),
    radial-gradient(circle at 78% 26%, rgba(255, 255, 255, 0.22), transparent 36%);
  color: #f6fbff;
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.8rem;
  font-weight: 600;
}

.hero-copy h1 {
  margin-top: 0.85rem;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.2;
}

.hero-copy p {
  margin-top: 0.95rem;
  line-height: 1.7;
  color: rgba(244, 250, 255, 0.92);
  max-width: 66ch;
}

.hero-btn {
  margin-top: 1.25rem;
  display: inline-flex;
  text-decoration: none;
  color: #f5faff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-panel {
  border-radius: 24px;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.hero-image-slot {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid #c8d9ee;
  background: #0a2f71;
  overflow: hidden;
}

.hero-image-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.channel-section {
  padding: 0.5rem 0 2.8rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2.3vw, 2rem);
}

.section-head p {
  margin-top: 0.45rem;
  color: #506c8f;
}

.search-wrap {
  min-width: min(360px, 100%);
  display: grid;
  gap: 0.4rem;
}

.search-wrap label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #32557f;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fcff;
  padding: 0.72rem 0.86rem;
  font-family: inherit;
  color: #1f3e65;
}

.search-wrap input:focus {
  outline: 2px solid rgba(15, 116, 255, 0.2);
  border-color: #72a9eb;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.more-courses-wrap {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
}

.more-courses-btn {
  border: 1px solid #c9dcf2;
  border-radius: 999px;
  background: linear-gradient(120deg, #f7fbff, #ebf4ff);
  color: #1b4777;
  padding: 0.72rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.more-courses-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -16px rgba(14, 67, 132, 0.6);
  background: linear-gradient(120deg, #f2f8ff, #e4f1ff);
}

.channel-card {
  border-radius: 20px;
  background: var(--card);
  border: 1px solid #d7e4f3;
  box-shadow: var(--shadow-soft);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.channel-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: #bdd4ee;
}

.channel-card.hidden {
  display: none;
}

.channel-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0.95rem 1.1rem;
  text-decoration: none;
}

.avatar-frame {
  position: relative;
  width: 114px;
  height: 114px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 4px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 28px -20px rgba(15, 57, 107, 0.8);
  overflow: hidden;
}

.avatar-frame::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--tone-a);
  opacity: 0.32;
}

.avatar-logo {
  position: relative;
  z-index: 2;
  width: 58%;
  height: 58%;
  object-fit: contain;
  display: block;
}

.avatar-code {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  color: #ffffff;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-weight: 800;
  letter-spacing: 0.45px;
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--tone-a), var(--tone-b));
}

.avatar-code.hidden {
  display: none;
}

.channel-link h3 {
  margin-top: 0.85rem;
  font-size: 1.03rem;
  line-height: 1.34;
  color: #0e2a4d;
}

.channel-link p {
  margin-top: 0.55rem;
  color: #567193;
  font-size: 0.9rem;
  line-height: 1.55;
  min-height: 66px;
}

.open-course {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f65d8;
  background: #ebf4ff;
  border: 1px solid #d0e2f8;
  border-radius: 999px;
  padding: 0.36rem 0.72rem;
}

.info-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 18, 36, 0.66);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.info-modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.info-modal {
  position: relative;
  width: min(580px, 100%);
  border-radius: 20px;
  border: 1px solid #d7e5f7;
  background: #ffffff;
  padding: 1.2rem;
  box-shadow: 0 24px 42px -30px rgba(6, 30, 63, 0.74);
}

.info-modal h2 {
  font-size: 1.24rem;
  color: #0f2d52;
}

.info-modal p {
  margin-top: 0.78rem;
  line-height: 1.65;
  color: #3f5f88;
}

.support-optional {
  color: #0f66d9;
  font-weight: 700;
}

.info-modal-close {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: #edf4ff;
  color: #224d80;
  font-size: 1.22rem;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .search-wrap {
    min-width: 100%;
  }
}

@media (max-width: 780px) {
  .home-nav {
    display: none;
  }

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

@media (max-width: 540px) {
  .go-course {
    display: none;
  }

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

  .avatar-frame {
    width: 104px;
    height: 104px;
  }
}
