:root {
    --bg-dark: #1a1a1a;
    --bg-darker: #141414;
    --bg-lighter: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-color: #00b4d8;
    --accent-dark: #0096b4;
    --accent-gradient: linear-gradient(135deg, #00b4d8, #90e0ef);
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', monospace;
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --glass-bg: rgba(26, 26, 26, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --card-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
    --card-shadow-hover: 0 16px 48px 0 rgba(0, 180, 216, 0.22), 0 4px 24px rgba(0,0,0,0.18);
    --ai-glow-blue: rgba(0,170,255,0.7);
    --ai-glow-white: rgba(255,255,255,0.7);
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: var(--bg-darker);
    overflow: hidden;
}

.background-shapes::before,
.background-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0.05;
    filter: blur(100px);
}

.background-shapes::before {
    width: 300px;
    height: 300px;
    top: -50px;
    left: -100px;
}

.background-shapes::after {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -150px;
}

/* Add shimmer overlay */
.background-shapes .shimmer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--accent-color) 0%,
        transparent 30%
    );
    opacity: 0.03;
    transform-origin: center;
    animation: shimmer 2s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-5px, -5px);
    }
    100% {
        transform: translate(0, 0);
    }
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: opacity 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo::before {
    content: '';
    position: absolute;
    font-size: 0.875rem;
    bottom: -1.2rem;
    left: 0;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.logo:hover::before {}

.logo:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    color: var(--accent-color);
    position: relative;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1), left 0.3s cubic-bezier(0.4,0,0.2,1);
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--accent-color);
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
    left: 0;
}

.hamburger {
    display: none;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: white;
}

main {
    padding-top: 80px; /* Header height */
}

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 2rem; }
p { color: #eee; }

.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-content {
    max-width: 800px;
}



.hero-content h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-family: var(--font-mono);
}

.hero-content h1::after {
    content: '|';
    display: inline-block;
    color: var(--accent-color);
    animation: blink 1s step-end infinite;
}

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

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.8;
}

.hero-content blockquote {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
    border-left: 2px solid var(--accent-color);
    padding-left: 1.5rem;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#projects {
    padding-bottom: 6rem;
}

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

.project-card {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

.project-card:hover {
    transform: translateY(-5px) scale(1.015);
    box-shadow: var(--card-shadow-hover);
}

.project-card .expand-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    opacity: 0;
    transform: scale(0);
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-image {
    width: 100%;
    height: 200px;
    background: var(--bg-lighter);
    border-radius: 8px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '< Project Preview />';
    font-family: var(--font-mono);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.05;
}

.project-content {
    position: relative;
    z-index: 1;
}

.project-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skill-category span,
.tech-stack span {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-lighter);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
    opacity: 0.9;
    font-family: var(--font-mono);
}

#contact {
    text-align: center;
}

.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: var(--glass-border);
    padding: 3rem;
    box-shadow: var(--card-shadow);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px) scale(1.015);
    box-shadow: var(--card-shadow-hover);
}

.contact-card .hover-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        circle at var(--hover-x, 50%) var(--hover-y, 50%),
        rgba(0, 180, 216, 0.15) 0%,
        rgba(0, 180, 216, 0.10) 25%,
        rgba(0, 180, 216, 0.06) 45%,
        rgba(0, 180, 216, 0.03) 65%,
        rgba(0, 180, 216, 0.0) 100%
    );
    will-change: opacity;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.contact-card:hover .hover-gradient {
    opacity: 1;
}

.contact-card > * {
    position: relative;
    z-index: 2;
}

.contact-card h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.contact-card p {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color);
}

/* --- Fix: GitHub Button ist standardmäßig blau, nur bei direktem Hover weiß --- */
.social-links a.github-link {
    color: var(--accent-color) !important;
    background: var(--bg-lighter);
    border: 1px solid var(--accent-color);
    transition: all 0.3s ease;
}

/* Beim Hover der Kontakt-Box bleibt GitHub-Button blau */
.contact-card:hover .social-links a.github-link {
    color: var(--accent-color) !important;
    background: var(--bg-lighter);
}

/* Nur bei direktem Hover/Fokus wird er weiß */
.social-links a.github-link:hover,
.social-links a.github-link:focus {
    color: #fff !important;
    background: rgba(0, 180, 216, 0.6);
    transform: scale(1.13);
    box-shadow: 0 0 16px 2px rgba(0,180,216,0.25), 0 2px 8px rgba(0,0,0,0.10);
    z-index: 2;
}

/* Remove any conflicting rules that might override this behavior */
.social-links a:hover {
    transform: translateY(-2px);
    color: var(--text-primary);
}

/* Social-Button: Reaktion auf Box-Hover */
.contact-card:hover .social-links a {
    color: #fff;
    transform: scale(1.07);
    transition: color 0.2s, transform 0.2s;
}
/* Verstärkter Effekt beim direkten Button-Hover */
.contact-card .social-links a:hover,
.contact-card .social-links a:focus {
    color: #fff !important;
    background: rgba(0, 180, 216, 0.6);
    transform: scale(1.13);
    box-shadow: 0 0 16px 2px rgba(0,180,216,0.25), 0 2px 8px rgba(0,0,0,0.10);
    z-index: 2;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #eee;
}

/* About Me Page */
.about-section {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 10px;
    border: var(--glass-border);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.about-image {
    flex: 1;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
}

.about-text {
    flex: 2;
}

.about-text h3 {
    color: var(--text-primary);
    margin-top: 0;
}

/* Modifier for alternating layout */
.about-section.text-left {
    flex-direction: row-reverse;
}

.about-section:hover {
    transform: scale(1.045);
    box-shadow: var(--card-shadow-hover);
}

.about-section .hover-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        circle at var(--hover-x, 50%) var(--hover-y, 50%),
        rgba(0, 180, 216, 0.35) 0%,
        rgba(0, 180, 216, 0.20) 30%,
        rgba(0, 180, 216, 0.10) 60%,
        rgba(0, 180, 216, 0.05) 85%,
        rgba(0, 180, 216, 0.0) 100%
    );
    will-change: opacity;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.about-section:hover .hover-gradient {
    opacity: 1;
}

.about-section .about-image,
.about-section .about-text {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: 0.3s ease-in-out;
    }

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

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 2rem;
    }

    .project-card {
        padding: 2rem;
        margin: 0.5rem 0;
    }

    .about-section, .about-section.text-left {
        flex-direction: column;
    }

    .image-placeholder {
        width: 150px;
        height: 150px;
    }
}

/* Accessibility and Dark Theme Enhancements */
::selection {
    background: var(--accent-color);
    color: var(--text-primary);
}

:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Dark theme specific adjustments */
h1, h2, h3 {
    color: var(--text-primary);
}

h2 {
    font-family: var(--font-mono);
    font-size: 2rem;
    letter-spacing: -0.5px;
    margin-bottom: 3rem;
}

section {
    padding: 6rem 2rem;
}

/* Improved contrast for better accessibility */

g a {
    background: var(--bg-lighter);
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(0, 180, 216, 0.6);
    transform: translateY(-2px);
}

/* Improved scrollbar for dark theme */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-lighter);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Mobile improvements */
@media (max-width: 768px) {
    section {
        padding: 4rem 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .project-card {
        margin: 0;
    }

    .project-image {
        height: 160px;
    }
}

.profile-image {
    margin-bottom: 2rem;
}

.image-placeholder {
    width: 180px;
    height: 180px;
    background: var(--bg-lighter);
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.1;
}

.image-placeholder span {
    font-family: var(--font-mono);
}

/* Remove all cursor glow and glow-on-hover effects */
.cursor-glow,
.shimmer {
    pointer-events: none;
}

/* Enhanced hover effects */
.nav-links a:hover,
.nav-links a:focus {
    color: var(--accent-color);
}

.project-card .hover-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        circle at var(--hover-x, 50%) var(--hover-y, 50%),
        rgba(0, 180, 216, 0.15) 0%,
        rgba(0, 180, 216, 0.10) 25%,
        rgba(0, 180, 216, 0.06) 45%,
        rgba(0, 180, 216, 0.03) 65%,
        rgba(0, 180, 216, 0.0) 100%
    );
    will-change: opacity;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.project-card:hover .hover-gradient {
    opacity: 1;
}

.project-card .project-content,
.project-card .tech-stack {
    position: relative;
    z-index: 2;
}

/* Project Overlay */
.project-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.project-overlay-content {
    background: var(--bg-darker);
    border-radius: 20px;
    padding: 4rem 3rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translate(var(--translate-x, 0), var(--translate-y, 0)) scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-overlay.active .project-overlay-content {
    transform: translate(0, 0) scale(1);
    opacity: 1;
}

.project-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.project-overlay-header h2 {
    margin: 0;
    font-size: 2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.close-overlay {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.close-overlay:hover {
    transform: rotate(90deg);
}

.project-overlay-body {
    margin-bottom: 2rem;
}

.project-overlay-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.project-overlay-footer {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-overlay-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--bg-lighter);
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-overlay-footer a:hover {
    background: rgba(0, 180, 216, 0.6);
    transform: translateY(-2px);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .project-overlay-content {
        padding: 2rem;
        width: 95%;
    }
}

.cursor-glow {
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ai-sparkle {
    position: absolute;
    left: 2rem;
    bottom: -3rem;
    height: 40px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    z-index: 100;
}

.sparkle-glow {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at center,
        var(--accent-color) 0%,
        rgba(0, 180, 216, 0.3) 50%,
        transparent 70%
    );
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 1;
}

.ai-sparkle:hover .sparkle-glow {
    opacity: 0.6;
    transform: scale(1.2);
}

.sparkle-icon {
    width: 20px;
    height: 20px;
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: absolute;
    left: 6px;
    z-index: 3;
    filter: drop-shadow(0 0 8px var(--accent-color));
}

.ai-sparkle:hover .sparkle-icon {
    transform: rotate(180deg) scale(1.1);
}

.ai-sparkle:not(:hover) .sparkle-icon {
    transform: rotate(-180deg);
    transition: transform 0.5s ease;
}

.ai-pill {
    position: absolute;
    left: 0;
    height: 32px;
    background: var(--bg-dark) !important; /* Wirklich blickdicht, überschreibt alles */
    backdrop-filter: blur(10px);
    border-radius: 100px;
    display: flex;
    align-items: center;
    width: 32px;
    overflow: hidden;
    transition: width 0.5s cubic-bezier(0.34, 1.25, 0.64, 1),
                padding 0.5s cubic-bezier(0.34, 1.25, 0.64, 1),
                background 0.5s ease,
                box-shadow 0.5s ease;
    z-index: 2;
    transform-origin: left center;
    position: relative;
    overflow: hidden;
}

.ai-pill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 100px;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    /* Animated gradient overlay, always present (for animation/transition) */
    background: linear-gradient(90deg,
        var(--accent-color) 0%,
        var(--accent-color) 10%,
        #ff8800 20%,
        #9333ea 40%,
        #ec4899 60%,
        #ffffff 80%,
        var(--accent-color) 90%,
        var(--accent-color) 100%
    );
    background-size: 200% 100%;
    animation: gradientMove 8s linear infinite;
    transition: opacity 0.5s cubic-bezier(0.34, 1.25, 0.64, 1);
}

/* Overlay visible, transition in */
.ai-pill.transition-gradient::after {
    opacity: 1;
    /* transition is already set above */
}
/* Overlay hidden if not in transition */
.ai-pill:not(.transition-gradient)::after {
    opacity: 0;
    /* transition is already set above */
}

/* .ai-pill::before bleibt wie gehabt */
.ai-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 100px;
    padding: 2px;
    z-index: 1;
    opacity: 0.85;
    background: conic-gradient(
        var(--accent-color) 0deg 180deg,
        #fff 180deg 360deg
    );
    filter: blur(6px);
    /* animated rotating gradient border */
    /* dynamic glow matched to gradient */
    box-shadow: 0 0 12px 4px var(--accent-color);
    animation: conicRotateSpin 6s linear infinite, shadowSync 6s linear infinite;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    /* smooth transition when stopping animation */
    transition: filter 0.3s ease, background 0.3s ease, opacity 0.3s ease;
    transform-origin: center center;
    animation: rotateOnLoad 0.5s ease-out forwards, conicRotateSpin 6s linear infinite, shadowSync 6s linear infinite;
}


/* AI Pill Rainbow Gradient State bleibt wie gehabt */
.ai-pill.rainbow-gradient::before {
    opacity: 1;
    background: linear-gradient(90deg,
        var(--accent-color) 0%,
        var(--accent-color) 10%,
        #ff8800 20%,
        #9333ea 40%,
        #ec4899 60%,
        #ffffff 80%,
        var(--accent-color) 90%,
        var(--accent-color) 100%
    );
    background-size: 200% 100%;
    animation: gradientMove 8s ease-in-out infinite alternate;
    filter: blur(12px);
}

.ai-sparkle:hover .ai-pill::after {
    opacity: 0.3;
}

.ai-sparkle:hover .glow-effect {
    opacity: 0.2;
    background: linear-gradient(90deg,
        rgba(0, 180, 216, 0.7) 0%,
        rgba(0, 180, 216, 0.7) 10%,
        rgba(255, 136, 0, 0.7) 20%,
        rgba(147, 51, 234, 0.7) 40%,
        rgba(236, 72, 153, 0.7) 60%,
        rgba(255, 255, 255, 0.7) 80%,
        rgba(0, 180, 216, 0.7) 90%,
        rgba(0, 180, 216, 0.7) 100%
    );
    background-size: 200% 100%;
    animation: gradientMove 8s linear infinite;
}

.ai-sparkle:hover .ai-pill {
    width: 340px;
    padding: 0 25px 0 36px;
    background: var(--bg-dark) !important;
    box-shadow: 
        0 0 25px rgba(0, 180, 216, 0.4),
        inset 0 0 70px rgba(0, 180, 216, 0.3);
}

@keyframes pillGradientMove {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@keyframes scaleAtEnd {
    0%, 80% {
        transform: scale(1);
    }
    90% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.ai-pill-content {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    margin-left: 8px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.ai-sparkle:hover .ai-pill-content {
    opacity: 1;
    transform: translateX(0);
}

@keyframes gradientMove {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@keyframes squashStretch {
    0% {
        transform: scale(1.02, 1);
    }
    40% {
        transform: scale(0.95, 1.05);
    }
    70% {
        transform: scale(1.05, 0.95);
    }
    100% {
        transform: scale(1, 1);
    }
}

.ai-sparkle:not(:hover) .ai-pill {
    /* Initiale Animation beim Laden entfernt */
    animation: none;
}

@keyframes pillCollapse {
    0% {
        width: 340px;
        padding: 0 25px 0 36px;
    }
    100% {
        width: 32px;
        padding: 0;
    }
}

@keyframes liquidEffect {
    0% {
        transform: scale(1, 1);
    }
    40% {
        transform: scale(1.03, 0.98);
    }
    70% {
        transform: scale(0.995, 1.02);
    }
    90% {
        transform: scale(1.01, 0.995);
    }
    100% {
        transform: scale(1, 1);
    }
}

.ai-sparkle:hover .ai-pill {
    width: 340px;
    padding: 0 25px 0 36px;
    background: var(--bg-dark) !important;
    box-shadow: 
        0 0 25px rgba(0, 180, 216, 0.4),
        inset 0 0 70px rgba(0, 180, 216, 0.3);
}

/* Add gradient and glow to the icon by default */

/* Highlight Cards Styling */
.highlight-card {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--card-shadow);
}

.highlight-card:hover {
    transform: translateY(-5px) scale(1.015);
    box-shadow: var(--card-shadow-hover);
}

.highlight-card .hover-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        circle at var(--hover-x, 50%) var(--hover-y, 50%),
        rgba(0, 180, 216, 0.15) 0%,
        rgba(0, 180, 216, 0.10) 25%,
        rgba(0, 180, 216, 0.06) 45%,
        rgba(0, 180, 216, 0.03) 65%,
        rgba(0, 180, 216, 0.0) 100%
    );
    will-change: opacity;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.highlight-card:hover .hover-gradient {
    opacity: 1;
}

.highlight-card .highlight-content {
    position: relative;
    z-index: 2;
}

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

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


/* Skill tag layout */
.skill-category {
  display: block;
  margin-bottom: 1rem;
}

.skill-category h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    opacity: 0.9;
}

.skill-category span {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-lighter);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
    opacity: 0.9;
    font-family: var(--font-mono);
}

.experience-item, .education-item {
    margin-bottom: 1.5rem;
}

.experience-item:last-child, .education-item:last-child {
    margin-bottom: 0;
}

.experience-item h4, .education-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.company, .institution {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.insert-animation {
    opacity: 0;
    animation: fadeInSimple 0.7s ease forwards;
    will-change: opacity;
}

@keyframes fadeInSimple {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (max-width: 500px) {
  .ai-sparkle {
    left: 12px;
  }
  .ai-sparkle:hover .ai-pill {
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    padding: 0 16px 0 34px;
  }
}

.project-card:hover .tech-stack span,
.project-card:hover .skill-category span,
.highlight-card:hover .tech-stack span,
.highlight-card:hover .skill-category span {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.5), rgba(144, 224, 239, 0.5));
    /* Optional: fill-opacity entfernen, falls nicht benötigt */
    color: #fff;
    box-shadow: 0 0 12px 2px rgba(0,180,216,0.25), 0 2px 8px rgba(0,0,0,0.10);
    transform: scale(1.07);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
    border-radius: 8px;
}
@keyframes conicRotate {
    0% {
        --conic-angle: 0deg;
    }
    100% {
        --conic-angle: 360deg;
    }
}

@keyframes conicRotateSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes shadowSync {
    0%, 100% {
        box-shadow: 0 0 12px 4px var(--accent-color);
    }
    50% {
        box-shadow: 0 0 12px 4px #fff;
    }
}

:root {
  --ai-glow-blue: rgba(0,170,255,0.7);
  --ai-glow-white: rgba(255,255,255,0.7);
}

/* Fester AI-Glow und weiche Übergänge */
.ai-pill::before,
.ai-pill.rainbow-gradient::before,
.ai-pill.fade-out-gradient::before {
  box-shadow:
    0 0 8px 2px var(--ai-glow-blue),
    0 0 12px 6px var(--ai-glow-white);
  transition:
    filter 0.3s ease,
    background 0.3s ease,
    opacity 0.3s ease,
    box-shadow 0.3s ease;
}
/* Bounce-Animationen für Ein- und Ausfahren verstärkt */


/* Global link color */
a {
  color: var(--accent-color);
  text-decoration: none;
}
a:visited {
  color: var(--accent-color);
}

/* Round profile picture */
.profile-pic {
  border-radius: 50%;
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: center 0%;
}



@keyframes fadeInSimple {
    from { opacity: 0; }
    to   { opacity: 1; }
}
