/* --- VARIABLEN & RESET --- */
:root {
    /* Darkmode Palette */
    --bg-main: #08080a;
    --bg-secondary: #111114;
    
    /* Der Gradient (Lila/Orange bleibt) */
    --gradient-accent: linear-gradient(135deg, #8c52ff 0%, #ff914d 100%);
    --color-purple: #8c52ff;
    --color-orange: #ff914d;

    /* Text Colors - NEU: Grau statt Weiß */
    --text-primary: #a6a6a6; 
    --text-secondary: #75757a; /* Etwas dunkleres Grau für Secondary */

    /* Glassmorphism Styles */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    
    /* Misc */
    --nav-height: 70px;
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    /* Alles zentriert */
    text-align: center;
    
    background-image: radial-gradient(circle at top right, rgba(140, 82, 255, 0.1), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(255, 145, 77, 0.05), transparent 40%);
    background-attachment: fixed;
}

/* --- UTILITIES --- */
.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.gradient-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gradient-accent);
    color: white; /* Button Text bleibt weiß für Kontrast */
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
    box-shadow: 0 4px 15px rgba(140, 82, 255, 0.3);
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 145, 77, 0.4);
}

/* --- NAVIGATION --- */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: var(--nav-height);
    z-index: 100;
    display: flex;
    justify-content: center; /* Zentriert den Inhalt */
    align-items: center;
    padding: 0 2rem;
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.glass-nav.scrolled {
    top: 10px;
    width: 95%;
    background: rgba(10, 10, 12, 0.85);
}

.nav-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: var(--gradient-accent);
    border-radius: 50%;
}

/* --- MAIN CONTENT --- */
main {
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 60px;
    min-height: 80vh;
    max-width: 1200px;
    margin: 0 auto;
}

.page {
    display: none;
    padding: 0 20px;
    animation: fadeSlideUp 0.6s var(--transition-smooth);
}

.page.active {
    display: block;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #dedede; /* Überschriften etwas heller als der Text */
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #dedede;
}

.subtitle, .section-intro {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px auto; /* Zentriert */
}

/* Hero Section Styles */
.hero-container {
    text-align: center; /* WICHTIG: Zentriert */
    padding: 40px 0;
    max-width: 900px;
    margin: 0 auto;
}

.cards-row {
    display: flex;
    gap: 25px;
    margin-top: 60px;
    flex-wrap: wrap;
    justify-content: center; /* Karten zentriert */
}

.info-card {
    flex: 1;
    min-width: 280px;
    max-width: 450px;
    padding: 35px;
    transition: var(--transition-smooth);
    text-align: center;
}

.info-card h3 {
    margin-bottom: 15px;
    color: var(--color-purple);
}

/* Hover Glow Effect */
.glow-hover {
    position: relative;
    overflow: hidden;
}

.glow-hover::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gradient-accent);
    opacity: 0;
    z-index: -1;
    filter: blur(40px);
    transition: opacity 0.5s ease;
}

.glow-hover:hover::before {
    opacity: 0.1;
}
.glow-hover:hover {
    border-color: rgba(140, 82, 255, 0.3);
    transform: translateY(-5px);
}

/* Projects Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    justify-items: center; /* Grid Items zentriert */
}

.project-card {
    width: 100%;
    padding: 5px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    transition: var(--transition-smooth);
}

.project-card:hover {
    background: var(--gradient-accent);
    transform: translateY(-5px);
}

.card-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 13px;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center; /* Text in Karten zentriert */
}

.card-content h3 { margin-bottom: 10px; color: #dedede; }
.card-content p { color: var(--text-secondary); margin-bottom: 20px; flex-grow: 1; }

.tech-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center; /* Tags zentriert */
}

.tech-tags span {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
}

/* License Terminal Style */
.license-wrapper {
    max-width: 800px;
    margin: 40px auto; /* Zentriert */
    overflow: hidden;
    border: 1px solid rgba(140, 82, 255, 0.2);
    text-align: left; /* Terminal Inhalt linksbündig für Code-Look, oder zentriert wenn gewünscht. Hier links besser lesbar. */
}

.license-header {
    background: rgba(0,0,0,0.3);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.traffic-lights {
    display: flex;
    gap: 8px;
    margin-right: 20px;
}

/* Mac Buttons in GRAU (#333) */
.traffic-lights span {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #333; /* Grau */
    border: 1px solid #444;
}

.filename {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: auto; /* Push filename to right or center? */
    margin-right: auto;
    transform: translateX(-20px); /* Optischer Ausgleich */
}

.license-body {
    padding: 30px;
    background: rgba(0,0,0,0.2);
}

.license-body pre {
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--text-primary); /* Grau #a6a6a6 */
    text-align: left; /* Text im Terminal linksbündig */
}

.license-body strong {
    color: var(--color-purple);
}

/* --- FOOTER --- */
footer {
    background: var(--bg-secondary);
    padding: 80px 20px 40px;
    margin-top: 100px;
    border-top: 1px solid var(--glass-border);
    text-align: center; /* Zentriert */
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-brand h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: none; /* "Moritzsoft Netzwerk" ausgeblendet wie gewünscht */
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

/* LOGO HANDLING */
.footer-logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
}

.wide-logo {
    height: 60px;
    width: auto; 
    object-fit: contain;
    filter: grayscale(100%) brightness(150%) contrast(80%);
    opacity: 0.5;
    transition: var(--transition-smooth);
}

.wide-logo:hover {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
    transform: scale(1.05);
}

.footer-legal p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.legal-link {
    color: var(--color-purple);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    position: relative;
}

.legal-link:hover {
    color: var(--color-orange);
}

/* --- ANIMATIONS --- */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .glass-nav {
        top: auto; bottom: 20px;
        padding: 0 1.5rem;
    }
    .nav-content {
        justify-content: center;
    }
    .logo-text { display: none; }
    .nav-links {
        gap: 25px;
        width: 100%;
        justify-content: space-between;
    }
    
    main {
        padding-top: 60px;
        padding-bottom: 120px;
    }
    
    .wide-logo { height: 45px; }
}

/* --- style.css --- */

.traffic-lights {
    display: flex;
    gap: 8px;
    margin-right: 20px;
}

/* Basis Form */
.traffic-lights span {
    width: 12px; height: 12px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

/* 1. Button: Grau (Neutral / Close) */
.traffic-lights span:nth-child(1) {
    background: var(--text-secondary); /* Dein Standard-Grau #75757a */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 2. Button: Lila (Minimize) */
.traffic-lights span:nth-child(2) {
    background: var(--color-purple);   /* #8c52ff */
    border: 1px solid rgba(140, 82, 255, 0.3);
    box-shadow: 0 0 6px rgba(140, 82, 255, 0.3); /* Leichter Glow */
}

/* 3. Button: Orange (Maximize) */
.traffic-lights span:nth-child(3) {
    background: var(--color-orange);   /* #ff914d */
    border: 1px solid rgba(255, 145, 77, 0.3);
    box-shadow: 0 0 6px rgba(255, 145, 77, 0.3); /* Leichter Glow */
}

/* Hover Effekt für die Buttons */
.traffic-lights:hover span {
    transform: scale(1.1);
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Hinter dem Content */
    opacity: 0.6; /* Damit es nicht zu aufdringlich ist */
    pointer-events: none; /* Klicks gehen durch das Canvas durch */
}