/* ------------------------------------------------------------------
   DOC JONG LEE – Frontend
   Anlehnung an das nüchterne Sidebar-Layout von koosoo.org
------------------------------------------------------------------ */
:root {
  --ink: #000;
  --link: #1a1aee;
  --muted: #666;
  --bg: #fff;
  --sidebar-w: 300px;
  --gap: 48px;
  --font: "Helvetica Neue", Helvetica, Arial, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------- Layout ---------------- */
.layout {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  padding: 26px 24px 60px 26px;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
}

.logo {
  display: block;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: 0.01em;
  font-weight: 400;
  margin-bottom: 46px;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }

/* ---------------- Menü ---------------- */
.menu { display: block; }
.menu__group { margin-bottom: 6px; }

.menu__cat,
.menu__sub,
.menu__page {
  display: block;
  padding: 5px 0;
  line-height: 1.35;
}

.menu__cat {
  color: var(--ink);
  font-size: 14px;
  margin-top: 14px;
}
.menu__cat.is-active { text-decoration: underline; }

.menu__sub {
  color: var(--ink);
  font-size: 13px;
  padding-left: 0;
}

.menu__page {
  color: var(--link);
  font-size: 11.5px;
  letter-spacing: 0.01em;
}
.menu__page--sub { padding-left: 12px; }
.menu__page.is-active { color: var(--ink); text-decoration: underline; }

.divider {
  margin: 34px 0 24px;
  font-size: 11px;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
}

.langswitch { font-size: 12px; margin-bottom: 26px; }
.langswitch a { color: var(--link); }
.langswitch a.is-active { color: var(--ink); text-decoration: underline; }
.langswitch span { color: var(--muted); }

.sidebar__footer { font-size: 12px; color: var(--ink); line-height: 1.9; }
.sidebar__footer a { color: var(--ink); }
.admin-link a { color: var(--link); }

/* ---------------- Inhalt ---------------- */
.content {
  flex: 1 1 auto;
  max-width: 860px;
  padding: 26px var(--gap) 120px 0;
}

.page-title { font-size: 15px; font-weight: 700; margin: 0 0 20px; }

.richtext { font-size: 13.5px; line-height: 1.65; }
.richtext p { margin: 0 0 14px; }
.richtext img,
.richtext video,
.richtext iframe {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 4px;
}
.richtext figure { margin: 0 0 22px; }
.richtext figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.richtext h1, .richtext h2, .richtext h3 { font-size: 14px; font-weight: 700; margin: 24px 0 10px; }
.richtext a { color: var(--link); }
.richtext .video-wrap { position: relative; padding-top: 56.25%; margin-bottom: 20px; }
.richtext .video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.richtext ul, .richtext ol { padding-left: 18px; }

.article__meta { margin-top: 34px; font-size: 12.5px; line-height: 1.8; }
.article__title em { font-weight: 700; }
.article__subtitle { color: var(--ink); }
.article__year { color: var(--ink); }
.article__fallback { margin-top: 10px; color: var(--muted); font-size: 11.5px; }

.editlink { margin-top: 40px; font-size: 12px; }
.notice { font-size: 12px; color: #b00; margin-bottom: 14px; }
.empty { color: var(--muted); font-size: 13px; }

/* Listen */
.teaserlist, .worklist { list-style: none; margin: 0; padding: 0; }
.teaserlist li { padding: 4px 0; font-size: 13px; }
.teaserlist__year { color: var(--muted); margin-left: 8px; }

.worklist { display: block; }
.workitem { margin-bottom: 34px; }
.workitem__link { color: var(--ink); display: block; }
.workitem__link:hover { text-decoration: none; }
.workitem__link:hover .workitem__title { text-decoration: underline; }
.workitem__img { display: block; max-width: 100%; height: auto; margin-bottom: 6px; }
.workitem__title { font-size: 13px; font-style: italic; font-weight: 700; }
.workitem__year { font-size: 12px; color: var(--muted); margin-left: 8px; }

/* ---------------- Mobile ---------------- */
.topbar { display: none; }
.burger { display: none; }
.backdrop { display: none; }

@media (max-width: 860px) {
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
  }
  .topbar__logo {
    color: var(--ink);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .burger {
    display: block;
    width: 34px; height: 28px;
    background: none; border: 0; padding: 4px 2px; cursor: pointer;
  }
  .burger span {
    display: block; height: 2px; margin: 5px 0;
    background: var(--ink); transition: transform .2s ease, opacity .2s ease;
  }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .layout { display: block; }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 84vw; max-width: 340px;
    background: #fff;
    z-index: 50;
    transform: translateX(-102%);
    transition: transform .25s ease;
    box-shadow: 0 0 24px rgba(0,0,0,.12);
    max-height: none;
    padding-top: 22px;
  }
  .sidebar.is-open { transform: translateX(0); }
  .logo { font-size: 26px; margin-bottom: 28px; }
  .menu__cat { font-size: 15px; }
  .menu__page { font-size: 13px; padding: 6px 0; }

  .backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 45;
  }
  .backdrop[hidden] { display: none; }

  .content { max-width: 100%; padding: 18px 16px 80px; }
}

@media print {
  .sidebar, .topbar { display: none; }
  .content { max-width: 100%; padding: 0; }
}
