/* Schrift: Nimbus Mono von URW++ (Lizenz: GNU GPL, siehe font/nimbus-mono/).
   @font-face sagt dem Browser, wo die Schriftdatei liegt und welcher Schnitt welcher ist.
   Derselbe Block steht in style.css, html/style.css und html/text.css,
   weil nicht alle Seiten dieselbe CSS-Datei laden.
   Die Oblique-Datei ist als font-style: italic angemeldet. So nutzen alle
   Hover-Effekte mit font-style: italic automatisch die echte schräge Variante.
   font-display: swap zeigt den Text sofort in einer Ersatzschrift,
   bis Nimbus Mono geladen ist, statt ihn unsichtbar zu lassen. */
@font-face {
    font-family: "Nimbus Mono";
    src: url("../font/nimbus-mono/NimbusMono-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nimbus Mono";
    src: url("../font/nimbus-mono/NimbusMono-Oblique.woff") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}


/* Allgemeines */

body {
    background: white;
    margin: 0;
    min-height: 100vh;
    /* Auf dem Handy darf man scrollen, sonst wäre der Text abgeschnitten.
       Ab 40rem wird das Scrollen gesperrt (siehe Media Query ganz unten). */
}


/* Hauptinhalt */

/* Der Inhalt ist genau so hoch wie das Fenster und steht senkrecht in der Mitte.
   Das Padding oben und unten hält Platz frei für Navigation und Footer. */
.text {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* safe: Passt der Inhalt nicht, wird nur unten abgeschnitten,
       damit Navigation und erstes Bild oben sichtbar bleiben. */
    justify-content: safe center;
    text-align: center;

    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 3.5rem 0;

    font-family: "Nimbus Mono", "Courier New", monospace;
}


/* Bilder */

/* Gleiche Grösse wie die zwei Bilder auf der Startseite (html/style.css, .bild1/.bild2).
   Die Porträts haben dasselbe Format 2:3 wie 200 × 300, darum wird nichts abgeschnitten.
   px statt rem, damit die Grösse garantiert identisch mit der Startseite ist. */
.text__bild {
    display: block;

    width: 200px;
    height: 300px;

    object-fit: cover;
}


.text p {
    /* ch = Breite eines Zeichens. In einer Monospace-Schrift sind alle Zeichen gleich breit,
       80 Zeichen ergeben bei englischem Text etwa 12–15 Wörter pro Zeile. */
    width: 80ch;
    max-width: calc(100% - 40px);

    margin: 3vh auto;

    font-family: "Nimbus Mono", "Courier New", monospace;
    font-size: 0.875rem; /* 14 px, gleich wie --schrift-text in style.css */
    line-height: 18px;
    font-weight: normal;
     hyphens: auto;
     text-wrap: pretty;
     text-align: left;
}


/* Navigation oben links */

.homebutton {
    color: black;
    font-family: "Nimbus Mono", "Courier New", monospace;
    font-size: 1.125rem; /* gleich wie --schrift-gross in style.css (diese Seite lädt style.css nicht) */

    position: absolute;
    top: 20px;
    left: 20px;

    text-decoration: none;
}

.homebutton:hover {
    font-style: italic;
}


/* Projects oben rechts */

.projektbutton {
    position: absolute;
    top: 20px;
    right: 20px;

    color: black;
    font-family: "Nimbus Mono", "Courier New", monospace;
    font-size: 1.125rem; /* gleich wie --schrift-gross in style.css (diese Seite lädt style.css nicht) */
    text-decoration: none;
}

.projektbutton:hover {
    font-style: italic;
}


/* Footer unten rechts.
   Auf dem Handy steht er normal unter dem Inhalt, damit er beim Scrollen
   nicht über dem Text liegt. Ab 40rem ist er fest unten rechts (Media Query unten). */

footer {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    align-items: flex-end;

    padding: 0 30px 20px;
}

.contact,
.instagram {
    color: black;
    font-family: "Nimbus Mono", "Courier New", monospace;
    text-decoration: none;
}


/* Cursor */

.cursor-ball {
    display: none;
    position: fixed;
    top: -1rem;
    left: -1rem;
    z-index: 9999;

    width: 16px;
    height: 16px;

    border-radius: 50%;
    background: #FF3300;

    pointer-events: none;
    transform: translate(-50%, -50%);
    scale: 1;

    transition: scale 0.3s ease;
}

.cursor-ball.is-hovering {
    scale: 1.875;
}

html,
html * {
    cursor: none !important;
}

.cursor-ball {
    display: block;
}


/* Ab 40rem (Tablet und Desktop): alles auf einem Bildschirm, ohne Scrollen.
   Mobile first: Die Regeln oben gelten fürs Handy, hier kommt nur dazu,
   was auf grösseren Bildschirmen anders ist. */

@media (min-width: 40rem) {

    body {
        /* Die Seite soll nicht scrollbar sein. Ist das Fenster zu niedrig,
           wird unten abgeschnitten (bewusster Entscheid). */
        overflow: hidden;
    }

    footer {
        position: fixed;
        right: 30px;
        bottom: 20px;
        padding: 0;
    }

}
