/* gyassa.com: one stylesheet for every page. It shares its palette and type with dynamicruntime.com
   (KdrCommercial: dyncom/site/assets/site.css) so the two sites read as one family. */

:root {
  --purple-deep: #5B53B8;
  --teal: #1D9E75;
  --coral: #D85A30;

  --bg: #FAF9F5;
  --bg-alt: #F1EFE8;
  --surface: #FFFFFF;
  --ink: #1F1D2B;
  --ink-soft: #55526A;
  --line: #E2DFD5;
  --accent: var(--purple-deep);
  --accent-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(31, 29, 43, .06), 0 8px 24px rgba(31, 29, 43, .06);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --page: 1120px;
  --content: 820px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15141C;
    --bg-alt: #1C1B25;
    --surface: #23222E;
    --ink: #EEEDF3;
    --ink-soft: #ABA8BD;
    --line: #34323F;
    --accent: #9D96EC;
    --accent-ink: #15141C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 1.6em 0 .5em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 0; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

code { font-family: var(--mono); font-size: .9em; background: var(--bg-alt); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--bg-alt); padding: 14px 18px; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; }
blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.25rem; border-left: 4px solid var(--coral); color: var(--ink-soft); }
table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; }
th, td { text-align: left; padding: .6em .8em; border-bottom: 1px solid var(--line); vertical-align: top; }
/* MathJax display equations scroll rather than widen the page on a phone. */
mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 10px; display: block; }
.brand-name { font: 600 1.45rem/1 var(--serif); }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--teal); }
.site-nav .button {
  padding: .45em 1em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: .9rem;
}
.site-nav .button:hover { color: var(--accent-ink); filter: brightness(1.08); }

/* Content: left-aligned under the brand, as on dynamicruntime.com, and wider than a typical blog column. */

main { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 8vw, 88px); }
.content { max-width: var(--content); overflow-wrap: break-word; } /* A bare URL wraps instead of widening a phone's page. */
.back { font-size: .95rem; margin-bottom: 1.5rem; }
.back a { text-decoration: none; }

.eyebrow {
  font: 600 .8rem/1.2 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); }

/* Cards, for the home page's "where to find things". */

.cards { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin: 1.25rem 0 1rem; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}
.card:nth-child(2) { border-top-color: var(--coral); }
.card:nth-child(3) { border-top-color: #7F77DD; }
.card:nth-child(4) { border-top-color: var(--ink-soft); }
.card:hover { border-color: var(--accent); border-top-width: 4px; }
.card strong { display: block; font: 600 1.15rem/1.3 var(--serif); color: var(--accent); margin-bottom: .3em; }
.card span { color: var(--ink-soft); font-size: .97rem; }

/* The blog's post list. */

ul.posts { list-style: none; padding: 0; margin: 1.5rem 0 0; }
ul.posts li { padding: 1.1rem 0; border-top: 1px solid var(--line); margin: 0; color: var(--ink-soft); }
ul.posts li:last-child { border-bottom: 1px solid var(--line); }
ul.posts strong a { font: 600 1.2rem/1.3 var(--serif); text-decoration: none; }
ul.posts strong a:hover { text-decoration: underline; }
ul.posts em { white-space: nowrap; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--ink-soft); font-size: .92rem; }
.site-footer .wrap { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.site-footer h4 { font: 600 .8rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0 0 .75em; }
.site-footer p { margin: 0 0 .5em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45em; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
