/**
 * Shared light, high-contrast theme for all atlas pages.
 */
@import url("./shared/page-stickers.css");

:root {
  --bg: #f6f7fa;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #e8ecf2;
  --border: #b8c2d0;
  --border-strong: #6b7788;
  --text: #0f172a;
  --text-muted: #334155;
  --text-secondary: #475569;
  --link: #0b4f9c;
  --link-hover: #083a73;
  --accent: #9b1c30;
  --accent-soft: rgba(155, 28, 48, 0.1);
  --mit-red: #9b1c30;
  --mit-gray: #64748b;
  --focus-ring: #0b4f9c;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;

  /* Aliases used by secondary stylesheets */
  --panel: var(--bg-elevated);
  --muted: var(--text-muted);
  --serif: var(--font-display);
  --sans: var(--font);
  --warn: #92400e;
  --atlas-accent: #0d9488;

  /* Card/panel surface — teal wash → cream (decide-flow style) */
  --surface-gradient-start: #f0fdfa;
  --surface-gradient-mid: #faf9f7;
  --surface-card-gradient: linear-gradient(
    135deg,
    var(--surface-gradient-start) 0%,
    var(--surface-gradient-mid) 52%,
    #ffffff 100%
  );
  --surface-card-border: #99f6e4;
  --surface-card-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 28px rgba(13, 148, 136, 0.1);

  /* Genealogy tree */
  --mit: var(--mit-red);
  --faculty: #b42333;
  --external: #1d4ed8;
  --student: #64748b;

  /* Signal badges (high contrast on white) */
  --signal-avoid-bg: #fee2e2;
  --signal-avoid-fg: #991b1b;
  --signal-caution-bg: #fef3c7;
  --signal-caution-fg: #92400e;
  --signal-positive-bg: #dcfce7;
  --signal-positive-fg: #166534;
  --signal-thin-bg: #e2e8f0;
  --signal-thin-fg: #475569;

  /* Research area accents (readable on light) */
  --area-mechanics: #1d4ed8;
  --area-design: #c2410c;
  --area-controls: #6d28d9;
  --area-energy: #b45309;
  --area-ocean: #0f766e;
  --area-bioengineering: #be185d;
  --area-nano: #0369a1;
  --area-other: #475569;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(155, 28, 48, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(29, 78, 216, 0.05), transparent);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 1000;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mit-red);
}

.lead {
  max-width: 42rem;
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.btn {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.btn-primary {
  background: var(--mit-red);
  border-color: var(--mit-red);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.05);
  background: var(--mit-red);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- SEO per-faculty pages (/p/{school}/{name}) --- */
.seo-page { background: #faf9f7; color: #1a1a1a; }
.seo-faculty { max-width: 720px; margin: 0 auto; padding: 2rem 1.25rem 4rem; line-height: 1.6; }
.seo-breadcrumb { font-size: .85rem; opacity: .7; margin-bottom: 1rem; }
.seo-faculty h1 { font-size: 1.9rem; margin: .2rem 0; }
.seo-school { font-weight: 600; opacity: .8; margin: 0 0 1rem; }
.seo-focus { margin: .5rem 0 1.25rem; }
.seo-faculty h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.seo-faculty ul { margin: .25rem 0 .75rem 1.1rem; }
.seo-faculty ul[lang="zh"] { opacity: .85; }
.seo-placement { font-size: .95rem; margin: 1rem 0; }
.seo-asof { font-size: .8rem; opacity: .65; margin: .25rem 0; }
.seo-caveat { font-size: .82rem; opacity: .7; border-left: 3px solid #ddd; padding-left: .75rem; margin: 1.5rem 0; }
.seo-verified { margin-top: 2rem; padding: 1.25rem; background: #fff; border: 1px solid #eee; border-radius: 10px; }
.seo-button { display: inline-block; background: #1a1a1a; color: #fff; padding: .55rem 1rem; border-radius: 8px; text-decoration: none; font-weight: 600; }
.seo-cta { margin-top: 1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
