/**
 * EdTech UI refresh — overrides for modern education platform look.
 * Loaded after main.css; see docs/ui.md for design direction.
 */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --blue: #155eef;
  --blue-dark: #0d47bf;
  --sky: #4faeff;
  --pale: #eff6ff;
  --mint: #16b989;
  --paper: #ffffff;
  --canvas: #f8fafc;
  --canvas-2: #f1f5f9;
  --line: #e2e8f0;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, .04), 0 16px 40px rgba(15, 23, 42, .08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --space-section: clamp(56px, 8vw, 88px);
  --container: min(1240px, calc(100% - 48px));
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
}

.shell {
  width: var(--container);
}

/* Header */
.site-header {
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.brand-copy strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.brand-copy small {
  color: var(--muted-light);
  font-size: 9px;
  letter-spacing: .11em;
}

.desktop-nav a,
.nav-shell > .menu > li > a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav a::after,
.nav-shell > .menu > li > a::after {
  bottom: 22px;
  height: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}

.nav-cta-secondary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
  transition: border-color .22s ease, color .22s ease, background .22s ease;
}

.nav-cta-secondary:hover {
  border-color: #bfdbfe;
  color: var(--blue);
  background: var(--pale);
}

.nav-cta {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(21, 94, 239, .22);
}

.mobile-menu nav .mobile-cta {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: white;
  font-weight: 700;
  text-align: center;
}

/* Masthead strip */
.news-masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.news-masthead-inner {
  min-height: 44px;
  padding-block: 8px;
}

.edition-mark strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
}

.edition-mark span,
.news-update,
.hot-topics {
  font-size: 13px;
}

.hot-topics a {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--canvas-2);
  font-weight: 600;
}

.hot-topics a:hover {
  background: var(--pale);
}

/* Hero / lead */
.news-lead-section {
  padding: var(--space-section) 0 calc(var(--space-section) - 16px);
  background: linear-gradient(180deg, #ffffff 0%, var(--canvas) 100%);
}

.news-section-heading {
  align-items: flex-end;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.news-section-heading span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.news-section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.04em;
}

.news-section-heading > p {
  max-width: 420px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  text-align: right;
}

.news-lead-grid {
  gap: 24px;
}

.lead-news-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

.lead-news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.lead-news-art {
  border-radius: 0;
}

.lead-news-art .post-art {
  min-height: 280px;
}

.lead-news-copy {
  padding: 24px 24px 28px;
}

.lead-news-copy h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.25;
}

.lead-news-copy p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.lead-news-secondary {
  gap: 16px;
  padding: 0;
  border: 0;
}

.secondary-news-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  transition: transform .25s ease, box-shadow .25s ease;
}

.secondary-news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.secondary-news-card + .secondary-news-card {
  padding-top: 0;
  border-top: 0;
}

.secondary-news-card > a {
  height: 140px;
  margin-bottom: 0;
  border-radius: 0;
}

.secondary-news-card > div {
  padding: 16px 18px 18px;
}

.secondary-news-card h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.news-wire {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.wire-header {
  border-bottom: 1px solid var(--line);
}

.wire-header strong {
  font-size: 14px;
  font-weight: 800;
}

.wire-header a {
  font-size: 12px;
  font-weight: 700;
}

/* Metadata */
.post-meta {
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted-light);
}

.post-meta span:first-child {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--pale);
  color: var(--blue);
}

/* Category bar */
.news-category-bar {
  background: var(--paper);
  border-color: var(--line);
}

.news-category-inner {
  min-height: 56px;
}

.news-category-inner > strong {
  font-size: 11px;
  font-weight: 800;
}

.news-category-inner > a {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}

/* Latest feed */
.news-feed-section {
  padding: var(--space-section) 0;
  background: var(--canvas);
}

.block-title {
  margin-bottom: 8px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.block-title h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: -.03em;
}

.block-title > a {
  font-size: 13px;
  font-weight: 700;
}

.block-title > span {
  font-size: 12px;
  color: var(--muted-light);
}

.news-row {
  gap: 20px;
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.news-row:last-child {
  border-bottom: 1px solid var(--line);
}

.news-row:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm);
}

.news-row-art {
  height: 128px;
  border-radius: var(--radius-sm);
}

.news-row-copy h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.news-row-copy p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.popular-sidebar {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
}

.headline-rank {
  min-width: 28px;
  color: #cbd5e1;
  font-size: 22px;
  font-weight: 800;
}

.popular-list .headline-item h3,
.headline-item h3 {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.author-news-note {
  border-radius: var(--radius-md);
  background: var(--canvas);
}

.author-news-note strong,
.author-news-note p,
.author-news-note a {
  font-size: 13px;
}

/* Skills — dark signature section */
.news-desk-section {
  padding: var(--space-section) 0;
  border: 0;
  background: linear-gradient(160deg, #0b1f3f 0%, #0f2744 55%, #123564 100%);
  color: white;
}

.news-desk-section .desk-heading {
  border-color: rgba(255, 255, 255, .12);
}

.news-desk-section .desk-heading span {
  color: #7ec8ff;
  font-size: 11px;
}

.news-desk-section .desk-heading h2 {
  color: white;
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 800;
}

.news-desk-section .desk-heading > a {
  color: #93c5fd;
  font-size: 13px;
}

.section-intro-blurb {
  max-width: 640px;
  margin: -8px 0 20px;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.65;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.skill-pill {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 650;
  transition: background .22s ease, border-color .22s ease, color .22s ease;
}

.skill-pill:hover {
  border-color: rgba(147, 197, 253, .45);
  background: rgba(255, 255, 255, .12);
  color: white;
}

.news-desk-section .desk-feature {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  padding: 0;
  background: rgba(255, 255, 255, .04);
}

.news-desk-section .desk-feature > a {
  border-radius: 0;
}

.news-desk-section .desk-feature > div {
  padding: 24px;
}

.news-desk-section .desk-feature h3 a {
  color: white;
}

.news-desk-section .desk-feature h3 a:hover {
  color: #93c5fd;
}

.news-desk-section .desk-feature p {
  color: #cbd5e1;
  font-size: 14px;
}

.news-desk-section .post-meta {
  color: #94a3b8;
}

.news-desk-section .post-meta span:first-child {
  background: rgba(21, 94, 239, .25);
  color: #bfdbfe;
}

.news-desk-section .desk-list article {
  border-color: rgba(255, 255, 255, .1);
}

.news-desk-section .desk-list h3 a {
  color: white;
}

.news-desk-section .desk-list h3 a:hover {
  color: #93c5fd;
}

.news-desk-section .desk-thumb {
  border-radius: var(--radius-sm);
}

/* Roadmap */
.roadmap-section {
  padding: var(--space-section) 0;
  background: white;
}

.section-intro {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-intro h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.roadmap-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--canvas);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.roadmap-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm);
  background: white;
}

.roadmap-step {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.roadmap-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.roadmap-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.roadmap-card .text-link {
  font-size: 13px;
  font-weight: 700;
}

/* Review section */
.review-newsroom {
  padding: var(--space-section) 0;
}

.review-lead-news > a,
.review-lead-news .post-art {
  border-radius: var(--radius-md);
}

/* Certification */
.education-desk {
  padding: var(--space-section) 0;
  background: var(--canvas);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm);
}

.cert-card small {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cert-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
}

.cert-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.cert-card .text-link {
  font-size: 13px;
  font-weight: 700;
}

.education-feature {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
}

.education-feature > a {
  border-radius: 0;
}

.education-feature > div {
  padding: 28px;
}

.education-feature h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
}

.education-feature p {
  font-size: 15px;
}

/* CTA banner */
.home-cta-banner {
  padding: 0 0 var(--space-section);
  background: var(--canvas);
}

.home-cta-banner .closing-banner {
  margin: 0;
  padding: clamp(32px, 5vw, 44px);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0d53df 0%, #1a6bff 100%);
  box-shadow: var(--shadow-md);
}

.home-cta-banner .closing-banner h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
}

.home-cta-banner .closing-banner span {
  font-size: 11px;
}

.cta-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.cta-banner-actions .light-button {
  min-height: 44px;
  font-size: 14px;
}

.cta-banner-actions .outline-button-light {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius-sm);
  color: white;
  background: rgba(255, 255, 255, .08);
  font-size: 14px;
  font-weight: 700;
  transition: background .22s ease;
}

.cta-banner-actions .outline-button-light:hover {
  background: rgba(255, 255, 255, .16);
}

/* Buttons & links */
.text-link,
.primary-link {
  font-size: 13px;
  font-weight: 700;
}

.primary-link {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
}

/* Cards — shared hover on images */
a:hover .post-art-image img {
  transform: scale(1.03);
}

.post-art-image img {
  transition: transform .28s ease;
}

.lead-news-art,
.news-row-art,
.desk-feature > a,
.education-feature > a,
.review-lead-news > a {
  overflow: hidden;
}

/* Footer */
.site-footer {
  padding: 56px 0 24px;
  background: #0b1628;
}

.footer-grid {
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
  padding-bottom: 36px;
}

.footer-brand p {
  max-width: 320px;
  font-size: 14px;
  line-height: 1.7;
  color: #94a3b8;
}

.footer-grid nav strong {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.footer-grid nav a {
  font-size: 14px;
  color: #94a3b8;
}

.footer-bottom {
  font-size: 13px;
  color: #64748b;
}

/* Responsive */
@media (max-width: 1080px) {
  .roadmap-grid,
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-cta-secondary {
    display: none;
  }

  .lead-news-card {
    border-right: 0;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .footer-grid nav:nth-of-type(3),
  .footer-grid nav:nth-of-type(4) {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .nav-actions,
  .nav-cta {
    display: none;
  }

  .news-section-heading {
    display: grid;
    gap: 12px;
  }

  .news-section-heading > p {
    text-align: left;
    max-width: none;
  }

  .lead-news-secondary {
    grid-template-columns: 1fr;
  }

  .roadmap-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .home-cta-banner .closing-banner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cta-banner-actions {
    width: 100%;
  }

  .cta-banner-actions .light-button,
  .cta-banner-actions .outline-button-light {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 600px) {
  :root {
    --container: min(100% - 32px, 520px);
  }

  .site-header {
    height: 64px;
  }

  .news-row {
    grid-template-columns: 1fr;
  }

  .news-row-art {
    height: 180px;
  }

  .news-row-copy p {
    display: block;
  }

  .popular-sidebar {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead-news-card:hover,
  .secondary-news-card:hover,
  .news-row:hover,
  .roadmap-card:hover,
  .cert-card:hover {
    transform: none;
  }
}
