/* ── Font ──────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Werker';
  src: url('../fonts/werker.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --black: #000;
  --white: #fff;
  --grey:  #000;
  --border: 1px solid #000;
  --nav-height: 80px;
  --font: 'Werker', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background: var(--white);
  color: var(--black);
}

body {
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  border-bottom: 1px solid white;
}

a:hover {
  border-bottom: 1px solid transparent;
}

a:any-link {
  text-decoration-line: none;
}

button {
  font-family: var(--font);
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--black);
  border-radius: 5px;
}

select {
  font-family: var(--font);
  font-size: 16px;
  background: none;
  border: 1px solid #000;
  cursor: pointer;
  color: var(--black);
  padding: 4px 6px;
}

input, textarea, select {
  outline: none;
}

/* ── Nav ───────────────────────────────────────────────────────────────── */
#nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
}

#nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: var(--border);
}

#nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

#menu-toggle {
  font-size: 16px;
  color: black;
}

#site-title {
  font-size: 16px;
  text-transform: uppercase;
  color: var(--black);
}

#nav-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

#nav.nav-open {
  background: var(--black);
  color: var(--white);
}

#nav.nav-open #nav-bar {
  border-bottom: 1px solid var(--white);
}

#nav.nav-open #menu-toggle,
#nav.nav-open #site-title,
#nav.nav-open select {
  color: var(--white);
}

#nav.nav-open select {
  border: 1px solid white;
}

/* ── Menu panel ────────────────────────────────────────────────────────── */
#menu-panel {
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  height: 0;
  transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}



#menu-panel.open {
  overflow: visible;
}

#menu-content {
  display: flex;
  margin: 0 20px;
}

#menu-content > div {
  flex: 1;
  padding: 20px;
  border-left: 1px solid var(--white);
  height: 100%;
}

#menu-content > div:first-child {
  border-left: none;
  padding-left: 0;
}

#menu-content > div:last-child {
  padding-right: 0;
}

#menu-content h3 {
  font-size: 16px;
  font-weight: normal;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--white);
}



#menu-about p {
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--white);
  text-transform: lowercase;
}

/* ── Menu rooms ────────────────────────────────────────────────────────── */
.menu-room {
  animation: fadeIn 0s ease;
}

.room-link {
  font-size: 16px;
  line-height: 1.2;
  text-align: left;
  width: 100%;
  display: block;
  color: var(--white);
}

.room-link.active {
  font-style: italic;
}

.room-intro {
  font-size: 16px;
  line-height: 1.2;
  color: var(--white);
  margin-top: 6px;
  margin-bottom: 12px;
  display: none;
}

.room-intro.visible {
  display: block;
}

/* ── Menu notions ──────────────────────────────────────────────────────── */
.notion-link {
  font-size: 16px;
  line-height: 1.2;
  margin-right: 4px;
  display: inline;
  color: var(--white);
}

.notion-link:not(:last-child)::after {
  content: ',';
}

.notion-link.active {
  font-style: italic;
}

/* ── Contribute form ───────────────────────────────────────────────────── */
#contribute-form {
  display: flex;
  flex-direction: column;
  gap: 0px;
  padding-bottom: 20px;
}

#contribute-form input,
#contribute-form select,
#contribute-form textarea {
  background: none;
  border: none;
  border-bottom: 1px solid #fff;
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  padding: 10px 0;
  margin: 5px 0px;
  width: 100%;
}

#contribute-form input::placeholder,
#contribute-form textarea::placeholder {
  color: #fff;
}

#contribute-form textarea {
  resize: vertical;
  min-height: 160px;
}

#contribute-form button[type="submit"] {
  margin-top: 8px;
  border: 1px solid var(--white);
  color: var(--white);
  padding: 6px 14px;
  font-size: 16px;
  align-self: flex-start;
}

#contribute-form button[type="submit"]:hover {
  background: var(--black);
  color: var(--white);
}

.form-message {
  padding: 20px;
  font-size: 16px;
  border-bottom: 1px solid #000;
}

.form-success {
  background: #ffe600;
}

.form-error {
  background: #ffcccc;
}

.field-note {
    border-bottom: 1px solid white;
    padding-bottom: 10px;
}

#contribute-image {
    border-bottom: 1px solid transparent !important;
}

/* ── Publication overlay ─────────────────────────────────────────────── */
#publication-overlay {
  position: fixed;
  top: 40px;
  left: 40px;
  right: 40px;
  bottom: 40px;
  z-index: 200;
  display: none;
  overflow-y: auto;
  border: 1px solid black;
  background-color: rgba(255, 232, 26, 0.95);
}

#publication-overlay h2 {
  font-size: 16px;
  font-weight: normal;
  margin-bottom: 8px;
}

#publication-overlay p {
  margin-bottom: 8px;
}

#publication-overlay.open {
  display: block;
}

#publication-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 201;
}

#publication-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

.pub-col-left {
  display: flex;
  flex-direction: column;
}

.pub-col-right {
  display: flex;
  align-items: flex-start;
  padding-top: 40px;
}

.pub-image {
  width: 100%;
  height: auto;
  display: block;
}

.pub-link {
  display: inline;
  margin-top: 16px;
}

#publication-overlay a {
  border-bottom: 1px solid black;
}

#publication-overlay a:hover {
  border-bottom: 1px solid transparent;
}

/* ── Posts grid ──────────────────────────────────────────────────────── */
#grid {
  columns: 3;
  column-gap: 20px;
  padding: 10px 20px 10px 20px;
  text-transform: lowercase;
}

/* ── Post item ───────────────────────────────────────────────────────── */

.post-item {
    background: var(--white);
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    border-bottom: 1px solid black;
    padding-bottom: 10px;
}

.post-item.filtered {
  display: none;
}

.post-image {
  width: 100%;
  overflow: hidden;
}

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

svg#duotone-filter {
  position: absolute;
  width: 0;
  height: 0;
}

.post-info {
  padding: 6px 0 0;
}

.post-info h2 {
  font-size: 16px;
  font-weight: normal;
  margin-bottom: 4px;
  line-height: 1.4;
}

.reference {
  font-size: 16px;
  line-height: 1.2;
  color: var(--black);
  margin: 10px 0px;
}

.meta {
  font-size: 16px;
  color: var(--black);
  font-style: italic;
}

.meta .room::after {
  content: ', ';
}

/* ── Bilderkritik ────────────────────────────────────────────────────── */
#bilderkritik {
  background: #c8b5ff;
  padding: 20px;
  border-bottom: 1px solid #000;
  position: relative;
}

#bilderkritik-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

#bilderkritik-inner .bk-col:last-child {
  padding-top: 40px;
}

.bk-col p {
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 12px;
}

#bk-notions a {
  border-bottom: 1px solid black;
}

#bk-notions a:hover {
  border-bottom: 1px solid transparent;
}

#bk-image {
  width: 100%;
  height: auto;
  display: block;
  filter: none;
}

/* ── Notion ──────────────────────────────────────────────────────────── */
#notion-info {
  background: #ffe600;
  padding: 20px;
  border-bottom: 1px solid #000;
  position: relative;
}

#notion-info-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0px;
}

#ni-title {
  text-transform: uppercase;
  margin-bottom: 8px;
}

#ni-description {
  font-size: 16px;
  line-height: 1.2;
}

#bk-close,
#ni-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 20px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  z-index: 1;
}

/* ── Tablet ──────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  #grid {
    columns: 2;
  }

  #menu-rooms,
  #menu-notions {
    display: none;
  }

  #bilderkritik-inner {
    grid-template-columns: 1fr;
  }

  #publication-content {
    grid-template-columns: 1fr;
  }

  .pub-col-right {
    order: 2;
    padding-top: 0;
  }

  .pub-col-left {
    order: 1;
  }
  
  
}

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #site-title {
    display: none;
  }
	
#contribute-form select {
    padding-left: 0;
  }
	
#menu-panel.open {
    overflow-y: auto;
    max-height: 100vh;
  }
	
button {
  border-radius: 20px;
}
	
#nav.nav-open select {
    border: 1px solid white;
	padding-left: 10px;
}
	
	#filter-notion {
    width: 140px;
}
	
	#filter-room {
    width: 140px;
}

  #nav-filters {
    gap: 8px;
  }

  #menu-rooms,
  #menu-notions {
    display: none;
  }

  #menu-content {
    flex-direction: column;
  }

  #menu-content > div {
    border-left: none;
    border-bottom: 1px solid var(--white);
    padding: 20px 0;
    flex: 0;
  }

  #menu-content > div:last-child {
    border-bottom: none;
  }

  .room-link {
    display: inline;
    width: auto;
  }

  #menu-rooms {
    font-size: 0;
    height: auto;
  }
  
  .room-link {
    font-size: 16px;
  }
  
  .menu-room:not(:last-child)::after {
    content: ', ';
    font-size: 16px;
  }
  
  .menu-room {
    display: inline;
  }

  #grid {
    columns: 1;
  }

  #bilderkritik-inner {
    grid-template-columns: 1fr;
  }

  #notion-info-inner {
    grid-template-columns: 1fr;
  }

  #publication-overlay {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  #publication-content {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .pub-col-right {
    order: 2;
    padding-top: 0;
  }

  .pub-col-left {
    order: 1;
  }
}