*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #111827;
  --muted: #5b6472;
  --soft: #f8fafc;
  --paper: #ffffff;
  --line: #d6e4f2;
  --blue: #0f62fe;
  --blue-dark: #073b91;
  --cyan: #00a6d6;
  --green: #22c55e;
  --amber: #ffb020;
  --violet: #8b5cf6;
  --shadow: 0 24px 70px rgba(3, 18, 44, 0.14);
  --shadow-sm: 0 14px 34px rgba(3, 18, 44, 0.09);
  --radius: 8px;
  --radius-lg: 14px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(0, 166, 214, 0.12), transparent 34%),
    linear-gradient(240deg, rgba(139, 92, 246, 0.12), transparent 30%),
    linear-gradient(180deg, #f4fbff 0%, #eef6ff 36%, #ffffff 100%);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

body.is-loading-resource {
  overflow: hidden;
}

a {
  color: inherit;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 98, 254, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 98, 254, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.98;

  /* JS will set this variable from scroll position (smoothed) */
  --scrollY: 0px;
}


.site-bg span {
  position: absolute;
  display: block;
}

.signal-line {
  width: 42vw;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(15, 98, 254, 0.40), rgba(0, 166, 214, 0.70), transparent);
  box-shadow: 0 0 18px rgba(0, 166, 214, 0.18);
  transform-origin: left center;

  /* Make motion stay subtle and visible while scrolling */
  transform: translateY(calc(var(--scrollY) * 0.10));
  animation: signalDrift 10.5s ease-in-out infinite alternate;
}


.line-one {
  left: 5%;
  top: 18%;
  transform: rotate(16deg);
}

.line-two {
  right: 3%;
  top: 44%;
  transform: rotate(-22deg);
  animation-delay: -4s;
}

.line-three {
  left: 18%;
  bottom: 18%;
  width: 54vw;
  transform: rotate(8deg);
  animation-delay: -7s;
}

.data-packet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 8px rgba(255, 176, 32, 0.14), 0 0 22px rgba(255, 176, 32, 0.34);

  /* Scroll-coupled gentle drift */
  transform: translateY(calc(var(--scrollY) * 0.18));
  animation: packetMove 10.5s linear infinite;
}


.packet-one {
  left: 8%;
  top: 17%;
}

.packet-two {
  right: 18%;
  top: 43%;
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.13), 0 0 22px rgba(34, 197, 94, 0.28);
  animation-delay: -3s;
}

.packet-three {
  left: 28%;
  bottom: 18%;
  background: var(--violet);
  box-shadow: 0 0 0 8px rgba(139, 92, 246, 0.13), 0 0 22px rgba(139, 92, 246, 0.26);
  animation-delay: -6s;
}

.network-node {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid rgba(15, 98, 254, 0.22);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 18%, transparent 19%),
    radial-gradient(circle, rgba(0, 166, 214, 0.16), rgba(15, 98, 254, 0.05));
  box-shadow: inset 0 0 28px rgba(15, 98, 254, 0.08), 0 0 30px rgba(0, 166, 214, 0.08);
  animation: nodePulse 5s ease-in-out infinite;
}

.node-one {
  top: 11%;
  left: 14%;
}

.node-two {
  top: 38%;
  right: 15%;
  animation-delay: -1.5s;
}

.node-three {
  left: 46%;
  bottom: 12%;
  animation-delay: -3s;
}

@keyframes signalDrift {
  from { opacity: 0.22; translate: -1.1vw 0; }
  to { opacity: 0.46; translate: 1.4vw 0.6vh; }
}


@keyframes packetMove {
  /* Smaller, smoother travel distance (subtle even movement) */
  0% { transform: translate3d(0, 0, 0) scale(0.88); opacity: 0.0; }
  10% { opacity: 0.92; }
  50% { transform: translate3d(16vw, 3.5vh, 0) scale(1); opacity: 0.88; }
  90% { opacity: 0.90; }
  100% { transform: translate3d(32vw, -1.5vh, 0) scale(0.88); opacity: 0; }
}


@keyframes nodePulse {
  0%, 100% { transform: scale(0.94); opacity: 0.42; }
  50% { transform: scale(1.05); opacity: 0.74; }
}

/* Satellite background orbit */
.satellite-orbit {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Start slightly off-screen so it enters nicely */
  transform: translate3d(-30vw, -10vh, 0);
  animation: satelliteOrbit 9.5s ease-in-out infinite;

  /* Scroll-coupled tiny vertical drift */
  translate: 0 calc(var(--scrollY) * 0.06);
}


.satellite-glow {
  position: absolute;
  width: 230px;
  height: 230px;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(0, 166, 214, 0.22), rgba(139, 92, 246, 0.06) 55%, transparent 70%);
  filter: blur(1px);
  opacity: 0.9;
  animation: satelliteGlowPulse 2.9s ease-in-out infinite;
}

.satellite {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(56, 189, 248, 0.22));
  box-shadow:
    0 0 0 8px rgba(0, 166, 214, 0.08),
    0 0 26px rgba(0, 166, 214, 0.22);
}

.satellite::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, rgba(255, 255, 255, 0.2));
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

.satellite-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 6px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.28), rgba(255, 255, 255, 0.9));
  transform: translate(-50%, -50%);
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.18);
}

.satellite-panel.panel-left {
  transform: translate(calc(-50% - 26px), -50%) rotate(-12deg);
  background: linear-gradient(90deg, rgba(0, 166, 214, 0.24), rgba(255, 255, 255, 0.92));
}

.satellite-panel.panel-right {
  transform: translate(calc(-50% + 26px), -50%) rotate(12deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(139, 92, 246, 0.22));
}

@keyframes satelliteOrbit {
  0% {
    opacity: 0;
    transform: translate3d(-32vw, -12vh, 0) rotate(-10deg);
    filter: blur(0.2px);
  }
  12% {
    opacity: 0.95;
  }
  50% {
    opacity: 1;
    transform: translate3d(12vw, 4vh, 0) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(38vw, 14vh, 0) rotate(6deg);
    filter: blur(0.4px);
  }
}

@keyframes satelliteGlowPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.98);
    opacity: 0.55;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .satellite-orbit,
  .satellite-glow,
  .profile-card::before {
    animation: none !important;
  }
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.page-loader.active {
  opacity: 1;
  pointer-events: auto;
}

.loader-panel {
  display: grid;
  place-items: center;
  gap: 0.85rem;
  width: min(280px, calc(100vw - 2rem));
  padding: 1.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.loader-ring {
  width: 46px;
  height: 46px;
  border: 4px solid #dbeafe;
  border-top-color: var(--blue);
  border-right-color: var(--cyan);
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

.loader-panel p {
  color: var(--ink);
  font-weight: 800;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

#navbar,
.mobile-menu,
.hero,
.section,
.footer,
.back-top {
  position: relative;
}

#navbar,
.mobile-menu,
.hero,
.section,
.footer {
  z-index: 1;
}

#navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 3rem;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(219, 231, 243, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

#navbar.scrolled {
  padding-block: 0.7rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  text-decoration: none;
}

.nav-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
}

.nav-links a,
.mob-link,
.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active,
.mob-link:hover,
.footer-links a:hover {
  color: var(--blue);
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  place-items: center;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 67px;
  left: 1rem;
  right: 1rem;
  z-index: 999;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.mobile-menu.open {
  display: flex;
}

.mob-link {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
}

.mob-link:hover {
  background: #eef7ff;
}

.hero {
  position: relative;
  min-height: 94vh;
  display: grid;
  align-items: center;
  padding: 8rem 3rem 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-width: 980px;
}

.eyebrow,
.section-label,
.resource-top span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-label::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--amber);
}

.hero h1,
.section h2 {
  max-width: 880px;
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  margin-top: 1rem;
  max-width: 980px;
  font-size: clamp(2.7rem, 6vw, 5.25rem);
  line-height: 1.04;
  overflow-wrap: anywhere;
  text-wrap: balance;
  background: linear-gradient(135deg, #07142f 0%, var(--blue) 48%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 620px;
  margin: 1.35rem 0 2rem;
  color: #475569;
  font-size: 1.08rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.3rem;
}

.btn,
.resource-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 0.93rem;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn:hover,
.resource-btn:hover {
  transform: translateY(-2px);
}

.btn.primary,
.resource-card.featured .resource-btn {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.btn.secondary {
  background: #fff;
  color: var(--blue);
  border-color: var(--line);
}

.btn.compact {
  margin-top: 0.5rem;
}

.student-card {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.student-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.student-card strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.hero-visual {
  position: absolute;
  right: min(8vw, 90px);
  top: 18%;
  width: 280px;
  height: 280px;
  opacity: 0.92;
}

.hero-visual span {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
}

.hero-visual span:nth-child(1) {
  inset: 20px;
  background: rgba(37, 99, 235, 0.13);
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.hero-visual span:nth-child(2) {
  inset: 68px;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.28);
}

.hero-visual span:nth-child(3) {
  inset: 116px;
  background: var(--amber);
  box-shadow: 0 0 0 16px rgba(245, 158, 11, 0.16);
}

.section {
  padding: 5.8rem 3rem;
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section h2 {
  margin: 0.7rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  color: #07142f;
}

.section-intro {
  max-width: 680px;
  margin-bottom: 2.4rem;
  color: var(--muted);
  font-size: 1rem;
}

.section-about,
.section-telegraph,
.section-resources {
  background: rgba(255, 255, 255, 0.66);
}

.section-topics,
.section-inspiration {
  background: #f1f7fd;
  border-block: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 3.5rem;
  align-items: center;
}

.profile-card,
.topic-card,
.diagram-wrap,
.inspiration-quote,
.inspiration-cards article,
.resource-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-card {
  position: relative;
  overflow: hidden;
  max-width: 270px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: 0;
  background: conic-gradient(from 0deg, transparent 0 34%, rgba(15, 98, 254, 0.8), rgba(0, 166, 214, 0.9), transparent 66% 100%);
  animation: profileSpin 7s linear infinite;
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 1;
  border-radius: calc(var(--radius-lg) - 2px);
  background: #fff;
}

.profile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.about-image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  background: #dbeafe;
}

.profile-meta {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
  font-weight: 800;
}

.profile-meta span {
  color: var(--ink);
}

.profile-meta strong {
  color: var(--blue);
  font-size: 0.86rem;
}

@keyframes profileSpin {
  to {
    transform: rotate(360deg);
  }
}

.about-text p {
  max-width: 720px;
  margin-bottom: 1rem;
  color: #475569;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0;
}

.about-tags span {
  padding: 0.42rem 0.72rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.topic-card {
  position: relative;
  padding: 1.45rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.topic-card::after {
  content: attr(data-num);
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #cbd5e1;
  font-weight: 900;
}

.topic-card:hover,
.resource-card:hover,
.inspiration-cards article:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.topic-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.topic-card h3,
.resource-card h4,
.inspiration-cards h4,
.telegraph-facts h3,
.video-section h3 {
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.topic-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.12rem;
}

.topic-card p,
.resource-card p,
.inspiration-cards p,
.fact-item p {
  color: var(--muted);
  font-size: 0.91rem;
}

.topic-card ul {
  margin-top: 1rem;
  list-style: none;
}

.topic-card li {
  padding: 0.38rem 0;
  color: #475569;
  font-size: 0.86rem;
  border-top: 1px solid #eef2f7;
}

.topic-card li::before {
  content: "+";
  margin-right: 0.45rem;
  color: var(--green);
  font-weight: 900;
}

.ext-links-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.ext-links-bar span {
  color: var(--ink);
  font-weight: 900;
}

.ext-links-bar a {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.telegraph-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.6rem;
  align-items: start;
}

.diagram-wrap {
  padding: 1rem;
}

.telegraph-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.diagram-caption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.telegraph-facts {
  display: grid;
  gap: 0.8rem;
}

.telegraph-facts h3 {
  margin-bottom: 0.3rem;
  font-size: 1.35rem;
}

.fact-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.85rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fact-item span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #ecfeff;
  color: #0891b2;
  font-weight: 900;
  font-size: 0.8rem;
}

.fact-item strong {
  color: var(--ink);
  font-weight: 900;
}

.inspiration-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 1.4rem;
  margin-bottom: 3rem;
}

.inspiration-quote {
  padding: 1.5rem;
  border-left: 5px solid var(--amber);
}

.inspiration-quote blockquote {
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
}

.inspiration-quote cite {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.inspiration-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 1.4rem;
  margin-bottom: 3rem;
  align-items: start;
}

.inspiration-quote {
  padding: 1.5rem;
  border-left: 5px solid var(--amber);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
}

.inspiration-quote blockquote {
  margin: 0;
}

.inspiration-quote cite {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.inspiration-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.inspiration-card {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(236, 254, 255, 0.88));
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.inspiration-card::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 30% 30%, rgba(0, 166, 214, 0.22), transparent 60%),
    radial-gradient(circle at 65% 65%, rgba(139, 92, 246, 0.18), transparent 55%);
  transform: rotate(12deg);
  pointer-events: none;
}

.inspiration-card h4 {
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
  position: relative;
  z-index: 1;
}

.inspiration-card p {
  color: var(--muted);
  font-size: 0.98rem;
  position: relative;
  z-index: 1;
}

.inspiration-card p + p {
  margin-top: 0.9rem;
}


.video-section {
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
}

.video-section h3 {
  margin-bottom: 0.4rem;
  font-size: 1.55rem;
}

.video-wrap {
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

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

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 240px;
  padding: 1.35rem;
  transition: var(--transition);
}

.resource-card.featured {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border-color: #93c5fd;
}

.resource-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.resource-top strong {
  color: var(--amber);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  font-weight: 900;
}

strong,
b {
  font-weight: 900;
}

.resource-card h4 {
  font-size: 1.15rem;
}

.resource-card p {
  flex: 1;
}

.resource-btn {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--blue);
}

.resource-btn:hover {
  background: var(--blue);
  color: #fff;
}

.assignment-viewer {
  width: min(760px, 100%);
  margin: 2rem auto 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.viewer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.viewer-heading h3 {
  margin-top: 0.45rem;
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  line-height: 1.2;
}

.viewer-heading p {
  max-width: 460px;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.pdf-object {
  display: block;
  width: 100%;
  height: 460px;
  min-height: 0;
  border: 0;
  background: #e5e7eb;
}

.pdf-fallback {
  display: grid;
  place-items: center;
  gap: 0.85rem;
  min-height: 360px;
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
}

.footer {
  padding: 2rem 3rem;
  background: #08111f;
  color: #e2e8f0;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p {
  font-weight: 800;
}

.footer span {
  color: #94a3b8;
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links .github-link {
  color: #fff;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(203, 213, 225, 0.36);
  border-radius: var(--radius);
}

.footer-links .github-link:hover {
  color: #fff;
  border-color: var(--cyan);
  background: rgba(0, 166, 214, 0.16);
}

.back-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 990;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .hero-visual {
    opacity: 0.34;
  }

  .about-grid,
  .telegraph-layout,
  .inspiration-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    max-width: 270px;
  }

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

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  #navbar {
    padding: 0.8rem 1rem;
  }

  .nav-links {
    display: none;
  }

  .nav-brand span:last-child {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hamburger {
    display: grid;
  }

  .hero {
    min-height: auto;
    padding: 7rem 1.1rem 3rem;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 9.5vw, 2.7rem);
    line-height: 1.08;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-visual {
    right: -80px;
    top: 72px;
    width: 220px;
    height: 220px;
  }

  .section {
    padding: 4rem 1.1rem;
  }

  .topics-grid,
  .resources-grid,
  .inspiration-cards {
    grid-template-columns: 1fr;
  }

  .student-card,
  .profile-meta,
  .viewer-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewer-actions {
    width: 100%;
  }

  .viewer-actions .resource-btn {
    width: 100%;
  }

  .pdf-object {
    height: 380px;
  }
}
