:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #637083;
  --paper: #f6f8fb;
  --line: rgba(16, 24, 40, 0.12);
  --panel: rgba(255, 255, 255, 0.82);
  --shadow: 0 18px 55px rgba(18, 27, 43, 0.14);
  --blue: #2563eb;
  --green: #059669;
  --cyan: #0891b2;
  --red: #e11d48;
  --amber: #d97706;
  --violet: #7c3aed;
  --teal: #0f766e;
  --indigo: #4f46e5;
  --slate: #475569;
  --lime: #65a30d;
  --pink: #db2777;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 163, 224, 0.16), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(236, 27, 75, 0.12), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 48%, #eef8f4 100%);
  color: var(--ink);
}

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

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  left: 0;
  min-height: 74px;
  padding: 12px clamp(16px, 5vw, 56px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
}

.brand-mark {
  background: #111827;
  border-radius: 8px;
  color: #fff;
  display: grid;
  font-weight: 900;
  height: 42px;
  letter-spacing: 0;
  place-items: center;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.topnav {
  display: flex;
  gap: 6px;
}

.topnav a {
  border-radius: 999px;
  color: #364153;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 13px;
}

.topnav a:hover {
  background: rgba(16, 24, 40, 0.07);
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 34px clamp(16px, 4vw, 36px) 64px;
}

.hero {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
  min-height: calc(100vh - 118px);
}

.hero-copy {
  padding: 28px 0;
}

.eyebrow {
  color: #506070;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  letter-spacing: 0;
  line-height: 0.92;
  max-width: 8.2ch;
}

.hero-text {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.55;
  margin-top: 22px;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-action,
.secondary-action {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  min-height: 48px;
  padding: 0 18px;
}

.primary-action {
  background: #111827;
  color: white;
}

.secondary-action {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.hero-art {
  margin: 0;
}

.hero-art img {
  aspect-ratio: 5 / 3;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
  object-fit: cover;
  width: 100%;
}

.stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: -22px;
}

.stats div,
.toolbar,
.subject-block,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(18, 27, 43, 0.07);
}

.stats div {
  padding: 18px;
}

.stats strong {
  display: block;
  font-size: clamp(1.25rem, 3vw, 2.1rem);
}

.stats span {
  color: var(--muted);
  font-weight: 700;
}

.toolbar {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 1fr) auto;
  margin: 26px 0 44px;
  padding: 14px;
}

.search {
  display: grid;
  gap: 7px;
}

.search span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.search input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  outline: none;
  padding: 0 14px;
}

.search input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  min-height: 38px;
  padding: 0 13px;
}

.chip[aria-pressed="true"] {
  background: #111827;
  color: #fff;
}

.section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 3rem);
  letter-spacing: 0;
}

.latest {
  margin-bottom: 58px;
}

.quick-grid,
.app-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.subject-groups {
  display: grid;
  gap: 18px;
}

.subject-block {
  overflow: hidden;
  padding: 20px;
}

.subject-head {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.subject-icon,
.subject-badge {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 950;
  justify-content: center;
}

.subject-icon {
  color: white;
  font-size: 1.35rem;
  height: 54px;
  width: 54px;
}

.subject-head h3 {
  font-size: 1.35rem;
}

.subject-head p {
  color: var(--muted);
  font-weight: 700;
  margin-top: 3px;
}

.app-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 16px;
  position: relative;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.app-card:hover {
  border-color: rgba(16, 24, 40, 0.28);
  box-shadow: 0 18px 42px rgba(18, 27, 43, 0.13);
  transform: translateY(-3px);
}

.card-topline {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.75rem;
  font-weight: 900;
  justify-content: space-between;
  text-transform: uppercase;
}

.subject-badge {
  color: #fff;
  height: 34px;
  width: 34px;
}

.app-card strong {
  font-size: 1.08rem;
  line-height: 1.15;
}

.card-description {
  color: var(--muted);
  line-height: 1.42;
}

.tag-row {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row em {
  background: rgba(16, 24, 40, 0.06);
  border-radius: 999px;
  color: #465366;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
  padding: 5px 8px;
}

.blue .subject-icon,
.blue .subject-badge {
  background: var(--blue);
}

.green .subject-icon,
.green .subject-badge {
  background: var(--green);
}

.cyan .subject-icon,
.cyan .subject-badge {
  background: var(--cyan);
}

.red .subject-icon,
.red .subject-badge {
  background: var(--red);
}

.amber .subject-icon,
.amber .subject-badge {
  background: var(--amber);
}

.violet .subject-icon,
.violet .subject-badge {
  background: var(--violet);
}

.teal .subject-icon,
.teal .subject-badge {
  background: var(--teal);
}

.indigo .subject-icon,
.indigo .subject-badge {
  background: var(--indigo);
}

.slate .subject-icon,
.slate .subject-badge {
  background: var(--slate);
}

.lime .subject-icon,
.lime .subject-badge {
  background: var(--lime);
}

.pink .subject-icon,
.pink .subject-badge {
  background: var(--pink);
}

.empty-state {
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding: 28px;
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px clamp(16px, 4vw, 36px) 42px;
}

.footer a {
  color: var(--ink);
  font-weight: 900;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 20px;
  }

  h1 {
    max-width: 10ch;
  }

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

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

  .chips {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    overflow-x: auto;
    padding-bottom: 2px;
    width: 100%;
  }

  main {
    padding-top: 18px;
  }

  .hero-actions,
  .stats,
  .quick-grid,
  .app-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .stats {
    margin-top: 18px;
  }

  .primary-action,
  .secondary-action {
    justify-content: center;
    width: 100%;
  }

  .footer {
    align-items: flex-start;
    display: grid;
  }
}
