:root {
  color-scheme: light;
  --ink: #181713;
  --muted: #706a5d;
  --paper: #f8f2e6;
  --paper-deep: #eadcc6;
  --line: rgba(24, 23, 19, 0.14);
  --accent: #b9462d;
  --accent-2: #116a65;
  --card: rgba(255, 250, 241, 0.76);
  --shadow: 0 24px 80px rgba(56, 38, 21, 0.16);
  --hero-image: url("../assets/hero-character.png");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 46%, rgba(185, 70, 45, 0.18), transparent 32rem),
    radial-gradient(circle at 72% 38%, rgba(17, 106, 101, 0.16), transparent 30rem),
    radial-gradient(circle at 48% 18%, rgba(255, 250, 241, 0.9), transparent 24rem),
    linear-gradient(132deg, #fbf1e3 0%, #f6e6cf 42%, #efe2cf 68%, #e9ddcc 100%);
  color: var(--ink);
  font-family:
    "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(24, 23, 19, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 23, 19, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 24px 0 0;
  overflow: hidden;
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px;
  margin-bottom: clamp(70px, 12vh, 120px);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.68);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 58px rgba(56, 38, 21, 0.08);
}

.nav a {
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.86rem;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(24, 23, 19, 0.08);
}

.hero-grid,
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 36px;
  align-items: center;
}

.hero-grid {
  position: relative;
  min-height: calc(100vh - 150px);
  align-items: end;
}

.hero-grid::before,
.hero-grid::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.hero-grid::before {
  top: 18%;
  left: 47%;
  width: clamp(110px, 12vw, 190px);
  aspect-ratio: 1;
  border: 1px solid rgba(185, 70, 45, 0.22);
  border-radius: 18px;
  transform: rotate(45deg);
  box-shadow:
    34px -34px 0 -20px rgba(17, 106, 101, 0.2),
    -42px 42px 0 -26px rgba(24, 23, 19, 0.16);
}

.hero-grid::after {
  right: 33%;
  bottom: 18%;
  width: 160px;
  height: 42px;
  border-top: 1px solid rgba(24, 23, 19, 0.18);
  border-bottom: 1px solid rgba(24, 23, 19, 0.1);
  transform: rotate(-10deg);
  opacity: 0.78;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 720px;
  padding-bottom: clamp(56px, 10vh, 126px);
  animation: rise-in 700ms ease both;
}

.status,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--accent-2);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(4.7rem, 9vw, 9.4rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.subtitle {
  margin-bottom: 34px;
  color: var(--accent);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.intro {
  max-width: 670px;
  color: var(--muted);
  font-size: clamp(1.18rem, 1.6vw, 1.5rem);
  line-height: 1.62;
}

.hero-actions,
.section-heading,
.signal-top,
.signal-link,
.footer {
  display: flex;
  align-items: center;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 46px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf1;
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(24, 23, 19, 0.18);
}

.button.ghost {
  background: rgba(255, 250, 241, 0.5);
  color: var(--ink);
  box-shadow: none;
}

.button.compact {
  min-height: 42px;
  padding: 0 15px;
  font-size: 0.86rem;
  box-shadow: none;
}

.button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.76;
}

.signal-top,
.section-heading {
  justify-content: space-between;
  gap: 20px;
}

.signal-link,
.text-link,
.card-link {
  gap: 8px;
  color: var(--accent);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-weight: 700;
}

.card-link {
  display: inline-flex;
  margin-top: 20px;
}

.hero-art {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-height: clamp(560px, 74vh, 820px);
  animation: rise-in 900ms 100ms ease both;
}

.hero-art::before {
  position: absolute;
  right: clamp(-132px, -7vw, -48px);
  bottom: 18px;
  z-index: 1;
  width: min(760px, 58vw);
  height: min(820px, 78vh);
  content: "";
  background-image: var(--hero-image);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
  filter: drop-shadow(0 28px 48px rgba(56, 38, 21, 0.1));
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse at 58% 52%, #000 0 60%, rgba(0, 0, 0, 0.94) 70%, rgba(0, 0, 0, 0.34) 88%, transparent 98%);
  mask-image: radial-gradient(ellipse at 58% 52%, #000 0 60%, rgba(0, 0, 0, 0.94) 70%, rgba(0, 0, 0, 0.34) 88%, transparent 98%);
}

.hero-art::after {
  position: absolute;
  right: -78px;
  bottom: 46px;
  width: 260px;
  height: 260px;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(17, 106, 101, 0.22) 0 2px, transparent 3px);
  background-size: 16px 16px;
  mask-image: radial-gradient(circle, #000 0 58%, transparent 76%);
}

.spark,
.dot {
  position: absolute;
  z-index: 2;
  display: block;
}

.spark {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.spark::before,
.spark::after {
  position: absolute;
  inset: 0;
  content: "";
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.spark-one {
  top: 26%;
  right: 4%;
}

.spark-two {
  bottom: 30%;
  left: 20%;
  width: 24px;
  height: 24px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(17, 106, 101, 0.42);
}

.dot-one {
  top: 38%;
  right: 0;
  background: rgba(24, 23, 19, 0.42);
}

.dot-two {
  bottom: 36%;
  left: 9%;
}

.hero-copy::after {
  position: absolute;
  right: 8%;
  bottom: 22%;
  width: 54px;
  height: 54px;
  content: "";
  border: 1px solid rgba(17, 106, 101, 0.3);
  transform: rotate(18deg);
  opacity: 0.72;
}

.section {
  padding: 110px 0;
  border-top: 1px solid var(--line);
}

.post-list,
.creation-grid {
  display: grid;
  gap: 14px;
}

.post-card,
.creation-card {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
}

.creation-card {
  padding: 24px;
  border-radius: 26px;
}

.post-card span,
.creation-card span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-card p,
.creation-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.research-feature {
  position: relative;
  padding: clamp(24px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(150deg, rgba(255, 250, 241, 0.82), rgba(239, 226, 207, 0.6)),
    radial-gradient(circle at 92% 16%, rgba(185, 70, 45, 0.16), transparent 13rem);
  box-shadow: 0 22px 70px rgba(56, 38, 21, 0.12);
  backdrop-filter: blur(18px);
}

.research-feature::after {
  position: absolute;
  right: -42px;
  bottom: -46px;
  width: 180px;
  height: 180px;
  content: "";
  border: 1px solid rgba(17, 106, 101, 0.24);
  transform: rotate(45deg);
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.paper-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(185, 70, 45, 0.34);
  border-radius: 999px;
  background: rgba(185, 70, 45, 0.1);
  color: var(--accent);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.research-feature h3 {
  max-width: 740px;
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.02;
}

.research-feature p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.research-feature .authors {
  margin-bottom: 24px;
  color: var(--accent-2);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.94rem;
  font-weight: 800;
}

.research-feature .tldr {
  padding-left: 18px;
  margin-bottom: 20px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: 1.06rem;
}

.paper-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.blog-panel {
  padding-right: clamp(18px, 4vw, 54px);
  padding-left: clamp(18px, 4vw, 54px);
  border: 1px solid var(--line);
  border-radius: 40px;
  background: rgba(255, 250, 241, 0.45);
  box-shadow: var(--shadow);
}

.post-list {
  margin-top: 36px;
}

.creation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 36px;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 24px;
  border-radius: 28px;
}

.creations-panel {
  padding-right: clamp(18px, 4vw, 54px);
  padding-left: clamp(18px, 4vw, 54px);
}

.creation-card {
  min-height: 260px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-family: "Avenir Next", Avenir, sans-serif;
}

.markdown-detail {
  margin-top: 20px;
}

.markdown-detail summary {
  width: fit-content;
  cursor: pointer;
  color: var(--accent);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
}

.markdown-body {
  max-width: 720px;
  padding-top: 22px;
  color: var(--ink);
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 28px 0 12px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.markdown-body h2 {
  scroll-margin-top: 120px;
}

.markdown-body p,
.markdown-body li,
.markdown-body blockquote {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}

.markdown-body ul {
  padding-left: 20px;
}

.markdown-body ol {
  padding-left: 22px;
}

.markdown-body a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-body code {
  padding: 0.12em 0.32em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.72);
  color: var(--ink);
  font-size: 0.92em;
}

.markdown-body pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(24, 23, 19, 0.06);
}

.markdown-body .math-block {
  max-width: 100%;
  margin: 28px 0;
  overflow-x: auto;
  color: var(--ink);
}

.markdown-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.markdown-body blockquote {
  padding-left: 18px;
  margin-left: 0;
  border-left: 3px solid var(--accent-2);
}

.article-page {
  background:
    radial-gradient(circle at 12% 0%, rgba(185, 70, 45, 0.08), transparent 32rem),
    radial-gradient(circle at 86% 6%, rgba(17, 106, 101, 0.08), transparent 30rem),
    linear-gradient(180deg, #f7f4ed, #eee9df);
}

.article-page::before {
  opacity: 0.18;
  mask-image: linear-gradient(to bottom, #000, transparent 58%);
}

.article-topbar {
  display: flex;
  justify-content: space-between;
  width: min(1260px, calc(100% - 40px));
  padding: 24px 0;
  margin: 0 auto;
  color: var(--muted);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.article-topbar a:hover,
.article-toc a:hover {
  color: var(--ink);
}

.article-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  gap: clamp(34px, 7vw, 96px);
  align-items: start;
  width: min(1260px, calc(100% - 40px));
  padding: 58px 0 110px;
  margin: 0 auto;
}

.article-toc {
  position: sticky;
  top: 28px;
  padding-top: 10px;
  color: var(--muted);
  font-family: "Avenir Next", Avenir, sans-serif;
}

.article-toc p {
  margin-bottom: 18px;
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-toc nav {
  display: grid;
  gap: 10px;
}

.toc-link,
.toc-empty {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.toc-link.depth-2 {
  padding-left: 12px;
}

.toc-link.depth-3,
.toc-link.depth-4 {
  padding-left: 22px;
}

.article-content {
  min-width: 0;
}

.article-kicker {
  margin-bottom: 18px;
  color: var(--accent);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-content h1 {
  max-width: 860px;
  margin-bottom: 24px;
  font-size: clamp(3.1rem, 7vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.article-summary {
  max-width: 720px;
  margin-bottom: 54px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.32rem);
  line-height: 1.7;
}

.article-markdown {
  max-width: 760px;
  padding-top: 0;
}

.article-markdown h2 {
  margin-top: 58px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(1.75rem, 2.5vw, 2.45rem);
  line-height: 1.08;
}

.article-markdown h3,
.article-markdown h4,
.article-markdown h5 {
  margin-top: 38px;
  margin-bottom: 14px;
  color: var(--ink);
}

.article-markdown p,
.article-markdown li {
  color: #4e493f;
  font-size: 1.08rem;
  line-height: 1.86;
}

.article-markdown p {
  margin-bottom: 22px;
}

.article-markdown blockquote {
  padding: 20px 0 20px 24px;
  margin: 34px 0;
  border-left: 3px solid var(--accent);
  color: var(--ink);
}

.article-markdown blockquote p {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.7;
}

.article-markdown .MathJax,
.article-markdown mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: "Avenir Next", Avenir, sans-serif;
  white-space: nowrap;
}

.project-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.project-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.54);
  color: var(--muted);
  font-family: "Avenir Next", Avenir, sans-serif;
  font-weight: 700;
}

.footer {
  justify-content: space-between;
  gap: 28px;
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.footer h2 {
  max-width: 820px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  main {
    width: min(100% - 24px, 720px);
  }

  .hero {
    padding-top: 16px;
  }

  .nav {
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 52px;
    border-radius: 26px;
  }

  .hero-grid,
  .grid-two,
  .post-card,
  .creation-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    gap: 18px;
  }

  .grid-two,
  .footer {
    align-items: start;
  }

  .hero-copy {
    padding-bottom: 10px;
  }

  .hero-copy h1 {
    font-size: clamp(4rem, 22vw, 6.8rem);
  }

  .hero-art {
    min-height: 430px;
    order: 2;
  }

  .hero-art::before {
    right: 50%;
    bottom: 6px;
    width: min(600px, 112vw);
    height: 500px;
    transform: translateX(52%);
  }

  .hero-art::after {
    right: -40px;
    bottom: 52px;
  }

  .section {
    padding: 74px 0;
  }

  .section-heading,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  time {
    white-space: normal;
  }

  .article-topbar {
    width: min(100% - 28px, 720px);
  }

  .article-shell {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 720px);
    padding-top: 28px;
  }

  .article-toc {
    position: static;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

  .article-toc nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-content h1 {
    font-size: clamp(2.7rem, 16vw, 4.8rem);
  }
}
