:root {
  --text: rgb(55, 53, 47);
  --muted: rgba(55, 53, 47, 0.65);
  --border: rgba(55, 53, 47, 0.16);
  --bg: #ffffff;
  --hover: rgba(55, 53, 47, 0.06);
  --blue: rgb(231, 243, 248);
  --red: rgb(253, 235, 236);
  --yellow: rgb(251, 243, 219);
  --gray: rgb(241, 241, 239);
  --orange: rgb(250, 235, 221);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(55, 53, 47, 0.35);
  text-underline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
}

.notion-page {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 76px 28px 48px;
}

h1 {
  margin: 0 0 28px;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  margin: 34px 0 8px;
  font-size: 1.55rem;
  line-height: 1.25;
}

h3 {
  margin: 26px 0 8px;
  font-size: 1.18rem;
}

p,
blockquote,
ul,
dl {
  margin: 8px 0;
}

blockquote {
  padding-left: 14px;
  border-left: 3px solid var(--text);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

footer {
  margin-top: 54px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.database {
  margin-top: 44px;
}

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

.gallery-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  background: white;
}

.gallery-card:hover {
  background: var(--hover);
}

.gallery-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.gallery-card h3 {
  margin: 12px 12px 4px;
  font-size: 1rem;
}

.gallery-card p {
  margin: 0 12px 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 14px;
}

.tags span {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--gray);
  color: var(--muted);
  font-size: 12px;
}

.project-page {
  margin-top: 90px;
  padding-top: 38px;
  border-top: 1px solid var(--border);
}

body.home-view .project-page {
  display: none;
}

body.project-view > .notion-page > blockquote,
body.project-view > .notion-page > h1,
body.project-view > .notion-page > p,
body.project-view .database,
body.project-view footer {
  display: none;
}

body.project-view .project-page {
  display: none;
}

body.project-view .project-page.is-active {
  display: block;
  margin-top: 0;
}

.properties {
  display: grid;
  gap: 0;
  margin: 16px 0 24px;
  border-top: 1px solid var(--border);
}

.properties div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

.notion-image,
.image-stack img,
.image-grid img {
  display: block;
  width: 100%;
  margin: 18px 0 24px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.notion-image {
  max-height: none;
  object-fit: contain;
}

.image-stack {
  display: grid;
  gap: 18px;
  margin: 18px 0 24px;
}

.image-stack img,
.image-grid img {
  margin: 0;
  object-fit: contain;
}

.image-grid {
  display: grid;
  gap: 14px;
  margin: 18px 0 24px;
}

.image-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.callout,
.image-note {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 4px;
}

.blue {
  background: var(--blue);
}

.red {
  background: var(--red);
}

.yellow {
  background: var(--yellow);
}

.gray {
  background: var(--gray);
}

.orange {
  background: var(--orange);
}

.image-note {
  border: 1px dashed var(--border);
  background: rgba(55, 53, 47, 0.03);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .topbar {
    display: block;
  }

  .topbar nav {
    margin-top: 8px;
  }

  .notion-page {
    padding: 54px 18px 36px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .image-grid.two {
    grid-template-columns: 1fr;
  }

  .properties div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
