/* Micro-Edits project page
   Same layout family as ARticulate (blue) and CineCraft (yellow),
   with a pink / purple / cyan scheme drawn from the paper's teaser and the editor UI. */
:root {
  color-scheme: light;
  --ink: #333333;
  --muted: #666666;
  --border: #e5e5e5;

  /* Sampled from assets/overview.png so the page matches the teaser figure exactly */
  --purple: #8b5cf6;        /* W_i micro-editing window (exact teaser value, same as the editor app) */
  --purple-dark: #7c3aed;
  --purple-tint: #f3effe;

  --pink: #d93a7a;          /* text-safe version of the speaker pink */
  --pink-accent: #ff6b9d;   /* Speaker B / footage B (exact teaser value) */
  --pink-tint: #fff0f5;

  --cyan: #1c9a91;          /* text-safe version of the speaker teal */
  --cyan-accent: #4ecdc4;   /* Speaker A / footage A (exact teaser value) */
  --cyan-tint: #eafaf8;

}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.6;
}

a { color: var(--pink); text-decoration: none; }
a:hover { color: #b8285f; text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--cyan-accent); outline-offset: 4px; border-radius: 3px; }
img { max-width: 100%; }

.wrap { max-width: 940px; margin-inline: auto; padding-inline: 20px; }
.skip-link { position: absolute; left: 20px; top: -70px; padding: 10px 20px; background: white; z-index: 5; }
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.hero { text-align: center; padding-top: 28px; padding-bottom: 30px; }
h1 { margin: 0 0 5px; font-size: calc(1rem + 0.9vw); line-height: 1.2; font-weight: bold; }
.venue { margin: 0 0 15px; color: var(--muted); font-size: calc(1.2rem + 0.2vw); font-weight: bold; }
.authors { display: flex; justify-content: center; flex-wrap: wrap; column-gap: 14px; row-gap: 5px; margin: 10px 0; font-size: calc(0.8rem + 0.2vw); }
.authors > span, .authors a { color: var(--pink); }
.authors a:hover { color: #b8285f; text-decoration: underline; }
sup { color: var(--pink); font-size: 10px; margin-left: 2px; }
.affiliations { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 26px; margin: 7px 0 0; font-size: calc(0.8rem + 0.1vw); color: var(--muted); }
.internship { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

.resource-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--pink-accent); border-radius: 4px; background: white; color: var(--pink);
  font-size: calc(0.8rem + 0.1vw); font-weight: bold;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.button span { font-size: 15px; }
.button:hover { background: var(--pink-tint); color: var(--pink); text-decoration: none; }
.button.primary { color: white; background: var(--pink-accent); border-color: var(--pink-accent); }
.button.primary:hover { color: white; background: #f5578e; border-color: #f5578e; }

/* ---------- Figures ---------- */
figure { margin: 0; }
.hero-figure img { display: block; width: 100%; height: auto; }
.hero-figure a { display: block; border-radius: 8px; overflow: hidden; }
.hero-figure a:focus-visible { outline-offset: 2px; }
figcaption { color: var(--muted); font-size: calc(0.8rem + 0.1vw); line-height: 1.5; }
.hero-figure figcaption { padding: 12px 0 0; }
.hero-figure figcaption strong { color: var(--ink); }
.hero-figure figcaption .rhythm { color: var(--pink); }
.hero-figure figcaption .view { color: var(--cyan); }
.hero-figure figcaption .credit { white-space: nowrap; font-size: 11px; }
.workspace-figure { margin-top: 32px; }
.workspace-figure a { border: 1px solid var(--border); }

/* ---------- Sections ---------- */
.section { padding-block: 24px; }
.section + .section { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 30px; }
h2 { font-size: calc(0.9rem + 0.5vw); color: var(--muted); line-height: 1.3; margin: 0 0 15px; font-weight: bold; }
h3 { font-size: 16px; line-height: 1.4; margin: 0 0 10px; }
p { margin: 0 0 16px; }

.abstract { margin-top: 10px; }
.abstract h2 { font-size: calc(1rem + 0.3vw); color: var(--ink); }
.abstract > p:last-child { color: var(--ink); font-size: calc(0.85rem + 0.1vw); line-height: 1.65; margin-bottom: 0; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin-bottom: 12px; }
.text-link { font-size: 13px; font-weight: 600; white-space: nowrap; }
.section-intro { color: var(--muted); font-size: calc(0.85rem + 0.1vw); max-width: 720px; }
.section-intro:last-of-type { margin-bottom: 0; }

/* ---------- Video ---------- */
.video-frame {
  aspect-ratio: 16 / 9; background: #191623; overflow: hidden; border-radius: 8px; margin-top: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(139, 92, 246, .12);
}
iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Tools: rhythm edits vs. view edits ---------- */
.features { display: grid; grid-template-columns: 1fr 1.35fr; gap: 28px; margin: 24px 0 0; }
.features article { border-top: 3px solid var(--purple); padding-top: 14px; }
.features article.rhythm { border-color: var(--pink-accent); }
.features article.view { border-color: var(--cyan-accent); }
.feature-number { display: block; font-size: 11px; letter-spacing: 1.3px; margin-bottom: 8px; font-weight: 700; color: var(--purple); }
.features article.rhythm .feature-number { color: var(--pink); }
.features article.view .feature-number { color: var(--cyan); }
.features h3 { margin-bottom: 6px; }
.features p { font-size: 14px; color: var(--muted); margin: 0; }
.modes { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.modes li {
  font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 980px;
  background: var(--cyan-tint); color: var(--cyan); border: 1px solid #c6ece8;
}
.features article.rhythm .modes li { background: var(--pink-tint); color: var(--pink); border-color: #fcd0df; }

/* ---------- Results ---------- */
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 19px; margin-top: 24px; }
.scene { display: block; color: var(--ink); }
.scene:hover { text-decoration: none; }
.scene img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 8px; border: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease;
}
.scene:hover img { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 107, 157, .22); }
.scene > div { padding: 10px 0 0; }
.scene h3 { margin-bottom: 3px; font-weight: 600; }
.scene:hover h3 { color: var(--pink); }
.scene span { font-size: 12px; color: var(--cyan); font-weight: 600; }

/* ---------- Citation ---------- */
.citation p { color: var(--muted); font-size: 14px; }
pre {
  padding: 20px 24px; margin: 16px 0 0; overflow-x: auto;
  background: #f8f6fe; border: 1px solid #e6defb; border-left: 3px solid var(--pink-accent); border-radius: 8px;
  font-size: 12px; line-height: 1.8; color: #444;
}

/* ---------- Footer ---------- */
footer {
  display: flex; justify-content: space-between; gap: 18px; margin-top: 20px; padding-block: 22px 28px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 12px;
}
.footer-divider { color: #f2b6cc; padding-inline: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 15px; }
  .hero { padding-top: 18px; padding-bottom: 24px; }
  h1 { font-size: 1.5rem; }
  .venue { font-size: 1rem; }
  .authors { gap: 6px 16px; font-size: 14px; }
  .authors > span { white-space: nowrap; }
  .affiliations { gap: 4px 18px; font-size: 13px; }
  .resource-links { gap: 6px; margin-top: 20px; }
  .button { justify-content: center; font-size: 12px; padding-inline: 10px; min-height: 36px; }
  .hero-figure figcaption { padding: 10px 0; font-size: 12px; }
  .section { padding-block: 22px; }
  .section-heading { flex-wrap: wrap; gap: 0 12px; }
  .features, .results-grid { grid-template-columns: 1fr; gap: 22px; }
  .features { margin-top: 20px; }
  .scene > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .scene h3 { margin: 0; }
  footer { flex-direction: column; gap: 3px; }
  pre { padding: 16px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene img, .button { transition: none; }
  .scene:hover img { transform: none; }
}
