/* ===== CSS Variables & Root ===== */
:root {
    /* Color Palette */
    --primary-color: #2563eb;
    --primary-dark: #ffffff;
    --primary-light: #667eea;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    /* Neutral Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --container-padding: 1.5rem;
    --section-padding: 5rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans), serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--container-padding);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

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

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: color var(--transition-base);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-height) + 130px);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    position:relative;
    padding:12px;
    border-radius:22px;
    background:linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow:var(--shadow-xl);
}

.greeting {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.5s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Container um das Bild /
.portrait-container {
  position: relative;
  display: inline-block;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  box-shadow: var(--shadow-xl);
  opacity: 0;
  animation: fadeInScale 0.8s ease 0.6s forwards;
}

/ Das Bild selbst /
.portrait-container img {
  display: block;        / verhindert Zeilenabstands-Lücke /
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 14px;
  border: none;
  position: relative;
  z-index: 1;            / liegt über der Deko /
}


/Deko-Rahmen hinter dem Bild – gleichmäßiger Abstand /
.portrait-decoration {
  position: absolute;
  inset: -16px;          / statt top/right/width/height /
  border: 3px solid var(--primary-color);
  border-radius: 24px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/ Responsiv */
@media (max-width: 992px) {
    .portrait-container { max-width: 300px; margin: 0 auto; }
}

/* ===== About Section ===== */
.about {
    padding: var(--section-padding) 0;
    background: var(--bg-primary);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.about-content {
    display: grid;
    gap: 3rem;
}

.about-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
    transition: all var(--transition-base);
}

.info-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.info-value {
    color: var(--text-secondary);
}

/* ===== Experience Section ===== */
.experience {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    padding-left: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
    opacity: 0;
    animation: slideInLeft 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -45px;
    top: 5px;
    width: 15px;
    height: 15px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-secondary), 0 0 0 6px var(--primary-color);
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);

}
/* Company Logo Styles */
.company-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.company-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    padding: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.company-header > div {
    flex: 1;
}

.company-header h3 {
    margin-bottom: 0.25rem;
}

.company-header h4 {
    margin-bottom: 0;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-list {
    list-style: none;
    margin-top: 1rem;
}

.timeline-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.timeline-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* ===== Education Section ===== */
.education {
    padding: var(--section-padding) 0;
    background: var(--bg-primary);
}

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

.education-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border-top: 3px solid var(--primary-color);
    transition: all var(--transition-base);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.education-card:nth-child(1) { animation-delay: 0.1s; }
.education-card:nth-child(2) { animation-delay: 0.2s; }
.education-card:nth-child(3) { animation-delay: 0.3s; }

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.education-year {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.education-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-card h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.education-card p {
    color: var(--text-secondary);
}

/* ===== Skills Section ===== */
.skills {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-category {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

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

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    position: relative;
}

.skill-name {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
}

.skill-item[data-level="65"] .skill-progress { width: 65%; }
.skill-item[data-level="70"] .skill-progress { width: 70%; }
.skill-item[data-level="60"] .skill-progress { width: 60%; }
.skill-item[data-level="80"] .skill-progress { width: 80%; }
.skill-item[data-level="85"] .skill-progress { width: 85%; }
.skill-item[data-level="88"] .skill-progress { width: 88%; }
.skill-item[data-level="90"] .skill-progress { width: 90%; }
.skill-item[data-level="95"] .skill-progress { width: 95%; }
.skill-item[data-level="95"] .skill-progress { width: 95%; }
.skill-item[data-level="10"] .skill-progress { width: 10%; }
.skill-item[data-level="30"] .skill-progress { width: 30%; }
.skill-item[data-level="45"] .skill-progress { width: 45%; }
.skill-item[data-level="20"] .skill-progress { width: 20%; }
.skill-item[data-level="25"] .skill-progress { width: 25%; }
.skill-item[data-level="15"] .skill-progress { width: 15%; }

/* Soft Skills */
.soft-skills {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.soft-skills h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.soft-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.soft-skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.soft-skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Contact Section ===== */
.contact {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: all var(--transition-base);
}

.contact-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Contact Form */
.contact-form {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-base);
    background: var(--bg-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    display: block;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }

    .portrait-container {
        max-width: 300px;
        margin: 0 auto;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }
}
    /* Mobile Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        transition: left var(--transition-base);
        box-shadow: var(--shadow-xl);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        padding: 1rem 0;
        font-size: 1.125rem;
    }

    /* Hero Mobile */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    /* Timeline Mobile */
    .timeline {
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -26px;
        width: 12px;
        height: 12px;
    }

    /* Grid Adjustments */
    .education-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Footer Mobile */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }


@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .back-to-top,
    .hero-buttons,
    .social-links {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    body {
        font-size: 12pt;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
    :root {
        --primary-color: #0066cc;
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --bg-secondary: #f0f0f0;
    }
}

/* ===== Loading Animation ===== */
.skill-item.animate .skill-progress {
    animation: fillProgress 1.5s ease forwards;
}

@keyframes fillProgress {
    from {
        width: 0;
    }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== Selection Styles ===== */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
/* ===== Dark Mode Variables ===== */
[data-theme="dark"] {
    --primary-color: #60a5fa;
    --primary-dark: #ffffff;
    --primary-light: #764ba2;
    --secondary-color: #34d399;
    --accent-color: #a78bfa;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-dark: #020617;
    --border-color: #334155;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-left: 2rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    position: absolute;
    transition: all var(--transition-base);
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* ===== Dark Mode Specific Overrides ===== */
[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] .hero::before {
    background-image: radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.15) 0%, transparent 50%);
}

[data-theme="dark"] .timeline-content,
[data-theme="dark"] .education-card,
[data-theme="dark"] .skill-category,
[data-theme="dark"] .contact-form,
[data-theme="dark"] .info-item,
[data-theme="dark"] .contact-item,
[data-theme="dark"] .soft-skills {
    background: var(--bg-secondary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--bg-dark);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .skill-bar {
    background: var(--bg-dark);
}

[data-theme="dark"] .portrait-container img {
    box-shadow: 0 5px 50px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .contact {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Mobile Dark Mode */
@media (max-width: 768px) {
    [data-theme="dark"] .nav-menu {
        background: var(--bg-primary);
        box-shadow: var(--shadow-xl);
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        margin-left: 1rem;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
}

/* Smooth transitions for theme change */
* {
    transition: background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

/* Floating Theme Toggle (Alternative) */
.theme-toggle-floating {
    position: fixed;
    bottom: 80px; /* Über dem Back-to-Top Button */
    right: 2rem;
    z-index: 999;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

/* Better contrast for dark mode */
[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

[data-theme="dark"] .btn-secondary {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

[data-theme="dark"] .soft-skill-tag {
    background: linear-gradient(135deg, #1e40af, #6d28d9);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] code {
    background: var(--bg-dark);
    color: var(--primary-light);
}

/* ===== HERO BUTTONS - IMMER WEISS IN BEIDEN MODI ===== */
.hero .btn-primary,
.hero .btn-secondary,
[data-theme="dark"] .hero .btn-primary,
[data-theme="dark"] .hero .btn-secondary {
    background: transparent !important;
    color: white !important;
    border: 2px solid white !important;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero .btn-primary:hover,
.hero .btn-secondary:hover,
[data-theme="dark"] .hero .btn-primary:hover,
[data-theme="dark"] .hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: white !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Hero Text auch immer weiß in beiden Modi */
.hero .greeting,
.hero .hero-title,
.hero .hero-subtitle,
.hero .hero-description,
[data-theme="dark"] .hero .greeting,
[data-theme="dark"] .hero .hero-title,
[data-theme="dark"] .hero .hero-subtitle,
[data-theme="dark"] .hero .hero-description {
    color: white !important;
    -webkit-text-fill-color: white !important;
}