:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --accent: #555555;
    --font-mono: 'Courier New', Courier, monospace;
    --color-coding: #90ee90;
    --color-design: #ffffe0;
    --color-about: #ffa500;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
}

/* --- Intro Effekt --- */
#intro-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}

#start-button {
    padding: 15px 30px;
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 2px;
}
#start-button:hover { background: #fff; color: #000; }
.curtain-open { transform: scaleY(0); }

/* --- Hauptseite & Sichtbarkeit --- */
#main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px;
    /* Hier ist der Trick: Standardmäßig sichtbar für Unterseiten */
    opacity: 1; 
}

/* NUR wenn ein Intro-Overlay auf der Seite ist, auf 0 setzen */
body:has(#intro-overlay) #main-content {
    opacity: 0;
    transition: opacity 1s ease-in 0.5s;
}

/* Wenn das Intro geöffnet wird (JavaScript Klasse) */
.content-visible {
    opacity: 1 !important;
}

header {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 50px;
}

nav ul { list-style: none; padding: 0; display: flex; gap: 30px; }
nav a { text-decoration: none; color: var(--text-color); font-weight: bold; font-size: 0.9rem; padding-bottom: 5px; }

.typewriter h1 {
    overflow: hidden;
    border-right: .15em solid var(--accent);
    white-space: nowrap;
    margin: 0;
    letter-spacing: .15em;
    animation: typing 2s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink-caret { from, to { border-color: transparent; } 50% { border-color: var(--accent); } }

/* --- Projekt Sektion --- */
.projects-grid { margin-top: 40px; }

.project-item {
    margin-bottom: 60px;
    /* Auf Unterseiten sofort zeigen */
    opacity: 1;
    transform: translateY(0);
}

/* NUR wenn Intro da ist, verstecken für die Animation */
body:has(#intro-overlay) .project-item {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s all ease-out;
}

.project-item.show { opacity: 1 !important; transform: translateY(0) !important; }

.project-number { font-size: 0.8rem; color: var(--accent); }
.project-title { font-size: 1.8rem; margin: 10px 0; text-transform: uppercase; }
.project-desc { line-height: 1.6; color: #666; }
.project-link { display: inline-block; margin-top: 15px; color: var(--text-color); text-decoration: none; border-bottom: 1px solid var(--text-color); font-size: 0.8rem; }



/* Mobil-Anpassung (Dein Original) */
@media (max-width: 600px) {
    .typewriter h1 { font-size: 1.6rem; letter-spacing: 0.05em; animation: typing 2s steps(40, end) forwards, blink-caret .75s step-end infinite; }
    nav ul { gap: 15px; }
    .project-title { font-size: 1.3rem; }
}

/* About Text */
.about-text { margin-top: 40px; line-height: 1.8; max-width: 700px; color: #444; }
.about-text p { margin-bottom: 20px; }

/* Der Container für das Video - standardmäßig zugeklappt */
.project-details-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
}

/* Wenn die Klasse 'open' hinzugefügt wird, klappt es auf */
.project-details-drawer.open {
    max-height: 800px; /* Hoch genug für das Video */
    margin-bottom: 20px;
}

.project-preview-video {
    width: 100%;
    max-width: 600px;
    margin-top: 15px;
    border: 1px solid #eee;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
    display: block;
}

.project-preview-video:hover {
    filter: grayscale(0%);
}

.project-actions {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}
   /* Das Terminal-Fenster */
.code-window {
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 6px;
    margin-top: 20px;
    border: 1px solid #1a1a1a; 
    display: flex;
    flex-direction: column;
    width: 100%;       
    max-width: 600px;  
    overflow: hidden; 
    /* NEU: Verhindert, dass der Inhalt den Rahmen "frisst" */
    box-sizing: border-box; 
}

.code-header {
    background: #f5f5f5; 
    padding: 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #1a1a1a;
    /* NEU: Stellt sicher, dass der Header nicht schrumpft */
    flex-shrink: 0;
}

.dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
.file-name { margin-left: 10px; color: #1a1a1a; font-size: 0.7rem; font-weight: bold; }

/* Scroll-Bereich */
pre {
    margin: 0;
    padding: 15px;
    max-height: 400px; 
    overflow: auto;    
    background: #ffffff;
    /* WICHTIG: border-radius auf 0 setzen, da .code-window das Abrunden übernimmt */
    border-radius: 0; 
    display: block;
    /* NEU: Ein winziges Padding unten verhindert, dass der Text die Linie berührt */
    padding-bottom: 20px;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre; 
    color: #1a1a1a;
    /* NEU: Block-Anzeige behebt Rendering-Lücken am Boden */
    display: block;
}