:root {
    --navy: #1F2C5C;
    --navy-dark: #15204A;
    --red: #C8102E;
    --red-dark: #A60D26;
    --cream: #F8F5EE;
    --ink: #2A2A2A;
    --muted: #6B6B6B;
    --line: #E5E0D5;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    line-height: 1.6;
    background: #fff;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; color: var(--navy); line-height: 1.15; }
  a { color: var(--red); text-decoration: none; }
  img { max-width: 100%; display: block; }

  /* Top utility bar */
  .topbar {
    background: var(--navy); color: #fff; padding: 8px 0; font-size: 13px;
  }
  .topbar .container { display: flex; justify-content: space-between; align-items: center; }
  .topbar a { color: #fff; opacity: 0.9; }
  .topbar a:hover { opacity: 1; }
  .topbar .links span { margin: 0 12px; opacity: 0.5; }

  .container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

  /* Main nav */
  .navbar {
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px); z-index: 100;
  }
  .navbar .container { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
  .nav-logo { display: flex; align-items: center; gap: 14px; }
  .nav-logo img { height: 60px; width: 60px; }
  .nav-logo .text { line-height: 1.1; }
  .nav-logo .name { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--navy); font-size: 17px; }
  .nav-logo .tag { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
  .nav-links { display: flex; gap: 28px; align-items: center; }
  .nav-links a { color: var(--ink); font-weight: 500; font-size: 14.5px; }
  .nav-links a:hover { color: var(--red); }
  .nav-cta {
    background: var(--red); color: #fff !important; padding: 10px 20px; border-radius: 4px;
    font-weight: 600; font-size: 14px; transition: background 0.2s;
  }
  .nav-cta:hover { background: var(--red-dark); }

  /* Buttons */
  .btn {
    display: inline-block; padding: 14px 28px; font-weight: 600;
    font-size: 15px; border-radius: 4px; transition: all 0.2s; text-decoration: none;
    cursor: pointer; border: none; font-family: inherit;
  }
  .btn-primary { background: var(--red); color: #fff !important; }
  .btn-primary:hover { background: var(--red-dark); }
  .btn-outline { background: transparent; color: #fff !important; border: 2px solid #fff; }
  .btn-outline:hover { background: #fff; color: var(--navy) !important; }
  .btn-navy { background: var(--navy); color: #fff !important; }
  .btn-navy:hover { background: var(--navy-dark); }

  /* Eyebrow */
  .eyebrow {
    font-size: 12px; font-weight: 600; letter-spacing: 2px;
    color: var(--red); text-transform: uppercase; margin-bottom: 14px;
  }

  /* Page sections */
  .page { display: none; }
  .page.active { display: block; }

  /* HOME — Hero */
  .hero {
    position: relative;
    background:
      linear-gradient(135deg, rgba(31,44,92,0.85), rgba(31,44,92,0.65)),
      url('https://images.unsplash.com/photo-1600334129128-685c5582fd35?auto=format&fit=crop&w=2000&q=80') center/cover;
    color: #fff; padding: 140px 0 160px;
  }
  .hero .container { max-width: 900px; }
  .hero h1 {
    color: #fff; font-size: 58px; font-weight: 700; margin-bottom: 20px;
    letter-spacing: -1px;
  }
  .hero .subhead {
    font-size: 20px; opacity: 0.92; margin-bottom: 36px; max-width: 720px; font-weight: 300;
  }
  .hero .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
  .hero .badge-row {
    margin-top: 50px; display: flex; gap: 24px; flex-wrap: wrap;
    font-size: 13px; opacity: 0.9;
  }
  .hero .badge-row span::before { content: "✓ "; color: #FFD166; font-weight: 700; }

  /* Three-up "Why NIMB" */
  .why { background: var(--cream); padding: 80px 0; }
  .why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .why-card .icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--navy); color: #fff; display: flex;
    align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px;
  }
  .why-card h3 { font-size: 22px; margin-bottom: 10px; }
  .why-card p { color: var(--muted); font-size: 15px; }

  /* Standard section */
  .section { padding: 90px 0; }
  .section h2 { font-size: 38px; margin-bottom: 18px; }
  .section.alt { background: var(--cream); }
  .section.dark { background: var(--navy); color: #fff; }
  .section.dark h2 { color: #fff; }
  .section.dark .eyebrow { color: #FFD166; }

  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
  .split.reverse > div:first-child { order: 2; }
  .split .image-card {
    aspect-ratio: 4/3; border-radius: 6px; background-size: cover; background-position: center;
    box-shadow: 0 20px 60px rgba(31,44,92,0.18);
  }

  /* Quick facts list */
  .factlist { list-style: none; padding: 0; margin: 28px 0; }
  .factlist li {
    display: flex; justify-content: space-between; padding: 12px 0;
    border-bottom: 1px solid var(--line); font-size: 15px;
  }
  .factlist li strong { color: var(--navy); font-weight: 600; }
  .factlist li span { color: var(--ink); }

  /* Cohort cards */
  .cohort-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px;
  }
  .cohort-card {
    background: #fff; border: 1px solid var(--line); border-radius: 6px;
    padding: 28px; transition: all 0.2s;
  }
  .cohort-card:hover { box-shadow: 0 16px 40px rgba(31,44,92,0.12); transform: translateY(-3px); }
  .cohort-card .status {
    display: inline-block; padding: 5px 12px; border-radius: 12px;
    background: #E8F5E9; color: #2E7D32; font-size: 11.5px;
    font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 16px;
  }
  .cohort-card.coming-soon .status { background: #FFF3E0; color: #BF6500; }
  .cohort-card.upcoming .status { background: #E3F2FD; color: #1565C0; }
  .cohort-card h4 {
    font-family: 'Playfair Display', serif; color: var(--navy);
    font-size: 22px; margin-bottom: 6px;
  }
  .cohort-card .dates { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
  .cohort-card a { font-weight: 600; font-size: 14px; }

  /* Quote section */
  .quote-section {
    background: var(--navy); color: #fff; padding: 90px 0;
  }
  .quote-grid {
    display: grid; grid-template-columns: 280px 1fr; gap: 60px; align-items: center;
  }
  .quote-portrait {
    width: 280px; height: 280px; border-radius: 50%;
    background: linear-gradient(135deg, #FFD166, #C8102E);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-size: 90px; font-weight: 900;
    color: var(--navy); border: 6px solid #fff;
  }
  .quote blockquote {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 26px; line-height: 1.45; margin-bottom: 26px;
  }
  .quote cite { font-style: normal; font-size: 14px; }
  .quote cite strong { display: block; font-size: 17px; margin-bottom: 4px; font-style: normal; }

  /* Footer CTA */
  .final-cta { background: var(--red); color: #fff; padding: 70px 0; text-align: center; }
  .final-cta h2 { color: #fff; font-size: 38px; margin-bottom: 14px; }
  .final-cta p { font-size: 18px; opacity: 0.95; margin-bottom: 28px; }

  /* Footer */
  footer {
    background: #15204A; color: #fff; padding: 60px 0 24px;
  }
  .footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 50px;
    padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.15);
  }
  .footer-col h4 {
    color: #fff; font-size: 13px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.5px; margin-bottom: 16px; font-family: 'Inter', sans-serif;
  }
  .footer-col p, .footer-col a { color: rgba(255,255,255,0.75); font-size: 14px; line-height: 1.9; }
  .footer-col a { display: block; }
  .footer-col a:hover { color: #fff; }
  .footer-bottom {
    padding-top: 24px; font-size: 13px; color: rgba(255,255,255,0.55);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  }

  /* Sub-page hero (smaller) */
  .subhero {
    background: var(--navy); color: #fff; padding: 80px 0 70px; text-align: center;
  }
  .subhero h1 { color: #fff; font-size: 48px; margin-bottom: 14px; }
  .subhero .subhead { font-size: 18px; opacity: 0.9; max-width: 720px; margin: 0 auto; }
  .subhero .eyebrow { color: #FFD166; }

  /* Program snapshot table */
  .snapshot-table {
    background: #fff; border: 1px solid var(--line); border-radius: 6px;
    padding: 8px 28px;
  }
  .snapshot-table .factlist li { padding: 16px 0; }

  /* Curriculum accordion */
  details.module {
    border: 1px solid var(--line); border-radius: 6px;
    margin-bottom: 12px; background: #fff; padding: 0;
  }
  details.module summary {
    padding: 18px 24px; font-weight: 600; cursor: pointer;
    color: var(--navy); font-size: 17px; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
  }
  details.module summary::after { content: "+"; font-size: 26px; font-weight: 400; color: var(--red); }
  details.module[open] summary::after { content: "−"; }
  details.module p { padding: 0 24px 22px; color: var(--muted); font-size: 15px; }

  /* Steps */
  .steps-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px;
  }
  .step-card { text-align: center; }
  .step-num {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--red); color: #fff; display: flex;
    align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700;
    margin: 0 auto 18px;
  }
  .step-card h3 { font-size: 20px; margin-bottom: 10px; }
  .step-card p { color: var(--muted); font-size: 15px; }

  /* Admissions timeline */
  .timeline { margin: 40px 0; }
  .timeline-row { display: flex; gap: 30px; padding: 22px 0; border-bottom: 1px solid var(--line); }
  .timeline-row:last-child { border-bottom: none; }
  .timeline-num {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
    background: var(--navy); color: #fff; display: flex;
    align-items: center; justify-content: center; font-weight: 700; font-family: 'Playfair Display', serif;
  }
  .timeline-content h3 { font-size: 19px; margin-bottom: 6px; }
  .timeline-content p { color: var(--muted); }

  /* Payment cards */
  .pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
  .pay-card {
    background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  }
  .pay-card .pay-head { background: var(--navy); color: #fff; padding: 22px 26px; }
  .pay-card.featured .pay-head { background: var(--red); }
  .pay-card .pay-head h3 { color: #fff; font-size: 22px; }
  .pay-card .pay-head .tag { font-size: 13px; opacity: 0.9; margin-top: 4px; }
  .pay-card .pay-body { padding: 28px; }
  .pay-card ul { list-style: none; padding: 0; }
  .pay-card ul li {
    padding: 10px 0 10px 28px; position: relative;
    border-bottom: 1px solid var(--line); font-size: 14.5px;
  }
  .pay-card ul li::before {
    content: "✓"; position: absolute; left: 0; top: 10px;
    color: var(--red); font-weight: 700;
  }
  .pay-card ul li:last-child { border-bottom: none; }

  /* FAQ */
  details.faq {
    border-bottom: 1px solid var(--line); padding: 0;
  }
  details.faq summary {
    padding: 20px 0; font-weight: 600; cursor: pointer;
    color: var(--navy); font-size: 17px; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
  }
  details.faq summary::after { content: "+"; font-size: 24px; color: var(--red); }
  details.faq[open] summary::after { content: "−"; }
  details.faq p { padding: 0 0 22px; color: var(--muted); }

  /* Faculty cards */
  .faculty-grid { display: grid; grid-template-columns: 1fr; gap: 50px; margin-top: 40px; }
  .faculty-card { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
  .faculty-card.reverse { grid-template-columns: 1fr 240px; }
  .faculty-card.reverse .portrait { order: 2; }
  .portrait {
    width: 240px; height: 240px; border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--red));
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-size: 80px; color: #fff;
    font-weight: 900; flex-shrink: 0;
  }
  .faculty-card h3 { font-size: 30px; margin-bottom: 6px; }
  .faculty-card .role { color: var(--red); font-weight: 600; font-size: 15px; margin-bottom: 18px; letter-spacing: 0.5px; text-transform: uppercase; }
  .faculty-card p { color: var(--ink); margin-bottom: 14px; font-size: 15px; }
  .faculty-card .creds { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
  .faculty-card .creds h4 {
    font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--muted); margin-bottom: 12px; font-family: 'Inter', sans-serif;
  }
  .faculty-card .creds ul { list-style: none; padding: 0; columns: 2; column-gap: 30px; }
  .faculty-card .creds ul li {
    font-size: 13.5px; padding: 4px 0 4px 18px; position: relative; break-inside: avoid;
  }
  .faculty-card .creds ul li::before {
    content: "•"; position: absolute; left: 0; color: var(--red);
  }

  /* Admissions team row (3 cards) */
  .team-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 30px; }
  .team-card {
    background: #fff; border: 1px solid var(--line); border-radius: 6px;
    padding: 28px 24px; text-align: center;
    box-shadow: 0 4px 16px rgba(31,44,92,0.05);
  }
  .team-card .team-portrait {
    width: 110px; height: 110px; border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--red));
    color: #fff; font-family: 'Playfair Display', serif;
    font-size: 38px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
  }
  .team-card h4 { font-family: 'Playfair Display', serif; color: var(--navy); font-size: 20px; margin-bottom: 4px; }
  .team-card .team-role { color: var(--red); font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
  .team-card .team-email { color: var(--muted); font-size: 13.5px; }
  .team-intro {
    max-width: 720px; margin: 0 auto 10px; text-align: center;
    color: var(--ink); font-size: 16px; line-height: 1.6;
  }
  @media (max-width: 900px) {
    .team-row { grid-template-columns: 1fr; }
  }

  /* CE subjects grid */
  .ce-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
  .ce-card {
    background: #fff; border-top: 4px solid var(--red);
    padding: 28px; border-radius: 4px; box-shadow: 0 4px 16px rgba(31,44,92,0.06);
  }
  .ce-card h3 { font-size: 19px; margin-bottom: 10px; }
  .ce-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
  .ce-card .ce-meta {
    font-size: 12px; letter-spacing: 1px; color: var(--red);
    text-transform: uppercase; font-weight: 600; margin-bottom: 14px;
  }
  .ce-card a { font-weight: 600; font-size: 14px; }

  /* Calendar embed placeholder */
  .calendar-embed {
    background: #fff; border: 2px dashed #BBB; padding: 60px 30px;
    border-radius: 6px; text-align: center; margin: 40px 0;
  }
  .calendar-embed .icon { font-size: 56px; color: var(--navy); margin-bottom: 14px; }
  .calendar-embed h3 { margin-bottom: 10px; }
  .calendar-embed p { color: var(--muted); max-width: 560px; margin: 0 auto; }

  /* Contact form */
  .contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; margin-top: 30px; }
  .contact-form {
    background: var(--cream); padding: 38px; border-radius: 6px;
  }
  .form-row { margin-bottom: 16px; }
  .form-row label {
    display: block; font-size: 13.5px; font-weight: 600;
    color: var(--navy); margin-bottom: 6px;
  }
  .form-row input, .form-row select, .form-row textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--line);
    border-radius: 4px; font-family: inherit; font-size: 14.5px;
    background: #fff;
  }
  .form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none; border-color: var(--red);
  }
  .form-row textarea { resize: vertical; min-height: 90px; }
  .radio-group { display: flex; gap: 18px; padding-top: 4px; }
  .radio-group label {
    display: inline-flex; align-items: center; font-weight: 400;
    color: var(--ink); cursor: pointer; gap: 6px;
  }
  .radio-group input { width: auto; }
  .contact-info-card {
    background: var(--navy); color: #fff; padding: 38px; border-radius: 6px;
  }
  .contact-info-card h3 { color: #fff; font-size: 22px; margin-bottom: 18px; }
  .contact-info-card .info-block { margin-bottom: 22px; }
  .contact-info-card .info-block strong {
    display: block; font-size: 12px; text-transform: uppercase;
    letter-spacing: 1.5px; opacity: 0.7; margin-bottom: 6px;
  }
  .contact-info-card .info-block p { font-size: 15px; color: #fff; line-height: 1.5; }
  .map-placeholder {
    margin-top: 24px; height: 180px; border-radius: 4px;
    background: linear-gradient(135deg, #2A3A6E, #1F2C5C);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6); font-size: 13px;
  }

  /* Responsive */
  @media (max-width: 900px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 38px; }
    .why-grid, .cohort-grid, .steps-grid, .ce-grid { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; }
    .split.reverse > div:first-child { order: 0; }
    .pay-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
    .faculty-card, .faculty-card.reverse { grid-template-columns: 1fr; text-align: center; }
    .faculty-card.reverse .portrait { order: 0; }
    .portrait, .quote-portrait { margin: 0 auto; }
    .quote-grid { grid-template-columns: 1fr; }
  }

  /* Mobile nav */
  .nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.2s; }
  @media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0;
      background: #fff; flex-direction: column; align-items: flex-start;
      padding: 18px 24px 24px; gap: 16px; border-bottom: 1px solid var(--line);
      box-shadow: 0 12px 24px rgba(0,0,0,0.08); }
    .nav-links.open { display: flex; }
    .topbar .links { display: none; }
    .topbar .container { justify-content: center; text-align: center; font-size: 12px; }
  }
  .nav-links a.active { color: var(--red); }

  /* ---- Typography refinements: automatic line-wrap balancing ---- */
  h1, h2, h3, h4, .subhead, blockquote { text-wrap: balance; }
  p, li, summary { text-wrap: pretty; }
  .subhead { max-width: 58ch; }
  .subhero .subhead { margin-left: auto; margin-right: auto; }
  .section p { max-width: 70ch; }
  .final-cta p, .final-cta h2 { margin-left: auto; margin-right: auto; }

  .portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
