* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --beige: #e5e0d5;
  --beige-light: #f0ece3;
  --grey: #8c8c8c;
  --grey-bg: #d4d4d4;
  --grey-dark: #4a4a4a;
  --ink: #1a1a1a;
  --grid: #000;
  --line: 2px solid var(--ink);
  --measure: 50rem;
}

body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

main {
  flex: 1;
}

html {
  background: var(--grey-bg);
  background-image:
    radial-gradient(rgba(140, 140, 140, 0.14) 1px, transparent 1.4px);
  background-size: 28px 28px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.02rem;
  line-height: 1.6;
}

::selection {
  background: var(--grey-dark);
  color: var(--beige-light);
}

/* ─── Site header ─────────────────────────────── */

.site-header {
  background: var(--beige-light);
  border-bottom: var(--line);
  padding: 2rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  background: var(--ink);
  padding: 0.15rem 0.8rem 0.05rem;
}

.site-title a {
  color: var(--beige-light);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-title a:hover {
  color: var(--grey);
}

/* The nav and its external-links row share a column as wide as the
   nav buttons themselves. */
.site-nav-col {
  display: flex;
  flex-direction: column;
  margin-left: auto;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.site-nav a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.45rem 0.9rem;
  border: var(--line);
  background: var(--beige);
}

.site-nav a:hover {
  background: var(--ink);
  color: var(--beige-light);
}

.site-nav a[aria-current="page"] {
  background: var(--grey-dark);
  color: var(--beige-light);
}

/* Nav entries with more links below them (Themen, NKFD): a
   <details> taps open on touch devices with no scripts, while desktop
   still gets a hover (and keyboard-focus) menu purely via CSS. The
   summary is styled like the other nav buttons; the submenu floats
   without a box (the links are buttons already), is right-aligned,
   and stretches at least as wide as its top button: its invisible
   area bridges the gap so the hover never breaks while moving down. */

.site-nav .has-dropdown {
  position: relative;
  display: inline-flex;
}

.site-nav .has-dropdown > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.45rem 0.9rem;
  border: var(--line);
  background: var(--beige);
}

.site-nav .has-dropdown > summary::-webkit-details-marker {
  display: none;
}

.site-nav .has-dropdown > summary:hover {
  background: var(--ink);
  color: var(--beige-light);
}

.site-nav .caret::after {
  content: "\25BE";
  font-size: 0.8em;
  line-height: 1;
  transition: transform 0.15s ease-in-out;
}

.site-nav .has-dropdown:hover .caret::after,
.site-nav .has-dropdown:focus-within .caret::after {
  transform: rotate(180deg);
}

.site-nav .has-dropdown ul {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 100%;
  margin: 0;
  padding: 0.5rem 0 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  white-space: nowrap;
  z-index: 10;
}

.site-nav .has-dropdown:hover ul,
.site-nav .has-dropdown:focus-within ul,
.site-nav .has-dropdown[open] ul {
  display: flex;
}

/* Newer engines hide closed <details> content via ::details-content
   (content-visibility), which plain display rules cannot override —
   unhide it as well so the hover menu keeps working there. */
.site-nav .has-dropdown:hover::details-content,
.site-nav .has-dropdown:focus-within::details-content {
  content-visibility: visible;
}

/* ─── Main layout ─────────────────────────────── */

main {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

/* ─── Post list ───────────────────────────────── */

.page-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-dark);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-title::before {
  content: "";
  height: 12px;
  width: 12px;
  background: var(--grey-dark);
  display: inline-block;
}

.page-title::after {
  content: "";
  flex: 1;
  height: var(--line);
  border-top: var(--line);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
}

.pg-link {
  display: inline-block;
  color: var(--beige-light);
  background: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  padding: 0.55rem 1.2rem;
  border: var(--line);
  box-shadow: 4px 4px 0 var(--grey);
}

.pg-link:hover {
  background: var(--grey-dark);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--grey);
}

.pagination .pg-link:first-child:last-child {
  margin-left: auto;
}

.post-card {
  background: var(--beige-light);
  border: var(--line);
  box-shadow: 9px 9px 0 var(--grey);
  display: flex;
  flex-direction: column;
  /* Unbreakable content (long URLs) must not force the card wider
     than its column; break anywhere instead. */
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.post-card figure {
  border-bottom: var(--line);
}

.post-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: var(--line);
}

figcaption {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-dark);
  padding: 0.5rem 1.25rem;
}

.post-card .card-body {
  padding: 1.4rem 1.6rem 1.6rem;
  background: var(--beige-light);
}

.post-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--grey-dark);
  margin-bottom: 0.6rem;
}

.post-card h2 {
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  text-transform: none;
}

.post-card h2 a {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -0.3em 0 rgba(140, 140, 140, 0.3);
}

.post-card h2 a:hover {
  background: var(--ink);
  color: var(--beige-light);
  box-shadow: none;
}

.post-card .teaser {
  color: var(--grey-dark);
  margin-bottom: 1.1rem;
  /* Fixed teaser height so cards line up: clamp to 3 lines with an
     ellipsis, regardless of how long the excerpt or its URLs are. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-block;
  color: var(--beige-light);
  background: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  padding: 0.55rem 1.2rem;
  border: var(--line);
  box-shadow: 4px 4px 0 var(--grey);
}

.read-more:hover {
  background: var(--grey-dark);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--grey);
}

/* ─── Individual post ─────────────────────────── */

.post-full h1 {
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  text-transform: none;
  margin-bottom: 2.5rem;
}

figure.post-figure {
  margin: 0 0 2.5rem;
  border: var(--line);
  box-shadow: 9px 9px 0 var(--grey);
}

figure.post-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.post-body p {
  margin-bottom: 1.35rem;
}

/* Inline images in post content (WP wp-block-image figures) kept
   their original-size attributes/styles on import; cap them at the
   body width and scale proportionally, no matter what WP wrote. */
.post-body img {
  max-width: 100%;
  height: auto;
}

.post-body figure {
  margin: 0 0 1.75rem;
}

.post-body h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 2.25rem 0 0.9rem;
  background: var(--ink);
  color: var(--beige-light);
  display: inline-block;
  padding: 0.3rem 0.8rem;
}

.post-body blockquote {
  border-left: 6px solid var(--grey-dark);
  background: var(--beige-light);
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  font-style: italic;
  color: var(--grey-dark);
}

.post-body a {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -0.2em 0 rgba(140, 140, 140, 0.3);
  text-decoration: none;
}

.post-body a:hover {
  background: var(--ink);
  color: var(--beige-light);
  box-shadow: none;
}

/* Wordpress file/download blocks carried over from the import: the
   title link stays a plain link, the trailing button link becomes a
   real button matching the site's .read-more look. */
.post-body .wp-block-file {
  margin-bottom: 1.35rem;
}

.post-body .wp-block-file__button,
.post-body .wp-element-button.button {
  display: inline-block;
  color: var(--beige-light);
  background: var(--ink);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.2rem;
  border: var(--line);
  box-shadow: 4px 4px 0 var(--grey);
  margin: 0.5rem 0;
}

.post-body .wp-block-file__button:hover,
.post-body .wp-element-button.button:hover {
  background: var(--grey-dark);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--grey);
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.post-footer a {
  color: var(--ink);
  background: var(--beige-light);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  padding: 0.55rem 1.1rem;
  border: var(--line);
}

.post-footer a:hover {
  background: var(--ink);
  color: var(--beige-light);
}

/* ─── Footer ──────────────────────────────────── */

.site-footer {
  border-top: var(--line);
  background: var(--beige-light);
  color: var(--grey-dark);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover {
  background: var(--ink);
  color: var(--beige-light);
}

/* ─── Archive ──────────────────────────────────── */

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.archive-year {
  background: var(--beige-light);
  border: var(--line);
  box-shadow: 9px 9px 0 var(--grey);
}

.archive-year h2 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  padding: 0.6rem 1.6rem;
  border-bottom: var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.archive-year h2::after {
  content: "";
  flex: 1;
  border-top: var(--line);
}

.archive-year ul {
  list-style: none;
  padding: 0.8rem 1.6rem 1rem;
  display: grid;
  /* minmax(0,…) lets long titles wrap instead of blowing out the
     viewport width (which makes mobile browsers zoom in on load). */
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: 0.5rem;
}

.archive-year li {
  display: contents;
}

.archive-year li {
  display: contents;
}

.archive-year li a {
  overflow-wrap: anywhere;
}

.archive-year time {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--grey-dark);
  white-space: nowrap;
}

.archive-year a {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -0.3em 0 rgba(140, 140, 140, 0.3);
}

.archive-year a:hover {
  background: var(--ink);
  color: var(--beige-light);
  box-shadow: none;
}

@media (min-width: 720px) {
  .post-card.with-media {
    flex-direction: row;
    align-items: stretch;
  }
  .post-card.with-media figure {
    flex: 0 0 40%;
    border-bottom: none;
    border-right: var(--line);
    display: flex;
    flex-direction: column;
  }
  .post-card.with-media img {
    height: 100%;
    flex: 1;
  }
  .post-card .card-body {
    flex: 1;
  }
}
