/* johnathansolorzano.com
   Bianca Censori theme principles: white page, charcoal ink, one mono face,
   uppercase labels with wide tracking, a single 600px column.
   No divider lines; underlines only on hover; the signup inputs keep a line. */

:root {
  --ink: #2e2e30;
  --ink-2: #6f6f72;
  --ink-3: #b3b3b3;
  --line: #8a8a8c;
  --bg: #fff;
  --col: 600px;
  --gut: 20px;
  --font: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 12px/1.6 var(--font);
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; text-underline-offset: 5px; text-decoration-thickness: 1px; }

:is(a, button):focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.wrap { max-width: calc(var(--col) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: var(--gut); top: -40px; z-index: 20; background: var(--bg); padding: 8px 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.skip:focus { top: 8px; }

.label { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.site-header .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header nav ul { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; }
.site-header a { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.site-header a:hover { text-decoration: underline; }

/* Home hero */
.hero { text-align: center; padding-block: 96px 72px; display: flex; flex-direction: column; align-items: center; }
.photo { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.photo img { width: 96px; height: 96px; object-fit: cover; filter: grayscale(0); transition: filter .5s ease; }
.photo[aria-pressed=true] img { filter: grayscale(1); }
.photo .lava { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.photo.has-lava[aria-pressed=true] img { filter: none; } /* the lava layer does the black and white */
.hero h1 { margin: 32px 0 0; font-size: 18px; font-weight: 500; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; }

.toggle {
  width: 24px; height: 24px; margin-top: 10px; display: grid; place-items: center;
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink-2);
  font: 300 18px/1 var(--font); transition: color .2s ease, transform .3s ease;
}
.toggle:hover, .toggle[aria-expanded=true] { color: var(--ink); }
.toggle[aria-expanded=true] { transform: rotate(45deg); }
.no-js .toggle { display: none; }

.hero-about { max-width: 280px; margin: 10px 0 0; color: var(--ink-2); line-height: 1.8; }
.hero-signup { width: 100%; max-width: 280px; margin-top: 32px; }
.js .hero-about:not(.is-open) { display: none; }
.is-open { animation: in .35s ease; }
@keyframes in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Signup form */
.signup { width: 100%; max-width: 280px; text-align: center; }
.signup-h { margin: 0; }
.signup-s { margin: 6px 0 0; color: var(--ink-2); letter-spacing: .02em; }
.signup form { margin-top: 20px; display: flex; flex-direction: column; align-items: center; }
.field { position: relative; width: 100%; padding-top: 14px; margin-bottom: 14px; }
.field input {
  width: 100%; height: 34px; padding: 0; border: 0; border-bottom: 1px solid var(--ink-3); border-radius: 0;
  background: transparent; color: var(--ink); font: 400 12px var(--font); letter-spacing: .04em;
  transition: border-color .2s ease;
}
.field input:focus { outline: none; border-bottom-color: var(--ink); }
.field input::placeholder { color: transparent; }
.field label {
  position: absolute; left: 0; top: 24px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--line); pointer-events: none; transition: top .2s ease, font-size .2s ease, color .2s ease;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 0; font-size: 10px; color: var(--ink-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup button {
  margin-top: 14px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink);
  font: 500 11px var(--font); letter-spacing: .12em; text-transform: uppercase; text-underline-offset: 5px;
}
.signup button:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.signup button[disabled] { opacity: .5; cursor: default; }
.signup .msg { margin: 18px 0 0; color: var(--ink-2); line-height: 1.7; letter-spacing: .02em; }
.signup .msg:empty { display: none; }
.signup form.is-done > :not(.msg) { display: none; }

/* Post list */
.posts { padding-bottom: 120px; }
.posts-h { margin: 0; padding-bottom: 8px; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.posts ol { margin: 0; padding: 0; list-style: none; }
.posts li a { display: block; padding: 22px 0; }
.posts h2, .posts h3 { margin: 8px 0 0; font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; }
.posts li a:hover :is(h2, h3) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.posts p { margin: 8px 0 0; line-height: 1.7; color: var(--ink-2); }
.posts .empty { padding: 22px 0; color: var(--ink-2); }
time, .meta { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }

/* Articles (posts and the about page) */
.article { padding-top: 96px; }
.article > h1, .article > header { text-align: center; }
.article h1 { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.35; letter-spacing: .1em; text-transform: uppercase; }
.article .dek { margin: 16px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.article .meta { margin: 20px 0 0; }
.article .meta strong { color: var(--ink); font-weight: 500; }
.about-photo { display: block; width: 96px; height: 96px; object-fit: cover; margin: 0 auto 32px; }

.prose { margin-top: 56px; font-size: 13px; line-height: 1.85; letter-spacing: 0; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.4em; }
.prose h2 { margin: 3em 0 1em; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.prose h3 { margin: 2.6em 0 .9em; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.prose strong { font-weight: 500; }
.prose em { font-style: normal; color: var(--ink-2); }
.prose a { text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose blockquote { margin: 2.8em 0; padding: 0; }
.prose blockquote p { margin: 0; font-size: 16px; line-height: 1.6; letter-spacing: -.005em; }
.prose blockquote p::before { content: "\201C"; margin-left: -.6em; }
.prose blockquote p::after { content: "\201D"; }
.prose ul, .prose ol { padding-left: 0; list-style: none; }
.prose li { position: relative; margin: 0 0 .5em; }
.prose ul > li { padding-left: 1.6em; }
.prose ul > li::before { content: "\2014"; position: absolute; left: 0; color: var(--ink-3); }
.prose ol { counter-reset: n; }
.prose ol > li { padding-left: 2.2em; counter-increment: n; }
.prose ol > li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: .15em; font-size: 10px; letter-spacing: .08em; color: var(--ink-2); }
.prose figure { margin: 2.8em 0; }
.prose figure img { width: 100%; }
.prose figcaption { margin-top: .8em; font-size: 11px; letter-spacing: .04em; color: var(--ink-2); }
.prose hr { height: 0; margin: 3.2em 0; border: 0; overflow: visible; text-align: center; }
.prose hr::after { content: "\00B7  \00B7  \00B7"; display: block; margin-top: -.8em; font-size: 13px; letter-spacing: .4em; color: var(--ink-3); }
.prose code { font-size: 12px; background: #f5f5f5; padding: .1em .35em; }

.article-signup { display: flex; justify-content: center; padding-block: 96px; }
.more { padding-bottom: 120px; }

/* Subscribe page */
.subscribe-page { display: flex; justify-content: center; padding-block: 96px 72px; }
.subscribe-page > div { width: 100%; max-width: 280px; }

/* 404 */
.notfound { padding-block: 96px 120px; text-align: center; }
.notfound p { color: var(--ink-2); }
.notfound a { text-decoration: underline; text-underline-offset: 5px; }

/* Footer */
.site-footer { width: 100%; box-sizing: border-box; padding-bottom: 40px; text-align: center; }
.site-footer ul { display: flex; justify-content: center; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.site-footer ul a { width: 24px; height: 24px; display: grid; place-items: center; color: var(--ink-2); transition: color .2s ease, transform .2s ease; }
.site-footer ul a:hover { color: var(--ink); transform: translateY(-2px); }
.site-footer svg { width: 13px; height: 13px; }
.site-footer small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }

@media (max-width: 639px) {
  .hero { padding-block: 64px 48px; }
  .article { padding-top: 56px; }
  .article h1 { font-size: 18px; }
  .field input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Collapsible sections (About, FAQ): native <details>, so the text is in the HTML for search and AI crawlers */
.fold { margin: 0; }
.fold + .fold { margin-top: 0; }
.fold summary { display: flex; align-items: baseline; gap: 12px; cursor: pointer; list-style: none; padding: 14px 0; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "+"; margin-left: auto; font: 300 18px/1 var(--font); color: var(--ink-2); transition: transform .3s ease, color .2s ease; }
.fold summary:hover::after, .fold[open] summary::after { color: var(--ink); }
.fold[open] summary::after { transform: rotate(45deg); }
.prose .fold summary h2 { margin: 0; }
.fold-body { padding: 6px 0 22px; animation: in .35s ease; }
.fold-body > :last-child { margin-bottom: 0; }
.prose > p:first-child:has(+ .fold), .prose .fold:first-child { margin-top: 0; }
.prose .fold + p { margin-top: 2.4em; }
.prose > .fold:last-child { margin-bottom: 2em; }
