/* Notes (/notes/): the list of notes and each note's page.
   Builds on style.css: same color tokens, tiles, labels and chips as the homepage. */

.notes-wrap { display: flex; flex-direction: column; gap: 24px; padding-block: 40px 12px; }
.notes-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.notes-head > div { display: flex; flex-direction: column; gap: 14px; max-width: 660px; }
.notes-head h1 { font-size: clamp(2.3rem, 1.5rem + 3.2vw, 3.8rem); font-weight: 700; line-height: 1.02; }
.notes-head h1 span { color: var(--amber-text); background: linear-gradient(90deg, var(--amber-text), var(--coral) 60%, var(--lilac)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.notes-head p { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }

.rss-btn, .tag-btn { font: 700 .88rem var(--f-body); min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--tile-2); color: var(--ink); text-decoration: none; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.rss-btn:hover { border-color: var(--amber); color: var(--amber-text); }
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-filter[hidden] { display: none; }
.tag-btn { color: var(--muted); }
.tag-btn:hover { color: var(--ink); border-color: var(--amber); }
.tag-btn[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }

/* Cards on the list */
a.tile { color: inherit; text-decoration: none; }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 600 .85rem var(--f-body); color: var(--muted); }
.note-badge { font: 700 .75rem var(--f-body); padding: 4px 11px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); }
.note-badge.draft { background: color-mix(in srgb, var(--lilac) 20%, transparent); color: var(--lilac); }
.note-read { font: 700 .88rem var(--f-body); color: var(--amber-text); }

.note-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 30px; }
.note-feature:not(:has(.note-peek)) { grid-template-columns: minmax(0, 1fr); }
.note-feature-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.note-feature h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); font-weight: 700; }
.note-feature p { color: var(--muted); font-size: 1.05rem; max-width: 54ch; }
.note-peek { min-width: 0; }
.note-peek .code { margin: 0; }
@media (max-width: 820px) { .note-feature { grid-template-columns: minmax(0, 1fr); padding: 24px; } }

.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.note-card { display: flex; flex-direction: column; gap: 12px; }
.note-card h3 { font-size: 1.4rem; }
.note-card p { color: var(--muted); font-size: .97rem; }
.note-card .chips { margin-top: auto; }
.note-drafts { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.note-empty { display: flex; flex-direction: column; gap: 10px; }
.note-empty h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.note-empty p, .note-none { color: var(--muted); }
[data-hide] { display: none !important; }

/* One note */
.note { max-width: 800px; padding-block: 28px 12px; }
.note-back { display: inline-flex; align-items: center; min-height: 44px; font: 700 .9rem var(--f-body); text-decoration: none; }
.note-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.note-head { display: flex; flex-direction: column; gap: 18px; padding: 10px 0 30px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.note-head h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.2rem); font-weight: 700; line-height: 1.05; }
.note-dek { font-size: 1.22rem; color: var(--muted); }
.note-byline { display: flex; align-items: center; gap: 12px; font: 600 .92rem var(--f-body); color: var(--muted); }
.note-byline b { color: var(--ink); }
.note-byline .avatar { width: 40px; height: 40px; border-radius: 14px; font-size: 1.1rem; flex: none; }

.prose { font-size: 1.12rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.75rem; font-weight: 700; margin-top: 1.8em; scroll-margin-top: 80px; }
.prose h3 { font-size: 1.3rem; margin-top: 1.5em; scroll-margin-top: 80px; }
.prose h4 { font: 700 1rem var(--f-body); margin-top: 1.4em; }
.prose a { text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--amber-text); }
.prose :not(pre) > code { background: var(--tile-2); padding: 2px 6px; border-radius: 6px; font-size: .86em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.prose blockquote { margin-inline: 0; padding: 16px 18px; border-radius: var(--r-sm); background: var(--tile-2); font-size: 1rem; }
.prose blockquote > * + * { margin-top: .5em; }
.prose blockquote strong:first-child { display: block; font: 600 .78rem var(--f-display); text-transform: uppercase; letter-spacing: .06em; color: var(--amber-text); }
.prose figure.img { margin-inline: 0; }
.prose figure.img img { display: block; max-width: 100%; height: auto; border-radius: var(--r-sm); }
.prose figure.img figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); }

/* Code blocks (list and note) */
.code { margin: 0; background: var(--code-bg); border-radius: var(--r-sm); overflow: hidden; }
.code figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; font: 500 .78rem var(--f-mono); color: var(--code-dim); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.code-copy { font: 700 .74rem var(--f-body); min-height: 30px; border: 0; border-radius: 999px; padding: 0 12px; background: rgba(255, 255, 255, .08); color: var(--code-fg); cursor: pointer; }
.code-copy:hover { background: rgba(255, 255, 255, .14); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: .84rem/1.7 var(--f-mono); color: var(--code-fg); tab-size: 2; }
.note-peek pre { font-size: .78rem; max-height: 240px; overflow: hidden; }

/* End of a note */
.note-project { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 48px; }
.note-project .proj-icon { width: 54px; height: 54px; border-radius: 18px; }
.note-project-main { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.note-project-main h3 { font-size: 1.4rem; }
.note-project-main p { color: var(--muted); font-size: .97rem; }
.note-project .proj-links { width: 100%; }
.note-hi { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; }
.note-project + .note-hi { margin-top: 14px; }
.note:not(:has(.note-project)) .note-hi { margin-top: 48px; }
.note-hi h3 { font-size: 1.3rem; }
.note-hi p { color: var(--muted); font-size: .97rem; margin-top: 4px; }
.note-hi-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.note-hi-mail a { font: 700 1.05rem var(--f-display); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.note-hi-mail a:hover { color: var(--amber-text); }
.btn-copy { min-height: 44px; }
.note-pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; margin-top: 36px; }
.note-pager a { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; }
.note-pager span { font: 600 .82rem var(--f-body); color: var(--muted); }
.note-pager b { font: 600 1.1rem var(--f-display); }
.note-pager .next { text-align: right; }

/* Current section in the nav */
.nav-links a[aria-current="page"] { color: var(--amber-ink); background: var(--amber); }
