/*
Theme Name: Markelyra Editorial
Theme URI: https://blog.markelyra.com/
Author: Markelyra
Description: An accessible editorial theme for the Markelyra blog.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: markelyra-editorial
*/
:root {
  color-scheme: dark;
  --bg: #10161e;
  --panel: #151f2a;
  --ink: #f5f0e8;
  --muted: #b9c5cf;
  --line: #344252;
  --accent: #ffca84;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: inherit; }
a:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { max-width: 100%; }
.shell { width: min(calc(100% - 2.5rem), 1180px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 5; left: 1rem; top: -5rem; padding: .7rem 1rem; color: var(--bg); background: var(--accent); }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header { min-height: 76px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .58rem; min-height: 44px; text-decoration: none; font: 700 1.08rem/1 var(--sans); white-space: nowrap; }
.brand img { flex: none; }
.brand-dot { color: var(--accent); }
.brand-divider { height: 19px; width: 1px; background: var(--line); margin-inline: .22rem; }
.blog-label { font-size: .88rem; font-weight: 500; color: var(--muted); }
.site-header nav { display: flex; align-items: center; gap: clamp(.45rem, 2.6vw, 2rem); }
.site-header nav a, .site-footer > a:not(.brand) { display: inline-flex; align-items: center; min-height: 44px; gap: .3rem; text-decoration: none; color: var(--muted); font-size: .92rem; }
.site-header nav a:hover, .site-header nav a[aria-current], .site-footer a:hover { color: var(--ink); }
.site-header .product-link { color: var(--accent); }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); min-height: 430px; margin: 2.6rem 0 3.8rem; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--panel); }
.hero-copy { padding: clamp(2rem, 6.5vw, 5rem); position: relative; z-index: 1; }
.kicker { margin: 0 0 1.12rem; color: var(--accent); font-size: .78rem; letter-spacing: .125em; text-transform: uppercase; font-weight: 650; }
.hero h1, .listing h2, .article h1, .further h2 { font-family: var(--serif); font-weight: 400; }
.hero h1 { margin: 0; font-size: clamp(3.75rem, 8.5vw, 7rem); line-height: .91; letter-spacing: -.07em; }
.hero h1 em { color: var(--accent); font-weight: 400; }
.hero-lede { color: var(--muted); max-width: 31ch; font-size: 1.05rem; margin: 1.5rem 0 1.2rem; }
.hero-link { display: inline-flex; gap: .6rem; align-items: center; min-height: 44px; color: var(--accent); text-underline-offset: .3em; }
.hero-art { position: relative; min-width: 0; background: #111823; }
.hero-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center 68%; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--panel), transparent 34%); pointer-events: none; }
.listing { margin: 2.9rem 0 4.5rem; }
.listing-head { display: flex; flex-wrap: wrap; gap: .8rem 2rem; align-items: end; justify-content: space-between; margin-bottom: 1.45rem; }
.listing h2, .further h2 { margin: 0; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.045em; line-height: 1.15; }
.search { display: flex; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.search input, .search button { color: var(--ink); background: transparent; border: 0; min-height: 44px; font: inherit; }
.search input { width: min(48vw, 205px); padding: .4rem .75rem; }
.search input::placeholder { color: var(--muted); }
.search button { min-width: 44px; color: var(--accent); cursor: pointer; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.post-card { display: flex; flex-direction: column; align-items: start; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); padding: clamp(1.2rem, 2.3vw, 1.7rem); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .85rem; font-size: .79rem; color: var(--muted); }
.topic { color: var(--accent); text-decoration: none; font-weight: 650; }
.topic:hover { text-decoration: underline; text-underline-offset: .25em; }
.post-card h3 { font: 400 clamp(1.65rem, 2.6vw, 2rem)/1.14 var(--serif); letter-spacing: -.035em; margin: .9rem 0 .6rem; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--muted); font-size: .94rem; margin: 0 0 .9rem; }
.read-link { color: var(--accent); min-height: 44px; display: inline-flex; align-items: center; gap: .45rem; margin-top: auto; text-underline-offset: .27em; font-size: .88rem; }
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2.3rem; color: var(--muted); flex-wrap: wrap; }
.site-footer small { font-size: .8rem; }
.article-main { max-width: 820px; }
.article { padding: 2.2rem 0 3rem; }
.back-link { display: inline-flex; gap: .5rem; align-items: center; min-height: 44px; color: var(--accent); font-size: .9rem; text-underline-offset: .25em; }
.article-header { padding: 1.6rem 0 1.6rem; border-bottom: 1px solid var(--line); }
.article h1 { font-size: clamp(2.8rem, 7vw, 5.1rem); line-height: 1.02; letter-spacing: -.056em; margin: .65rem 0 .85rem; }
.article-deck { margin: 0; color: var(--muted); max-width: 60ch; font-size: clamp(1.05rem, 2.2vw, 1.28rem); }
.byline { margin: 1rem 0 0; font-weight: 650; font-size: .88rem; }
.article-content { padding-top: 1rem; max-width: 69ch; font-size: 1.04rem; line-height: 1.8; overflow-wrap: anywhere; }
.article-content h2 { font: 400 1.95rem/1.18 var(--serif); letter-spacing: -.03em; margin: 1.75em 0 .45em; }
.article-content h3 { font-size: 1.15rem; margin-top: 1.65em; }
.article-content a, .listing > p a { color: var(--accent); text-underline-offset: .22em; }
.article-content li { margin-bottom: .55rem; }
.article-content code { background: var(--panel); border-radius: 4px; padding: .11em .27em; font-size: .91em; }
.article-content blockquote { margin: 1.6rem 0; color: var(--muted); border-left: 3px solid var(--accent); padding: .1rem 0 .1rem 1rem; }
.further { border-top: 1px solid var(--line); margin: 0 0 3.5rem; padding-top: 1.4rem; }
.further ul { list-style: none; padding: 0; }
.further a { display: flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--accent); text-underline-offset: .25em; }
.navigation.pagination { margin-top: 1.5rem; }
.page-numbers { display: inline-block; padding: .4rem; }
@media (max-width: 860px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .shell { width: calc(100% - 2rem); }
  .site-header { padding: .6rem 0; align-items: flex-start; flex-direction: column; gap: .15rem; }
  .site-header nav { width: 100%; justify-content: space-between; }
  .site-header nav a { font-size: .88rem; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin: 1.35rem 0 2.6rem; }
  .hero-copy { padding: 1.8rem 1.35rem 1.2rem; }
  .hero h1 { font-size: clamp(3.15rem, 13vw, 4.8rem); }
  .hero-art { height: 155px; }
  .hero-art::after { background: linear-gradient(var(--panel), transparent 48%); }
  .post-grid { grid-template-columns: 1fr; }
  .listing { margin: 2.3rem 0 3rem; }
  .article { padding-top: 1.35rem; }
  .article-content { font-size: 1rem; }
}
