* {
  margin: 0;
  padding: 0;
}
:root {
  --padding: 1.5rem;
  --color-black: #000;
  --color-white: #fff;
  --color-grey: #777;
  --color-light: #efefef;
  --color-text: var(--color-black);
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);
  --color-hover: hsl(261, 45%, 49%);
  --color-code-light-grey: #cacbd1;
  --color-code-comment: #a9aaad;
  --color-code-white: #c5c9c6;
  --color-code-red: #d16464;
  --color-code-orange: #de935f;
  --color-code-yellow: #f0c674;
  --color-code-green: #a7bd68;
  --color-code-aqua: #8abeb7;
  --color-code-blue: #7e9abf;
  --color-code-purple: #b294bb;
  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    Courier, monospace;
}

/* ====================================== */
/* DEVTOOLS */
/* ====================================== */

.devwrap {
  background-color: lime;
  color: var(--color-black);
  padding: 1em;
  border-radius: 0.5em;
  margin: 1em 0;
}

/* ====================================== */
/* BASICS */
/* ====================================== */

html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-background);
  font-weight: 300;
  font-size: 16px;
}
img {
  width: 100%;
}
body {
  padding: 0 var(--padding) var(--padding) var(--padding);
  max-width: 70rem;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
  min-height: 100svh;
}
p {
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 300;
}
h1 + p {
  font-size: .75em;
  line-height: 1.5;
  font-weight: 100;
}
li {
  list-style: none;
}
a {
  color: currentColor;
  text-decoration: none;
}
button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}
strong,
b {
  font-weight: 600;
}
small {
  font-size: inherit;
  color: var(--color-text-grey);
}

.bg-light {
  background-color: var(--color-light);
}
.color-grey {
  color: var(--color-text-grey);
}

.hidden {
  display: none !important;
}

/* ====================================== */
/* GRID */
/* ====================================== */

.grid {
  --columns: 12;
  --gutter: 3rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}
.grid > .column {
  margin-bottom: 2vw;
}

.autogrid {
  --gutter: 3rem;
  --min: 10rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}

/* ====================================== */
/* TEXT */
/* ====================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.text {
  line-height: 1.5em;
}
.text a:not(.image-link) {
  line-height: 1;
  padding: 1rem 0;
  display: inline;
  text-decoration: none;
  position: relative;
  background-image: linear-gradient(
    0deg,
    var(--color-code-purple) 0%,
    var(--color-white) 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 0.25em;
  background-position: 0 calc(100% + 0.25em);
  background-origin: content-box;
  transition: all 0.15s ease !important;

  &::after {
    content: "\2192";
    margin-left: 0.25em;
    font-size: small;
  }

  &:hover {
    background-size: 100% 0.4em;
    background-image: linear-gradient(
      0deg,
      hsl(261, 25%, 80%) 0%,
      hsl(261, 25%, 80%) 100%
    );
  }
}
.text :first-child {
  margin-top: 0;
}
.text :last-child {
  margin-bottom: 0;
}
.text p,
.text ul,
.text ol {
  margin-bottom: 1.5rem;
}
.text ul,
.text ol {
  margin-left: 1rem;
}
.text ul p,
.text ol p {
  margin-bottom: 0;
}
.text ul > li {
  list-style: disc;
}
.text ol > li {
  list-style: decimal;
}
.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}
.text h1,
.h1,
.intro {
  font-size: clamp(1rem, calc(0.5rem + 3vw), 2rem);
  font-weight: 100;
  margin-bottom: calc(1rem + 1vw);
  line-height: 1.25em;
}
.text h2,
.h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.text h3,
.h3 {
  font-weight: 600;
}
.text .codeblock {
  display: grid;
}
.text code {
  font-family: var(--font-family-mono);
  font-size: 1em;
  background: var(--color-light);
  padding: 0 0.5rem;
  display: inline-block;
  color: var(--color-black);
}
.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1.5rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
}
.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}
.text hr {
  margin: 6rem 0;
}
.text dt {
  font-weight: 600;
}
.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-black);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
}
.text blockquote footer {
  font-size: 0.875rem;
  font-style: italic;
}
.text figure {
  margin: 3rem 0;
}
.text figcaption {
  padding-top: 0.75rem;
  color: var(--color-text-grey);
}
.text figure ul {
  line-height: 0;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.text figure ul li {
  list-style: none;
}

address {
  font-style: normal;
  font-size: inherit;
  .text {
    h3 {
      font-size: small;
      margin-bottom: 0.5em;
    }

    ul {
      margin-left: 0;
      > li {
        list-style: none;
        position: relative;
        svg {
          transform: translateY(2px);
        }
}
    }
}
}
/* ====================================== */
/* STRUCTURE */
/* ====================================== */

hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: 1.5rem;
  margin: 3rem auto;
}

.align-center {
  text-align: center;
}

.intro {
  max-width: 40rem;
}
.intro *:not(:last-child) {
  margin-bottom: .5em;
}
.meta-wrapper {
  margin-top: 0.5em;
  display: flex;
  justify-content: left;
  align-items: center;
  gap: 0.5em;
}

.cta {
  background: var(--color-black);
  color: var(--color-white);
  display: inline-flex;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-black);
}

/* ====================================== */
/* FOOTER */
/* ====================================== */

.footer {
  margin: 1rem 0 0 0;
  padding: 1em 0 0 0;
  line-height: 1.5em;
  border-top: 1px solid var(--color-code-light-grey);
}
/*
.footer:before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-black);
  margin-bottom: 1.5rem;
}
*/

.subfooter {
  ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    font-size: smaller;
    gap: 2em;
  }
}

.footer h2 {
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.footer ul,
.footer p {
  color: var(--color-text-grey);
}
.footer p {
  max-width: 15rem;
}
.footer a:hover {
  color: var(--color-text);
}

/* ====================================== */
/* MAP */
/* ====================================== */

.map {
  --w: 2;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  position: relative;
  overflow: hidden;
  background: var(--color-black);
}
.map iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ====================================== */
/* MARGINS */
/* ====================================== */

.margin-s {
  margin-bottom: 0.75rem;
}
.margin-m {
  margin-bottom: 1.5rem;
}
.margin-l {
  margin-bottom: 3rem;
}
.margin-xl {
  margin-bottom: 4.5rem;
}
.margin-xxl {
  margin-bottom: 6rem;
}

/* ====================================== */
/* PAGINATION */
/* ====================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  width: 100%;
  padding-top: 4rem;
}
.pagination > span {
  color: var(--color-code-light-grey);
}
.pagination > [class^="pagination-"] {
  padding: 0.25em;
  width: 3rem;
  text-align: center;
  border: 1px solid currentColor;
}
.pagination > a:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.pag-number {
  font-size: small;
}

/* ====================================== */
/* Teaser Circles
/* ====================================== */

.work-teaser, .prevnext-teaser {
  background-color: transparent;
  will-change: transform;
  max-width: 100px;

  .img-caption {
    color: var(--color-grey);
    transition: color 0.5s ease, transform 0.5s ease;
  }

  &:hover img,
  &:focus img {
    transform: scale3d(1.02, 1.02, 1) translateY(-0.25em);
    outline: 0.25em solid var(--color-white);
    box-shadow: 0 0.25em 1.5em rgba(0, 0, 0, 0.6);
    transition: all 0.5s ease, transform 0.5s ease;
    background-size: 110%;
  }

  &:hover .work-teaser-title,
  &:focus .work-teaser-title {
    color: var(--color-black);
    transition: color 0.5s ease, transform 0.5s ease;
  }

  &:hover .img-caption,
  &:focus .img-caption {
    color: var(--color-black);
  }

  img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 100vw;
    overflow: hidden;
    outline: 0.15em solid var(--color-white);
    box-shadow: 0 0 2em rgba(0, 0, 0, 0.05), 0 0 1.5em rgba(0, 0, 0, 0.05);
    transition: all 1s ease, transform 1s ease;
  }

  .work-teaser-title, .prevnext-teaser-title {
    color: var(--color-grey);
    font-size: x-small;
    font-weight: 300;
    position: relative;
    line-height: 1.25;
    padding: 0em;
    margin-top: 0.5em;
    transition: color 1s ease, transform 1s ease;
  }
}

/* ====================================== */
/* Filter / Kategorien / Tags */
/* ====================================== */

.filter {
  margin-bottom: 2em;
  line-height: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.25em;
  margin-bottom: 3rem;
}

.filter-label {
  display: inline;
  background-color: var(--color-light);
  color: var(--color-black);
  font-size: xx-small;
  font-weight: 300;
  line-height: 1;
  height: 1em;
  text-transform: uppercase;
  padding: 0.5em 1em;
  border-radius: 100vw;
  border: var(--color-light) solid 1px;
  transition: all 0.4s ease, transform 1s ease;

  &.filter-all {
    color: var(--color-black);
    background-color: transparent;
    font-weight: 500;
  }

  &.active-filter,
  &:not(.passive):hover,
  &:not(.passive):focus,
  &.filter-all:hover,
  &.filter-all:focus {
    color: var(--color-white);
    background-color: var(--color-hover);
    border: var(--color-hover) solid 1px;
  }
}

/* ====================================== */
/* NOTES */
/* ====================================== */

.note-excerpt {
  line-height: 1.5em;
}
.note-excerpt header {
  margin-bottom: 1.5rem;
}
.note-excerpt figure {
  margin-bottom: 0.5rem;
}
.note-excerpt-title {
  font-weight: 600;
}
.note-excerpt-date {
  color: var(--color-text-grey);
}

@media screen and (min-width: 60rem) {
  body {
    --padding: 3rem;
  }

  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .grid > .column {
    grid-column: span var(--columns);
  }

}

/* Teaser Stage (temporär, bis nach UStronauts-Ausstellung) */
body:has(.teaser-stage) .mainnav {
  margin-bottom: 1rem;
}

body:has(.teaser-stage) .footer {
  margin: 5vh 0 0 0;
}

.teaser-stage {
  height: calc(100dvh - 9rem); /* 9rem ≈ Navbar-Höhe + margin-bottom */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.teaser-link {
  display: block;
  max-height: 100%;
}

.teaser-image {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 9rem);
  width: auto;
  height: auto;
}

/* ====================================== */
/* COOKIE BANNER */
/* ====================================== */

#cookie-banner {
  position: fixed;
  bottom: 2em;
  left: 50%;
  width: min(calc(100% - 3rem), 860px);
  background: var(--color-white);
  border: 1px solid var(--color-code-light-grey);
  border-radius: 0.75rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 0.75rem 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 100;
  font-size: small;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.5rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#cookie-banner.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.cookie-banner__icon {
  flex-shrink: 0;
  width: 2.5rem;
  color: var(--color-grey);
}
#cookie-banner p {
  margin: 0;
  flex: 1;
  line-height: 1.4;
}
#cookie-banner a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.cookie-accept {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-code-light-grey);
  border-radius: 0.4rem;
  cursor: pointer;
  font: inherit;
  font-size: small;
  white-space: nowrap;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cookie-accept:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}
@media (max-width: 480px) {
  .cookie-banner__icon {
    display: none;
  }
}

