/* boaztulu.com
   The only stylesheet. Plain CSS, no build step.
   English is set in Charis SIL and Amharic in Abyssinica SIL; SIL drew the two to sit together.
   One text column, white page, underlined links. Keep it that way. */

[hidden] { display: none !important; }

:root {
  --ink: #1d1d1b;
  --muted: #5c5c56;
  --rule: #dddcd5;
  --tint: #f4f3ee;
  --link: #1c4d87;
  --link-hover: #0e3260;
  --amharic: #8e3a17;
  --serif: "Charis SIL", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --ethiopic: "Abyssinica SIL", "Noto Sans Ethiopic", Nyala, Ebrima, Kefa, serif;
  --mono: Consolas, Menlo, "DejaVu Sans Mono", monospace;
  --column: 41rem;
  --gutter: 1.1rem;
}

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

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 30rem) { html { font-size: 106.25%; } }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.17em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--link); outline-offset: 2px;
}

h1, h2, h3 { font-weight: 700; line-height: 1.25; margin: 0; }
h1 { font-size: 1.6rem; margin-bottom: 1.1rem; }
h2 { font-size: 1.22rem; margin: 2.6rem 0 0.75rem; clear: both; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 0.35rem; }

p, ul, ol, figure, dl { margin: 0 0 1rem; }
p, li, figcaption { text-wrap: pretty; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }
img { max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--tint); padding: 0.05em 0.3em; border-radius: 3px; }

.am { font-family: var(--ethiopic); font-weight: 400; font-synthesis: none; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 0.4rem 0.8rem; z-index: 10; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; color: #fff; }

/* ---------- Page frame: header, column, footer ---------- */

.site-head, main, .site-foot {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.35rem 1.4rem;
  padding-top: 1.7rem; padding-bottom: 0.9rem;
  background: linear-gradient(var(--rule), var(--rule)) center bottom / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.site-head .name { margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.site-head .name a { color: var(--ink); text-decoration: none; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; }
.site-head nav a { color: var(--ink); text-decoration: none; }
.site-head nav a:hover { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; }
.site-head nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
@media (max-width: 30rem) { .site-head nav { gap: 0.15rem 0.85rem; font-size: 0.96rem; } }

main { padding-top: 2.1rem; padding-bottom: 2.6rem; }

.site-foot {
  padding-top: 1.1rem; padding-bottom: 2.4rem;
  color: var(--muted); font-size: 0.86rem;
  background: linear-gradient(var(--rule), var(--rule)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.site-foot p { margin: 0 0 0.25rem; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

/* ---------- Home ---------- */

.portrait { float: right; width: 12.5rem; margin: 0.3rem 0 1rem 1.5rem; border-radius: 2px; }
@media (max-width: 30rem) {
  .portrait { float: none; display: block; width: 7.5rem; margin: 0 0 1.1rem; }
}
.contact-line { line-height: 1.85; }

/* Dated lists: news, jobs, awards, talks */
.dated { list-style: none; padding: 0; }
.dated li { display: grid; grid-template-columns: 5.4rem 1fr; gap: 0 0.8rem; margin-bottom: 0.55rem; }
.dated .when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 30rem) {
  .dated li { grid-template-columns: 1fr; gap: 0; margin-bottom: 0.8rem; }
  .dated .when { font-size: 0.86rem; }
}

/* ---------- Publications ---------- */

.pubs { padding-left: 1.7rem; }
.pubs li { margin-bottom: 0.9rem; padding-left: 0.15rem; }
.pubs li::marker { color: var(--muted); }
ul.pubs { list-style: none; padding-left: 0; }
.me { font-weight: 700; }

/* ---------- Figures and projects ---------- */

figure img { display: block; border: 1px solid var(--rule); }
figure.plain img { border: 0; }   /* for figures that already sit on white */
figcaption { color: var(--muted); font-size: 0.86rem; line-height: 1.45; margin-top: 0.45rem; }

.project { display: flow-root; margin-bottom: 2.1rem; }
.project h3 { margin-top: 0; font-size: 1.1rem; }
.byline { color: var(--muted); font-size: 0.9rem; line-height: 1.45; margin: 0.15rem 0 0.9rem; }
.status { color: var(--muted); font-style: italic; }
.toc { color: var(--muted); font-size: 0.95rem; }

.side { float: right; clear: right; width: 44%; margin: 0.35rem 0 0.8rem 1.4rem; }
.side.narrow { width: 30%; }
@media (max-width: 36rem) {
  .side, .side.narrow { float: none; width: auto; margin: 0 0 1rem; }
  .side.narrow img { max-width: 65%; }
}

.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0 1rem; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 30rem) { .photos { grid-template-columns: 1fr; } }

/* ---------- Tutorials (/ai) ---------- */

.tutorials h1 .am { display: block; color: var(--amharic); font-size: 1.12em; margin-bottom: 0.3rem; }
.tutorials p.am { color: var(--amharic); font-size: 1.05rem; margin-top: -0.35rem; }
.crumbs { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.9rem; }

.video { position: relative; aspect-ratio: 16 / 9; background: #111; margin: 0.3rem 0 0.5rem; }
@supports not (aspect-ratio: 16 / 9) { .video { height: 0; padding-top: 56.25%; } }
.video > a, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video > a { display: block; color: #fff; text-decoration: none; }
.video img { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video .play {
  position: absolute; left: 0.9rem; bottom: 0.9rem;
  background: rgba(0, 0, 0, 0.8); color: #fff;
  padding: 0.3rem 0.8rem; border-radius: 3px; font-size: 0.95rem;
}
.video > a:hover .play, .video > a:focus-visible .play { background: #000; text-decoration: underline; }

.lessons { padding-left: 1.7rem; }
.lessons li { margin-bottom: 0.55rem; }
.lessons .what { color: var(--muted); }
.lessons .actions a { margin-left: 0.5rem; font-size: 0.92rem; }

/* ---------- Buttons and the registration form ---------- */

.button {
  display: inline-block; font: inherit; font-weight: 700; line-height: 1.3;
  color: #fff; background: var(--ink); border: 0; border-radius: 3px;
  padding: 0.55rem 1.05rem; text-decoration: none; cursor: pointer;
}
.button:hover { color: #fff; background: #000; text-decoration: none; }

.form-card { background: var(--tint); border: 1px solid var(--rule); border-radius: 4px; padding: 1.4rem 1.4rem 1.6rem; }
.field { margin-bottom: 1.1rem; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field fieldset { border: 0; margin: 0; padding: 0; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 0.5rem 0.6rem; border: 1px solid #b9b8af; border-radius: 3px; background: #fff;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field label.choice, .choice { display: flex; gap: 0.55rem; align-items: baseline; font-weight: 400; margin: 0.3rem 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: end; }
@media (max-width: 34rem) { .row-2 { grid-template-columns: 1fr; } .form-card { padding: 1.1rem; } }
.hp { position: absolute !important; left: -5000px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: 3px; padding: 0.8rem 1rem; margin-bottom: 1.2rem; }
.alert-error { background: #fbeceb; border: 1px solid #e3b4ae; color: #6f2016; }
.alert-ok { background: #edf5ee; border: 1px solid #b9d6bd; color: #1f4d27; }
.plain-list { padding-left: 1.2rem; }
.alert .plain-list { margin: 0.4rem 0 0; }
