/* === VARIABLES === */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary-color: #475569;
    --secondary-light: #94a3b8;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    
    --container-width-lg: 80%;
    --container-width-md: 90%;
    --container-width-sm: 94%;
}

/* === RESET & BASE STYLES === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

section {
    padding: 5rem 0;
}

section:nth-child(odd) {
    background-color: #f1f5f9;
}

.container {
    width: var(--container-width-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.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%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

img {
    display: block;
    width: 100%;
    object-fit: cover;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    border: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--dark-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-text {
    background: transparent;
    color: var(--primary-color);
    padding: 0.5rem;
    margin: 1rem auto;
    display: block;
}

.btn-text:hover {
    color: var(--primary-dark);
    transform: translateY(0);
    box-shadow: none;
}

/* === NAVIGATION === */
#main-nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

#main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px;
    transition: var(--transition);
}

/* === HEADER/HERO === */
header {
    padding: 8rem 0 5rem;
    background-color: white;
    margin-top: 80px;
}

.profile-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.profile-image {
    flex: 0 0 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 5px solid white;
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* Fokus noch weiter nach oben verschoben */
}

.profile-info {
    flex: 1;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.profile-tags span {
    background-color: var(--gray-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* === ABOUT SECTION === */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.detail-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* === EXPERIENCE SECTION === */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 120px;
    width: 3px;
    background-color: var(--gray-color);
}

.timeline-item {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
    opacity: 1;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin-bottom 0.5s ease;
}

.timeline-item.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    pointer-events: none;
}

.timeline-date {
    flex: 0 0 100px;
    text-align: right;
    padding-right: 1.5rem;
    font-weight: 500;
    position: relative;
}

.timeline-date::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 7px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--primary-color);
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.timeline-content {
    flex: 1;
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    margin-left: 1.5rem;
}

.timeline-content:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-3px);
}

.timeline-content ul {
    margin-top: 1rem;
    padding-left: 1.2rem;
}

.timeline-content ul li {
    position: relative;
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

/* === EDUCATION SECTION === */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.education-item:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-3px);
}

.education-icon {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.education-content h4 {
    margin-bottom: 0.5rem;
}

.education-content p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* === SKILLS SECTION === */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.skills-category {
    margin-bottom: 2rem;
}

.skills-category h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-color);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
}

.skill-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 10px;
    background-color: var(--gray-color);
    border-radius: 5px;
    margin-bottom: 0.3rem;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
}

.skill-percentage {
    font-size: 0.8rem;
    color: var(--secondary-color);
    align-self: flex-end;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.interest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.interest-item:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-3px);
}

.interest-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* === CONTACT SECTION === */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item h4 {
    margin-bottom: 0.3rem;
}

.contact-availability, .contact-references {
    margin-top: 2rem;
}

.reference-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.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.75rem;
    border: 1px solid var(--gray-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* === FOOTER === */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: white;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
}

/* === BACK TO TOP BUTTON === */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    box-shadow: var(--box-shadow);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: var(--primary-dark);
}

/* === RESPONSIVE === */
@media screen and (max-width: 1024px) {
    .container {
        width: var(--container-width-md);
    }
    
    section {
        padding: 4rem 0;
    }
    
    .profile-container {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-image {
        margin: 0 auto;
    }
    
    .profile-tags {
        justify-content: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-date {
        flex: 0 0 50px;
        text-align: left;
        padding-right: 0.5rem;
    }
    
    .timeline-date::after {
        left: 23px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .container {
        width: var(--container-width-sm);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        top: 80px;
        background-color: white;
        flex-direction: column;
        width: 100%;
        text-align: center;
        transform: translateY(-150%);
        transition: var(--transition);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .burger {
        display: block;
    }
    
    .burger.active .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .burger.active .line2 {
        opacity: 0;
    }
    
    .burger.active .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .about-details {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-date {
        margin-bottom: 1rem;
        padding-left: 2.5rem;
    }
    
    .timeline-content {
        margin-left: 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Profilbild-Anpassung für mobile Geräte */
    .profile-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-image {
        margin: 0 auto;
        width: 220px;
        height: 220px; /* Gleiche Höhe wie Breite für perfekten Kreis */
        aspect-ratio: 1/1; /* Explizite Angabe des Seitenverhältnisses */
    }
    
    .profile-tags {
        justify-content: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    section {
        padding: 3rem 0;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
        min-width: 200px; /* Verhindert Verzerrung */
        min-height: 200px; /* Verhindert Verzerrung */
        max-width: 200px; /* Verhindert Verzerrung */
        max-height: 200px; /* Verhindert Verzerrung */
        aspect-ratio: 1/1; /* Erzwingt quadratisches Verhältnis */
        margin-bottom: 1.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .education-grid, .skills-container {
        gap: 1.5rem;
    }
    
    .education-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.8s ease-out;
}