/* Gemeinsam für alle Seiten: Navigation mit Kontakt und der Kontakt-Dialog.
   Farben über Token (--ink, --muted, --veil); Seiten ohne eigene Token sind dunkel. */

/* Navigation: der Name führt zur Startseite, rechts Work und Contact */
.site-title {
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: baseline;
    gap: 28px;
}

.nav-contact {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

@media (max-width: 767px) {
    .nav-right {
        gap: 20px;
    }
}

/* sehr schmale Telefone (320 px): Name und beide Punkte passen nebeneinander, der Rand bleibt */
@media (max-width: 359px) {
    .site-title {
        font-size: 17px;
    }

    .nav-link {
        font-size: 12.5px;
    }

    .nav-right {
        gap: 14px;
    }
}

/* Kontakt: klar statt Milchglas. Der Raum dunkelt ab, die Adressen stehen frei darin,
   in der Schrift der Startseite; CLOSE steht dort, wo eben CONTACT stand. */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    background: var(--veil, rgba(0, 0, 0, 0.975));
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.35s ease;
}

.overlay-close {
    position: absolute;
    top: calc(2rem + 5px);
    right: 40px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    color: var(--ink, #fff);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.overlay-close:hover {
    opacity: 0.7;
}

.overlay-content {
    display: grid;
    gap: 2.4rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay.active .overlay-content {
    opacity: 1;
    transform: none;
}

.contact-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted, rgba(255, 255, 255, 0.5));
}

.orcid-link {
    display: inline-flex;
    transition: opacity 0.3s ease;
}

.orcid-link:hover {
    opacity: 0.7;
}

.orcid-icon {
    width: 14px;
    height: 14px;
}

.mail {
    display: block;
    font-size: clamp(22px, 2.8vw, 36px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--ink, #fff);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.mail:hover {
    opacity: 0.7;
}

@media (max-width: 767px) {
    /* auf dem Telefon an der Kante von Name und Zeile, nicht mittig */
    .overlay {
        padding: 0 30px;
        justify-content: flex-start;
    }

    .overlay-close {
        top: calc(1.25rem + 4px);
        right: 30px;
        font-size: 14px;
    }

    .mail {
        font-size: clamp(18px, 5.6vw, 26px);
    }
}

@media (max-width: 359px) {
    .overlay-close {
        top: calc(1.25rem + 3px);
        font-size: 12.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .overlay,
    .overlay.active,
    .overlay-content {
        transition: none;
    }
}
