/* ============ Stamford portal: header · hero · courses · footer ============ */

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__in {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
}
.brand__logo {
  height: 34px;
  width: auto;
}
.brand__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}
.brand__txt b {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.brand__txt span {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav a {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav a:hover {
  color: var(--navy);
  background: var(--wash);
}
.nav a.is-active {
  color: var(--magenta);
}
.who {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.85rem 0.32rem 0.4rem;
  background: var(--wash);
  border: 1px solid var(--wash-line);
  border-radius: var(--radius-pill);
}
.who__ava {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  background: linear-gradient(135deg, var(--navy-600), var(--navy));
}
.who__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}
@media (max-width: 720px) {
  .nav {
    display: none;
  }
  .who__name {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(230, 21, 122, 0.42), transparent 60%),
    radial-gradient(760px 460px at 102% 8%, rgba(36, 65, 131, 0.6), transparent 58%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy) 58%, #081534 100%);
}
/* faint grid lines for academic-tech texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(720px 420px at 70% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero__in {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-5);
  align-items: center;
  padding-block: clamp(3rem, 2rem + 5vw, 5.5rem);
}
.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}
.hero__pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(244, 183, 64, 0.25);
}
.hero h1 {
  margin: 1.1rem 0 0.7rem;
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero h1 .spark {
  background: linear-gradient(100deg, var(--magenta-300), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  max-width: 46ch;
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.84);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: var(--space-4);
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: var(--space-5);
}
.hero__stat b {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.hero__stat span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.68);
}

/* hero visual — a stylized tutor "voice" card */
.hero__visual {
  position: relative;
  justify-self: center;
  width: min(330px, 80vw);
  aspect-ratio: 1;
}
.orb-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.orb {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 3.2rem;
  background: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.28), rgba(230, 21, 122, 0.18));
}
.orb::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 99, 166, 0.5);
  animation: orb-ping 2.4s var(--ease) infinite;
}
@keyframes orb-ping {
  0% { transform: scale(0.92); opacity: 0.9; }
  70%, 100% { transform: scale(1.28); opacity: 0; }
}
.orb-card b {
  font-size: 1.02rem;
}
.orb-card span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}
.orb-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
}
.orb-wave i {
  width: 4px;
  border-radius: 4px;
  background: var(--gold);
  animation: wave 1.1s var(--ease) infinite;
}
.orb-wave i:nth-child(1) { height: 40%; animation-delay: 0s; }
.orb-wave i:nth-child(2) { height: 90%; animation-delay: 0.12s; }
.orb-wave i:nth-child(3) { height: 60%; animation-delay: 0.24s; }
.orb-wave i:nth-child(4) { height: 100%; animation-delay: 0.36s; }
.orb-wave i:nth-child(5) { height: 50%; animation-delay: 0.48s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}
@media (max-width: 860px) {
  .hero__in {
    grid-template-columns: 1fr;
  }
  .hero__visual {
    display: none;
  }
}

/* ---------- courses ---------- */
.courses {
  padding-block: var(--space-section);
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.sec-head__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--magenta);
}
.sec-head h2 {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-top: 0.2rem;
}
.sec-head__term {
  flex: none;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.4rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.courses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(1rem, 0.6rem + 1.4vw, 1.6rem);
}

/* course card */
.ccard {
  --c: var(--magenta);
  --c2: var(--magenta-300);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur);
  animation: card-in var(--dur-slow) var(--ease) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.ccard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--c) 50%, transparent);
}
.ccard__top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.05rem 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, var(--c) 0%, var(--c2) 120%);
}
.ccard__top::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 80px at 88% -10%, rgba(255, 255, 255, 0.35), transparent 70%);
  pointer-events: none;
}
.ccard__icon {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.ccard__code {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.9;
}
.ccard__credits {
  font-size: 0.72rem;
  opacity: 0.85;
}
.ccard__badge {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: #4a3000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
.ccard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.05rem 1.15rem 1.2rem;
}
.ccard__title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}
.ccard__title-en {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.ccard__meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.ccard__meta .sep {
  color: var(--line-strong);
}
.ccard__meta-ic {
  display: inline-flex;
  color: var(--c);
  opacity: 0.85;
}
.ccard__meta-ic svg { width: 15px; height: 15px; }
.ccard__blurb {
  margin-top: 0.65rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.ccard__progress {
  margin-top: auto;
  padding-top: 1rem;
}
.ccard__progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.ccard__bar {
  height: 6px;
  border-radius: 6px;
  background: var(--wash);
  overflow: hidden;
}
.ccard__bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--c), var(--c2));
}
.ccard__actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.05rem;
}
.ccard__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.6rem;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  transition: transform var(--dur-fast), filter var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}
.ccard__btn svg {
  width: 17px;
  height: 17px;
}
.ccard__btn--chat {
  color: #fff;
  background: linear-gradient(135deg, var(--c), var(--c2));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent);
}
.ccard__btn--chat:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.ccard__btn--voice {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, #fff);
  border-color: color-mix(in srgb, var(--c) 28%, transparent);
}
.ccard__btn--voice:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--c) 16%, #fff);
}

/* ---------- footer ---------- */
.foot {
  margin-top: var(--space-4);
  padding-block: var(--space-5);
  background: var(--navy);
  color: rgba(255, 255, 255, 0.72);
}
.foot__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.foot__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 700;
}
.foot__brand img {
  height: 28px;
}
.foot small {
  font-size: 0.78rem;
  line-height: 1.6;
}
.foot a {
  color: var(--magenta-300);
}

/* professional SVG icons (replace emoji) */
.ccard__icon { color: #fff; }
.ccard__icon svg { width: 27px; height: 27px; }
.orb { color: #fff; }
.orb svg { width: 64px; height: 64px; }
.ccard__btn svg { width: 17px; height: 17px; }
.ic-inline {
  width: 1.05em;
  height: 1.05em;
  display: inline-block;
  vertical-align: -0.16em;
}

@media (max-width: 520px) {
  .ccard__actions {
    flex-direction: column;
  }
}
