/* About page — a responsive reading surface inspired by Apple Notes. */
:root {
  --notes-yellow: #f5b900;
  --notes-yellow-soft: #fff3bd;
  --notes-window: #fff;
  --notes-toolbar: rgba(246, 246, 247, .96);
  --notes-sidebar: #ececef;
  --notes-list: #f7f7f8;
  --notes-paper: #fff;
  --notes-selected: #ffd85e;
  --notes-selected-text: #1c1c1e;
  --notes-rule: rgba(60, 60, 67, .14);
  --notes-secondary: #636369;   /* 4.5:1 or better on the sidebars */
  --notes-link: #805700;
  --notes-shadow: 0 28px 80px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
}

:root[data-theme="dark"] {
  --notes-window: #1c1c1e;
  --notes-toolbar: rgba(44, 44, 46, .96);
  --notes-sidebar: #242426;
  --notes-list: #1c1c1e;
  --notes-paper: #151517;
  --notes-selected: #6c5712;
  --notes-selected-text: #fff;
  --notes-yellow-soft: #443a18;
  --notes-rule: rgba(255, 255, 255, .12);
  --notes-secondary: #a3a3aa;
  --notes-link: #ffd24a;
  --notes-shadow: 0 30px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .07);
}

.notes-body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 18% 16%, rgba(245, 185, 0, .13), transparent 26rem),
    radial-gradient(circle at 85% 90%, rgba(47, 208, 138, .08), transparent 28rem),
    var(--bg);
  font-family: var(--font-system);
}

.notes-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 110px 24px 32px;
}

.notes-window {
  height: calc(100dvh - 142px);
  min-height: 650px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--notes-window);
  border: 1px solid var(--notes-rule);
  border-radius: 20px;
  box-shadow: var(--notes-shadow);
}

.notes-titlebar {
  position: relative;
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  background: var(--notes-toolbar);
  border-bottom: 1px solid var(--notes-rule);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.window-lights {
  position: absolute;
  left: 16px;
  display: flex;
  gap: 8px;
}

.window-lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.window-lights span:nth-child(2) { background: #febc2e; }
.window-lights span:nth-child(3) { background: #28c840; }

.notes-app-title {
  grid-column: 2;
  font-size: 14px;
  font-weight: 600;
}

.notes-titlebar-actions {
  grid-column: 1;
  display: flex;
  gap: 8px;
  margin-left: 82px;
}

.notes-titlebar-actions--right {
  grid-column: 3;
  justify-content: flex-end;
  margin: 0;
}

.notes-tool {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.notes-tool:hover { background: var(--notes-rule); }
.notes-tool:focus-visible { outline: 2px solid var(--notes-yellow); outline-offset: 1px; }
.notes-tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notes-compose { color: var(--notes-yellow); }

.notes-workspace {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 220px 310px minmax(0, 1fr);
}

.notes-folders,
.notes-list,
.note-editor {
  min-height: 0;
  overflow-y: auto;
}

.notes-folders {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 10px 12px;
  background: var(--notes-sidebar);
  border-right: 1px solid var(--notes-rule);
}

.notes-sidebar-label {
  margin: 0 10px 7px;
  color: var(--notes-secondary);
  font-size: 12px;
  font-weight: 600;
}

.notes-sidebar-label--spaced { margin-top: 26px; }

.folder-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
}

.folder-row.is-selected { background: var(--notes-selected); color: var(--notes-selected-text); }
.folder-icon { width: 20px; height: 20px; color: #bd8700; }
.folder-row.is-selected .folder-icon { color: #7b5700; }
:root[data-theme="dark"] .folder-row.is-selected .folder-icon { color: #ffd34f; }
.folder-icon--muted { color: var(--notes-secondary); }
.folder-icon svg { width: 100%; height: 100%; fill: currentColor; }
.folder-count { margin-left: auto; color: var(--notes-secondary); font-size: 12px; }
.folder-row.is-selected .folder-count { color: inherit; opacity: .6; }

.notes-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 9px 2px;
  border-top: 1px solid var(--notes-rule);
}

.notes-account img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.notes-account span { display: flex; flex-direction: column; min-width: 0; }
.notes-account strong { font-size: 12px; font-weight: 600; }
.notes-account small { color: var(--notes-secondary); font-size: 11px; }

.notes-list {
  padding: 16px 10px;
  background: var(--notes-list);
  border-right: 1px solid var(--notes-rule);
}

.notes-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 10px 13px;
}

.notes-list-title { font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.notes-list-heading span { color: var(--notes-secondary); font-size: 11px; }

.note-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 11px;
  border: 0;
  border-radius: 9px;
  border-bottom: 1px solid var(--notes-rule);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.note-row:last-child { border-bottom-color: transparent; }
.note-row:hover { background: var(--notes-rule); }
.note-row.is-selected { background: var(--notes-selected); color: var(--notes-selected-text); border-bottom-color: transparent; }
.note-row:focus-visible { outline: 2px solid var(--notes-yellow); outline-offset: -2px; }
.note-row strong { font-size: 14px; line-height: 1.25; }
.note-row span {
  overflow: hidden;
  color: var(--notes-secondary);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.note-row.is-selected span { color: inherit; opacity: .85; }
.note-row--draft strong::before { content: "✎"; margin-right: 7px; color: var(--notes-link); }

.note-editor {
  scroll-behavior: smooth;
  background: var(--notes-paper);
  color: var(--text);
  scrollbar-color: var(--notes-rule) transparent;
}

.note-editor:focus-visible { outline: 2px solid var(--notes-yellow); outline-offset: -2px; }

.note-document {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 32px clamp(28px, 5vw, 74px) 64px;
}

.note-document[hidden],
.note-draft[hidden],
.note-row[hidden] { display: none !important; }

.note-draft {
  width: min(100%, 780px);
  min-height: 100%;
  margin: 0 auto;
  padding: 28px clamp(28px, 5vw, 74px) 32px;
  display: flex;
  flex-direction: column;
}

.draft-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  color: var(--notes-secondary);
  font-size: 12px;
}

.draft-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px 5px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--notes-link);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.draft-back:hover { background: var(--notes-rule); }
.draft-back:focus-visible { outline: 2px solid var(--notes-yellow); outline-offset: 1px; }
.draft-back span { font-size: 25px; font-weight: 400; line-height: 14px; }

.draft-title {
  width: 100%;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--notes-rule);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 700 clamp(30px, 4vw, 42px)/1.2 var(--font-system);
  letter-spacing: -.025em;
}

.draft-title::placeholder { color: var(--notes-secondary); opacity: .65; }
.draft-title:focus { border-bottom-color: var(--notes-yellow); }

.draft-body {
  flex: 1;
  min-height: 420px;
  padding: 22px 0 40px;
  outline: 0;
  color: var(--body-text);
  caret-color: var(--notes-yellow);
  font-size: 17px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.draft-body:empty::before { content: attr(data-placeholder); color: var(--notes-secondary); opacity: .65; pointer-events: none; }
.draft-body:focus-visible { box-shadow: inset 3px 0 0 var(--notes-yellow); padding-left: 14px; }

.draft-disclaimer {
  padding-top: 14px;
  border-top: 1px solid var(--notes-rule);
  color: var(--notes-secondary);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.note-date {
  margin-bottom: 28px;
  color: var(--notes-secondary);
  font-size: 12px;
  text-align: center;
}

.note-section {
  scroll-margin-top: 28px;
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--notes-rule);
}

.note-section:first-of-type { padding-top: 0; }
.note-section h2 { margin-bottom: 17px; font-size: 28px; line-height: 1.15; letter-spacing: -.025em; }
.note-section p { margin-top: 15px; color: var(--body-text); font-size: 17px; line-height: 1.72; }
.note-section a, .note-footer a { color: var(--notes-link); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.note-section a:hover, .note-footer a:hover { text-decoration-color: currentColor; }
.note-section a:focus-visible, .note-footer a:focus-visible { outline: 2px solid var(--notes-yellow); outline-offset: 2px; border-radius: 2px; }

.note-profile { display: flex; align-items: center; gap: 20px; }
.note-profile img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  image-rendering: pixelated;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.note-profile h1 { margin: 2px 0 0; font-size: clamp(34px, 5vw, 50px); line-height: 1.1; letter-spacing: -.035em; }
.note-section .note-eyebrow { margin: 0; color: var(--notes-secondary); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.note-section .note-lede { color: var(--text); font-size: 20px; line-height: 1.55; }

blockquote {
  position: relative;
  margin-top: 24px;
  padding: 20px 22px 20px 26px;
  overflow: hidden;
  border-radius: 4px 14px 14px 4px;
  background: var(--notes-yellow-soft);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
}

blockquote::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--notes-yellow);
}

.interest-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 23px; }
.interest-tags span { padding: 7px 11px; border-radius: 7px; background: #ddebff; color: #23578b; font-size: 14px; font-weight: 600; }
.interest-tags span:nth-child(2) { background: #ebddff; color: #65408c; }
.interest-tags span:nth-child(3) { background: #d9f3df; color: #28723b; }
.interest-tags span:nth-child(4) { background: #fff1b8; color: #775900; }
:root[data-theme="dark"] .interest-tags span { background: #234f78; color: #fff; }
:root[data-theme="dark"] .interest-tags span:nth-child(2) { background: #56386d; }
:root[data-theme="dark"] .interest-tags span:nth-child(3) { background: #285d3a; }
:root[data-theme="dark"] .interest-tags span:nth-child(4) { background: #685313; }

.notes-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.notes-checklist li { display: flex; align-items: center; gap: 10px; min-height: 34px; font-size: 16px; }
.notes-checklist span {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--notes-yellow);
  border-radius: 50%;
  background: var(--notes-yellow);
  color: #3b2a00;
  font-size: 12px;
  font-weight: 800;
}

.note-footer { padding: 40px 0 8px; text-align: center; }
.note-footer > span { color: var(--notes-yellow); font-size: 22px; }
.note-footer p { margin: 7px 0 4px; color: var(--notes-secondary); font-size: 14px; }
.note-footer a { font-size: 14px; }

/* Hiding the sidebars (toolbar button, about.js): their columns shrink to nothing, so they slide
   out to the left and fade while the note widens, like Notes on a Mac. Each sidebar keeps its
   width and sits at the right of its shrinking column, so its text doesn't squash as it goes.
   Once hidden they're "visibility: hidden", so keyboard and screen readers skip them too. */
@media (min-width: 981px) {
  .notes-workspace { transition: grid-template-columns .4s cubic-bezier(.3, .7, .2, 1); }
  .notes-folders { width: 220px; justify-self: end; }
  .notes-list { width: 310px; justify-self: end; }
  .notes-folders,
  .notes-list { transition: opacity .3s ease, visibility 0s linear 0s; }
  .notes-window.is-sidebar-hidden .notes-workspace { grid-template-columns: 0px 0px minmax(0, 1fr); }
  .notes-window.is-sidebar-hidden .notes-folders,
  .notes-window.is-sidebar-hidden .notes-list {
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease-in, visibility 0s linear .4s;   /* fades with the slide, then hidden */
  }
}

@media (max-width: 980px) {
  .notes-workspace { grid-template-columns: 260px minmax(0, 1fr); }
  .notes-folders { display: none; }
  .notes-sidebar-toggle { display: none; }
  .notes-titlebar-actions { margin-left: 0; }
}

@media (max-width: 700px) {
  .notes-page { padding: 88px 0 0; }
  .notes-window { height: auto; min-height: calc(100dvh - 88px); border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
  .notes-titlebar { min-height: 48px; }
  .window-lights, .notes-list { display: none; }
  .notes-workspace { display: block; }
  .note-editor { overflow: visible; }
  .note-document, .note-draft { padding: 25px 22px 50px; }
  .note-draft { min-height: calc(100dvh - 137px); }
  .draft-meta { margin-bottom: 30px; }
  .draft-body { min-height: 55vh; font-size: 16px; }
  .note-date { margin-bottom: 23px; }
  .note-section { scroll-margin-top: 72px; }
  .note-section h2 { font-size: 25px; }
  .note-section p { font-size: 16px; line-height: 1.68; }
  .note-section .note-lede { font-size: 18px; }
  .note-profile { gap: 15px; }
  .note-profile img { width: 76px; height: 76px; border-radius: 18px; }
  .note-profile h1 { font-size: 34px; }
  blockquote { font-size: 18px; }
}

@media (max-width: 460px) {
  .notes-checklist { grid-template-columns: 1fr; }
  .note-profile h1 { font-size: 30px; }
  .note-section .note-eyebrow { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .note-editor { scroll-behavior: auto; }
  .notes-workspace, .notes-folders, .notes-list { transition: none !important; }
}
