/* Base Styles */
:root {
    /* Dark theme color palette */
    --primary-color: #8a7aff;
    --secondary-color: #6357dd;
    --text-color: #e0e0e0;
    --text-light: #a0a0a0;
    --bg-color: #121212;
    --card-bg: rgba(30, 30, 30, 0.7);
    --card-border: rgba(60, 60, 60, 0.3);
    --card-shadow: rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Background Shapes */
.bg-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -5;
    overflow: hidden;
    opacity: 0.6; /* Make existing shapes more subtle */
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    will-change: transform; /* Optimize for animations */
}

.shape-1 {
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: linear-gradient(45deg, #6c63ff, #4a44c9);
}

.shape-2 {
    top: 50%;
    right: -150px;
    width: 600px;
    height: 600px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
}

.shape-3 {
    bottom: -150px;
    left: 30%;
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, #63ffd5, #00b8a9);
}

/* Frosted Glass Effect for Dark Theme */
.glass-card, .glass-nav, .glass-footer {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 var(--card-shadow);
    transition: var(--transition);
}

.glass-nav, .glass-footer {
    border-radius: 0;
    background: rgba(18, 18, 18, 0.85);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    border-color: rgba(100, 100, 100, 0.4);
}

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

p {
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

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

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

/* Buttons - Updated for better readability in dark theme */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000000; /* Dark text on light background maintains good contrast */
    box-shadow: 0 2px 10px rgba(138, 122, 255, 0.3);
}

.btn-secondary {
    background-color: rgba(138, 122, 255, 0.15);
    border: 1px solid var(--primary-color);
    color: #ffffff; /* White text instead of purple for better contrast */
}

.btn-sm {
    padding: 7px 15px;
    font-size: 0.9rem;
}

.btn-outline {
    background-color: rgba(138, 122, 255, 0.15);
    border: 1px solid var(--primary-color);
    color: #ffffff;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(138, 122, 255, 0.4);
}

.btn-primary:hover {
    background-color: #9d8fff; /* Slightly lighter on hover */
}

.btn-secondary:hover, .btn-outline:hover {
    background-color: rgba(138, 122, 255, 0.25);
    color: #ffffff;
}

/* Language Switcher Styles - Enhanced with modern animation */
.btn-lang {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-width: 90px;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-indicator {
    position: absolute;
    height: calc(100% - 6px);
    width: 42px;
    border-radius: 28px;
    background-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(138, 122, 255, 0.3);
    top: 3px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.lang-active .lang-indicator {
    transform: translateX(39px);
}

.lang-text {
    padding: 3px 10px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.current-lang, .alt-lang {
    font-weight: 500;
    transition: all 0.3s ease;
}

.current-lang {
    color: #000000;
}

.alt-lang {
    color: rgba(224, 224, 224, 0.7);
}

.lang-active .current-lang {
    color: rgba(224, 224, 224, 0.7);
}

.lang-active .alt-lang {
    color: #000000;
}

.btn-lang:hover {
    background: rgba(40, 40, 40, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Replace the old .lang-separator */
.lang-separator {
    display: none;
}

/* Header */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

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

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

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin-right: 25px; /* Add space between nav items and language switcher */
}

nav ul li {
    margin-left: 25px;
}

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

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.lang-switcher {
    margin-left: 15px; /* Add additional space after the last nav item */
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    max-width: 400px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
}

.profession {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 15px;
}

/* Sections */
section {
    padding: 100px 0;
}

/* About Section */
.about-content {
    display: flex;
    gap: 40px;
}

.about-text {
    flex: 1;
    padding: 30px;
}

.personal-info {
    margin: 20px 0;
}

.info-item {
    margin-bottom: 10px;
    display: flex;
}

.label {
    font-weight: 600;
    min-width: 120px;
}

/* Project Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    margin: 10px 0 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    background-color: rgba(108, 99, 255, 0.2);
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Project Links - Enhanced visibility */
.project-links {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.project-links a {
    font-weight: 500;
}

.project-links a i {
    margin-right: 4px;
}

/* Project buttons specific styling */
.project-links .btn:first-child {
    background-color: var(--primary-color);
    color: #000000;
    box-shadow: 0 2px 8px rgba(138, 122, 255, 0.3);
    border: none;
}

.project-links .btn:first-child:hover {
    background-color: #9d8fff;
    box-shadow: 0 4px 12px rgba(138, 122, 255, 0.4);
}

.project-links .btn-outline {
    background-color: rgba(138, 122, 255, 0.15);
    border: 1px solid var(--primary-color);
    color: #ffffff;
}

.project-links .btn-outline:hover {
    background-color: rgba(138, 122, 255, 0.25);
}

/* Skills Section */
.skills-container {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category h3 {
    margin-bottom: 20px;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-name {
    margin-bottom: 5px;
}

.skill-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.contact-info {
    padding: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item h3 {
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

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

.social-links a:hover {
    background-color: var(--primary-color);
    color: #000000;
}

.contact-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: rgba(50, 50, 50, 0.5);
    color: var(--text-color);
    transition: var(--transition);
    font-family: inherit;
}

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

/* Footer */
footer {
    padding: 30px 0;
    text-align: center;
}

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

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Media Queries */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        max-width: 300px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--card-bg);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--card-border);
        transition: var(--transition);
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 20px;
        margin-right: 0; /* Remove margin in mobile view */
        width: 100%;
    }
    
    .menu-toggle {
        display: block;
    }
    
    section {
        padding: 70px 0;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 15px;
    }

    .lang-switcher {
        margin: 0 20px 20px; /* Add margin in mobile view */
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Gallery Section */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    height: 200px;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Three.js background styles */
#three-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
}

/* Impressum Styles */
.impressum {
    padding: 120px 0 60px;
}

.impressum-content {
    padding: 30px;
}

.impressum-section {
    margin-bottom: 30px;
}

.impressum-section h3 {
    margin-bottom: 10px;
    color: var(--accent-color);
}

.impressum-section h4 {
    margin: 20px 0 10px;
    font-size: 1.2rem;
}

.impressum-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.back-btn i {
    margin-right: 10px;
}

.back-btn:hover {
    color: var(--accent-color);
}
