/* Einhar's compact black identity. This is the final layer over legacy styles. */
:root {
  color-scheme: dark;
  --surface-page: #000;
  --surface-raised: #171717;
  --surface-hover: #222;
  --ink-primary: #f4f4f2;
  --ink-secondary: #aaa9a6;
  --ink-muted: #777773;
  --ink-soft: #444440;
  --page-edge: clamp(20px, 3vw, 44px);
  --font-einhar: 'Instrument Sans', 'Segoe UI', Arial, sans-serif;
}
html, body, html body :is(main, .journal-layout, .journal-center, .journal-sidebar, .journal-feed, .journal-article, .journal-article-head, .journal-article-body, .site-footer, .legal-layout) {
  background: #000 !important;
  color: var(--ink-primary) !important;
}
html body :is(h1, h2, h3, h4, .journal-entry-title, .journal-article-end, .journal-return, .journal-back-link, .recent-card-title, .footer-bottom a, .page-legal .legal-layout a) {
  color: var(--ink-primary) !important;
}
html body :is(p, .journal-entry-summary, .journal-article-deck, .journal-article-body ul, .journal-article-body ol, .page-legal .legal-layout p) {
  color: var(--ink-secondary) !important;
}
html body :is(.journal-entry-meta, .journal-article-meta, .journal-index-link, .journal-topic-count, .recent-metadata, .footer-founder) {
  color: var(--ink-muted) !important;
}
html body a:hover, html body a:focus-visible { color: var(--ink-primary) !important; }
html body a:focus-visible, html body button:focus-visible, html body summary:focus-visible { outline: 2px solid #f4f4f2 !important; outline-offset: 4px; }
html body .site-header { display: none !important; }
html body .skip { color: #fff !important; background: #000 !important; }

/* The actual extruded Einhar mark is the only animated object on the landing page. */
html body.page-home main#main { width: 100%; padding: 0 !important; }
.page-home .quiet-hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 7vh var(--page-edge) 10vh; box-sizing: border-box; }
.page-home .mark-stage { width: min(420px, 80vw); height: min(55svh, 480px); min-height: 260px; display: grid; place-items: center; }
.page-home .mark-motion, .page-home .mark-still { grid-area: 1 / 1; display: block; width: 100%; height: 100%; object-fit: contain; }
.page-home .mark-still { display: none; }
.page-home .quiet-intro { width: min(420px, 100%); }
.page-home .quiet-intro h1 { margin: 0 0 16px; color: var(--ink-primary) !important; font: 550 15px/1.35 var(--font-einhar); letter-spacing: -.015em; }
.page-home .quiet-intro p { max-width: 390px; margin: 0 0 12px; color: var(--ink-secondary) !important; font: 400 15px/1.55 var(--font-einhar); letter-spacing: -.014em; }
.page-home .quiet-inline-link { display: inline-flex; align-items: baseline; gap: 2px; margin-top: 4px; color: var(--ink-primary); font: 450 14px/1.5 var(--font-einhar); text-decoration: none; white-space: nowrap; }
.page-home .quiet-inline-link svg { position: relative; top: 2px; width: 14px; height: 14px; transition: transform .2s ease; }
.page-home .quiet-inline-link:hover svg { transform: translate(2px, -2px); }
.page-home .quiet-content { width: min(860px, calc(100% - 2 * var(--page-edge))); margin: 0 auto clamp(150px, 20vh, 240px); }
.page-home .quiet-about { display: grid; grid-template-columns: 140px minmax(0, 480px); gap: clamp(30px, 7vw, 90px); align-items: start; }
.page-home .quiet-about h2 { margin: 0; font: 520 14px/1.5 var(--font-einhar); }
.page-home .quiet-about p { margin: 0 0 20px; color: var(--ink-secondary) !important; font: 400 15px/1.65 var(--font-einhar); }
.page-home .quiet-section { margin-top: clamp(100px, 14vh, 160px); }
.page-home .quiet-section h2 { margin: 0 0 22px; font: 520 14px/1.4 var(--font-einhar); }
.page-home #recent-posts { width: min(420px, 100%) !important; max-width: none !important; margin: clamp(100px, 14vh, 160px) 0 0 auto !important; padding: 0 !important; overflow: visible !important; }
.page-home .quiet-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.page-home .quiet-section-heading a { color: var(--ink-muted); font: 400 12px/1.4 var(--font-einhar); text-decoration: none; }
.page-home .quiet-section-heading a:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-home #recent-posts .recent-entries { display: block !important; width: 100%; padding: 0 !important; overflow: visible !important; }
.page-home #recent-posts .recent-card { display: block; width: 100%; max-width: none; margin: 0 0 20px; padding: 0; color: var(--ink-primary); text-decoration: none; }
.page-home #recent-posts .recent-card:nth-child(n + 4) { display: none; }
.page-home #recent-posts .recent-media { display: none !important; }
.page-home #recent-posts .recent-card-title { display: block; margin: 3px 0 0; font: 480 14px/1.45 var(--font-einhar); }
.page-home #recent-posts .recent-card:hover .recent-card-title { text-decoration: underline; text-underline-offset: 3px; }
.page-home #recent-posts .recent-metadata { display: block; margin: 0; font: 400 11px/1.4 var(--font-einhar); }
.page-home .quiet-founder { margin: clamp(110px, 17vh, 190px) 0 0; color: var(--ink-muted) !important; font: 400 12px/1.5 var(--font-einhar); }

/* Thoughts remains readable and browsable, without a bar or card framing. */
html body.journal-page:not(.journal-page-article) .journal-layout { width: min(940px, 100%); margin: 0 auto; padding: clamp(110px, 17vh, 170px) var(--page-edge) 150px !important; }
html body.journal-page:not(.journal-page-article) .journal-intro { margin-bottom: 48px; }
html body.journal-page:not(.journal-page-article) .journal-intro h1 { font-size: clamp(36px, 5vw, 54px); margin-bottom: 17px; }
html body.journal-page:not(.journal-page-article) .journal-intro p { max-width: 510px; font-size: 15px; line-height: 1.55; }
html body.journal-page:not(.journal-page-article) .journal-sidebar { margin-bottom: 65px; }
html body.journal-page:not(.journal-page-article) .journal-index-link[data-topic] { background: none !important; padding: 5px 8px; border-radius: 4px; }
html body.journal-page:not(.journal-page-article) .journal-index-link[data-topic][aria-current='page'] { color: #fff !important; font-weight: 600; text-decoration: none; }
html body.journal-page:not(.journal-page-article) .journal-feed { gap: 65px; }
html body.journal-page:not(.journal-page-article) .journal-feature { max-width: 760px; }
html body.journal-page:not(.journal-page-article) .journal-entry { max-width: 760px; }
html body .journal-entry-art { background: #111 !important; }
html body .journal-feature .journal-entry-art { max-height: 360px; }
html body .journal-entry-image, html body .journal-article-figure img, html body .journal-article-body img { filter: grayscale(1) contrast(1.04) !important; }
html body .journal-entry-title { font-weight: 480; }
html body .journal-entry-summary { color: var(--ink-secondary) !important; }
html body .journal-entry-kind, html body .journal-entry-date { color: var(--ink-muted) !important; }

/* Article covers use their own diagrams as the image, with editorial type in the same plane. */
html body.journal-page:not(.journal-page-article) .journal-feed { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px !important; }
html body.journal-page:not(.journal-page-article) :is(.journal-feature,.journal-entry) { position: relative; display: flex !important; flex-direction: column; box-sizing: border-box; min-width: 0; min-height: 420px; margin: 0 !important; padding: 28px; overflow: hidden; background: #171716 !important; color: #f4f4f2 !important; text-decoration: none !important; }
html body.journal-page:not(.journal-page-article) .journal-feature { grid-column: 1 / -1; min-height: 450px; }
html body.journal-page:not(.journal-page-article) .journal-entry-art { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent !important; pointer-events: none; }
html body.journal-page:not(.journal-page-article) .journal-entry-image { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .65; filter: grayscale(1) invert(1) contrast(1.25) !important; mix-blend-mode: screen; mask-image: linear-gradient(#000 0%, #000 42%, transparent 84%); transition: transform .65s cubic-bezier(.2,.7,.2,1); }
html body.journal-page:not(.journal-page-article) :is(.journal-feature,.journal-entry):is(:hover,:focus-visible) .journal-entry-image { transform: scale(1.045); }
html body.journal-page:not(.journal-page-article) .journal-entry-copy { position: relative; z-index: 1; display: flex; flex: 1; flex-direction: column; align-items: start; width: 100%; padding: 0 !important; background: none !important; }
html body.journal-page:not(.journal-page-article) .journal-entry-meta { order: -1; display: flex; align-items: baseline; width: 100%; margin: 0 0 auto; gap: 12px; color: #aaa9a6 !important; font: 450 12px/1.4 var(--font-einhar); }
html body.journal-page:not(.journal-page-article) .journal-entry-author { display: none; }
html body.journal-page:not(.journal-page-article) .journal-entry-kind { color: inherit !important; }
html body.journal-page:not(.journal-page-article) .journal-entry-date { margin-left: auto; color: inherit !important; }
html body.journal-page:not(.journal-page-article) .journal-entry-title { max-width: 580px; margin: 0 0 12px !important; color: #f4f4f2 !important; font: 490 clamp(22px, 2.2vw, 31px)/1.18 var(--font-einhar); letter-spacing: -.035em; }
html body.journal-page:not(.journal-page-article) .journal-entry-summary { display: block; max-width: 490px; margin: 0 !important; color: #aaa9a6 !important; font: 400 13px/1.5 var(--font-einhar); }
html body.journal-page:not(.journal-page-article) .journal-entry:nth-child(3n) { background: #efeeea !important; color: #151514 !important; }
html body.journal-page:not(.journal-page-article) .journal-entry:nth-child(3n) .journal-entry-image { opacity: .9; filter: grayscale(1) contrast(1.07) !important; mix-blend-mode: multiply; }
html body.journal-page:not(.journal-page-article) .journal-entry:nth-child(3n) :is(.journal-entry-title,.journal-entry-kind,.journal-entry-date) { color: #151514 !important; }
html body.journal-page:not(.journal-page-article) .journal-entry:nth-child(3n) :is(.journal-entry-meta,.journal-entry-summary) { color: #64645f !important; }
html body.journal-page:not(.journal-page-article) .journal-feed > [hidden] { display: none !important; }
html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) { grid-column: 1 / -1; min-height: 0; padding: 20px 0; background: #000 !important; }
html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) .journal-entry-art { display: none; }
html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) .journal-entry-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 30px; }
html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) .journal-entry-title { grid-column: 1; grid-row: 1; margin-bottom: 7px !important; font-size: clamp(18px, 2vw, 22px); }
html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) .journal-entry-summary { grid-column: 1; grid-row: 2; color: var(--ink-muted) !important; }
html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) .journal-entry-meta { grid-column: 2; grid-row: 1; gap: 14px; width: auto; margin: 0; color: var(--ink-muted) !important; }
html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) :is(.journal-entry-title,.journal-entry-kind,.journal-entry-date) { color: var(--ink-primary) !important; }

html body.journal-page-article .journal-layout { width: min(1110px, 100%); margin: 0 auto; grid-template-columns: 170px minmax(0, 1fr); column-gap: clamp(45px, 6vw, 85px); padding: clamp(95px, 14vh, 155px) var(--page-edge) 150px !important; }
html body.journal-page-article .journal-article-head, html body.journal-page-article .journal-article-body { max-width: 720px; }
html body.journal-page-article .journal-article h1 { max-width: 760px; font-size: clamp(36px, 4vw, 54px); line-height: 1.12; }
html body.journal-page-article .journal-article-deck { max-width: 650px; color: var(--ink-secondary) !important; }
html body.journal-page-article .journal-article-figure { max-width: 760px; margin-block: 50px 62px; background: #111 !important; }
html body.journal-page-article .journal-article-body p, html body.journal-page-article .journal-article-body ul, html body.journal-page-article .journal-article-body ol { color: #c7c7c3 !important; font-size: 16px; line-height: 1.75; }
html body.journal-page-article .journal-article-body h2 { color: #f4f4f2 !important; }
html body.journal-page-article .journal-index-link { color: var(--ink-muted) !important; background: none !important; }
html body.journal-page-article .journal-index-link:is(:hover,:focus-visible,[aria-current='location']) { color: #fff !important; background: #171717 !important; }
html body .journal-article-body a { color: #f4f4f2 !important; text-decoration-color: #777 !important; }
html body .journal-article-body blockquote, html body .journal-article-body pre { color: #d6d6d3 !important; background: #171717 !important; }

/* The bottom dock stays available while pages branch away from the homepage. */
html body .site-footer { position: fixed !important; z-index: 60; inset: auto var(--page-edge) 16px !important; min-height: 0 !important; width: auto !important; background: transparent !important; pointer-events: none; }
html body .site-footer .site-dock { display: flex; flex-wrap: nowrap; align-items: center; box-sizing: border-box; width: min(760px, 100%); min-height: 52px; margin: 0 auto; padding: 10px 18px; gap: 30px; background: rgba(21,21,21,.94); backdrop-filter: blur(18px); border-radius: 11px; box-shadow: 0 10px 35px rgba(0,0,0,.38); pointer-events: auto; }
html body .site-footer .dock-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
html body .site-footer .site-dock a { color: #9b9b97 !important; font: 450 12px/1.4 var(--font-einhar); text-decoration: none; white-space: nowrap; }
html body .site-footer .site-dock a:hover, html body .site-footer .site-dock a:focus-visible { color: #fff !important; }
html body .site-footer .site-dock .dock-brand { color: #f4f4f2 !important; font-weight: 600; letter-spacing: -.02em; }
html body.page-work .site-dock a[href="work.html"], html body.journal-page .site-dock a[href="journal.html"] { color: #f4f4f2 !important; }
html body .site-footer .dock-top { margin-left: 0; }

html body.page-legal .legal-layout { width: min(760px, 100%); max-width: none; margin: 0 auto; padding: clamp(100px, 16vh, 160px) var(--page-edge) 140px; }
html body.page-legal .legal-layout h1 { font-size: clamp(34px, 4vw, 54px); }
html body.page-legal .legal-layout h2 { font-size: clamp(23px, 2.5vw, 32px); }
html body.page-legal .legal-layout p { color: var(--ink-secondary) !important; }

html body.page-work main.work-layout { box-sizing: border-box; width: min(1320px, 100%); min-height: 100svh; margin: 0 auto; padding: clamp(70px, 10vh, 110px) var(--page-edge) 180px; }
.page-work .work-return { color: var(--ink-muted); font: 450 13px/1.4 var(--font-einhar); text-decoration: none; }
.page-work .work-opening { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin: clamp(95px, 15vh, 170px) 0 clamp(120px, 17vh, 180px); }
.page-work .work-opening h1 { margin: 0; font: 500 clamp(40px, 6vw, 70px)/1.1 var(--font-einhar); letter-spacing: -.05em; }
.page-work .work-opening p { max-width: 390px; margin: 0; font: 400 16px/1.6 var(--font-einhar); }
.page-work .work-case-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 24px; }
.page-work .work-case-heading h2 { margin: 0 0 4px; font: 520 21px/1.3 var(--font-einhar); letter-spacing: -.025em; }
.page-work .work-case-heading p { margin: 0; font: 400 14px/1.5 var(--font-einhar); }
.page-work .work-case-heading a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-primary); font: 450 13px/1.4 var(--font-einhar); text-decoration: none; white-space: nowrap; }
.page-work .work-case-heading a svg { width: 15px; height: 15px; }
.page-work .work-case-heading a:hover { text-decoration: underline; text-underline-offset: 4px; }
.page-work .work-gallery { display: grid; grid-template-columns: 1.15fr 1fr .85fr; gap: 8px; height: clamp(280px, 33vw, 470px); }
.page-work .work-plate { min-width: 0; height: 100%; margin: 0; overflow: hidden; background: #1c1c1b; }
.page-work .work-plate img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.page-work .work-plate:hover img { transform: scale(1.025); }
.page-work .work-caption { margin: 14px 0 0; color: var(--ink-muted) !important; font: 400 12px/1.5 var(--font-einhar); }

@media (max-width: 760px) {
  .page-home .quiet-hero { min-height: 90svh; padding-block: 6vh 9vh; }
  .page-home .mark-stage { width: min(320px, 85vw); height: min(47svh, 390px); min-height: 230px; }
  .page-home .quiet-intro p { font-size: 14px; }
  html body.journal-page-article .journal-layout { display: block; padding: 75px var(--page-edge) 110px !important; }
  html body.journal-page-article .journal-sidebar { margin-bottom: 28px; }
  html body.journal-page-article .journal-article-figure { margin-block: 40px 48px; }
  .page-home .quiet-about { grid-template-columns: 1fr; gap: 20px; }
  .page-work .work-opening { grid-template-columns: 1fr; gap: 20px; margin-block: 90px 110px; }
  .page-work .work-gallery { height: auto; grid-template-columns: 1fr 1fr; }
  .page-work .work-plate { height: clamp(220px, 52vw, 360px); }
  .page-work .work-plate:first-child { grid-column: 1 / -1; }
  html body.journal-page:not(.journal-page-article) .journal-feed { grid-template-columns: 1fr; }
  html body.journal-page:not(.journal-page-article) .journal-feature { grid-column: auto; }
  html body.journal-page:not(.journal-page-article) :is(.journal-feature,.journal-entry) { min-height: 410px; padding: 23px; }
  html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) .journal-entry-copy { grid-template-columns: 1fr; }
  html body.journal-page:not(.journal-page-article) .journal-feed > .journal-entry:nth-child(n+4) .journal-entry-meta { grid-column: 1; grid-row: 3; margin-top: 12px; }
  html body .site-footer { inset: auto 9px 9px !important; }
  html body .site-footer .site-dock { width: 100%; min-height: 49px; padding: 10px 13px; gap: 14px; }
  html body .site-footer .dock-links { gap: clamp(9px, 2.7vw, 18px); }
  html body .site-footer .site-dock a { font-size: 11px; }
  html body .site-footer .dock-top { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .page-home .mark-motion { display: none; }
  .page-home .mark-still { display: block; }
  .page-work .work-plate img { transition: none; }
  html body.journal-page:not(.journal-page-article) .journal-entry-image { transition: none; }
}
