/* The notebook shares the portfolio palette, typography and theme preference. */
.blog-page { padding-bottom: 0; }
.blog-page [hidden] { display: none !important; }
.blog-page a:focus-visible, .blog-page button:not([data-theme-choice]):focus-visible, .blog-page input:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.blog-page .skip-link { z-index: 100; }
.blog-reading-progress { position: fixed; z-index: 50; inset: 0 0 auto; height: 2px; background: var(--accent-text); opacity: .7; pointer-events: none; transform: scaleX(var(--reading-progress, 0)); transform-origin: left; }
.blog-header, .blog-main, .blog-footer { width: min(100% - 84px, 1196px); margin-inline: auto; }
.blog-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.blog-nav { display: flex; gap: 28px; font-size: 13px; }
.blog-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.blog-nav a[aria-current] { color: var(--accent-text); }
.blog-nav a:hover, .blog-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.notebook-intro { display: grid; grid-template-columns: 1.65fr 1fr; gap: 64px; align-items: end; padding: 90px 0 60px; }
.notebook-intro h1 { max-width: 720px; margin: 0; font-size: clamp(54px, 5.5vw, 80px); }
.notebook-intro > p { max-width: 390px; margin: 0 0 6px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.notebook-intro-copy { max-width: 390px; margin-bottom: 6px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.notebook-intro-copy p { margin-bottom: 0; }
.notebook-intro-copy p:first-child { margin-bottom: 14px; color: var(--ink); font-weight: 500; }
.notebook-intro-copy a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.notebook-intro-copy p + p + p { margin-top: 14px; }
.notebook-intro-with-design { grid-template-columns: 1.2fr 1fr; gap: 24px 44px; align-items: center; padding-top: 64px; }
.notebook-intro-with-design h1 { font-size: clamp(48px, 5.1vw, 74px); }
.notebook-intro-heading { align-self: end; }
.notebook-intro-with-design .notebook-intro-copy { grid-column: 1; max-width: 490px; align-self: start; font-size: 14px; }
.design-loop { grid-column: 2; grid-row: 1 / span 2; min-width: 0; width: 100%; max-width: 540px; justify-self: center; }
.design-loop-scene { display: block; width: 100%; height: auto; overflow: visible; }
.design-grid-dot { fill: var(--line); }
.design-surface { fill: var(--paper); stroke: var(--line); stroke-width: 1.25; }
.design-rule, .design-sketch { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-linecap: round; }
.design-placeholder { fill: var(--line); }
.design-wire-box { fill: none; stroke: var(--line); stroke-width: 1.5; }
.design-small-text, .design-process-labels { fill: var(--muted); font: 10px "DM Mono", monospace; }
.design-connector, .design-connector-tip { fill: none; stroke: var(--accent-text); stroke-width: 1.5; stroke-linecap: round; }
.design-connector { stroke-dasharray: 4 5; }
.design-selection { fill: var(--paper); stroke: var(--accent-text); stroke-width: 1; }
.design-selection > rect { fill: none; }
.design-selection text { fill: var(--accent-text); stroke: none; font: 9px "DM Mono", monospace; }
.design-swatch-ink { fill: var(--ink); }
.design-swatch-blue { fill: var(--blue); }
.design-swatch-lime { fill: var(--lime); }
.design-palette-pick { fill: none; stroke: var(--accent-text); stroke-width: 1.25; }
.design-ui-heading { fill: var(--ink); font: 600 15px var(--display); letter-spacing: -.5px; }
.design-ui-copy { fill: var(--muted); font: 9px var(--body); }
.design-preview-tile { fill: color-mix(in srgb, var(--blue) 30%, var(--paper)); }
.design-art-circle { fill: var(--blue); }
.design-art-arch { fill: var(--ink); }
.design-prototype-button { transform-box: fill-box; transform-origin: center; }
.design-prototype-button rect { fill: var(--ink); }
.design-prototype-button text { fill: var(--paper); font: 500 10px var(--body); }
.design-note { transform: rotate(-5deg); transform-box: fill-box; transform-origin: center; }
.design-note rect { fill: var(--lime); }
.design-note text { fill: #18211e; font: 11px var(--body); }
.design-cursor { transform: translate(152px, 147px); }
.design-cursor path { fill: var(--accent-text); stroke: var(--paper); stroke-width: 1.5; stroke-linejoin: round; }
.design-cursor rect { fill: var(--accent-text); }
.design-cursor text { fill: var(--paper); font: 500 10px var(--body); }
.design-click { opacity: 0; transform-box: fill-box; transform-origin: center; }
.design-click circle { fill: none; stroke: var(--accent-text); stroke-width: 1.5; }
.design-loop-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font: 10px/1.5 "DM Mono", monospace; }
.design-loop-footer button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 132px; min-height: 44px; padding: 8px 4px; border: 0; color: var(--muted); background: transparent; font: inherit; cursor: pointer; }
.design-loop-footer button::before { width: 5px; height: 8px; border-inline: 1.5px solid currentColor; content: ""; }
.design-loop[data-design-paused="true"] .design-loop-footer button::before { width: 0; height: 0; border: 4px solid transparent; border-right: 0; border-left: 6px solid currentColor; }
.design-loop-footer button:hover { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .design-loop .design-cursor { animation: design-cursor-path 12s cubic-bezier(.45, 0, .25, 1) infinite; }
  .design-loop .design-selection { animation: design-selection-focus 12s ease infinite; }
  .design-loop .design-palette-pick { animation: design-palette-focus 12s ease infinite; }
  .design-loop .design-prototype-button { animation: design-prototype-press 12s ease infinite; }
  .design-loop .design-click { animation: design-prototype-click 12s ease-out infinite; }
  .design-loop .design-connector { animation: design-flow 12s linear infinite; }
  .design-loop .design-phase-explore { animation: design-phase 12s ease infinite; }
  .design-loop .design-phase-refine { animation: design-phase 12s 3.6s ease infinite; }
  .design-loop .design-phase-test { animation: design-phase 12s 7.2s ease infinite; }
  .design-loop .design-loop-scene * { animation-play-state: paused; }
  .design-loop[data-design-running="true"] .design-loop-scene * { animation-play-state: running; }
}
@keyframes design-cursor-path {
  0%, 14%, 100% { transform: translate(152px, 147px); }
  28%, 40% { transform: translate(336px, 44px); }
  56%, 64%, 76% { transform: translate(383px, 244px); }
  68%, 72% { transform: translate(383px, 244px) scale(.88); }
  85% { transform: translate(425px, 182px); }
}
@keyframes design-selection-focus { 0%, 18%, 94%, 100% { opacity: 1; } 28%, 84% { opacity: .15; } }
@keyframes design-palette-focus { 0%, 22%, 48%, 100% { opacity: .15; } 28%, 40% { opacity: 1; } }
@keyframes design-prototype-press { 0%, 64%, 77%, 100% { transform: scale(1); } 68%, 72% { transform: scale(.96); } }
@keyframes design-prototype-click { 0%, 65%, 80%, 100% { opacity: 0; transform: scale(.6); } 68% { opacity: .65; transform: scale(.6); } 77% { opacity: 0; transform: scale(1.8); } }
@keyframes design-flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -54; } }
@keyframes design-phase { 0%, 26% { fill: var(--accent-text); } 34%, 92% { fill: var(--muted); } 100% { fill: var(--accent-text); } }
.notebook-feature { display: grid; grid-template-columns: 1.1fr 1fr; border: 1px solid var(--line); background: color-mix(in srgb, var(--blue) 12%, var(--paper)); }
.notebook-feature-image { display: flex; align-items: center; background: color-mix(in srgb, var(--blue) 30%, var(--paper)); overflow: hidden; }
.notebook-feature-image img { display: block; width: 100%; height: auto; }
.notebook-feature-copy { align-self: center; padding: clamp(24px, 4vw, 54px); }
.notebook-feature h2 { font-size: clamp(32px, 3.5vw, 49px); letter-spacing: -.055em; line-height: 1.08; }
.notebook-feature-copy > p:not(.eyebrow) { color: var(--muted); font-size: 15px; line-height: 1.8; }
.notebook-feature a, .notebook-card a { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.notebook-feature a:hover, .notebook-card a:hover { text-decoration-line: underline; }
.notebook-filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin: 56px 0 24px; }
.notebook-search { display: grid; gap: 8px; flex: 1 1 250px; max-width: 360px; color: var(--muted); font-size: 12px; }
.notebook-search input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: var(--paper); font: 15px var(--body); }
.notebook-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.notebook-topics button { min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font: 500 12px var(--body); cursor: pointer; }
.notebook-topics button[aria-pressed="true"] { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.notebook-count { margin: 48px 0 20px; color: var(--muted); font: 12px "DM Mono", monospace; }
.notebook-filters:not([hidden]) + .notebook-count { margin-top: 0; }
.notebook-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.notebook-card { display: flex; flex-direction: column; padding: 28px 0 32px; border-top: 1px solid var(--line); }
.notebook-card .eyebrow { margin-bottom: 14px; font-size: 10px; }
.notebook-card h2 { margin-bottom: 14px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.045em; line-height: 1.15; }
.notebook-card > p:not(.eyebrow) { max-width: 470px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.notebook-card .notebook-card-link { align-self: start; margin-top: auto; padding: 10px 0; font-size: 13px; }
.notebook-empty { padding: 30px 0; font-size: 16px; line-height: 1.8; }
.notebook-elsewhere { margin: 44px 0 90px; padding: 28px 0; border-block: 1px solid var(--line); }
.notebook-elsewhere h2 { font-size: 28px; letter-spacing: -.04em; }
.notebook-elsewhere p { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.notebook-elsewhere a, .story-body a, .story-credit a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; }
.blog-footer { padding: 25px 0 35px; }
.notebook-projects { margin: 60px 0 20px; }
.notebook-topics-guide { margin: 56px 0; }
.notebook-topics-guide > h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.045em; }
.notebook-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.notebook-topic-grid > div { border-top: 1px solid var(--line); padding-top: 22px; }
.notebook-topic-grid h3 { font: 500 19px/1.4 var(--display); letter-spacing: -.025em; }
.notebook-topic-grid p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.notebook-topic-grid ul, .story-related ul { list-style: none; margin: 0; padding: 0; }
.notebook-topic-grid a { display: block; padding-block: 8px; color: var(--accent-text); font-size: 13px; line-height: 1.6; text-decoration: underline; text-underline-offset: 4px; }
.notebook-projects > h2, .notebook-about h2, .notebook-stories > h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; }
.notebook-stories { margin-top: 56px; }
.notebook-archive-group > h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; letter-spacing: -.04em; }
.notebook-section-note { max-width: 700px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.notebook-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; margin-top: 28px; }
.notebook-project { display: grid; grid-template-columns: 62px minmax(0, 1fr) 14px; gap: 18px; align-items: start; padding: 24px 0; border-top: 1px solid var(--line); }
.notebook-project img { display: block; width: 62px; height: 62px; object-fit: contain; border-radius: 12px; }
.notebook-project h3 { margin-bottom: 9px; font: 500 19px/1.3 var(--display); letter-spacing: -.03em; }
.notebook-project p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.notebook-project > span { color: var(--accent-text); }
.notebook-project:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.notebook-about { padding-top: 52px; margin: 28px 0; border-top: 1px solid var(--line); }
.notebook-about > div { max-width: 790px; }
.notebook-about p, .notebook-about li { color: var(--muted); font-size: 15px; line-height: 1.9; }
.notebook-about li { margin-bottom: 8px; }
.notebook-about strong { color: var(--ink); }
.notebook-socials { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 38px; }
.notebook-socials a { display: inline-flex; min-height: 44px; gap: 7px; align-items: center; color: var(--accent-text); font-size: 13px; }
.notebook-document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; margin-bottom: 50px; }
.notebook-document-list a { display: flex; justify-content: space-between; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.7; }
.notebook-document-list a:hover { color: var(--accent-text); }
.story-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; padding: 34px 0 0; color: var(--muted); font-size: 12px; }
.story-breadcrumb a { display: inline-block; padding-block: 10px; }
.story-breadcrumb span { align-self: center; }
.story-heading { max-width: 940px; padding: 48px 0 44px; }
.story-heading h1 { max-width: 940px; font-size: clamp(42px, 6.2vw, 78px); line-height: 1.04; letter-spacing: -.06em; }
.story-deck { max-width: 740px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.7; }
.story-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; color: var(--muted); font: 11px/1.7 "DM Mono", monospace; }
.story-meta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.story-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0 0 54px; border-block: 1px solid var(--line); }
.story-facts > div { padding: 22px 24px 22px 0; }
.story-facts dt { margin-bottom: 8px; color: var(--muted); font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.story-facts dd { margin: 0; font-size: 13px; line-height: 1.7; }
.story-layout { display: grid; grid-template-columns: 200px minmax(0, 740px); gap: 64px; align-items: start; padding-bottom: 60px; }
.story-toc { position: sticky; top: 32px; padding-top: 5px; }
.story-toc h2 { margin-bottom: 18px; color: var(--muted); font: 10px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.story-toc ol { margin: 0; padding-left: 18px; color: var(--muted); }
.story-toc a { display: block; padding: 8px 0 8px 4px; font-size: 12px; line-height: 1.5; }
.story-toc a:hover { color: var(--accent-text); }
.story-body { min-width: 0; font-size: 17px; line-height: 1.9; overflow-wrap: anywhere; }
.story-body section { scroll-margin-top: 30px; margin-bottom: 48px; }
.story-body h2 { margin-bottom: 20px; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -.045em; }
.story-body h3 { font: 600 21px/1.4 var(--display); letter-spacing: -.025em; }
.story-body p, .story-body ul { margin-bottom: 22px; }
.story-body li { padding-left: 4px; margin-bottom: 8px; }
.story-body figure { margin: 30px 0; }
.story-body figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.story-body figcaption { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.story-screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.story-body .story-screens figure { margin-top: 0; }
.story-body .story-screens img { max-height: 620px; object-fit: contain; background: color-mix(in srgb, var(--blue) 10%, var(--paper)); }
.story-video { display: block; width: 100%; max-height: 560px; background: #151b19; }
.story-callout { margin: 30px 0; padding: 22px 26px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--blue) 12%, var(--paper)); font-size: 17px; }
.story-origin-note { padding: 15px 18px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }
.story-embed { display: block; width: 100%; height: 480px; border: 1px solid var(--line); margin-top: 30px; background: var(--paper); }
.story-credit { padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.story-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-bottom: 80px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
.story-next a { padding-block: 10px; text-decoration: underline; text-underline-offset: 5px; }
.story-related { margin-bottom: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.story-related h2 { font-size: 24px; letter-spacing: -.035em; }
.story-related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; }
.story-related a { display: block; padding-block: 8px; color: var(--accent-text); font-size: 14px; line-height: 1.7; text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .notebook-feature-image img { transform: translate3d(0, var(--blog-image-offset, 0px), 0) scale(var(--blog-image-scale, 1)); transition: transform .55s cubic-bezier(.2, .65, .3, 1); }
  html[data-blog-motion="active"] .notebook-feature-image img { --blog-image-scale: 1.04; }
  .notebook-card { position: relative; }
  .notebook-card::before { position: absolute; inset: -1px 0 auto; height: 1px; background: var(--accent-text); content: ""; transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.2, .65, .3, 1); pointer-events: none; }
  .notebook-project img, .notebook-project > span, .notebook-card-link span, .notebook-feature-copy .text-link span { transition: transform .3s cubic-bezier(.2, .65, .3, 1); }
  .notebook-card:focus-within::before { transform: scaleX(1); }
  .notebook-card:focus-within .notebook-card-link span { display: inline-block; transform: translateX(4px); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .notebook-feature:hover .notebook-feature-image img { --blog-image-scale: 1.055; }
  .notebook-feature:hover .text-link span { display: inline-block; transform: translateX(4px); }
  .notebook-project:hover img { transform: translateY(-3px) rotate(-2deg); }
  .notebook-project:hover > span { transform: translate(2px, -2px); }
  .notebook-card:hover::before { transform: scaleX(1); }
  .notebook-card:hover .notebook-card-link span { display: inline-block; transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .blog-reading-progress { display: none; }
  .blog-page *, .blog-page *::before, .blog-page *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width: 800px) {
  .blog-header, .blog-main, .blog-footer { width: calc(100% - 40px); }
  .blog-header { min-height: 78px; }
  .blog-nav { gap: 18px; font-size: 12px; }
  .notebook-intro { grid-template-columns: 1fr; gap: 28px; padding: 54px 0 36px; }
  .notebook-intro > p, .notebook-intro-copy { max-width: 540px; font-size: 15px; }
  .notebook-intro-with-design { gap: 20px; }
  .notebook-intro-with-design h1 { font-size: clamp(48px, 8vw, 74px); }
  .design-loop { grid-column: 1; grid-row: auto; max-width: 480px; margin-top: 8px; }
  .notebook-feature { grid-template-columns: 1fr; }
  .notebook-feature-copy { padding: 28px; }
  .notebook-grid { column-gap: 28px; }
  .notebook-topic-grid { grid-template-columns: 1fr; gap: 20px; }
  .notebook-filters { margin-top: 36px; }
  .notebook-elsewhere { margin-bottom: 54px; }
  .story-heading { padding-top: 30px; }
  .story-facts { grid-template-columns: 1fr; margin-bottom: 30px; }
  .story-facts > div { padding: 15px 0; }
  .story-facts > div + div { border-top: 1px solid var(--line); }
  .story-layout { grid-template-columns: 1fr; gap: 32px; }
  .story-toc { position: static; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .story-toc ol { columns: 2; }
  .story-toc li { break-inside: avoid; }
  .story-body { font-size: 16px; }
  .story-next { margin-bottom: 50px; }
}
@media (max-width: 520px) {
  .notebook-grid { grid-template-columns: 1fr; }
  .story-related ul { grid-template-columns: 1fr; gap: 8px; }
  .notebook-intro h1 { font-size: clamp(48px, 12vw, 64px); }
  .blog-nav { gap: 13px; }
  .blog-nav a:first-child { display: none; }
  .story-screens { gap: 12px; }
  .blog-footer { align-items: start; flex-direction: column; }
  .notebook-project-grid, .notebook-document-list { grid-template-columns: 1fr; }
  .notebook-project { grid-template-columns: 52px minmax(0, 1fr) 14px; gap: 14px; }
  .notebook-project img { width: 52px; height: 52px; }
}
@media print {
  .blog-header, .blog-footer, .story-toc, .story-next, .notebook-filters, .design-loop { display: none; }
  .blog-page { color: #000; background: #fff; }
  .blog-main { width: 100%; }
  .story-layout { display: block; }
  .story-body a { color: inherit; }
}
