/* idea — dual-column feed: lined / receipt / textbook / card */

:root {
  --ink: #241f1a;
  --ink-nav: #f4f6fa;
  --ink-soft: rgba(244, 246, 250, 0.72);
  --ballpoint: #1e5aa8;
  --line: rgba(244, 246, 250, 0.18);
  --font-display: "ZCOOL XiaoWei", "Songti SC", "Noto Serif SC", serif;
  --font-body: "Noto Serif SC", "Songti SC", serif;
  --font-book: "Source Serif 4", "Noto Serif SC", "Songti SC", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-sans: "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
  --pad: clamp(0.85rem, 2.8vw, 1.6rem);
  --max: 44rem;
  --gap: 0.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-nav);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.7;
  background: #0b2740;
  overflow-x: hidden;
}

.desk__photo {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(6, 24, 40, 0.14) 0%,
    rgba(6, 24, 40, 0.04) 40%,
    rgba(6, 24, 40, 0.16) 100%
  );
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  width: min(100% - var(--pad) * 2, var(--max));
  margin-inline: auto;
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, #071a2c 55%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.2rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.nav__mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.2rem;
}

.nav__brand-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.nav__links a.is-active {
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.nav__links a:hover {
  color: #fff;
}

/* desk column: todo + feed share one centered width */
.desk__col {
  position: relative;
  z-index: 10;
}

/* —— todo pad：蓝圆珠笔正文，红笔划重点 —— */
.todo {
  position: relative;
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 1.15rem;
  padding: 0.85rem 0.95rem 0.95rem;
  background-color: rgba(255, 255, 255, 0.72);
  background-image:
    linear-gradient(rgba(190, 210, 230, 0.45) 1px, transparent 1px),
    linear-gradient(
      90deg,
      transparent 1.55rem,
      rgba(200, 55, 55, 0.38) 1.55rem,
      rgba(200, 55, 55, 0.38) calc(1.55rem + 1.2px),
      transparent calc(1.55rem + 1.2px)
    );
  background-size: 100% 1.55rem, 100% 100%;
  background-position: 0 0.35rem, 0 0;
  backdrop-filter: blur(2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 10px 22px rgba(8, 20, 36, 0.22);
  color: var(--ballpoint);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.55rem;
}

.todo__label {
  margin: 0 0 0.55rem 1.85rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ballpoint) 55%, #8a4a4a);
}

.todo__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.todo__item + .todo__item {
  margin-top: 0.15rem;
  border-top: 1px dashed rgba(30, 90, 168, 0.18);
  padding-top: 0.15rem;
}

.todo__head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.2rem 0.15rem 0.2rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.todo__head:hover .todo__title {
  text-decoration: underline;
  text-decoration-color: rgba(30, 90, 168, 0.35);
  text-underline-offset: 0.18em;
}

.todo__check {
  flex: 0 0 auto;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.28rem;
  margin-left: 0.15rem;
  border: 1.5px solid color-mix(in srgb, var(--ballpoint) 75%, #fff);
  border-radius: 0.12rem;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(30, 90, 168, 0.06);
}

.todo__item.is-open .todo__check,
.todo__item[data-status="done"] .todo__check {
  background:
    linear-gradient(
      135deg,
      transparent 42%,
      #c0392b 42%,
      #c0392b 58%,
      transparent 58%
    ),
    rgba(255, 248, 245, 0.9);
  border-color: #c0392b;
}

.todo__title {
  flex: 1 1 auto;
  padding-top: 0.12rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.todo__meta {
  flex: 0 0 auto;
  margin-top: 0.22rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--ballpoint) 55%, #9a6a6a);
  white-space: nowrap;
}

.todo__panel {
  display: none;
  margin: 0.15rem 0 0.45rem 1.85rem;
  padding: 0.35rem 0.15rem 0.55rem 0;
}

.todo__item.is-open .todo__panel {
  display: block;
}

.todo-article {
  color: var(--ballpoint);
}

.todo-article p {
  margin: 0;
}

.todo-article p + p {
  margin-top: 0.55rem;
}

.todo-article h2,
.todo-article h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.35;
  color: #b91c1c;
}

.todo-article strong {
  color: #c0392b;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(192, 57, 43, 0.45);
  text-underline-offset: 0.12em;
  text-decoration-thickness: 1.5px;
}

.todo-article ul,
.todo-article ol {
  margin: 0.45rem 0;
  padding-left: 1.1rem;
}

.todo-article li {
  margin: 0.25rem 0;
}

.todo-article code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.05em 0.22em;
  background: rgba(30, 90, 168, 0.08);
  border-radius: 0.12rem;
  color: #184a8c;
}

.todo-article pre {
  margin: 0.55rem 0;
  padding: 0.55rem 0.65rem;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed rgba(30, 90, 168, 0.28);
  border-radius: 0.12rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  color: #1a4a8a;
  white-space: pre-wrap;
}

/* dual-column feed (xhs-like) */
.desk {
  padding: 1rem 0 2.5rem;
}

.feed {
  column-count: 2;
  column-gap: var(--gap);
}

.feed__empty {
  color: var(--ink-soft);
}

.scrap {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 var(--gap);
  padding: 0.9rem 0.95rem 1rem;
  color: var(--ink);
  vertical-align: top;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 8px 18px rgba(8, 20, 36, 0.22);
}

.scrap__date {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.scrap__body p {
  margin: 0;
}

.scrap__body p + p {
  margin-top: 0.55rem;
}

.scrap__body a {
  border-bottom: 1px solid currentColor;
}

.scrap__body h2,
.scrap__body h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.3;
}

.scrap__body blockquote {
  margin: 0.55rem 0;
  padding: 0.3rem 0 0.3rem 0.7rem;
  border-left: 2px solid rgba(36, 31, 26, 0.28);
  color: rgba(36, 31, 26, 0.82);
}

.scrap__body ol,
.scrap__body ul {
  margin: 0.5rem 0;
  padding-left: 1.15rem;
}

.scrap__body li {
  margin: 0.3rem 0;
}

.scrap__body li + li {
  margin-top: 0.35rem;
}

.scrap__body hr {
  border: 0;
  border-top: 1px dashed rgba(36, 31, 26, 0.28);
  margin: 0.7rem 0;
}

.scrap__body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.05em 0.25em;
  background: rgba(36, 31, 26, 0.06);
  border-radius: 0.15rem;
}

/* —— lined: 横线本 + 圆珠笔蓝 —— */
.scrap--lined {
  background-color: #f7f3e8;
  background-image:
    linear-gradient(#d7e4f0 1px, transparent 1px),
    linear-gradient(
      90deg,
      transparent 1.7rem,
      rgba(220, 90, 90, 0.35) 1.7rem,
      rgba(220, 90, 90, 0.35) calc(1.7rem + 1px),
      transparent calc(1.7rem + 1px)
    );
  background-size: 100% 1.55rem, 100% 100%;
  background-position: 0 2rem, 0 0;
  padding: 0.95rem 0.9rem 1.05rem 2.1rem;
  color: var(--ballpoint);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.55rem;
}

.scrap--lined .scrap__date {
  color: color-mix(in srgb, var(--ballpoint) 70%, #6a7588);
}

.scrap--lined .scrap__body a {
  color: var(--ballpoint);
}

/* —— receipt —— */
.scrap--receipt {
  background: repeating-linear-gradient(
    180deg,
    #f4f1e8 0 2px,
    #efebe1 2px 3px
  );
  border-radius: 0.1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.5;
  color: #2c2a26;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 8px 16px rgba(8, 20, 36, 0.18);
}

.scrap--receipt .scrap__date {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.22);
  padding-bottom: 0.35rem;
  margin-bottom: 0.45rem;
}

/* —— textbook: cool paper against ocean blue —— */
.scrap--textbook {
  background:
    linear-gradient(90deg, rgba(30, 90, 140, 0.08), transparent 0.95rem),
    linear-gradient(180deg, #f3f7fb 0%, #e4eef6 100%);
  border: 1px solid rgba(40, 90, 130, 0.14);
  border-radius: 0.08rem 0.28rem 0.28rem 0.08rem;
  box-shadow:
    -4px 0 0 rgba(35, 95, 145, 0.12),
    0 10px 20px rgba(8, 20, 36, 0.22);
  font-family: var(--font-book);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #1c2b3a;
}

.scrap--textbook .scrap__date {
  color: #5a7388;
}

.scrap--textbook .scrap__body > p:first-child,
.scrap--textbook .scrap__body > h2:first-child {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.55rem;
  color: #152433;
}

.scrap--textbook .scrap__body blockquote {
  background: rgba(30, 90, 140, 0.06);
  border-left-color: rgba(30, 100, 160, 0.4);
  color: #2a4054;
  padding: 0.4rem 0.55rem 0.4rem 0.7rem;
  border-radius: 0 0.15rem 0.15rem 0;
}

/* —— card: 名片 —— */
.scrap--card {
  padding: 1.05rem 1.05rem 1.1rem;
  background:
    linear-gradient(135deg, #fbfaf6 0%, #f0ebe1 100%);
  border: 1px solid rgba(40, 35, 28, 0.14);
  border-radius: 0.2rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 10px 22px rgba(8, 20, 36, 0.2);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #2a261f;
}

.scrap--card .scrap__date {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

.scrap--card .scrap__body > h2:first-child {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: #1a1814;
}

.scrap--card .scrap__body hr {
  border-top: 1px solid rgba(40, 35, 28, 0.16);
  margin: 0.75rem 0;
}

.scrap--card .scrap__body p {
  color: #3a352c;
}

/* Instagram chip */
.link-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0;
  padding: 0.28rem 0.65rem 0.28rem 0.45rem;
  border: 1px solid rgba(36, 31, 26, 0.1);
  border-radius: 999px;
  background: linear-gradient(135deg, #faf7f2 0%, #f3e9f0 55%, #eaf2fa 100%);
  color: #1f1a18 !important;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
  vertical-align: middle;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.link-ig:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 6px 14px rgba(8, 20, 36, 0.12);
}

.link-ig__icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}

.scrap--card .link-ig {
  margin-top: 0.35rem;
}

/* footer */
.foot {
  position: relative;
  z-index: 20;
  padding: 0.9rem 0 1.3rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: color-mix(in srgb, #071a2c 40%, transparent);
}

.foot__inner {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.foot a:hover {
  color: #fff;
}

@media (max-width: 40rem) {
  .nav__brand-text {
    display: none;
  }

  .todo {
    padding: 0.7rem 0.7rem 0.8rem;
    font-size: 0.84rem;
    line-height: 1.4rem;
    background-size: 100% 1.4rem, 100% 100%;
  }

  .todo__label,
  .todo__panel {
    margin-left: 1.45rem;
  }

  .feed {
    column-count: 2;
    column-gap: 0.55rem;
  }

  :root {
    --gap: 0.55rem;
  }

  .scrap {
    padding: 0.75rem 0.7rem 0.85rem;
  }

  .scrap--lined {
    padding-left: 1.65rem;
    font-size: 0.84rem;
    line-height: 1.4rem;
    background-size: 100% 1.4rem, 100% 100%;
  }

  .scrap--card .scrap__body > h2:first-child {
    font-size: 1.25rem;
  }
}

@media (min-width: 52rem) {
  :root {
    --max: 48rem;
    --gap: 0.9rem;
  }
}
