/* ============================================================
   HERO — warm technical editorial
   Palette: paper #faf7f1 · ink #1c1a17 · copper #80571f
            dark #1d1b17 · light copper #c7a06b
   ============================================================ */

.ms-hero {
  min-height: 650px;
  padding: 64px 24px;
  background: #faf7f1;
  color: #1c1a17;
  display: flex;
  align-items: center;
}

/* --- two-column grid: copy | scene --- */
.ms-grid {
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
}

/* --- copy column --- */
.ms-copy h1 {
  font-size: clamp(42px, 5vw, 64px);
  max-width: 13ch;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: #1c1a17;
}

.ms-copy .ms-lead {
  max-width: 42ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4a443b;
  margin: 0 0 24px;
}

/* --- scene: the graphic fills its box, no white frame --- */
.ms-scene {
  height: 420px;
  min-width: 0;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

/* hero art: no rounded-card chrome; quiet paper/art background */
.ms-scene-viewport {
  border: 0 !important;
  border-radius: 0 !important;
}

.ms-scene-viewport {
  height: 100%;
  overflow: hidden; /* the ONLY clipping — graphic bleeds to edges */
  border-radius: 6px;
}

.ms-scene-viewport svg,
.ms-scene-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- semantic controls, 44px targets, real text labels --- */
.ms-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ms-controls button {
  min-height: 44px;
  min-width: 44px;
  padding: 0 18px;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: #1c1a17;
  background: transparent;
  border: 1px solid #c7a06b;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ms-controls button:hover { background: #c7a06b; color: #1d1b17; }

.ms-controls button[aria-pressed="true"] {
  background: #80571f;
  border-color: #80571f;
  color: #faf7f1;
}

.ms-controls button:focus-visible {
  outline: 2px solid #80571f;
  outline-offset: 2px;
}

/* --- caption reserves space; no layout shift --- */
.ms-caption {
  min-height: 3em;
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #6b6255;
}

/* --- actions row --- */
.ms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
}

.ms-actions a,
.demo-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 3px;
}

.ms-actions .demo-link {
  background: #80571f;
  color: #faf7f1;
  border: 1px solid #80571f;
}
.ms-actions .demo-link:hover { background: #6d4a1a; }

.ms-actions .secondary {
  color: #80571f;
  border: 1px solid #c7a06b;
}
.ms-actions .secondary:hover { background: #c7a06b; color: #1d1b17; }

.ms-actions a:focus-visible,
.demo-link:focus-visible {
  outline: 2px solid #80571f;
  outline-offset: 2px;
}

/* --- pointer hint, short mono --- */
.pointer-hint {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #80571f;
  margin-top: 8px;
}

/* ============================================================
   SCENE VARIANTS — data-scene hooks
   ============================================================ */

/* reactor-a: distinct dark surface, light text/ink */
.ms-hero[data-scene="reactor-a"] {
  background: #1d1b17;
  color: #faf7f1;
}
.ms-hero[data-scene="reactor-a"] .ms-copy h1 { color: #faf7f1; }
.ms-hero[data-scene="reactor-a"] .ms-lead { color: #c7a06b; }
.ms-hero[data-scene="reactor-a"] .ms-caption { color: #a89a85; }
.ms-hero[data-scene="reactor-a"] .ms-controls button { color: #faf7f1; border-color: #80571f; }
.ms-hero[data-scene="reactor-a"] .ms-controls button:hover { background: #80571f; color: #faf7f1; }
.ms-hero[data-scene="reactor-a"] .ms-controls button[aria-pressed="true"] {
  background: #c7a06b; border-color: #c7a06b; color: #1d1b17;
}
.ms-hero[data-scene="reactor-a"] .ms-actions .secondary { color: #c7a06b; }

/* all other scenes: paper */
.ms-hero:not([data-scene="reactor-a"]) { background: #faf7f1; }

/* ============================================================
   MOBILE ≤ 800px — stack, tighten, no overflow
   ============================================================ */
@media (max-width: 800px) {
  .ms-hero { padding: 24px; min-height: 0; }
  .ms-grid { grid-template-columns: 1fr; gap: 24px; }
  .ms-copy h1 { font-size: clamp(36px, 9vw, 50px); }
  .ms-scene { height: 300px; }
  .ms-scene-viewport { border-radius: 4px; }
  .ms-controls { gap: 6px; }
  .ms-actions { gap: 8px; }
}

/* ============================================================
   EDUCATION — replaces huge tiles; official marks, no fill
   ============================================================ */

/* neutralize any old oversized tile styling on the mark */
.edu__mark {
  background: transparent !important;
  height: 90px;
  padding: 12px 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start; /* left-aligned, no fill */
}

/* remove old nth-child huge-tile rules */
.education-panel .edu:nth-child(odd) .edu__mark,
.education-panel .edu:nth-child(even) .edu__mark {
  background: transparent !important;
  height: 90px;
}

.edu__mark img {
  /* natural size, contained — optical calibration per mark */
  object-fit: contain;
  object-position: left bottom;
}

/* optical size overrides (contain keeps aspect; width/height cap) */
.edu--epfl .edu__mark img { width: 120px; height: auto; }
.edu--dtu  .edu__mark img { height: 50px;  width: auto; }
.edu--ntu  .edu__mark img { width: 160px; height: auto; }
.edu--quantic .edu__mark img { height: 80px; width: auto; }

/* panel grid: 4 / 2 / 1 */
.education-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 1000px) {
  .education-panel__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .education-panel__grid { grid-template-columns: 1fr; }
}

/* entry: flex column, thin top border */
.edu {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #c7a06b;
  padding: 20px 20px 24px 0;
}

.edu h4 {
  margin: 12px 0 4px;
  font-size: 1rem;
  color: #1c1a17;
}

.edu .edu__detail {
  font-size: 0.85rem;
  color: #6b6255;
  margin: 0;
}

/* ============================================================
   RESEARCH CONTEXT — inline images under professional timeline
   ============================================================ */

.research-context { margin-top: 32px; }

.research-context h4 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #80571f;
  margin: 0 0 16px;
}

.research-context ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.research-context li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #e5ddd0;
  padding-top: 16px;
}

.research-context img {
  width: 100%;
  max-height: 45px;
  object-fit: contain;
  object-position: left;
}

/* nrc.jpg: white presentation background knocked out via blend,
   file untouched */
.research-context img[src*="nrc"] {
  mix-blend-mode: multiply;
}

.research-context .ctx-label {
  font-size: 0.9rem;
  color: #1c1a17;
  line-height: 1.5;
}
