/*
Theme Name: Bernype Blog
Theme URI: https://bernype.at
Author: Bernhard Peham
Author URI: https://bernype.at
Description: Minimal dark blog theme matching the bernype.at design language — big bold serif headlines, "chapter" style sections, custom cursor and scroll reveals. Built for the bernype.at blog subdomain.
Version: 1.2.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bernype-blog
*/

/* ── Design tokens ── */
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; top: -100%; left: 0; padding: 8px 16px; background: var(--bg); color: var(--fg); font-weight: 700; z-index: 9999; }
.skip-link:focus { top: 0; }

:root{
  --ease: cubic-bezier(0.16,1,0.3,1);
  --font-sans: 'Sora', system-ui, Arial, sans-serif;
  --font-serif: 'Libre Baskerville', serif;
  --font-mono: 'DM Mono', monospace;
  --max-width: 860px;
  --bg: #0d1117;
  --fg: #c9d1d9;
  --accent: #5b9dff;
}

html,body{height:100%;}
html{ overflow-x: clip; }
body{
  margin:0; background:var(--bg); color:var(--fg);
  font-family:var(--font-sans); font-size:15px; line-height:1.6;
  cursor: none;
}

a{ color:var(--accent); }
a:hover{ text-decoration: underline; }

mark{
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-style: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ── Cursor ── */
#cur{ position:fixed; pointer-events:none; z-index:9999; width:7px; height:7px; border-radius:50%; background:var(--accent); transform:translate(-50%,-50%); transition:width .25s var(--ease),height .25s var(--ease),background .4s,opacity .3s; mix-blend-mode: difference; }
#cur.big{ width:48px; height:48px; opacity:.2; }

/* ── Layout ── */
.container{ max-width: var(--max-width); margin: 0 auto; }

/* ── Site header ── */
.site-header{ position: fixed; top: 0; left: 0; right: 0; z-index: 200; padding: 28px 8vw; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.site-header-inner{ display:flex; align-items:center; gap:10px; }
.site-logo{ color: inherit; text-decoration:none; opacity:.6; transition:opacity .2s; }
.site-logo:hover{ opacity:1; text-decoration:none; }
.site-sep{ opacity:.55; }
.site-section{ color: inherit; text-decoration:none; opacity:.9; }
.site-section:hover{ text-decoration:none; }

/* ── Chapter-style sections ── */
.ch{ position:relative; padding: 0 8vw; }
.ch-inner{ max-width: var(--max-width); margin: 0 auto; padding: 200px 0 120px; border-top:1px solid rgba(255,255,255,.08); }
.ch-kicker{ font-family:var(--font-mono); font-size:10px; letter-spacing:.28em; text-transform:uppercase; opacity:.65; margin-bottom:24px; display:flex; align-items:center; gap:16px; flex-wrap: wrap; }
.ch-headline{ font-family:var(--font-serif); font-weight:700; font-size:clamp(40px,7vw,88px); line-height:.98; letter-spacing:-2px; margin: 0 0 40px; max-width: 16ch; }

.statement{ font-family: var(--font-serif); font-size: clamp(18px, 2vw, 24px); line-height: 1.5; opacity: .85; margin-bottom: 56px; }
.statement em{ font-style: italic; opacity: .6; }

.body-text{ font-size: 16px; line-height: 1.85; opacity: .75; }
.body-text p + p{ margin-top: 18px; }
.body-text strong{ opacity: 1; color: inherit; }
.body-text a{ text-decoration: underline; text-underline-offset: 2px; }
.body-text h2, .body-text h3{ font-family: var(--font-serif); font-weight: 700; line-height: 1.2; margin: 48px 0 16px; opacity: 1; }
.body-text h2{ font-size: clamp(24px, 3vw, 36px); }
.body-text h3{ font-size: clamp(20px, 2.4vw, 26px); }
.body-text ul, .body-text ol{ padding-left: 1.4em; }
.body-text li + li{ margin-top: 8px; }
.body-text blockquote{ margin: 32px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); font-family: var(--font-serif); font-style: italic; opacity: .9; }
.body-text img{ max-width: 100%; height: auto; border-radius: 4px; }
.body-text code{ font-family: var(--font-mono); font-size: .9em; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 3px; }
.body-text pre{ font-family: var(--font-mono); font-size: 13px; line-height: 1.6; background: rgba(255,255,255,.05); padding: 20px; border-radius: 6px; overflow-x: auto; }
.body-text pre code{ background: none; padding: 0; }

.post-thumb{ margin-bottom: 48px; }
.post-thumb img{ width: 100%; height: auto; display: block; border-radius: 4px; }

/* ── Block patterns ── */
.body-text .lead{ font-family: var(--font-serif); font-size: clamp(18px, 2vw, 22px); line-height: 1.6; opacity: .9; margin-bottom: 32px; }

.body-text blockquote.pull-quote{ font-family: var(--font-serif); font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; font-style: normal; opacity: 1; border: none; border-top: 2px solid var(--fg); border-bottom: 1px solid rgba(255,255,255,.12); padding: 24px 0; margin: 48px 0; }

.body-text .phase-block{ border-left: 3px solid var(--accent); padding-left: 24px; margin: 40px 0; }
.body-text .phase-label{ font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .65; margin-bottom: 12px; }

.body-text .compare{ gap: 1px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; margin: 24px 0 32px; }
.body-text .compare-cell{ background: var(--bg); padding: 20px 24px; margin: 0; }
.body-text .compare-label{ font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .65; margin-bottom: 8px; }
.body-text .compare-cell.is-after .compare-label{ color: var(--accent); opacity: 1; }

.body-text .stat-callout{ background: rgba(91,157,255,.08); border-left: 3px solid var(--accent); border-radius: 0 4px 4px 0; padding: 20px 28px; margin: 32px 0; }
.body-text .stat-number{ font-family: var(--font-serif); font-size: clamp(32px, 5vw, 48px); font-weight: 700; color: var(--accent); line-height: 1; margin: 0 0 8px; }
.body-text .stat-label{ font-size: 14px; opacity: .7; line-height: 1.5; margin: 0; }

.body-text .cta-block{ background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; padding: 32px; margin-top: 56px; }
.body-text .cta-block h3{ margin-top: 0; }
.body-text .cta-list{ list-style: none; padding: 0; margin: 0; }
.body-text .cta-list li{ padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; gap: 12px; }
.body-text .cta-list li:last-child{ border-bottom: none; }
.body-text .cta-list li::before{ content: '→'; color: var(--accent); flex-shrink: 0; }

.body-text .references{ margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; opacity: .6; }
.body-text .references h4{ font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: 1; margin-bottom: 16px; }
.body-text .references li{ margin-bottom: 8px; line-height: 1.5; }

/* ── Blog listing ── */
.blog-list{ display: flex; flex-direction: column; }
.blog-latest-item{
  display: flex;
  align-items: baseline;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
  color: inherit;
}
.blog-latest-item:hover{ text-decoration: none; }
.blog-latest-item:hover .blog-latest-title{ opacity: 1; }
.blog-latest-year{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  opacity: .65;
  flex-shrink: 0;
}
.blog-latest-title{
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 30px);
  flex: 1;
  opacity: .7;
  transition: opacity .2s;
}
.blog-latest-arrow{
  margin-left: auto;
  opacity: .65;
  transition: transform .2s, opacity .2s;
  flex-shrink: 0;
}
.blog-latest-item:hover .blog-latest-arrow{ transform: translateX(4px); opacity: .7; }

/* ── Back / forward link ── */
.clink{
  display: inline-flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0;
  text-decoration: none; color: inherit;
  opacity: .7; transition: opacity .2s; font-size: 13px;
  margin-top: 56px;
  font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.clink:hover{ opacity: 1; text-decoration: none; }
.clink-arrow{ transition: transform .2s; }

/* ── Pagination ── */
.pagination{ margin-top: 48px; display: flex; gap: 16px; align-items: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.pagination .page-numbers{ color: inherit; opacity: .65; text-decoration: none; padding: 6px 4px; }
.pagination .page-numbers:hover{ opacity: 1; text-decoration: none; }
.pagination .page-numbers.current{ opacity: 1; border-bottom: 1px solid var(--accent); }

/* ── Reveal animation ── */
.r{ opacity:0; transform:translateY(22px); transition:opacity .9s var(--ease), transform .9s var(--ease); }
.r.in{ opacity:1; transform:none; }
.r1{ transition-delay:.1s } .r2{ transition-delay:.22s } .r3{ transition-delay:.34s } .r4{ transition-delay:.46s }

/* ── Footer ── */
footer.container{ padding: 28px 8vw 56px; font-family: var(--font-mono); font-size: 11px; opacity: .65; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.container a{ color: inherit; }

/* ── Responsive ── */
@media (max-width: 640px){
  .ch{ padding: 0 6vw; }
  .ch-inner{ padding: 140px 0 80px; }
  footer.container{ padding: 24px 6vw 48px; flex-direction: column; gap: 8px; }
  #cur{ display: none; }
}
