/*
Theme Name: Alan Bale Elm
Theme URI: https://alanbale.concordialinguistics.org/
Author: Alan Bale
Description: An Elm-driven academic site using WordPress as a headless content manager.
Version: 0.1.0
Requires at least: 6.9
Requires PHP: 8.1
Text Domain: alanbale-elm
*/

@font-face {
  font-family: "Alan Inter";
  src: url("assets/fonts/Inter-VariableFont_slnt,wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #13251f;
  --muted: #617069;
  --paper: #f6f2e8;
  --card: #fffdf7;
  --line: #d6d2c6;
  --field: #173f31;
  --field-hover: #225b46;
  --field-soft: #e3ebe4;
  --gold: #d89b2b;
  --gold-dark: #9b6610;
  --danger: #a33b2e;
  --shadow: 0 22px 60px rgb(24 45 36 / 10%);
  font-family: "Alan Inter", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.alanbale-elm-theme {
  min-width: 20rem;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.75%, rgb(255 255 255 / 35%) 50%, transparent 50.25%),
    radial-gradient(circle at 20% 0%, #fbf6e8 0, transparent 35rem),
    var(--paper);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: white;
  background: var(--field);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.7fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-name {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--field);
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.hero h1 {
  max-width: 13ch;
  margin: 0 0 0.8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.93;
}

.lede {
  max-width: 59ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.discipline-mark {
  position: relative;
  overflow: hidden;
  min-height: 12rem;
  padding: 1.4rem;
  border-radius: 1.2rem;
  color: white;
  background: var(--field);
  box-shadow: var(--shadow);
}

.discipline-mark::before,
.discipline-mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.discipline-mark::before {
  width: 9rem;
  height: 9rem;
}

.discipline-mark::after {
  width: 4rem;
  height: 4rem;
}

.mark-number,
.mark-caption,
.mark-word {
  position: relative;
  z-index: 1;
  display: block;
}

.mark-number {
  font-family: Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
}

.mark-caption {
  max-width: 10rem;
  margin-top: 3.2rem;
  color: rgb(255 255 255 / 72%);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mark-word {
  position: absolute;
  right: 1.4rem;
  bottom: 1.25rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.primary-nav {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 253 247 / 78%);
  box-shadow: 0 10px 30px rgb(24 45 36 / 6%);
}

.primary-nav a {
  flex: 0 0 auto;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-nav a:hover {
  color: var(--field);
  background: var(--field-soft);
}

.primary-nav a.active {
  color: white;
  background: var(--field);
}

.primary-nav a:focus-visible,
wordpress-content a:focus-visible,
.site-name:focus-visible,
.text-link:focus-visible {
  outline: 3px solid rgb(216 155 43 / 50%);
  outline-offset: 3px;
}

.content-card,
.no-script-content {
  min-height: 18rem;
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

wordpress-content {
  display: block;
  max-width: 72ch;
}

.page-publications wordpress-content,
.page-talks wordpress-content {
  max-width: 86ch;
}

wordpress-content > :first-child {
  margin-top: 0;
}

wordpress-content > :last-child {
  margin-bottom: 0;
}

wordpress-content p,
wordpress-content li {
  color: #30433b;
  font-size: 1rem;
  line-height: 1.78;
}

wordpress-content p {
  margin: 0 0 1.25rem;
}

wordpress-content ul,
wordpress-content ol {
  margin: 0 0 1.5rem;
  padding-left: 1.35rem;
}

wordpress-content h2,
wordpress-content h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.025em;
}

wordpress-content h2 {
  margin: 2.6rem 0 1rem;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

wordpress-content h3 {
  margin: 2.5rem 0 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--gold-dark);
  font-size: 1.4rem;
}

wordpress-content a,
.text-link {
  color: var(--field);
  font-weight: 700;
  text-decoration-color: rgb(23 63 49 / 35%);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

wordpress-content a:hover,
.text-link:hover {
  color: var(--gold-dark);
  text-decoration-color: currentcolor;
}

wordpress-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  background: var(--field-soft);
}

.status-card {
  display: grid;
  align-content: center;
}

.status-copy {
  max-width: 45rem;
  margin: 0;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.45;
}

.site-footer {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.no-script-content {
  width: min(76rem, calc(100% - 2rem));
  margin: 2rem auto;
}

@media (max-width: 52rem) {
  .site-shell {
    padding-top: 2rem;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .discipline-mark {
    min-height: 9rem;
  }

  .mark-caption {
    margin-top: 1.7rem;
  }
}

@media (max-width: 34rem) {
  .site-shell {
    width: min(100% - 1rem, 76rem);
    padding-top: 1.25rem;
  }

  .hero {
    gap: 1.25rem;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 15vw, 4rem);
  }

  .site-name {
    margin-bottom: 1rem;
  }

  .primary-nav {
    border-radius: 1rem;
  }

  .content-card {
    padding: 1.25rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
