:root {
  color-scheme: dark;
  --background: #111114;
  --surface: #19191e;
  --surface-raised: #202026;
  --border: #303037;
  --muted: #9c9ba5;
  --text: #f5f3f2;
  --accent: #ef785f;
  --accent-light: #ff9a7f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 50% 0, rgb(70 43 48 / 20%), transparent 48rem),
    var(--background);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

.topbar, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -1px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #201312;
  font-size: 15px;
}

.brand-period { color: var(--accent); margin-left: -8px; }
.topbar-note, footer > span:last-child { color: var(--muted); font-size: 12px; }

main { max-width: 930px; margin: 0 auto; padding: 68px 28px 80px; }
.hero { text-align: center; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--accent-light); font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.eyebrow-line { width: 20px; height: 1px; background: var(--accent); }

h1, h2 { font-family: "Space Grotesk", sans-serif; letter-spacing: -2.8px; }
h1 { margin: 19px 0 14px; font-size: clamp(42px, 7vw, 68px); line-height: 1.03; }
h1 span { color: var(--accent); }
.hero-copy { margin: 0; color: #b6b3bb; font-size: 15px; }

.compare-panel {
  margin: 42px auto 0;
  padding: 27px 28px 20px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(135deg, rgb(255 255 255 / 3%), transparent 75%), #18181d;
  text-align: left;
  box-shadow: 0 24px 70px rgb(0 0 0 / 19%);
}

.people-row { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 17px; }
.person-field { min-width: 0; position: relative; }
.person-field label { display: block; margin: 0 0 11px 2px; color: #aaa8b1; font-size: 10px; font-weight: 700; letter-spacing: 1.3px; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 49px; padding: 0 14px 0 39px; border: 1px solid #393840; border-radius: 8px; outline: none; background: #121216; color: var(--text); font: inherit; font-size: 14px; }
.input-wrap input::placeholder { color: #6f6d77; }
.input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(239 120 95 / 12%); }
.search-icon { position: absolute; z-index: 1; left: 14px; top: 10px; color: #85828e; font-size: 24px; line-height: 24px; transform: rotate(-20deg); }
.versus { display: grid; width: 34px; height: 34px; margin-top: 21px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--accent); font-size: 19px; }
.selected-person { min-height: 21px; padding: 5px 2px 0; color: #a9a6af; font-size: 11px; }

.suggestions { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; left: 0; max-height: 230px; overflow-y: auto; padding: 5px; border: 1px solid #3a3941; border-radius: 9px; background: #222127; box-shadow: 0 12px 30px rgb(0 0 0 / 45%); }
.suggestion { display: block; width: 100%; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.suggestion:hover, .suggestion:focus { outline: none; background: #333039; }
.suggestion-name { display: block; font-size: 13px; font-weight: 600; }
.suggestion-description { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.suggestion-empty { padding: 10px; color: var(--muted); font-size: 11px; }

.compare-button { display: flex; width: 100%; height: 48px; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; border: 0; border-radius: 8px; background: var(--accent); color: #241311; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; transition: background .15s, transform .15s; }
.compare-button:hover { background: var(--accent-light); transform: translateY(-1px); }
.compare-button:disabled { cursor: wait; opacity: .7; transform: none; }
.form-hint { margin: 12px 0 0; color: #77747e; font-size: 11px; text-align: center; }
.status-message { max-width: 610px; margin: 20px auto 0; padding: 13px 15px; border: 1px solid #414048; border-radius: 8px; color: #c9c6cf; font-size: 13px; }
.status-message.error { border-color: #78463f; background: rgb(239 120 95 / 8%); color: #ffad9a; }

.results-section { margin-top: 86px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.results-heading .eyebrow { justify-content: flex-start; }
h2 { margin: 12px 0 0; font-size: 36px; letter-spacing: -1.5px; }
.export-button { padding: 10px 13px; border: 1px solid #46444d; border-radius: 7px; background: transparent; color: #d3d0d6; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; }
.export-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-light); }
.export-button:disabled { cursor: not-allowed; opacity: .45; }
.results-summary { margin: 12px 0 22px; color: var(--muted); font-size: 13px; }
.results-summary strong { color: var(--text); font-weight: 600; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.project-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); min-height: 125px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #19191e; }
.project-poster { display: grid; min-height: 125px; place-items: center; background: #29262b; color: #817d87; font-size: 25px; }
.project-poster img { width: 100%; height: 100%; min-height: 125px; object-fit: cover; }
.poster-placeholder { display: flex; width: 100%; min-height: 125px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; background: radial-gradient(ellipse at 30% 20%, rgb(239 120 95 / 28%), transparent 58%), linear-gradient(145deg, #33282d, #242329 68%); color: #f0c7ba; }
.poster-placeholder span { font-family: "Space Grotesk", sans-serif; font-size: 31px; font-weight: 700; letter-spacing: 1px; }
.poster-placeholder small { color: #b7a4a4; font-size: 7px; font-weight: 700; letter-spacing: 1.5px; }
.project-info { min-width: 0; padding: 14px 13px; }
.project-title { margin: 0; overflow-wrap: anywhere; font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 600; line-height: 1.3; }
.project-year { margin: 5px 0 9px; color: #a6a2ac; font-size: 11px; }
.project-roles { display: grid; gap: 4px; color: #c0bdc4; font-size: 10px; line-height: 1.4; }
.project-rating { display: inline-flex; align-items: center; gap: 4px; margin-top: 9px; color: #efc86e; font-size: 11px; }
.image-credit { display: block; margin-top: 8px; color: #aaa5ad; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: #625e67; text-underline-offset: 2px; }
.image-credit:hover { color: var(--accent-light); }
.source-note { margin: 17px 0 0; color: #77747e; font-size: 10px; }
.empty-state { grid-column: 1 / -1; padding: 31px 20px; border: 1px dashed #3b3941; border-radius: 10px; color: #aaa7b0; font-size: 13px; line-height: 1.6; text-align: center; }

footer { border-top: 1px solid #25242a; }
.brand-small { font-size: 16px; }
.brand-small .brand-mark { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }

@media (max-width: 640px) {
  .topbar, footer { padding: 20px; }
  .topbar-note { max-width: 140px; text-align: right; }
  main { padding: 51px 18px 62px; }
  h1 { font-size: clamp(40px, 12vw, 55px); letter-spacing: -2px; }
  .hero-copy { max-width: 310px; margin: 0 auto; font-size: 13px; line-height: 1.6; }
  .compare-panel { margin-top: 30px; padding: 21px 17px 17px; }
  .people-row { grid-template-columns: 1fr; gap: 2px; }
  .person-field label { margin-bottom: 8px; }
  .versus { width: 27px; height: 27px; margin: 3px auto; font-size: 16px; }
  .input-wrap input { height: 46px; }
  .results-section { margin-top: 61px; }
  h2 { font-size: 30px; }
  .project-grid { grid-template-columns: 1fr; }
  .results-heading { align-items: center; }
  .export-button { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
