/* =============================================================
   TEAM NEXUS — stylesheet
   Design system: NVIDIA-grade engineering marketing
   (black / white / gray + a single saturated #76b900 green)
   Tokens transcribed faithfully from DESIGN.md.
   ============================================================= */

/* ---- Inter as the open-source stand-in for NVIDIA-EMEA ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* ----------------------------- Tokens ---------------------- */
:root {
  /* Brand & accent */
  --primary:            #76b900;
  --on-primary:         #000000;
  --primary-dark:       #5a8d00;
  --accent-green-pale:  #bff230;

  /* Surface */
  --canvas:             #ffffff;
  --surface-soft:       #f7f7f7;
  --surface-dark:       #000000;
  --surface-elevated:   #1a1a1a;
  --hairline:           #cccccc;
  --hairline-strong:    #5e5e5e;

  /* Text */
  --ink:                #000000;
  --body:               #1a1a1a;
  --mute:               #757575;
  --stone:              #898989;
  --ash:                #a7a7a7;
  --on-dark:            #ffffff;
  --on-dark-mute:       rgba(255, 255, 255, 0.7);

  /* Semantic / editorial */
  --link-blue:          #0046a4;

  /* Radius */
  --r-none:  0px;
  --r-xs:    1px;
  --r-sm:    2px;
  --r-full:  9999px;

  /* Spacing (8px base) */
  --s-xxs:     2px;
  --s-xs:      4px;
  --s-sm:      8px;
  --s-md:      12px;
  --s-lg:      16px;
  --s-xl:      24px;
  --s-xxl:     32px;
  --s-section: 64px;

  /* Layout */
  --maxw: 1280px;
  --gutter: 24px;

  /* Chrome heights */
  --nav-h: 64px;

  --font: 'Inter', Arial, Helvetica, sans-serif;
}

/* ----------------------------- Reset ----------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, p { margin: 0; }

/* ----------------------------- Layout helpers -------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--s-section); }

/* Eyebrow caption over a section heading */
.eyebrow {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.43;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--s-md);
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
}
.section-intro {
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  max-width: 760px;
  margin-top: var(--s-lg);
}

/* A small solid green square — the system's signature ornament */
.corner-square {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: var(--r-none);
}

/* ----------------------------- Buttons --------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  border-radius: var(--r-sm);
  border: 0;
  cursor: pointer;
  height: 44px;
  padding: 11px 24px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--primary);
  padding: 9px 22px;
}
.btn-outline:hover { background: var(--primary); color: var(--on-primary); }

.btn-outline-on-dark {
  background: transparent;
  color: var(--on-dark);
  border: 1px solid var(--on-dark);
}
.btn-outline-on-dark:hover { background: var(--on-dark); color: var(--ink); }

/* Inline arrow link — "Learn More →" */
.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--r-none);
}
.ghost-link .arrow { transition: transform .15s ease; }
.ghost-link:hover .arrow { transform: translateX(4px); }

/* ----------------------------- Primary nav ----------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--surface-dark);
  color: var(--on-dark);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.nav.scrolled { box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3); border-bottom-color: var(--hairline-strong); }

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-xl);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--on-dark);
}
.brand .mark { color: var(--primary); }
.brand .corner-square { width: 10px; height: 10px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-xl);
  margin-left: auto;
}
.nav-links a {
  font-size: 16px;
  font-weight: 700;
  color: var(--on-dark);
  padding-block: var(--s-xs);
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); border-bottom-color: var(--primary); }

.nav-cta { margin-left: var(--s-sm); }

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 40px; height: 40px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--on-dark);
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------- Hero ------------------------ */
.hero {
  background: var(--surface-dark);
  color: var(--on-dark);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s-section);
  padding-block: 80px;
}
.hero-copy { max-width: 520px; }

.hero-eyebrow {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  margin-bottom: var(--s-lg);
}

.hero h1 {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 1px;
  margin-bottom: var(--s-md);
}
.hero h1 .dot { color: var(--primary); }

.hero-sub {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--on-dark);
  margin-bottom: var(--s-sm);
}
.hero-sub-en {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-dark-mute);
  margin-bottom: var(--s-xl);
}

.hero-motto {
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-dark-mute);
  border-left: 2px solid var(--primary);
  padding-left: var(--s-lg);
  margin-bottom: var(--s-xl);
}
.hero-motto .cn { color: var(--on-dark); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-md); }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-visual svg { width: 100%; height: auto; max-width: 520px; }

/* ----------------------------- Generic cards --------------- */
.grid {
  display: grid;
  gap: var(--s-xl);
  margin-top: var(--s-xxl);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: var(--s-xl);
}
/* signature corner square, top-left */
.card.has-corner::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 12px; height: 12px;
  background: var(--primary);
}

/* ----------------------------- Tech-stack (N-E-X-U-S) ------ */
.stack-card { padding: var(--s-xxl); }
.stack-letter {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  margin-bottom: var(--s-md);
}
.stack-word {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--s-xs);
}
.stack-track {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mute);
  margin-bottom: var(--s-md);
}
.stack-desc {
  font-size: 15px;
  line-height: 1.67;
  color: var(--body);
}

/* ----------------------------- Members --------------------- */
.member-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-xs);
  min-height: 132px;
  /* leave room on the right for the logo */
  padding-right: 92px;
}
/* school logo — pinned to the right of the landscape card, full color */
.member-logo {
  position: absolute;
  top: 50%;
  right: var(--s-xl);
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.member-abbr {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.member-cn {
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
}
/* green ×N member-count tag, top-right */
.member-count {
  position: absolute;
  top: var(--s-md);
  right: var(--s-md);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  letter-spacing: 0.3px;
}

/* ----------------------------- Objectives ------------------ */
.obj-card { padding: var(--s-xxl); display: flex; flex-direction: column; gap: var(--s-md); }
.obj-icon { font-size: 28px; line-height: 1; }
.obj-title { font-size: 24px; font-weight: 700; line-height: 1.25; }
.obj-en {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mute);
}
.obj-body { font-size: 16px; line-height: 1.5; color: var(--body); }
.obj-body strong { font-weight: 700; color: var(--ink); }

.obj-lead {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}
.obj-lead .accent { color: var(--primary); }

/* ----------------------------- Resources ------------------- */
.res-group { margin-top: var(--s-xxl); }
.res-group + .res-group { margin-top: var(--s-section); }

.res-group-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-md);
  padding-bottom: var(--s-md);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--s-xl);
}
.res-group-title { font-size: 20px; font-weight: 700; line-height: 1.25; }
.res-group-en {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mute);
}
.res-group-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--stone);
}

.res-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-md);
  min-height: 150px;
}
.res-card:hover { border-color: var(--primary); }

.badge {
  align-self: flex-start;
  background: var(--surface-soft);
  color: var(--body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
}
.res-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}
.res-source {
  font-size: 13px;
  color: var(--mute);
  margin-top: auto;
}
.res-card .ghost-link { font-size: 14px; margin-top: var(--s-sm); }

.res-note {
  margin-top: var(--s-section);
  padding: var(--s-xl);
  background: var(--surface-soft);
  border-left: 2px solid var(--primary);
  font-size: 15px;
  color: var(--body);
}
.res-note strong { color: var(--ink); }

/* ----------------------------- CTA strip ------------------- */
.cta-strip {
  background: var(--surface-dark);
  color: var(--on-dark);
}
.cta-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-xl);
  padding-block: var(--s-section);
  flex-wrap: wrap;
}
.cta-strip h2 { font-size: 24px; font-weight: 700; line-height: 1.25; }
.cta-strip p { color: var(--on-dark-mute); margin-top: var(--s-sm); }

/* ----------------------------- Footer ---------------------- */
.footer {
  background: var(--surface-dark);
  color: var(--on-dark-mute);
  padding-block: var(--s-section) var(--s-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--s-section);
}
.footer-brand .brand { font-size: 24px; margin-bottom: var(--s-md); }
.footer-brand .cn {
  font-size: 14px;
  color: var(--on-dark-mute);
  line-height: 1.6;
  max-width: 320px;
}
.footer-brand .motto {
  margin-top: var(--s-md);
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-dark);
  margin-bottom: var(--s-lg);
}
.footer-col li { margin-bottom: var(--s-md); }
.footer-col a {
  font-size: 15px;
  color: var(--on-dark-mute);
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--primary); }

.footer-fine {
  margin-top: var(--s-section);
  padding-top: var(--s-lg);
  border-top: 1px solid var(--hairline-strong);
  display: flex;
  justify-content: space-between;
  gap: var(--s-md);
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mute);
}

/* ----------------------------- Stat wall (callout-stat) ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-xl);
  margin-top: var(--s-xxl);
}
.stat-card {
  position: relative;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: var(--s-xxl);
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 12px; height: 12px;
  background: var(--primary);
}
.stat-number {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.stat-number .suffix { font-size: 24px; font-weight: 700; }
.stat-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-top: var(--s-md);
}
.stat-sub {
  font-size: 13px;
  color: var(--mute);
  margin-top: var(--s-xs);
}

/* ----------------------------- Resource filter (pill-tab) -- */
.res-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm);
  margin-top: var(--s-xl);
}
.pill-tab {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
  font-family: var(--font);
  font-size: 14.4px;
  font-weight: 700;
  letter-spacing: 0.144px;
  padding: 9px 17px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pill-tab:hover { border-color: var(--ink); }
.pill-tab.active {
  background: var(--ink);
  color: var(--on-dark);
  border-color: var(--ink);
}
/* hidden groups when a filter is active */
.res-group.is-hidden { display: none; }

/* ----------------------------- Back-to-top -----------------*/
.to-top {
  position: fixed;
  right: var(--s-xl);
  bottom: var(--s-xl);
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--on-primary);
  border: 0;
  border-radius: var(--r-sm);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background-color .15s ease;
  z-index: 90;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary-dark); }

/* ----------------------------- Responsive ------------------ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 60px; }
}

@media (max-width: 860px) {
  :root { --gutter: 20px; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface-dark);
    border-top: 1px solid var(--hairline-strong);
    padding: var(--s-sm) var(--gutter) var(--s-lg);
    margin-left: 0;
    transform: translateY(-120%);
    transition: transform .25s ease;
    box-shadow: 0 8px 12px rgba(0,0,0,0.4);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: var(--s-md) 0; border-bottom: 1px solid var(--surface-elevated); }
  .nav-links a.active { border-bottom-color: var(--primary); }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s-xl);
    padding-block: 56px;
  }
  .hero-visual { order: -1; }
  .hero-visual svg { max-width: 360px; }
  .hero h1 { font-size: 52px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-xl); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  :root { --s-section: 40px; }
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 18px; }
  .section-title { font-size: 28px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .cta-strip-inner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
}
