/* Home page redesign: shared colour palette */
:root {
  --ink: #102b55;
  --muted: #5a6d89;
  --paper: #f6f9ff;
  --white: #ffffff;
  --teal: #1768d6;
  --teal-dark: #0e4599;
  --gold: #f6ad18;
  --line: #d6e3f7;
  --violet: #7251da;
  --mint: #24a86a;
  --coral: #ec6a45;
}

html {
  scroll-behavior: smooth;
}

/* Kept outside the header so the shared header remains unchanged. */
.university-quick-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px max(5vw, 22px);
  overflow-x: auto;
  background: linear-gradient(100deg, #eef5ff, #f8fbff 52%, #edf4ff);
  border-bottom: 1px solid #d4e2f6;
  scrollbar-width: none;
}

.university-quick-strip::-webkit-scrollbar { display: none; }

.university-quick-strip a {
  flex: 0 0 auto;
  padding: 9px 18px;
  color: #15325e;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d5e0f1;
  border-radius: 10px;
  box-shadow: 0 4px 0 #c7d8ed, 0 9px 18px rgba(30, 86, 157, 0.1);
  font-size: 0.88rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease, background 180ms ease;
}

.university-quick-strip a:first-child {
  color: #102b55;
  background: linear-gradient(135deg, #ffd95b, #f6ad18);
  border-color: #f5c33e;
  box-shadow: 0 4px 0 #d99809, 0 9px 18px rgba(221, 151, 0, 0.2);
}

.university-quick-strip a:hover,
.university-quick-strip a:focus-visible {
  color: white;
  background: linear-gradient(135deg, #286fdd, #6245d4);
  box-shadow: 0 7px 0 #173d9b, 0 13px 24px rgba(42, 82, 173, 0.23);
  outline: none;
  transform: translateY(-3px);
}

.university-quick-strip a:active { transform: translateY(2px); box-shadow: 0 2px 0 #173d9b; }

.home-page {
  background: linear-gradient(180deg, #f8fbff 0%, #fff 42%, #f5f9ff 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  /* Search suggestions hero ke bahar overlay ho saken, isliye vertical overflow clip nahi karna. */
  overflow: visible;
}

/* Homepage font system: readable learning copy with distinct display and UI accents. */
.home-page .eyebrow,
.home-page .text-link,
.home-page .quick-link-list a,
.home-page .search-box button {
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

.home-page .section-heading h2,
.home-page .format-copy h2 {
  font-family: Sora, ui-sans-serif, system-ui, sans-serif;
}

.home-page .section-heading > p:last-child,
.home-page .format-copy > p,
.home-page .uni-card span,
.home-page .course-card p,
.home-page .tool-card p {
  font-family: "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
}

.home-page .uni-card h3,
.home-page .course-card h3,
.home-page .tool-card h3 {
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
}

.home-page * {
  font-family: inherit;
}

/* Global inherit rule icons ko normal text font de raha tha, isliye missing-glyph boxes dikh rahe the. */
.home-page .fa-solid,
.home-page .fas {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Regular aur brand icons bhi apni original Font Awesome family mein render honge. */
.home-page .fa-regular,
.home-page .far {
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
}

.home-page .fa-brands,
.home-page .fab {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
}

/* Hero */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .68fr) minmax(0, 1.32fr);
  align-items: center;
  gap: clamp(35px, 7vw, 110px);
  min-height: 530px;
  padding: 76px max(5vw, 28px);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 13%, rgba(117, 79, 226, .30), transparent 23rem),
    radial-gradient(circle at 67% 93%, rgba(21, 183, 231, .23), transparent 24rem),
    radial-gradient(circle at 16% 77%, rgba(43, 103, 220, .13), transparent 21rem),
    linear-gradient(122deg, #eaf3ff 0%, #fbfdff 49%, #edf0ff 100%);
  border-bottom: 1px solid var(--line);
}

.hero-float {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  color: #216bcf;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 14px;
  box-shadow: 0 12px 25px rgba(37, 85, 166, .15);
  place-items: center;
  pointer-events: none;
  will-change: transform;
}

.hero-float-book { top: 13%; left: 48%; color: #7251da; transform: rotate(-9deg); }
.hero-float-code { right: 5%; bottom: 13%; color: #1768d6; transform: rotate(9deg); }
.hero-float-spark { top: 21%; right: 7%; width: 34px; height: 34px; color: #e59a14; border-radius: 50%; transform: rotate(-12deg); }

.hero-copy {
  max-width: 760px;
  order: 2;
  animation: home-rise 620ms cubic-bezier(.2,.75,.25,1) both;
}

/* GSAP owns the transform/opacity of these two hero layers when it is available. */
.gsap-motion-ready .hero-copy,
.gsap-motion-ready .hero-note {
  animation: none;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--teal);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.home-hero h1,
.section-heading h2,
.format-copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.home-hero h1 {
  max-width: 730px;
  font-size: clamp(2.8rem, 4.4vw, 4.7rem);
}

.home-hero h1 em {
  color: #236bd2;
  font-weight: inherit;
}

.hero-intro {
  max-width: 650px;
  margin: 25px 0 30px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

/* Search */
.home-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 660px;
  overflow: visible;
  background: var(--white);
  border: 1px solid #c4d8f4;
  border-radius: 16px;
  box-shadow: 0 13px 28px rgba(31, 87, 165, 0.13), inset 0 1px rgba(255, 255, 255, 0.9);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-search:focus-within {
  border-color: #6a94e6;
  box-shadow: 0 16px 32px rgba(35, 105, 208, 0.18), 0 0 0 4px rgba(59, 124, 224, 0.1);
  transform: translateY(-2px);
}

.home-search > i {
  margin-left: 19px;
  color: var(--teal);
}

.home-search input {
  padding: 17px 14px;
  color: var(--ink);
  background: transparent;
}

.home-search input::placeholder {
  color: #7b898e;
}

.home-search button {
  margin-right: 5px;
  padding: 13px 21px;
  color: white;
  background: linear-gradient(135deg, #246fdc, #173fa9);
  border-radius: 11px;
  box-shadow: 0 3px 0 #123489;
  font-weight: 700;
}

.home-search button:hover {
  background: linear-gradient(135deg, #3a7ee0, #254db6);
  transform: translateY(-1px);
}

.quick-links {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.quick-links > span {
  font-weight: 700;
  white-space: nowrap;
}

.quick-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #d4e0f3;
  border-radius: 999px;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.quick-links a:hover {
  color: var(--teal);
  border-color: var(--teal);
  background: #fff;
  transform: translateY(-1px);
}

/* Hero information panel */
.hero-note {
  position: relative;
  order: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
  max-height: none;
  padding: 31px;
  color: #f9fbff;
  background: linear-gradient(145deg, #102e69, #1558b6 64%, #3d66c5);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 20px;
  box-shadow: 13px 15px 0 rgba(62, 104, 199, 0.16), 0 22px 36px rgba(21, 67, 142, 0.18);
  animation: home-rise 680ms 100ms cubic-bezier(.2,.75,.25,1) both;
  isolation: isolate;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-note::before {
  position: absolute;
  right: -30px;
  bottom: -33px;
  z-index: -1;
  width: 235px;
  height: 235px;
  content: "";
  background: url("/images/homework.png") right bottom / contain no-repeat;
  filter: drop-shadow(0 14px 11px rgba(5, 22, 72, .28));
  transform: rotate(-5deg);
  animation: hero-art-float 4.8s ease-in-out infinite;
}

.hero-note::after {
  position: absolute;
  top: -115px;
  right: -105px;
  z-index: -2;
  width: 260px;
  height: 260px;
  content: "";
  background: rgba(86, 221, 255, .22);
  border-radius: 50%;
  filter: blur(2px);
}

.note-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c7e7ff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.note-top i,
.note-stats strong {
  color: var(--gold);
}

.note-label {
  margin-top: auto;
  color: #c7e7ff;
  font-size: 0.82rem;
}

.hero-note h2 {
  margin: 8px 0 25px;
  font-family: Georgia, serif;
  max-width: 290px;
  font-size: clamp(1.72rem, 2.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.18;
}

.hero-slogan {
  max-width: 215px;
  margin: 35px 0 0;
  color: #cce9ff;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.hero-slogan strong { color: #ffd050; }

.note-stats {
  display: flex;
  gap: 24px;
  padding-top: 17px;
  color: #d9eaff;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.76rem;
}

.note-stats strong {
  display: block;
  font-size: 1.45rem;
}

/* Shared content section styles */
.home-section {
  padding: 62px max(5vw, 28px);
}

.section-heading {
  max-width: 650px;
  margin-bottom: 34px;
}

.section-heading h2,
.format-copy h2 {
  margin-bottom: 13px;
  font-size: clamp(2.2rem, 3.5vw, 3.4rem);
}

.section-heading > p:last-child,
.format-copy > p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

/* University cards */
.university-section,
.tools-section {
  background: transparent;
}

.university-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 9%, rgba(104, 83, 218, .12), transparent 22rem),
    linear-gradient(120deg, #f9fbff, #f2f7ff 54%, #f9f6ff);
}

.tools-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 14%, rgba(39, 113, 220, .1), transparent 18rem),
    radial-gradient(circle at 89% 76%, rgba(117, 81, 218, .09), transparent 20rem),
    #f8fbff;
}

.uni-grid,
.course-grid,
.tools-grid {
  display: grid;
  gap: 17px;
}

.uni-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: none;
}

.uni-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 205px;
  padding: 23px 26px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 4px 0 #cfdef1, 0 11px 0 #e3ecf7, 0 24px 34px rgba(31, 75, 139, .12), inset 0 1px rgba(255,255,255,.9);
  transition: box-shadow 260ms ease, border-color 260ms ease, filter 260ms ease;
  text-align: left;
}

.uni-card:nth-child(1) { border-color: #bed6fb; background: linear-gradient(155deg, #fff 0%, #f5f9ff 57%, #e6f2ff 100%); }
.uni-card:nth-child(2) { border-color: #d9cffc; background: linear-gradient(155deg, #fff 0%, #faf7ff 57%, #eee8ff 100%); }
.uni-card:nth-child(3) { border-color: #bae8d3; background: linear-gradient(155deg, #fff 0%, #f5fff9 57%, #e3f8eb 100%); }

.uni-card:nth-child(1) span { color: #1e6fd5; }
.uni-card:nth-child(2) span { color: #7251da; }
.uni-card:nth-child(3) span { color: #129660; }

.uni-card::before,
.uni-card::after,
.course-card::before,
.course-card::after,
.tool-card::before {
  display: none;
}

.uni-card::before {
  position: absolute;
  top: -42px;
  right: -31px;
  z-index: -1;
  display: block;
  width: 160px;
  height: 160px;
  content: "";
  background: rgba(44, 116, 223, .12);
  border-radius: 50%;
}

.uni-card::after {
  position: absolute;
  top: -18%;
  left: -42%;
  z-index: -1;
  display: block;
  width: 25%;
  height: 140%;
  content: "";
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.88), transparent);
  transform: skewX(-18deg);
}

.uni-card:nth-child(2)::before { background: rgba(114, 81, 218, .14); }
.uni-card:nth-child(3)::before { background: rgba(31, 171, 105, .13); }

.uni-card img {
  width: 64px;
  height: 64px;
  margin: 0 0 22px;
  object-fit: contain;
  filter: drop-shadow(0 7px 7px rgba(19, 62, 124, .18));
  transition: filter 240ms ease;
}

.uni-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.2rem;
  text-shadow: none;
}

.uni-card span,
.card-link,
.tool-card > span,
.text-link {
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 700;
}

.uni-card:hover,
.tool-card:hover,
.tools-grid a:hover .tool-card {
  border-color: #79a5ea;
  box-shadow: 0 17px 29px rgba(31, 79, 154, 0.17), 0 4px 0 #d2e0f6;
  transform: translateY(-7px) rotateX(1deg);
}

.uni-card:hover {
  border-color: #87abe3;
  box-shadow: 0 5px 0 #b9d0ec, 0 13px 0 #d6e4f4, 0 29px 40px rgba(34, 77, 146, .2), inset 0 1px rgba(255,255,255,.9);
  filter: saturate(1.12);
  transform: none;
}

.uni-card:hover::after { animation: card-light-sweep 720ms cubic-bezier(.22,.8,.23,1) both; }
.uni-card:hover img { animation: logo-spark 520ms ease both; }

/* Course cards */
.course-section {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 6% 83%, rgba(45, 111, 220, .15), transparent 22rem), radial-gradient(circle at 92% 12%, rgba(36, 169, 109, .12), transparent 20rem), linear-gradient(125deg, #eaf2ff, #f6f3ff 52%, #ecfbf4);
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: none;
  gap: 20px;
}

.split-heading h2 {
  margin-bottom: 0;
}

.text-link {
  padding-bottom: 7px;
  white-space: nowrap;
}

.course-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: 20px;
  overflow: hidden;
  color: var(--ink);
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 16px;
  isolation: isolate;
  box-shadow: 0 4px 0 #cbd9ec, 0 10px 0 #e0e9f5, 0 22px 32px rgba(34, 72, 139, .13);
  transition: box-shadow 260ms ease, filter 260ms ease;
}

.course-card::after {
  position: absolute;
  right: -35px;
  bottom: -62px;
  width: 155px;
  height: 125px;
  content: "";
  border-radius: 50%;
  z-index: -1;
  opacity: .8;
  transform: rotate(-12deg);
}

.course-c::after { background: #d8e9ff; }
.course-cpp::after { background: #e6dcff; }
.course-java::after { background: #ffe3ca; }
.course-python::after { background: #d8f5e5; }

.course-card:hover {
  box-shadow: 0 5px 0 #adc6e6, 0 12px 0 #d5e2f2, 0 30px 43px rgba(34, 72, 139, .22);
  filter: saturate(1.12);
  transform: none;
}

.course-number {
  color: #93a7a1;
  font-size: 0.75rem;
  font-weight: 700;
}

.course-card img {
  align-self: flex-start;
  width: 90px;
  height: 90px;
  margin: 18px 0 14px;
  object-fit: contain;
  filter: drop-shadow(0 7px 7px rgba(20, 48, 102, .16));
}

.course-card::before {
  position: absolute;
  top: -20%;
  left: -46%;
  z-index: 0;
  display: block;
  width: 23%;
  height: 140%;
  content: "";
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.9), transparent);
  transform: skewX(-19deg);
}

.course-card:hover::before { animation: card-light-sweep 720ms cubic-bezier(.22,.8,.23,1) both; }
.course-card:hover img { animation: logo-spark 520ms ease both; }

.course-card h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.course-card p,
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.card-link,
.tool-card > span {
  margin-top: auto;
  padding-top: 22px;
  font-size: 0.82rem;
}

.course-c { border-top: 4px solid #3778d6; }
.course-cpp { border-top: 4px solid #7655d8; }
.course-java { border-top: 4px solid #ec9843; }
.course-python { border-top: 4px solid #22a96d; }

/* Tools */
.tools-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 26px;
  max-width: none;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 220px;
  padding: 24px 27px 22px;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(145deg, #fff 0%, #fbfdff 62%, #edf5ff 100%);
  border: 1px solid #cbdcf5;
  border-radius: 22px;
  box-shadow: 0 4px 0 #b8cee9, 0 11px 0 #d9e6f5, 0 23px 35px rgba(23, 68, 137, .14), inset 0 1px 1px rgba(255,255,255,.95);
  transition: border-color 260ms ease, box-shadow 260ms ease, filter 260ms ease;
  text-align: left;
}

.tool-card::before {
  position: absolute;
  top: 0;
  right: -48%;
  z-index: -1;
  display: block;
  width: 72%;
  height: 100%;
  content: "";
  background: linear-gradient(135deg, transparent 8%, rgba(28, 110, 215, .08) 50%, rgba(114, 81, 218, .17) 100%);
  border-radius: 50% 0 0 50%;
  transform: skewX(-13deg);
}

.tool-card::after {
  position: absolute;
  top: -16%;
  left: -60%;
  z-index: -1;
  width: 38%;
  height: 132%;
  content: "";
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.02), rgba(255,255,255,.83), rgba(255,255,255,.02), transparent);
  transform: skewX(-18deg);
}

.tool-card:hover {
  border-color: #709ce1;
  box-shadow: 0 5px 0 #9bb9df, 0 13px 0 #c5d8ee, 0 28px 46px rgba(28, 76, 154, .23), inset 0 1px 1px rgba(255,255,255,.95);
  filter: saturate(1.1);
  transform: none;
}

.tool-card:hover::after { animation: tool-light-sweep 700ms cubic-bezier(.22,.8,.23,1) both; }
.tool-card:hover .tool-icon { animation: tool-icon-pop 520ms cubic-bezier(.16,1,.3,1) both; }

.tool-card:nth-child(1) { background: linear-gradient(145deg, #fff 0%, #fffafa 60%, #fff0ed 100%); border-color: #ffd4ca; }
.tool-card:nth-child(1)::before { background: linear-gradient(135deg, transparent 8%, rgba(247, 106, 66, .09) 50%, rgba(255, 178, 91, .2) 100%); }
.tool-card:nth-child(2) { background: linear-gradient(145deg, #fff 0%, #fbfcff 60%, #eef2ff 100%); border-color: #cad9ff; }
.tool-card:nth-child(2)::before { background: linear-gradient(135deg, transparent 8%, rgba(64, 123, 231, .09) 50%, rgba(114, 81, 218, .2) 100%); }
.tool-card:nth-child(3) { background: linear-gradient(145deg, #fff 0%, #fffdf8 60%, #fff4de 100%); border-color: #f8ddb0; }
.tool-card:nth-child(3)::before { background: linear-gradient(135deg, transparent 8%, rgba(243, 171, 25, .1) 50%, rgba(246, 101, 65, .17) 100%); }

.tool-card:nth-child(1) .tool-icon { color: #e55843; background: #fff0ed; }
.tool-card:nth-child(2) .tool-icon { color: #2568d8; background: #e9f1ff; }
.tool-card:nth-child(3) .tool-icon { color: #e58b13; background: #fff4df; }

.tool-icon {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  color: #216bcf;
  background: linear-gradient(135deg, #e2efff, #eef2ff);
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 14px;
  box-shadow: 0 4px 0 rgba(56, 103, 169, .16), 0 9px 16px rgba(37, 89, 161, .16);
  place-items: center;
}

.tool-card h3 {
  max-width: 190px;
  margin: 18px 0 7px;
  color: var(--ink);
  font-size: 1.32rem;
  line-height: 1.15;
}

.tool-card h3::after {
  display: none;
}

.tool-card p { max-width: 260px; font-size: .94rem; }

.tool-card > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(135deg, #276fd9, #17429f);
  border-radius: 10px;
  box-shadow: 0 3px 0 #103886;
  font-size: .8rem;
  letter-spacing: .01em;
  transition: background 200ms ease, transform 200ms ease;
}

.tool-card:nth-child(1) > span { background: linear-gradient(135deg, #ef6945, #d94832); box-shadow: 0 3px 0 #b83928; }
.tool-card:nth-child(3) > span { background: linear-gradient(135deg, #ef9c1c, #e36e24); box-shadow: 0 3px 0 #b95a1c; }
.tool-card:hover > span { background: linear-gradient(135deg, #7251da, #276fd9); transform: translateX(5px); }

/* Font icon fallback was appearing as a small box/zero in some browsers. */
.uni-card span i,
.card-link i,
.tool-card > span i,
.text-link i {
  margin-left: 4px;
  font-size: .78em;
}

/* Project formats */
.formats-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(35px, 8vw, 120px);
  padding: 76px max(5vw, 28px);
  color: var(--ink);
  background: linear-gradient(122deg, #f5f9ff, #fff 52%, #f3f9ff);
}

.format-copy .eyebrow {
  color: #216bcf;
}

.format-copy h2 {
  color: var(--ink);
}

.format-copy > p:last-child,
.format-links span {
  color: var(--muted);
}

.format-copy > p:last-child {
  max-width: 500px;
}

.format-links {
  display: grid;
  gap: 12px;
}

.format-links a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 19px 20px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfe0f7;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(35, 83, 151, .1);
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.format-links a:hover {
  background: #fff;
  border-color: var(--gold);
  box-shadow: 0 17px 29px rgba(35, 83, 151, .16);
  transform: translateX(6px);
}

@keyframes home-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-art-float {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-7px); }
}

/* Hover effect is a moving light pass, intentionally separate from the static 3D layers. */
@keyframes tool-light-sweep {
  from { left: -60%; }
  to { left: 138%; }
}

@keyframes tool-icon-pop {
  0% { filter: brightness(1); }
  45% { filter: brightness(1.25) saturate(1.25); }
  100% { filter: brightness(1); }
}

@keyframes card-light-sweep {
  from { left: -46%; }
  to { left: 132%; }
}

@keyframes logo-spark {
  0%, 100% { filter: drop-shadow(0 7px 7px rgba(20, 48, 102, .16)); }
  48% { filter: drop-shadow(0 0 13px rgba(255, 191, 43, .78)) brightness(1.13); }
}

.format-links > a > i:first-child {
  color: var(--gold);
  font-size: 1.25rem;
}

.format-links strong {
  display: block;
  font-size: 1rem;
}

.format-links span {
  display: block;
  margin-top: 3px;
  font-size: 0.82rem;
}

/* Tablet and mobile */
@media (max-width: 900px) {
  .home-hero,
  .formats-section {
    grid-template-columns: 1fr;
  }

  .hero-note {
    min-height: 260px;
    max-width: 570px;
  }

  .hero-copy { order: 1; }
  .hero-note { order: 2; }

  .hero-float-book { top: 47%; left: auto; right: 9%; }
  .hero-float-code { display: none; }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .uni-grid,
  .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  }

  .uni-card {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: 132px;
    padding: 18px 22px;
    gap: 20px;
  }

  .uni-card img {
    flex: 0 0 auto;
    margin: 0;
  }

  .tool-card {
    min-height: 0;
    padding: 20px 24px;
  }

  .tool-card h3 {
    margin-top: 14px;
  }

  .tool-card > span {
    margin-top: 12px;
  }
}

@media (max-width: 560px) {
  .university-quick-strip { gap: 8px; min-height: 56px; }
  .university-quick-strip a { padding: 8px 13px; font-size: .8rem; }
  .home-hero,
  .home-section,
  .formats-section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .home-section { padding-top: 40px; padding-bottom: 40px; }

  .home-hero {
    padding-top: 55px;
    padding-bottom: 55px;
  }

  .hero-note::before { width: 185px; height: 185px; }

  .home-search > i {
    margin-left: 13px;
  }

  .home-search input {
    min-width: 0;
    padding-left: 10px;
  }

  .home-search button {
    padding: 13px;
    font-size: 0.85rem;
  }

  .quick-links {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .quick-link-list { gap: 7px; }
  .quick-links a { min-height: 30px; padding: 5px 10px; }

  .hero-float { display: none; }

  .split-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-card {
    min-height: 210px;
  }

  .uni-card {
    padding: 20px;
    min-height: 165px;
  }

  .uni-card h3 {
    font-size: 1.05rem;
  }

  .uni-card span {
    font-size: 0.78rem;
  }
}

@media (min-width: 1500px) {
  .home-hero,
  .home-section,
  .formats-section {
    padding-right: max(7vw, calc((100vw - 1540px) / 2));
    padding-left: max(7vw, calc((100vw - 1540px) / 2));
  }

  .home-hero { gap: clamp(55px, 6vw, 104px); }
}

@media (min-width: 901px) and (max-width: 1160px) {
  .home-hero { gap: 40px; padding-top: 62px; padding-bottom: 62px; }
  .home-hero h1 { font-size: clamp(3rem, 5vw, 4rem); }
  .hero-note { padding: 25px; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .home-search { border-radius: 13px; }
  .home-search button { padding: 12px 10px; }
  .quick-link-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-links a { justify-content: center; font-size: .76rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .home-page * {
    animation: none !important;
    transition: none !important;
  }
}
