/* One stylesheet for the whole site. Minimal, serif, understated.
 *
 * To switch themes: swap the active :root block below with one of the
 * preset blocks at the bottom of this comment. Nine variable lines.
 */

:root {
  color-scheme: light;

  /* ---------- Active theme: stark white (PG-minimal) ---------- */
  --page-bg:       #ffffff;
  --card-page-bg:  #ffffff;
  --card-bg:       #ffffff;
  --ink:           #000000;
  --ink-soft:      #1f1f1f;
  --ink-muted:     #7d7d7d;
  --rule:          #d8d8d8;
  --border:        #d8d8d8;
  --code-bg:       #f4f4f4;

  /* ---------- Other palettes — copy a block over the active one ----------

  Bone (warm Bateman):
    --page-bg:      #f8f6ed;
    --card-page-bg: #e7e4d6;
    --card-bg:      #f6f3e7;
    --ink:          #1c1c1c;
    --ink-soft:     #2b2b2b;
    --ink-muted:    #6a6450;
    --rule:         #cbc5af;
    --border:       #cbc5af;
    --code-bg:      #ece8d8;

  Newsprint (pale, slightly cool):
    --page-bg:      #f4f3ee;
    --card-page-bg: #ebeae3;
    --card-bg:      #faf9f5;
    --ink:          #1f1f1f;
    --ink-soft:     #2b2b2b;
    --ink-muted:    #6e6e69;
    --rule:         #d3d2cb;
    --border:       #d3d2cb;
    --code-bg:      #efeee9;

  Cool slate (calm contemporary):
    --page-bg:      #eceef0;
    --card-page-bg: #e0e3e6;
    --card-bg:      #f7f8f9;
    --ink:          #161a1f;
    --ink-soft:     #262b32;
    --ink-muted:    #6d747c;
    --rule:         #c0c5cb;
    --border:       #c0c5cb;
    --code-bg:      #e4e7ea;

  */
}

body {
  font-family: Garamond, "EB Garamond", "Hoefler Text", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page-bg);
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

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

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

.muted {
  color: var(--ink-muted);
}

/* ---------- Business card landing (index.html) ---------- */

.card-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
  background: var(--card-page-bg);
}

.card {
  width: 460px;
  max-width: 100%;
  min-height: 270px;
  perspective: 1400px;
}

/* Flip layer: holds the two faces and rotates between them. */
.card-inner {
  display: grid;
  grid-template-areas: "stack";
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-inner.is-flipped {
  transform: rotateY(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .card-inner {
    transition: none;
  }
}

.card-face {
  grid-area: stack;
  background: var(--card-bg);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 18px rgba(0, 0, 0, 0.04);
  padding: 38px 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  text-align: center;
  text-transform: lowercase;
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-back {
  transform: rotateY(180deg);
}

.card-flip {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1;
  padding: 6px 8px;
  color: var(--ink-muted);
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.card-flip:hover,
.card-flip:focus-visible {
  opacity: 1;
  outline: none;
}

.card-links {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.22em;
  line-height: 2.4;
  color: var(--ink-soft);
}

.card-mid {
  padding: 4px 0;
}

.card-name {
  margin: 0;
  font-size: clamp(1.35rem, 6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.25;
}

.card-title {
  margin: 10px 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}

.card-pursuits {
  margin: 12px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  color: var(--ink-muted);
}

.card-contact {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  line-height: 2.1;
  color: var(--ink-soft);
}

.card-contact .sep {
  margin: 0 6px;
  color: var(--ink-muted);
}

.card a {
  color: inherit;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Articles index + reader / about page ---------- */

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 80px 24px 96px;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 0 0 40px;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-list li {
  margin: 0 0 16px;
}

.article-list .date {
  color: var(--ink-muted);
  font-size: 0.8rem;
  margin-left: 10px;
  white-space: nowrap;
}

/* Rendered Markdown */

article h1 {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 6px;
}

article .meta {
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin: 0 0 36px;
}

article h2 {
  font-size: 1.25rem;
  margin: 36px 0 10px;
}

article h3 {
  font-size: 1.05rem;
  margin: 26px 0 8px;
}

article p {
  margin: 0 0 20px;
}

article ul,
article ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

article li {
  margin: 0 0 8px;
}

article blockquote {
  margin: 0 0 20px;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--rule);
  color: var(--ink-muted);
}

article pre {
  background: var(--code-bg);
  padding: 16px 18px;
  border-radius: 3px;
  overflow-x: auto;
  font-size: 0.82rem;
}

article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

article pre code {
  background: none;
  padding: 0;
}

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

article hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 36px 0;
}

.foot {
  margin-top: 64px;
  font-size: 0.85rem;
}
