:root {
  --paper: #11151e;
  --panel: #181e2a;
  --panel-2: #1e2634;
  --ink: #edf1f7;
  --muted: #9ca7ba;
  --line: #2d374b;
  --lime: #c9f36b;
  --blue: #8eafe7;
  --max: 1260px;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  min-width: 0;
  margin: 0;
  background: radial-gradient(circle at 88% -8%, rgba(108, 153, 232, .14), transparent 27%), var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: inherit; }
.shell { width: min(calc(100% - 48px), var(--max)); min-height: 100vh; margin: 0 auto; }
.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.identity { color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-decoration: none; }
.identity::before { display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 50%; background: var(--lime); content: ""; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.site-nav a { border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 700; padding: 8px 11px; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { background: var(--panel); color: var(--ink); outline: none; }

.page-intro { max-width: 820px; padding: clamp(58px, 9vw, 118px) 0 36px; }
.eyebrow { color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 14px 0 0; font: clamp(48px, 7vw, 88px)/.96 Georgia, "Times New Roman", serif; letter-spacing: -.06em; }
.lede { max-width: 670px; margin: 23px 0 0; color: var(--muted); font-size: clamp(16px, 2vw, 20px); line-height: 1.65; }

.controls { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, 210px)); gap: 10px; margin: 10px 0 22px; }
.input, .select {
  width: 100%;
  min-height: 47px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  outline: none;
  padding: 0 14px;
}
.input::placeholder { color: #77839a; }
.input:focus, .select:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(201, 243, 107, .12); }
.result-count { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.paper-grid { display: grid; gap: 12px; padding-bottom: 76px; }
.paper-card { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(115deg, rgba(30, 38, 52, .96), rgba(24, 30, 42, .96)); padding: clamp(21px, 3vw, 31px); }
.paper-card::after { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--lime); content: ""; opacity: .7; }
.paper-card:hover { border-color: rgba(201, 243, 107, .48); }
.paper-card h2 { max-width: 860px; margin: 11px 0 0; font-size: clamp(20px, 2.2vw, 29px); letter-spacing: -.035em; line-height: 1.14; }
.paper-card h2 a { text-decoration: none; }
.paper-card h2 a:hover, .paper-card h2 a:focus-visible { color: var(--lime); outline: none; }
.paper-meta, .paper-summary { color: var(--muted); line-height: 1.65; }
.paper-meta { margin: 12px 0 0; font-size: 14px; }
.paper-summary { max-width: 820px; margin: 13px 0 0; font-size: 15px; }
.paper-open { align-self: end; color: var(--lime); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.paper-open:hover, .paper-open:focus-visible { text-decoration: underline; text-underline-offset: .28em; outline: none; }
.type { display: inline-flex; align-items: center; min-height: 24px; border: 1px solid rgba(201, 243, 107, .28); border-radius: 999px; color: var(--lime); font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 0 9px; text-transform: uppercase; }
.type.preprint { border-color: rgba(142, 175, 231, .36); color: var(--blue); }
.empty { border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); padding: 32px; }

.back-link { display: inline-flex; margin-top: 39px; color: var(--lime); font-size: 14px; font-weight: 750; text-decoration: none; }
.back-link:hover, .back-link:focus-visible { text-decoration: underline; text-underline-offset: .28em; outline: none; }
.detail { max-width: 940px; padding: 16px 0 80px; }
.detail h1 { font-size: clamp(38px, 5vw, 68px); }
.detail .paper-meta { font-size: 16px; }
.detail-authors { margin: 22px 0 0; color: var(--muted); line-height: 1.75; }
.detail-section { border-top: 1px solid var(--line); margin-top: 42px; padding-top: 28px; }
.detail-section h2 { margin: 0 0 14px; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.detail-section p { color: var(--muted); font-size: 17px; line-height: 1.8; }
.metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.metadata div { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px; }
.metadata dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.metadata dd { margin: 8px 0 0; color: var(--ink); line-height: 1.5; }
.metadata a, .resource-link { color: var(--lime); text-underline-offset: .22em; }
.resources { display: flex; flex-wrap: wrap; gap: 10px; }
.resource-link { border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 750; padding: 10px 14px; text-decoration: none; }
.resource-link:hover, .resource-link:focus-visible { background: var(--lime); border-color: var(--lime); color: var(--paper); outline: none; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 24px 0 32px; }

@media (max-width: 720px) {
  .shell { width: min(calc(100% - 32px), var(--max)); }
  .site-header { align-items: flex-start; flex-direction: column; gap: 10px; padding: 17px 0; }
  .site-nav { justify-content: flex-start; width: 100%; }
  .site-nav a { padding: 7px 9px; }
  .page-intro { padding-top: 52px; }
  .controls { grid-template-columns: 1fr; }
  .paper-card { grid-template-columns: 1fr; gap: 16px; }
  .paper-open { align-self: auto; }
  .metadata { grid-template-columns: 1fr; }
}
