/* Custom Properties */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --bg-alt: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    overflow: hidden; /* Verhindert das globale Scrollen */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav */
header {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

.sun { display: block; }
.moon { display: none; }

[data-theme="dark"] .sun { display: none; }
[data-theme="dark"] .moon { display: block; }

/* SPA Sektions-Steuerung */
main {
    position: relative;
    height: 100vh;
    width: 100%;
}

section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: 120px 0 60px 0; /* Platz für Header */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateY(10px);
    overflow-y: auto; /* Scrollen NUR innerhalb der Sektion erlaubt */
    background-color: var(--bg-color);
}

section.active-section {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 10;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.highlight {
    color: var(--primary-color);
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.description {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    font-size: 1.1rem;
}

/* Typing Effect */
.typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-color);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background-color: var(--bg-alt);
}

.bg-alt {
    background-color: var(--bg-alt);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 3rem;
}

.profile-img {
    width: 100%;
    max-width: 300px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-links {
    list-style: none;
    margin-top: 2rem;
}

.contact-links li {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.contact-links i,
.contact-links svg {
    display: inline-block;
    color: var(--primary-color);
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    stroke-width: 2px;
}

.contact-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-links a:hover {
    color: var(--primary-color);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 8px;
    font-family: inherit;
}

/* Footer (fixiert am Boden der Sektionen) */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    margin-top: 4rem;
}

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: var(--transition);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .profile-img { margin: 0 auto; }
    .contact-wrapper { grid-template-columns: 1fr; }
    
    .nav-links {
        position: fixed;
        right: 0;
        top: 80px;
        height: calc(100vh - 80px);
        background-color: var(--bg-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        padding-top: 3rem;
        z-index: 1001;
    }

    .nav-links-active { transform: translateX(0); }
    .burger { display: block; }
}
