/* ===== Ruby Chen — Notion-style site ===== */

:root {
  --text: #37352f;
  --muted: rgba(55, 53, 47, 0.65);
  --faint: rgba(55, 53, 47, 0.45);
  --border: rgba(55, 53, 47, 0.16);
  --hover: rgba(55, 53, 47, 0.04);
  --bg: #ffffff;
  --code-bg: rgba(135, 131, 120, 0.15);
  --code-text: #eb5757;
  --page: 900px;
  --content: 708px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

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

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: underline; text-decoration-color: rgba(55,53,47,.4); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--text); }

/* ----- Top bar ----- */
.topbar {
  max-width: var(--page);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.topbar a { text-decoration: none; color: var(--text); padding: 4px 8px; border-radius: 4px; }
.topbar a:hover { background: var(--hover); }
.topbar .home { font-weight: 600; margin-left: -8px; }
.crumbs { display: flex; align-items: center; min-width: 0; }
.crumbs .sep { color: var(--faint); margin: 0 2px; }
.crumbs .here { padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar nav { display: flex; gap: 4px; margin-right: -8px; }

/* ----- Page shells ----- */
.page { max-width: var(--page); margin: 0 auto; padding: 0 24px 80px; }
.content { max-width: var(--content); margin: 0 auto; }

h1 { font-size: 40px; font-weight: 700; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 1.5em; font-weight: 600; line-height: 1.3; margin: 32px 0 4px; }
h3 { font-size: 1.25em; font-weight: 600; line-height: 1.3; margin: 24px 0 4px; }
p { margin: 4px 0 8px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

/* ----- Home intro ----- */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0 24px;
}
.intro h1 { margin-bottom: 20px; }
.intro p { font-size: 18px; margin-bottom: 14px; }
.intro img { width: 100%; border-radius: 4px; }

/* ----- Gallery (Projects database) ----- */
.gallery-title {
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin: 32px 0 16px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: background .1s;
}
.card:hover { background: rgba(55,53,47,.03); }
.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: #f7f6f3;
}
.card-body { padding: 10px 12px 12px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 12px;
  line-height: 20px;
  padding: 0 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.tag.red    { background: #ffe2dd; color: #5d1715; }
.tag.yellow { background: #fdecc8; color: #402c1b; }
.tag.pink   { background: #f5e0e9; color: #4c2337; }
.tag.blue   { background: #d3e5ef; color: #183347; }

.contact { margin-top: 40px; }

/* ----- Project page ----- */
.cover {
  width: 100%;
  height: 30vh;
  min-height: 180px;
  max-height: 300px;
  object-fit: cover;
  background: #f7f6f3;
}
.page-head { padding-top: 40px; }
.page-head.has-icon { padding-top: 0; }
.page-icon { font-size: 72px; line-height: 1; margin: -42px 0 8px; position: relative; }
.back { font-size: 14px; color: var(--muted); text-decoration: none; display: inline-block; margin: 16px 0 0; }
.back:hover { color: var(--text); }
.props { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; font-size: 14px; color: var(--muted); align-items: center; }
.props a { color: var(--muted); }

figure { margin: 12px 0 16px; }
figure img, figure video { width: 100%; border-radius: 2px; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

.cols { display: flex; gap: 24px; margin: 4px 0; }
.cols > div { flex: 1 1 0; min-width: 0; }

.label {
  display: inline-block;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 85%;
  color: var(--code-text);
  background: var(--code-bg);
  padding: 2px 4px;
  border-radius: 4px;
  margin: 16px 0 4px;
}

ul { padding-left: 1.6em; margin: 4px 0 8px; }
li { margin: 2px 0; }

blockquote {
  margin: 8px 0;
  padding: 2px 14px;
  border-left: 3px solid currentColor;
  font-size: 1.1em;
}

.callout {
  display: flex;
  gap: 10px;
  padding: 16px 16px 16px 12px;
  background: rgba(241, 241, 239, 1);
  border-radius: 4px;
  margin: 8px 0;
}

.highlight-yellow { background: #fbf3db; }
.highlight-orange { background: #fbecdd; }

.bookmark {
  display: block;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  text-decoration: none;
  margin: 8px 0;
  font-size: 14px;
}
.bookmark:hover { background: var(--hover); }
.bookmark span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.video-embed { position: relative; aspect-ratio: 16 / 9; margin: 12px 0; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

details { margin: 8px 0; }
summary { cursor: pointer; padding: 2px 0; }
details > div { padding-left: 1.6em; }

.coming-soon { padding: 80px 0; color: var(--muted); }

/* ----- Mobile ----- */
@media (max-width: 700px) {
  h1 { font-size: 32px; }
  .intro { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .intro p { font-size: 17px; }
  .cols { flex-direction: column; gap: 0; }
  .page-icon { font-size: 56px; margin-top: -32px; }
  .gallery { grid-template-columns: 1fr; }
}

/* ----- Art page ----- */
.art-hero { padding: 40px 0 24px; }
.art-hero h1 { margin-bottom: 20px; }
.art-lede { font-size: 26px; margin: 0 0 20px; }
.start-btn {
  display: inline-block;
  background: #2f2f2f;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  padding: 10px 34px;
  border-radius: 6px;
}
.start-btn:hover { background: #000; }
.art-section-title { margin: 8px 0 24px; }
hr.short { width: 50%; margin: 64px auto; }
.artwork-main {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 40px;
  align-items: center;
}
.artwork-text h2 { font-weight: 400; font-size: 26px; margin: 0 0 12px; }
.artwork-text p { font-size: 15px; margin-bottom: 14px; }
.artwork-media img { width: 100%; }
.artwork-media .wide { width: 100%; }
.artwork-media .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.artwork-media .pair img { width: 100%; }
.iter-label { margin: 20px 0 10px; font-size: 15px; }
.iterations {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.iterations img { width: 100%; }
@media (max-width: 700px) {
  .art-lede { font-size: 22px; }
  .artwork-main { grid-template-columns: 1fr; gap: 16px; }
  .artwork-media { order: -1; }
  .iterations { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  hr.short { margin: 44px auto; }
}
