@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400;500;700;800&display=swap");

:root {
  --page-bg: #f4f1ea;
  --paper: rgba(255, 252, 246, 0.86);
  --paper-strong: #fffdf8;
  --ink: #1b1a18;
  --muted: #5c5a54;
  --line: rgba(39, 34, 27, 0.12);
  --accent: #a14f2d;
  --accent-soft: rgba(161, 79, 45, 0.12);
  --shadow: 0 24px 70px rgba(33, 26, 18, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(204, 153, 118, 0.2), transparent 30%),
    radial-gradient(circle at top right, rgba(115, 139, 124, 0.18), transparent 28%),
    linear-gradient(180deg, #f5f1e9 0%, #ece6da 100%);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero {
  text-align: center;
  padding: 36px 18px 28px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.94;
}

.lede {
  width: min(760px, 100%);
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.7;
}

.hero-note {
  width: min(760px, 100%);
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.link-row,
.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-row {
  justify-content: center;
  margin-top: 28px;
}

a {
  color: var(--ink);
  text-decoration: none;
}

.link-row a,
.link-grid a {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.link-row a:hover,
.link-grid a:hover {
  transform: translateY(-1px);
  border-color: rgba(161, 79, 45, 0.3);
  background: rgba(255, 255, 255, 0.88);
}

.primary-link {
  background: linear-gradient(135deg, #1d1c19 0%, #3d352d 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
}

main {
  display: grid;
  gap: 22px;
}

.paper-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.abstract-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: 28px;
}

.abstract-card p:last-child {
  margin-bottom: 0;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.facts div {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--paper-strong);
  border: 1px solid rgba(39, 34, 27, 0.08);
}

.facts dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.facts dd {
  margin: 0;
  line-height: 1.5;
}

.grid-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.grid-section .paper-card,
.footer-card {
  padding: 24px;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.screenshots {
  padding: 18px 0 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.section-header p:last-child {
  margin: 0;
  max-width: 700px;
  color: var(--muted);
  line-height: 1.7;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.shot-card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow);
}

.device-frame {
  position: relative;
  padding: 14px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, #2c2a26 0%, #111 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 40px rgba(0, 0, 0, 0.24);
}

.device-frame::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 22%;
  height: 12px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.08);
}

.device-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

figcaption {
  display: grid;
  gap: 6px;
  padding: 14px 4px 2px;
  color: var(--muted);
  line-height: 1.6;
}

figcaption strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.footer-card {
  display: grid;
  gap: 18px;
}

code {
  padding: 0.08em 0.36em;
  border-radius: 0.45em;
  background: var(--accent-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92em;
}

@media (max-width: 920px) {
  .abstract-card,
  .grid-section,
  .shot-grid,
  .facts {
    grid-template-columns: 1fr;
  }

  .section-header {
    display: grid;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    padding: 20px 0 42px;
  }

  .hero {
    padding-inline: 8px;
  }

  .abstract-card,
  .grid-section .paper-card,
  .footer-card,
  .shot-card {
    padding: 18px;
  }
}
