/* --------------------------------------------------------------------------
   Alex Schose — Independent Practice (V2 — restrained serif)
   Single stylesheet. No build step. No JavaScript. No tracking.
   -------------------------------------------------------------------------- */

:root {
  --paper:       #fafaf6;
  --paper-deep:  #f1ede3;
  --ink:         #14181f;
  --ink-soft:    #515963;
  --rule:        #d8d3c4;
  --measure:     38rem;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', 'Source Serif Pro', Charter, 'Iowan Old Style', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variation-settings: "opsz" 14;
}

body { margin: 0; padding: 0; }

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  margin-bottom: 3rem;
}

.masthead h1 {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.1;
  margin: 0 0 0.7rem;
  font-variation-settings: "opsz" 60;
}

.tagline {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 32rem;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Proof block — the credibility move
   -------------------------------------------------------------------------- */

.proof {
  margin: 0 0 4rem;
}

.proof-caption {
  font-size: 0.83rem;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
  letter-spacing: 0.01em;
}

.proof pre {
  background: var(--paper-deep);
  border-left: 2px solid var(--ink);
  margin: 0 -3.5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.55;
}

.proof code {
  background: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--ink);
  white-space: pre;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

section {
  margin-bottom: 3.5rem;
}

section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  letter-spacing: -0.005em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  font-variation-settings: "opsz" 14;
}

section h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

section p {
  margin: 0 0 1rem;
}

section p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Services & work entries
   -------------------------------------------------------------------------- */

.service,
.entry {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.service:last-child,
.entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.meta,
.entry-meta {
  font-size: 0.83rem;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.entry-meta {
  margin-bottom: 0.2rem;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 120ms ease;
}

a:hover {
  text-decoration-color: var(--ink);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.55rem 1.5rem;
  margin: 1.4rem 0 0;
}

.contact dt {
  font-size: 0.83rem;
  color: var(--ink-soft);
  padding-top: 0.18rem;
}

.contact dd {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Monospace
   -------------------------------------------------------------------------- */

.mono,
code,
pre {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.86em;
}

code {
  background: var(--paper-deep);
  padding: 0.05em 0.35em;
  border-radius: 2px;
  font-size: 0.84em;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.colophon {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.colophon p {
  margin: 0 0 0.4rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.colophon p:last-child {
  margin-bottom: 0;
}

.fineprint {
  font-size: 0.82rem !important;
}

/* --------------------------------------------------------------------------
   Selection
   -------------------------------------------------------------------------- */

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  html { font-size: 17px; }
  main { padding: 3.5rem 1.25rem 3rem; }
  .masthead { margin-bottom: 2.4rem; }
  .masthead h1 { font-size: 2rem; }
  .tagline { font-size: 1rem; }
  .proof pre { font-size: 0.95rem; padding: 0.85rem 1rem; margin: 0 -1.25rem; }
  .proof code { font-size: 0.72rem; }
  .contact { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .contact dt { margin-top: 0.85rem; }
  .contact dt:first-child { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  html { background: white; font-size: 11pt; }
  main { padding: 0; max-width: none; }
  a { color: var(--ink); text-decoration: none; }
}

/* --------------------------------------------------------------------------
   Article (long-form writing)
   -------------------------------------------------------------------------- */

.post-nav {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 3rem;
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.post-header h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.7rem;
  font-variation-settings: "opsz" 60;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}

.post h2 {
  font-size: 1.18rem;
  font-weight: 600;
  margin: 2.6rem 0 1rem;
  padding-bottom: 0;
  border-bottom: 0;
  letter-spacing: -0.005em;
}

.post h2:first-of-type {
  margin-top: 0.5rem;
}

.post p {
  margin: 0 0 1.05rem;
}

.post p + p {
  text-indent: 0;
}

.post ol,
.post ul {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
}

.post ol li,
.post ul li {
  margin-bottom: 0.6rem;
  padding-left: 0.2rem;
}

.post ol li:last-child,
.post ul li:last-child {
  margin-bottom: 0;
}

.post pre {
  background: var(--paper-deep);
  border-left: 2px solid var(--ink);
  margin: 1.4rem -2.5rem;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  line-height: 1.55;
}

.post pre code {
  background: none;
  padding: 0;
  font-size: 0.78rem;
  white-space: pre;
}

.post pre.diagram {
  background: transparent;
  border-left: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 1rem;
  margin-left: 0;
  margin-right: 0;
  text-align: center;
}

.post pre.diagram code {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.post table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.92rem;
}

.post table th,
.post table td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.post table th {
  font-weight: 600;
  color: var(--ink);
  border-bottom-width: 2px;
}

.post table td:last-child {
  white-space: nowrap;
  color: var(--ink-soft);
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.post-footer p { margin: 0 0 0.5rem; }
.post-footer p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .post pre { margin-left: -1.25rem; margin-right: -1.25rem; padding: 0.85rem 1rem; }
  .post pre code { font-size: 0.7rem; }
  .post pre.diagram { margin-left: 0; margin-right: 0; padding: 1rem 0.5rem; }
  .post pre.diagram code { font-size: 0.6rem; }
  .post table { font-size: 0.85rem; }
  .post table th, .post table td { padding: 0.45rem 0.5rem; }
}
