/* Shared chrome for the personal site. Quiet, paper-like, still a homepage. */
:root {
  --bg: #f6f3ec;
  --fg: #1c1917;
  --muted: #6b645c;
  --rule: #ddd6cb;
  --link: #2a4a6a;
  --link-hover: #16324c;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Liberation Sans", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Liberation Serif", "Times New Roman", serif;
}

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

html {
  color-scheme: light;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.15rem 1.35rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 1.5rem;
}

.site-name {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: var(--fg);
  text-decoration: none;
}

.site-name:hover {
  color: var(--fg);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  font-family: var(--sans);
  font-size: 0.88rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fg);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -1px 0 var(--fg);
}

.site-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.75rem 1.35rem;
}

.site-main table {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  border: 0;
  border-collapse: collapse;
}

.site-main td > h2:first-child {
  margin-top: 0;
}

.site-main td {
  font-family: inherit;
}

.site-main p {
  margin: 0 0 1.05em;
}

.site-main > :last-child,
.site-main td > :last-child {
  margin-bottom: 0;
}

.site-main > p:empty {
  display: none;
}

.site-main h2,
.site-main .section-title,
.site-main font[size="4"],
.site-main font[size="+1"] {
  display: block;
  margin: 1.75rem 0 0.85rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-main center {
  display: block;
  margin: 0.85rem 0;
  font-style: italic;
}


.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.8rem 1.35rem 2.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
}

form {
  margin: 1.1rem 0 0;
}

textarea {
  width: 100% !important;
  max-width: 100%;
  margin-top: 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fffdf8;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.45;
}

input[type="button"],
input[type="submit"] {
  font-family: var(--sans);
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.site-main form table td {
  padding: 0.15rem 0.2rem;
}

input[type="button"]:hover {
  border-color: var(--fg);
}

input[type="submit"] {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
  margin-top: 0.55rem;
}

input[type="submit"]:hover {
  background: var(--link);
  border-color: var(--link);
}

@media (max-width: 40rem) {
  body {
    font-size: 1rem;
  }

  .site-header-inner,
  .site-nav {
    justify-content: flex-start;
  }
}
