@charset "UTF-8";

/* ================================ */
/* CSS Experiments – Template       */
/* Kopieren, umbenennen, loslegen   */
/* ================================ */

* {
    margin: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #0f0f0f;
    color: #e8e8e8;
    min-height: 100vh;
}


/* -------------- */
/* Nav */
/* -------------- */

nav {
    padding: 1rem 2rem;
    border-bottom: 1px solid #222;
}

nav a {
    color: #888;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #e8e8e8;
}


/* -------------- */
/* Main */
/* -------------- */

main {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

main h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #cd6f9e, #553fa6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* -------------- */
/* Demo Block     */
/* -------------- */

.demo {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #1a1a1a;
}

.demo:last-child {
    border-bottom: none;
}

.demo h2 {
    font-size: 1rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.demo p {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Inline Code in Beschreibungen */
.demo p code {
    background: #1a1a1a;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #cd6f9e;
}








/* ================================ */
     /* Schreibmaschineneffekt  */
/* ================================ */

.typewriter {
    display: flex;
    justify-content: center;
}

.typewriter p {
    font-family: monospace;
    font-size: 1.5rem;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #cd6f9e;
    width: 27ch; /* ch = Breite eines Zeichens in Monospace, exakt passend */
    animation: typing 3s steps(28) forwards,
               blink 1s step-end infinite;
}

@keyframes typing {
    from { 
        width: 0; 
    }

    to { 
        width: 27ch; 
    } /* gleicher Wert wie die gesetzte Breite */
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}


.replay-btn {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #cd6f9e, #553fa6);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.replay-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}
