/* Light Interaction project page.
   A clean academic project-page style with centered hero, metric cards,
   section cards, and responsive video/result grids.
*/

:root {
  --bg: #f7f8fb;
  --paper: #ffffff;
  --paper-soft: #f3f6fb;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #e6eaf0;
  --accent: #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf2ff;
  --success: #16a34a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --content: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

main {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 40px 22px 72px;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
  padding: 48px 44px 40px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.94)),
    radial-gradient(circle at 78% 18%, rgba(59, 130, 246, 0.14), transparent 22rem);
  box-shadow: var(--shadow);
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -34% 52%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.13), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  max-width: 930px;
  margin: 0 auto 14px;
  font-size: clamp(1.9rem, 4.1vw, 3.35rem);
  line-height: 1.10;
  letter-spacing: -0.043em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.authors,
.affiliations,
.correspondence {
  margin: 8px auto;
  color: var(--muted);
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  max-width: 880px;
  color: var(--ink);
  font-size: 1.05rem;
}

.affiliations {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 0.98rem;
}

.correspondence {
  margin-top: 6px;
  font-size: 0.9rem;
}

/* Buttons */

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: var(--accent);
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.24);
}

.button.outline {
  background: #ffffff;
  color: var(--accent-dark);
  border-color: rgba(59, 130, 246, 0.32);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.08);
}

.button.outline:hover {
  background: var(--accent-soft);
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.14);
}

.button.disabled {
  cursor: default;
  background: #eef2f7;
  color: #536072;
  border-color: #e0e6ee;
  box-shadow: none;
}

.button.disabled:hover {
  transform: none;
  background: #eef2f7;
  box-shadow: none;
}

/* Metrics */

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 32px auto 0;
  max-width: 850px;
}

.metric-card {
  padding: 18px 14px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.metric-value {
  display: block;
  color: var(--accent-dark);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.metric-label {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Sections */

.section {
  margin: 28px 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.abstract-section {
  padding-top: 38px;
}

.section-heading {
  margin-bottom: 22px;
  text-align: center;
}

.section h2 {
  margin: 0 0 20px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section p {
  max-width: 850px;
  margin: 0 auto 16px;
  color: #243244;
  font-size: 1.02rem;
}

/* Figures */

.wide-figure,
.result-grid figure,
.comparison figure {
  margin: 0;
}

.wide-figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-soft);
}

.wide-figure img,
.result-grid img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  color: var(--muted);
  font-size: 0.92rem;
}

.wide-figure figcaption {
  padding: 14px 18px 18px;
  text-align: center;
}

/* Method cards */

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.module-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.module-index {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 850;
}

.module-card h3 {
  margin: 0 0 9px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Gallery */

.example {
  margin: 22px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
}

.example-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.example-title h3 {
  margin: 0;
  font-size: 1.26rem;
}

.example-title span {
  color: var(--success);
  font-size: 0.92rem;
  font-weight: 800;
}

.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

video {
  display: block;
  width: 100%;
  border-radius: 16px;
  background: #0f172a;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.comparison figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.comparison figcaption span {
  color: var(--muted);
}

/* Results */

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-grid figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
}

.result-grid figcaption {
  padding: 13px 15px 16px;
  text-align: center;
}

/* BibTeX */

pre {
  overflow-x: auto;
  max-width: 900px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #d9e1ec;
  border-radius: 18px;
  background: #0f172a;
  color: #e5edf7;
  font-size: 0.9rem;
  line-height: 1.55;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Responsive layout */

@media (max-width: 840px) {
  main {
    padding: 24px 14px 48px;
  }

  .hero,
  .section {
    padding: 28px 18px;
    border-radius: 22px;
  }

  .metric-strip,
  .module-grid,
  .comparison,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .example-title {
    display: block;
  }

  .example-title span {
    display: inline-block;
    margin-top: 4px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2rem;
  }
}
