/* -------------------------------------------------
   1. SETTINGS – Design Tokens
   ------------------------------------------------- */
:root {
    --accent-color: #d6f1f1;
    --dark-accent-color: color-mix(in oklab, var(--accent-color), black 40%);
    --text-color-light: #222;
    --text-color-dark: white;
    --spacing: 2em;
}

/* nunito-sans-300 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 300;
  src: url('/forsch/font/nunito-sans-v19-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* nunito-sans-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 600;
  src: url('/forsch/font/nunito-sans-v19-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


/* -------------------------------------------------
   2. Reset & basic typography 
   ------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color-light);
    background: white;
}

body {
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

main,
header {
    margin: 0 15vw;
}

/* -------------------------------------------------------------------------- */
/*                             3. Header & Footer                             */
/* -------------------------------------------------------------------------- */
.site-header,
.site-footer {
    text-align: center;
    margin-top: auto;
}

/* --------------------------------- Header --------------------------------- */
.site-header__logo {
    margin: calc(var(--spacing) * 2);
}

.site-header__headline {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.site-header__tagline {
    font-size: 0.95rem;
    color: #555;
}

.site-header__skip-link{
    display: none;
}

/* --------------------------------- Footer --------------------------------- */
.site-footer {
    position: sticky;
    bottom: 0;
    font-size: 0.85rem;
    color: var(--text-color-light);
    background-color: white;
    padding: var(--spacing) 0;
    margin: 2em 0 0 0;
    border-top: 2px solid var(--accent-color);
    max-width: 100vw;
}

.site-footer a {
    color: inherit;
    text-decoration: underline;
}

.site-footer__logo {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.site-footer__links ul {
    display: flex;
    justify-items: center;
    justify-content: center;
    align-content: center;
    gap: 1.5rem;
    padding: var(--spacing) 0 0 0;
    margin: 0;
    list-style: none;
}

/* -------------------------------------------------------------------------- */
/*                            4. Navigation Section                           */
/* -------------------------------------------------------------------------- */
.navigation-section__headline {
    margin-bottom: 0.25em;
}

.navigation-section__nav ul {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    margin-bottom: 2rem;
}
.navigation-section__nav-element a {
    display: block;
    color: var(--dark-accent-color);
    text-decoration: 2px solid var(--accent-color);
    font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/*                                Issue Section                               */
/* -------------------------------------------------------------------------- */
/* Issue sections – show only the targeted one */
.issue__section {
    display: none;
}
.issue__section:target {
    display: block;
}

/* Show the first issue when no fragment is present */
.issue__section:first-of-type {
    display: block;
}

.issue__header {
    background-color: var(--accent-color);
    margin-bottom: var(--spacing);
    padding: var(--spacing);
}

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

/* -------------------------------------------------------------------------- */
/*                               Article Element                              */
/* -------------------------------------------------------------------------- */
.article {
    background: #fff;
    padding: 1.2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article__title-headline {
    display: block;
    color: var(--text-color-light);
    border-bottom: 4px solid var(--accent-color);
    width: fit-content;
    text-decoration: none;
    font-weight: 600;
}

.article__download-image {
    height: 1rem;
    width: auto;
}
.article__meta {
    font-size: 0.85rem;
    color: #555;
    margin: 0.6rem 0 1rem;
}
.article__abstract {
    font-size: 0.95rem;
    color: #333;
}

.article__citation-text {
    font-size: 0.85em;
    font-style: italic;
}

.article__citation {
    margin: 0.5rem 0;
}

/* -------------------------------------------------------------------------- */
/*                                About Section                               */
/* -------------------------------------------------------------------------- */
.about-section {
    margin: var(--spacing) 0;
}

.about-section__description {
    margin: 0.5em 0;
}

/* -------------------------------------------------------------------------- */
/*                              Responsive tweaks                             */
/* -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    body {
        padding: 0.8rem;
    }
    main, header{
        margin: 0 5vw;
    }
    .site-header__headline {
        font-size: 1.6rem;
    }
    .site-footer__logo img{
        height: 40px;
    }
}

/* -------------------------------------------------------------------------- */
/*                                    Modal                                   */
/* -------------------------------------------------------------------------- */

/* --------------------- Modal base – hidden by default --------------------- */
.modal {
    display: none; /* hidden until :target */
    position: fixed;
    inset: 0; /* full‑screen overlay */
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* When the element is the URL target → show it */
.modal:target {
    display: flex;
}

/* ---------------------------- Modal content box --------------------------- */
.modal__content {
    background: #fff;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 70vh;
    width: 65vw;
    padding: 1.5rem;
    position: relative;
    overflow: auto;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* ---------------------- Close button (styled as an X) --------------------- */
.modal__close a {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    color: #666;
    text-decoration: none;
}
.modal__close a:hover,
.modal__close a:focus {
    color: #000;
}

/* ------------------------------ Title & body ------------------------------ */
.modal__title {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}
.modal__body {
    margin-top: 1rem;
}

.modal__body p {
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

/* -------------------------------- Headlines ------------------------------- */
.modal__body h2 {
    padding-top: 1rem;
}
.modal__body h3 {
    padding-top: 0.5rem;
}

/* ------------------------------- Lists ------------------------------ */
.modal__body-list {
    list-style-position: inside;
    font-size: 0.8rem;
}

/* --------------------------- Credits (as list) --------------------------- */
.modal__body-credits {
    list-style: none;
}

.modal__body-credits li {
    padding: 0.25rem 0;
}

/* --------------------------- Address (as lists) -------------------------- */
.modal__body-address {
    font-family: monospace;
    font-style: normal;
}

.modal__body-address ul {
    list-style: none;
}

.modal__body-address li {
    padding: 0.1rem 0;
}

.modal__body-credits li,
.modal__body-address li {
    font-size: 0.8rem;
}

/* ------------------------- Respect reduced‑motion ------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .modal__content {
        animation: slideDown 0.25s ease-out forwards;
    }
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
