/* Nordic restraint: warm paper, charcoal, soft mineral colors, a trace of plum. */
:root {
  --paper: #f8f9f5;
  --ink: #252b29;
  --muted: #626a65;
  --accent: #764d63;
  --line: #dde1d9;
  --wash: #edf0e9;
  color-scheme: light;
  --selection: #e2d8df;
  --selection-ink: #30232c;
  --project-one: #e8ede5;
  --project-two: #eeebe3;
  --project-three: #e9e4e9;
  --project-four: #e5eaed;
  --tag: #666d65;
  --placeholder: #798475;
  --underline: #b5bcb3;
  --badge-border: #cdd1c9;
  --gold: #9b7d3d;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c201f;
  --ink: #e7ebe4;
  --muted: #a8b0a6;
  --accent: #d4a8c5;
  --line: #363e37;
  --wash: #282e29;
  --selection: #67465d;
  --selection-ink: #fff5fb;
  --project-one: #29332f;
  --project-two: #33312a;
  --project-three: #332c36;
  --project-four: #293137;
  --tag: #aab4a7;
  --placeholder: #bac5ae;
  --underline: #758170;
  --badge-border: #596354;
  --gold: #c4b47b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
  color-scheme: dark;
  --paper: #1c201f;
  --ink: #e7ebe4;
  --muted: #a8b0a6;
  --accent: #d4a8c5;
  --line: #363e37;
  --wash: #282e29;
  --selection: #67465d;
  --selection-ink: #fff5fb;
  --project-one: #29332f;
  --project-two: #33312a;
  --project-three: #332c36;
  --project-four: #293137;
  --tag: #aab4a7;
  --placeholder: #bac5ae;
  --underline: #758170;
  --badge-border: #596354;
  --gold: #c4b47b;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.75 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
::selection { background: var(--selection); color: var(--selection-ink); }
a { color: inherit; text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; }
.wrap { max-width: 1096px; padding-inline: 48px; margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 16px; padding: 12px 20px; background: var(--ink); color: var(--paper); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding-top: 30px; padding-bottom: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: -.02em; }
.brand-avatar { transition: transform .2s ease; width: 28px; height: 28px; border-radius: 4px; image-rendering: pixelated; }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 13px; }
.site-header nav > a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; position: relative; }
.site-header nav > a[aria-current=page]:after { content: ""; position: absolute; bottom: 5px; left: 0; right: 0; height: 1px; background: var(--accent); }
.resume-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 13px; text-decoration: none; }
.file-type { font-size: 9px; letter-spacing: .02em; padding: 1px 4px; border: 1px solid var(--badge-border); border-radius: 3px; line-height: 1.5; }
.is-placeholder { color: var(--muted); cursor: default; }
.hero { position: relative; padding: 76px 0 72px; }
.hero-intro { max-width: 710px; }
.hero h1 { font-size: clamp(42px, 5.3vw, 64px); line-height: 1.12; font-weight: 500; letter-spacing: -.055em; max-width: 700px; margin-bottom: 27px; text-wrap: balance; }
.hero-intro p { max-width: 590px; font-size: 17px; line-height: 1.85; color: var(--muted); }
.hero-intro p + p { margin-top: 17px; font-size: 14px; max-width: 590px; }
.hero-intro a { color: var(--ink); text-decoration-color: var(--underline); }
.hero-intro a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 27px; margin-top: 28px; }
.hero-links > a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none; font-size: 13px; }
.hero-links > a:first-child { color: var(--accent); }
.section { padding-top: 34px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.section-heading h2 { font-size: 22px; font-weight: 500; line-height: 1.4; letter-spacing: -.04em; }
.text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 12px; text-decoration: none; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 30px; }
.project-card { min-width: 0; }
.project-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 1.6; padding: 23px; background: var(--project-one); border-radius: 5px; overflow: hidden; }
.project-card:nth-child(4n+2) .project-image { background: var(--project-two); }
.project-card:nth-child(4n+3) .project-image { background: var(--project-three); }
.project-card:nth-child(4n+4) .project-image { background: var(--project-four); }
.project-image img { width: 100%; height: 100%; object-fit: contain; border-radius: 3px; filter: drop-shadow(0 5px 7px #28302715); transition: transform .25s ease; }
.project-image:hover img { transform: translateY(-3px); }
.project-content { padding-top: 13px; }
.project-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.project-title-row h3 { font-size: 17px; line-height: 1.5; letter-spacing: -.025em; font-weight: 500; }
.project-title-row a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.project-title-row > span { font-size: 18px; color: var(--muted); }
.project-content > p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 1px 0 13px; max-width: 420px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px 13px; padding: 0; margin: 0; list-style: none; color: var(--tag); }
.project-tags li { font-size: 10px; line-height: 1.7; letter-spacing: .015em; }
.project-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--placeholder); font-size: 68px; font-weight: 400; letter-spacing: -.06em; }
.blog-section { margin-top: 65px; padding-bottom: 65px; }
.blog-section .section-heading { margin-bottom: 8px; }
.blog-intro { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.post-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 50px 20px; align-items: center; gap: 20px; padding: 19px 0; border-top: 1px solid var(--line); }
.post-row:last-child { border-bottom: 1px solid var(--line); }
.post-row time, .reading-time { font-size: 11px; color: var(--muted); }
.post-row h3 { font-size: 16px; font-weight: 400; letter-spacing: -.015em; line-height: 1.6; }
.post-row h3 a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.reading-time, .post-arrow { text-align: right; }
.post-arrow { color: var(--muted); font-size: 18px; }
.site-footer { padding-bottom: 15px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding: 29px 0; }
.footer-email { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; text-decoration: none; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-block: 14px; color: var(--muted); font-size: 10px; }
.footer-bottom > a { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; font-size: 18px; text-decoration: none; }
.page-heading { padding: 65px 0 40px; }
.page-heading h1 { font-size: 48px; line-height: 1.2; letter-spacing: -.05em; margin-bottom: 16px; }
.project-archive { margin-bottom: 70px; }
.archive-list { margin-bottom: 75px; }
.article-layout { max-width: 710px; margin: 48px auto 70px; }
.article-heading { padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 35px; }
.subtle-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
.article-heading h1 { font-size: 44px; line-height: 1.17; letter-spacing: -.05em; margin: 23px 0; font-weight: 500; }
.article-meta { display: flex; gap: 16px; color: var(--muted); font-size: 12px; }
.prose { font-size: 17px; line-height: 1.9; }
.prose > * + * { margin-top: 1.4em; }
.prose h2 { font-size: 28px; margin-top: 1.7em; line-height: 1.3; letter-spacing: -.035em; }
.prose h3 { font-size: 22px; line-height: 1.4; letter-spacing: -.025em; }
.prose a { color: var(--accent); }
.prose li + li { margin-top: 8px; }
.prose pre { max-width: 100%; overflow-x: auto; background: var(--wash); padding: 20px; border: 1px solid var(--line); font-size: 14px; border-radius: 4px; }
.prose code { font-size: .88em; background: var(--wash); padding: 2px 5px; border-radius: 2px; }
.prose pre code { padding: 0; }
.prose blockquote { border-left: 2px solid var(--accent); margin-left: 0; padding-left: 24px; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.prose table { display: block; max-width: 100%; overflow: auto; border-collapse: collapse; }
.prose td, .prose th { padding: 10px; border: 1px solid var(--line); }
.article-end { padding-top: 25px; margin-top: 40px; border-top: 1px solid var(--line); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* A small compass glint and an offbeat plum/gold pairing, kept quiet. */
.hero:after { content: ""; position: absolute; top: 77px; right: 4px; width: 22px; height: 22px; background: var(--gold); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); transform: rotate(12deg); pointer-events: none; }
.hero h1:after { content: ""; display: block; width: 34px; height: 3px; margin-top: 27px; background: linear-gradient(90deg, var(--accent) 0 68%, transparent 68% 79%, var(--gold) 79%); }
.brand:hover .brand-avatar { transform: rotate(-5deg); }
.section-heading h2 { display: flex; align-items: center; gap: 11px; }
.section-heading h2:before { content: ""; width: 6px; height: 6px; border: 1px solid var(--gold); transform: rotate(45deg); }
.blog-section .section-heading h2:before { border-color: var(--accent); }
.project-title-row > span { transition: transform .2s ease, color .2s ease; }
.project-card:hover .project-title-row > span, .project-card:focus-within .project-title-row > span { color: var(--accent); transform: translate(2px, -2px); }
.project-card:focus-within .project-image img { transform: translateY(-3px); }
.project-tags li + li:before { content: "·"; margin-right: 12px; color: var(--gold); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.theme-toggle:hover { border-color: var(--accent); background: var(--wash); }
.theme-toggle[hidden] { display: none; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
@media (max-width: 850px) {
  .wrap { padding-inline: 32px; }
  .site-header nav { gap: 22px; }
  .hero { padding-block: 55px 54px; }
  .hero h1 { font-size: 54px; }
  .hero-intro { max-width: 650px; }
  .project-image { padding: 18px; }
  .post-row { grid-template-columns: 95px minmax(0, 1fr) 40px 18px; gap: 16px; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 24px; }
  .site-header { padding-top: 20px; padding-bottom: 15px; flex-wrap: wrap; gap: 9px; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 15px; }
  .brand { font-size: 14px; }
  .hero { padding-block: 38px 44px; }
  .hero:after { top: 19px; width: 16px; height: 16px; }
  .hero h1 { font-size: clamp(36px, 8.3vw, 48px); line-height: 1.15; letter-spacing: -.05em; margin-bottom: 22px; }
  .hero-intro p { font-size: 16px; }
  .hero-intro p + p { font-size: 14px; margin-top: 16px; }
  .hero-links { gap: 5px 23px; margin-top: 20px; }
  .section { padding-top: 23px; }
  .section-heading { gap: 15px; margin-bottom: 20px; }
  .section-heading h2 { font-size: 21px; }
  .text-link { gap: 9px; }
  .projects-grid { grid-template-columns: 1fr; gap: 29px; }
  .project-image { padding: 19px; }
  .project-content { padding-top: 10px; }
  .project-content > p { font-size: 14px; }
  .blog-section { margin-top: 43px; padding-bottom: 38px; }
  .blog-intro { margin-bottom: 20px; }
  .post-row { grid-template-columns: minmax(0, 1fr) 24px; gap: 4px 16px; padding-block: 18px; }
  .post-row time { grid-column: 1; }
  .post-row h3 { grid-column: 1; grid-row: 2; font-size: 16px; }
  .reading-time { grid-column: 1; grid-row: 3; text-align: left; }
  .post-arrow { grid-column: 2; grid-row: 2; }
  .footer-top { flex-wrap: wrap; padding-block: 21px; gap: 10px; }
  .footer-links { gap: 25px; }
  .footer-bottom { flex-wrap: wrap; gap: 4px 14px; }
  .footer-bottom > span:nth-child(2) { order: 3; width: 100%; }
  .page-heading { padding: 39px 0 26px; }
  .page-heading h1 { font-size: 38px; }
  .article-layout { margin-top: 24px; }
  .article-heading h1 { font-size: 34px; }
  .article-meta { font-size: 11px; gap: 12px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 26px; }
  .prose ul, .prose ol { padding-left: 24px; }
  .project-archive, .archive-list { margin-bottom: 45px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .file-type, .skip-link, .theme-toggle { border: 1px solid CanvasText; }
  .site-header nav > a[aria-current=page] { text-decoration: underline; }
}

/* An archive that grows without making the homepage or reading column wider. */
[hidden] { display: none !important; }
.home-blog { margin-top: 0; padding-bottom: 52px; }
.home-blog + .section { padding-bottom: 64px; }
.project-display-only .project-image { cursor: default; }
.project-display-only .project-image:hover img { transform: none; }
.project-display-only .project-title-row h3 { display: flex; align-items: center; min-height: 44px; }
.blog-archive { margin-bottom: 75px; }
.blog-tools { max-width: 690px; margin-bottom: 35px; }
.blog-tools label { display: block; font-size: 13px; margin-bottom: 8px; }
.search-field { display: flex; align-items: center; gap: 12px; border: 1px solid var(--badge-border); border-radius: 4px; background: var(--paper); padding: 3px 10px 3px 14px; }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.search-field input { width: 100%; min-width: 0; min-height: 44px; padding: 5px 0; border: 0; outline: none; color: var(--ink); background: transparent; font: inherit; font-size: 14px; }
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-field button, .more-results { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 3px; background: var(--wash); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.archive-status { margin-top: 10px; font-size: 12px; color: var(--muted); }
.archive-year { display: grid; grid-template-columns: 75px minmax(0, 1fr); column-gap: 25px; margin-top: 30px; }
.archive-year > h2 { font-size: 17px; font-weight: 500; color: var(--muted); padding-top: 24px; }
.archive-year .post-row { grid-template-columns: 100px minmax(0, 1fr) 40px 18px; gap: 16px; }
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 36px; font-size: 12px; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; }
.pagination > span { color: var(--muted); }
.search-result { padding-block: 20px; border-top: 1px solid var(--line); max-width: 760px; }
.search-result .archive-status { margin-top: 0; }
.search-result h3 { font-size: 18px; line-height: 1.6; letter-spacing: -.02em; }
.search-result h3 a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.search-result > p:last-child { margin-top: 5px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.more-results { margin-top: 20px; border: 1px solid var(--badge-border); }
.article-layout.has-toc { max-width: none; }
.has-toc > .article-heading, .has-toc > .article-pagination, .has-toc > .article-end { max-width: 710px; }
.article-body-layout { min-width: 0; }
.has-toc .article-body-layout { display: grid; grid-template-columns: minmax(0, 710px) minmax(150px, 210px); gap: 45px; align-items: start; }
.has-toc .prose { grid-column: 1; grid-row: 1; min-width: 0; }
.article-toc { grid-column: 2; grid-row: 1; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-left: 20px; border-left: 1px solid var(--line); font-size: 12px; line-height: 1.7; color: var(--muted); }
.article-toc summary { min-height: 44px; padding-block: 11px; cursor: pointer; color: var(--ink); font-weight: 500; }
.article-toc ul { list-style: none; margin: 0; padding: 0; }
.article-toc ul ul { padding-left: 13px; }
.article-toc a { display: block; padding-block: 5px; text-decoration: none; }
.article-toc a:hover { text-decoration: underline; }
.article-toc summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 12px; margin: 15px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.article-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; margin-top: 45px; border-top: 1px solid var(--line); padding-top: 25px; }
.article-pagination > a { display: block; min-height: 44px; font-size: 14px; text-decoration: none; line-height: 1.7; }
.article-pagination > a > span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.article-end { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.prose .footnotes { font-size: 14px; line-height: 1.8; margin-top: 40px; }
.prose sup { line-height: 0; }
@media (max-width: 1000px) {
  .has-toc .article-body-layout { display: flex; flex-direction: column; gap: 28px; }
  .article-layout.has-toc { max-width: 710px; }
  .article-toc { position: static; width: 100%; max-height: none; padding: 8px 18px; border: 1px solid var(--line); border-radius: 4px; }
  .article-toc nav { padding-bottom: 10px; }
  .article-toc a { min-height: 32px; display: flex; align-items: center; }
  .has-toc .prose { width: 100%; }
}
@media (max-width: 600px) {
  .home-blog { padding-bottom: 34px; }
  .home-blog + .section { padding-bottom: 40px; }
  .blog-archive { margin-bottom: 45px; }
  .archive-year { grid-template-columns: 1fr; gap: 9px; margin-top: 23px; }
  .archive-year > h2 { padding-top: 0; font-size: 16px; }
  .archive-year .post-row { grid-template-columns: minmax(0, 1fr) 24px; gap: 4px 16px; }
  .article-pagination { gap: 20px; }
  .article-pagination > a { font-size: 13px; }
}
