@font-face {
  font-family: 'ME Playfair';
  src: url('PlayfairDisplay-Variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --me-ink: #1a2921;
  --me-forest: #16352b;
  --me-deep: #0f251e;
  --me-green: #2b5142;
  --me-paper: #f8f5ed;
  --me-card: #fffdf8;
  --me-line: #ded8c9;
  --me-muted: #506055;
  --me-brass: #e0bb79;
  --me-ochre: #79561f;
  --me-serifs: 'ME Playfair', Georgia, serif;
  --me-gutter: clamp(1rem, 4.5vw, 4rem);
  --me-max: 78rem;
}

body {
  background: var(--me-paper);
  color: var(--me-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
}

#page {
  max-width: var(--me-max);
}

body.home #page,
body.blog #page {
  max-width: none;
}

body.home #content,
body.blog #content {
  display: block;
  padding: 0;
}

.me-wrap {
  width: min(100% - var(--me-gutter) * 2, var(--me-max));
  margin-inline: auto;
}

body :where(h1, h2, h3, h4, h5, h6) {
  color: var(--me-ink);
  font-family: var(--me-serifs);
  line-height: 1.17;
  letter-spacing: -.025em;
  text-wrap: balance;
}

body a {
  color: var(--me-green);
  text-underline-offset: .2em;
}

body a:hover {
  color: var(--me-ochre);
}

body :focus-visible {
  outline: 2px solid #906020;
  outline-offset: 4px;
}

.me-header {
  position: relative;
  z-index: 5;
  background: var(--me-card);
  border-bottom: 1px solid var(--me-line);
}

.me-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.8rem;
  gap: 1.25rem;
}

.me-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  flex: 0 0 auto;
  color: var(--me-forest);
  font-family: var(--me-serifs);
  font-size: clamp(1.12rem, 2vw, 1.57rem);
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none;
}

.me-mark {
  --me-mark-color: var(--me-ochre);
  display: grid;
  place-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--me-mark-color);
  border-radius: 50%;
}

.me-mark span {
  width: .67rem;
  height: .67rem;
  border: 1px solid var(--me-mark-color);
  transform: rotate(45deg);
}

.me-links,
.me-topic-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem clamp(.4rem, 1.7vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.me-header__nav .me-links > li {
  position: relative;
}

.me-header__nav a,
.me-search summary,
.me-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.75rem;
  color: var(--me-forest);
  font-size: .91rem;
  font-weight: 620;
  text-decoration: none;
}

.me-header__nav a:hover,
.me-header__nav a[aria-current='page'],
.me-header__nav .current-menu-item > a {
  color: var(--me-ochre);
  text-decoration: underline;
}

.me-header__nav .sub-menu {
  min-width: 11rem;
  margin: 0;
  padding: .5rem .9rem;
  list-style: none;
}

.me-menu-toggle {
  display: none;
  padding: .35rem .65rem;
  border: 1px solid var(--me-line);
  border-radius: .25rem;
  background: transparent;
  cursor: pointer;
}

.me-menu-icon {
  width: .9rem;
  height: .65rem;
  border-block: 1px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}

.me-search summary {
  cursor: pointer;
  list-style: none;
}

.me-search summary::-webkit-details-marker {
  display: none;
}

.me-search-icon {
  position: relative;
  width: .82rem;
  height: .82rem;
  margin-inline-end: .16rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.me-search-icon::after {
  position: absolute;
  width: .36rem;
  height: 1.5px;
  background: currentColor;
  content: '';
  inset: 90% auto auto 82%;
  transform: rotate(45deg);
  transform-origin: left center;
}

.me-search__form {
  position: absolute;
  width: min(24rem, 100%);
  padding: 1rem;
  background: var(--me-card);
  border: 1px solid var(--me-line);
  box-shadow: 0 14px 26px #1a292114;
  inset: calc(100% - .15rem) 0 auto auto;
}

.me-search__form label {
  display: block;
  color: var(--me-muted);
  font-size: .8rem;
  font-weight: 620;
  margin-bottom: .35rem;
}

.me-search__form > div {
  display: flex;
  gap: .4rem;
}

.me-search__form input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--me-line);
  color: var(--me-ink);
  background: white;
}

.me-search__form button {
  flex: none;
  background: var(--me-forest);
  color: white;
  padding-inline: 1rem;
}

.me-home,
.me-archive {
  margin-block: clamp(1rem, 3.4vw, 2.8rem) clamp(3rem, 7vw, 7rem);
}

.me-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  min-height: clamp(27rem, 39vw, 34rem);
  overflow: hidden;
  border-radius: .35rem;
  background: var(--me-deep);
}

.me-hero__copy {
  align-self: center;
  padding: clamp(2rem, 5.25vw, 5rem);
}

.me-label {
  display: block;
  margin: 0 0 .7rem;
  color: var(--me-ochre);
  font-size: .71rem;
  font-weight: 720;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.me-hero .me-label,
.me-about-strip .me-label {
  color: var(--me-brass);
}

.me-hero h1 {
  margin: 0 0 1.2rem;
  color: var(--me-card);
  font-size: clamp(2.7rem, 4.8vw, 5rem);
  font-weight: 550;
  line-height: 1.03;
  letter-spacing: -.065em;
  text-wrap: initial;
}

.me-hero h1 em {
  display: block;
  color: var(--me-brass);
  font-weight: 500;
}

.me-hero__intro {
  max-width: 39ch;
  margin-bottom: 1.8rem;
  color: #e5eadc;
  font-size: clamp(.96rem, 1.25vw, 1.12rem);
  line-height: 1.65;
}

.me-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem 1.25rem;
}

.me-button,
.me-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.85rem;
  padding: .55rem .91rem;
  border-radius: .18rem;
  background: var(--me-brass);
  color: var(--me-deep);
  font-size: .89rem;
  font-weight: 700;
  text-decoration: none;
}

.me-button:hover,
.me-button:focus-visible {
  background: #f0d4a0;
  color: var(--me-deep);
}

.me-quiet-link {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 2.75rem;
  color: var(--me-forest);
  font-size: .87rem;
  font-weight: 670;
  text-decoration: underline;
}

.me-hero .me-quiet-link {
  color: #f1ead7;
}

.me-hero :focus-visible,
.me-about-strip :focus-visible,
.me-footer :focus-visible {
  outline-color: var(--me-brass);
}

.me-hero__art {
  position: relative;
  min-height: 100%;
  background: #d8bf94;
}

.me-hero__art img {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
}

.me-hero__geometry {
  position: absolute;
  display: grid;
  place-items: center;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 62% 18%, #f0dbb7, transparent 58%),
    linear-gradient(156deg, #dbc396, #a78e61);
}

.me-hero__geometry::before,
.me-hero__geometry::after,
.me-hero__geometry span {
  position: absolute;
  width: 57%;
  max-width: 21rem;
  aspect-ratio: 1;
  border: 1px solid #4d502874;
  transform: rotate(45deg);
  content: '';
}

.me-hero__geometry::after {
  width: 44%;
  max-width: 16rem;
  transform: rotate(65deg);
}

.me-hero__geometry span {
  width: 30%;
  max-width: 11rem;
  transform: rotate(25deg);
}

.me-section {
  margin-block-start: clamp(2.9rem, 6vw, 6rem);
  scroll-margin-top: 2rem;
}

.me-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin-bottom: clamp(.85rem, 2.5vw, 1.7rem);
}

.me-section__header h2,
.me-about-strip h2,
.me-archive h1 {
  margin: 0;
  font-size: clamp(1.85rem, 3.25vw, 3rem);
  font-weight: 580;
  line-height: 1.17;
  letter-spacing: -.045em;
}

.me-topics,
.me-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(.66rem, 2.1vw, 1.4rem);
}

.me-topic,
.me-post-card,
.me-empty {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--me-line);
  border-radius: .3rem;
  background: var(--me-card);
}

.me-topic {
  display: flex;
  flex-direction: column;
  min-height: 12.9rem;
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
}

.me-topic h3,
.me-post-card h2,
.me-post-card h3 {
  margin: 0 0 .5rem;
  font-size: clamp(1.17rem, 1.93vw, 1.75rem);
  font-weight: 650;
  letter-spacing: -.04em;
}

.me-topic h3 a,
.me-post-card h2 a,
.me-post-card h3 a {
  color: var(--me-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.me-topic h3 a {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}

.me-topic h3 a span {
  flex: none;
  color: var(--me-ochre);
  font-family: system-ui, sans-serif;
  font-size: .95rem;
}

.me-topic h3 a:hover,
.me-post-card h2 a:hover,
.me-post-card h3 a:hover {
  color: var(--me-ochre);
  text-decoration: underline;
}

.me-topic p,
.me-post-card p,
.me-empty {
  margin: 0;
  color: var(--me-muted);
  font-size: clamp(.9rem, 1.06vw, 1rem);
  line-height: 1.62;
}

.me-topic__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  margin: 0 0 1.1rem;
  border-radius: 50%;
  background: #eef0e7;
  color: var(--me-green);
}

.me-topic__icon i {
  display: block;
  width: .9rem;
  height: .9rem;
  border: 1.5px solid currentColor;
}

.me-topic--principles .me-topic__icon i {
  width: .73rem;
  height: .73rem;
  transform: rotate(45deg);
}

.me-topic--reading .me-topic__icon {
  background: #f5eddb;
  color: var(--me-ochre);
}

.me-topic--reading .me-topic__icon i {
  width: 1.1rem;
  height: .74rem;
  border-radius: 1px 1px 3px 3px;
  background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
}

.me-topic--daily .me-topic__icon i {
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 18%, transparent 20%);
}

.me-post-card {
  overflow: hidden;
}

.me-post-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ede6d8;
}

.me-post-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.me-post-card__content,
.me-empty {
  padding: clamp(1rem, 2.15vw, 1.55rem);
}

.me-post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem .62rem;
  margin: 0 0 .68rem;
  color: var(--me-muted);
  font-size: .75rem;
}

.me-post-card__meta span {
  color: var(--me-ochre);
  font-weight: 700;
}

.me-post-grid:has(.me-post-card:only-child):not(.me-post-grid--compact) {
  grid-template-columns: minmax(0, 1fr);
}

.me-post-grid:not(.me-post-grid--compact) > .me-post-card:only-child {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
}

.me-post-grid:not(.me-post-grid--compact) > .me-post-card:only-child:not(:has(.me-post-card__image)) {
  grid-template-columns: 1fr;
}

.me-post-grid:not(.me-post-grid--compact) > .me-post-card:only-child > .me-post-card__content {
  align-self: center;
  padding: clamp(1.2rem, 4.5vw, 3.6rem);
}

.me-post-grid:not(.me-post-grid--compact) > .me-post-card:only-child h2,
.me-post-grid:not(.me-post-grid--compact) > .me-post-card:only-child h3 {
  font-size: clamp(1.45rem, 2.95vw, 2.6rem);
}

.me-about-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 4vw, 3rem);
  margin-top: clamp(3rem, 7vw, 6rem);
  padding: clamp(1.5rem, 4.3vw, 3.4rem);
  border-radius: .3rem;
  background: var(--me-forest);
}

.me-about-strip h2 {
  color: white;
}

.me-about-strip p:not(.me-label) {
  max-width: 54ch;
  margin: .65rem 0 0;
  color: #e5eadc;
}

.me-about-strip .me-button {
  flex: 0 0 auto;
}

.me-archive__header {
  margin-bottom: 2rem;
}

.me-archive__header p {
  max-width: 62ch;
  margin-block: .65rem 1rem;
  color: var(--me-muted);
}

.me-topic-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: .75rem;
  border: 1px solid var(--me-line);
  border-radius: .18rem;
  background: var(--me-card);
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
}

.me-archive .pagination {
  margin-top: 1.8rem;
}

body:not(.home):not(.blog) .site-content {
  padding: clamp(1.2rem, 4vw, 3.65rem) var(--me-gutter);
}

body:not(.home):not(.blog) .inside-article,
body:not(.home):not(.blog) .comments-area,
body:not(.home):not(.blog) .page-header {
  max-width: 56rem;
  margin-inline: auto;
  border: 1px solid var(--me-line);
  border-radius: .3rem;
  background: var(--me-card);
  padding: clamp(1.1rem, 5vw, 3.7rem);
}

.single .inside-article > .featured-image {
  margin: clamp(1.2rem, 3vw, 2rem) 0 0;
}

.single .entry-title,
.page:not(.home) .entry-title,
.archive .page-title {
  font-size: clamp(1.95rem, 4.8vw, 3.8rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.048em;
}

.site-content .entry-meta {
  color: var(--me-muted);
}

.site-content .entry-content {
  color: var(--me-ink);
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  line-height: 1.77;
  overflow-wrap: anywhere;
}

.site-content .entry-content :where(h2, h3, h4) {
  margin-top: 1.2em;
}

.site-content .entry-content a {
  text-decoration: underline;
}

.site-content .entry-content :where(table, pre) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.site-content .entry-content :where(img, iframe, video) {
  max-width: 100%;
}

.site-content .entry-content iframe[src*='youtube.'],
.site-content .entry-content iframe[src*='youtube-nocookie.'],
.site-content .entry-content video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--me-deep);
}

.site-content .entry-content blockquote {
  border-inline-start: 3px solid var(--me-brass);
  color: var(--me-forest);
  background: #f2eee4;
}

.site-content .entry-content [lang='ar'] {
  line-height: 1.9;
}

.me-author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(.8rem, 2.5vw, 1.3rem);
  margin-top: clamp(1.65rem, 5vw, 3.2rem);
  padding: clamp(1rem, 3vw, 1.65rem);
  border: 1px solid #dbe2d6;
  border-radius: .3rem;
  background: #eff2ea;
}

.me-author__monogram {
  display: grid;
  place-items: center;
  width: clamp(2.55rem, 6vw, 3.6rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--me-forest);
  color: var(--me-brass);
  font-family: var(--me-serifs);
  font-size: 1.55rem;
}

.me-author h2,
.me-pillar-posts > h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.3rem, 2.65vw, 1.9rem);
  overflow-wrap: anywhere;
}

.me-author h2 a {
  color: var(--me-forest);
}

.me-author__bio {
  color: var(--me-muted);
  font-size: .98rem;
  line-height: 1.7;
}

.me-author__bio p:last-child {
  margin: 0;
}

.me-pillar-posts {
  margin-top: 2.5rem;
}

.me-footer {
  padding-block: clamp(1.9rem, 5vw, 3.6rem) 1.5rem;
  background: var(--me-deep);
  color: #e5eadc;
}

.me-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .8rem 2rem;
}

.me-footer .me-brand,
.me-footer nav a {
  color: var(--me-card);
}

.me-footer .me-mark {
  --me-mark-color: var(--me-brass);
}

.me-footer__top p {
  max-width: 43ch;
  margin-top: .7rem;
  color: #cbd7c7;
  font-size: .9rem;
}

.me-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: .89rem;
}

.me-footer__copyright {
  margin: 1rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid #496055;
  color: #cbd7c7;
  font-size: .78rem;
}

@media (min-width: 881px) {
  .me-header__nav .sub-menu {
    position: absolute;
    z-index: 6;
    display: none;
    top: 100%;
    left: -.9rem;
    width: max-content;
    max-width: min(20rem, 70vw);
    background: var(--me-card);
    border: 1px solid var(--me-line);
    box-shadow: 0 10px 20px #1a292117;
  }

  .me-header__nav li:hover > .sub-menu,
  .me-header__nav li:focus-within > .sub-menu {
    display: block;
  }
}

@media (max-width: 880px) {
  .me-header__inner {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .12rem .7rem;
    min-height: 4rem;
    padding-block: .45rem;
  }

  .me-header .me-brand {
    margin-inline-end: auto;
  }

  .me-header.has-menu-control .me-menu-toggle {
    display: inline-flex;
  }

  .me-header__nav {
    order: 5;
    width: 100%;
    padding-block: .15rem .4rem;
  }

  .me-header.has-menu-control:not(.is-menu-open) .me-header__nav {
    display: none;
  }

  .me-header__nav .me-links {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .me-header__nav a {
    display: flex;
  }

  .me-header__nav .me-links > li + li {
    border-top: 1px solid var(--me-line);
  }

  .me-search summary > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
  }

  .me-search summary {
    width: 2.75rem;
    justify-content: center;
  }

  .me-hero h1 {
    font-size: clamp(2.7rem, 6.45vw, 4.5rem);
  }
}

@media (max-width: 660px) {
  .me-hero,
  .me-post-grid:not(.me-post-grid--compact) > .me-post-card:only-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .me-hero {
    min-height: auto;
  }

  .me-hero__copy {
    padding: clamp(1.28rem, 6.3vw, 2.85rem);
  }

  .me-hero__art {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .me-hero__art img {
    object-position: 50% 52%;
  }

  .me-topics,
  .me-post-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .me-topic {
    min-height: 0;
  }

  .me-topic__icon {
    margin-bottom: .75rem;
  }

  .me-about-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .me-pillar-posts .me-post-card__image {
    max-height: 12rem;
  }
}

@media (max-width: 360px) {
  .me-header__inner {
    gap: .12rem .35rem;
  }

  .me-header .me-brand {
    gap: .35rem;
    font-size: 1.03rem;
  }

  .me-header .me-mark {
    width: 1.56rem;
    height: 1.56rem;
  }

  .me-menu-toggle {
    padding-inline: .45rem;
  }

  .me-search summary {
    width: 2.3rem;
  }
}
