:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #475569;
    --shadow: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
    font-size: 14px;
}

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

/* Header */
header {
    background-color: var(--bg-secondary);
    padding: 0.8rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

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

.logo {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    font-size: 0.85rem;
}

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

.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.controls {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.theme-toggle, .lang-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.theme-toggle:hover, .lang-toggle:hover {
    background: var(--accent);
    color: white;
}

/* Main Content */
main {
    margin-top: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.6)), url('../images/Flux_Dev_act_as_a_prfessiona_web_designer_I_am_a_Linux_Adminis_0.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--bg-secondary);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 1000px;
    width: 100%;
    padding: 0 1.5rem;
    margin-top: 60px;
}

.hero-text {
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 0.8rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 700;
}

.hero .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--accent);
    margin-bottom: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-weight: 500;
}

.hero p {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    color: #e2e8f0;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    line-height: 1.6;
    max-width: 450px;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 12px 32px var(--shadow);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Sections */
section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Experience and Contact section titles - Always white */
.experience .section-title,
.contact .section-title {
    color: #f8fafc !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

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

.skill-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card h3 {
    color: var(--accent);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

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

.skill-card li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.skill-card li:last-child {
    border-bottom: none;
}

/* Experience Section */
.experience {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8)), url('../images/Flux_Dev_act_as_a_prfessiona_web_designer_I_am_a_Linux_Adminis_0.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.experience-timeline {
    max-width: 700px;
    margin: 0 auto;
}

.experience-item {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 0.8rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent);
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.experience-item h3 {
    color: var(--accent);
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.experience-item .company {
    color: var(--text-secondary);
    font-weight: bold;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.experience-item .period {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.8rem;
}

.experience-item p {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Technology Showcase Section */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.showcase-post {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
    text-align: center;
}

.showcase-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.showcase-icon {
    font-size: 2rem;
}

.showcase-post:hover {
    transform: translateY(-5px);
}

.showcase-post h3 {
    color: var(--accent);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.showcase-post .date {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.8rem;
}

.showcase-post p {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Contact Section */
.contact {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8)), url('../images/Flux_Dev_act_as_a_prfessiona_web_designer_I_am_a_Linux_Adminis_0.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: start;
    max-width: 700px;
    margin: 0 auto;
}

.contact-info-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.contact-info-card h3 {
    color: var(--accent);
    margin-bottom: 1.2rem;
    text-align: center;
    font-size: 1.1rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
}

.contact-detail:last-child {
    margin-bottom: 0;
}

.contact-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.qr-section {
    text-align: center;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.qr-section h3 {
    color: var(--accent);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.qr-code {
    width: 150px;
    height: 150px;
    border-radius: 0.8rem;
    border: 2px solid var(--border);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #ffffff;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    font-size: 0.8rem;
}

.light-theme .social-link {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.5);
    color: #000000;
}

[data-theme="light"] .social-link {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.5);
    color: #000000;
}
.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.social-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Brand Colors for Social Icons */
.social-link.xing .social-icon {
    fill: #026466;
}

.social-link.linkedin .social-icon {
    fill: #0077b5;
}

.social-link.facebook .social-icon {
    fill: #1877f2;
}

.social-link.tiktok .social-icon {
    fill: #ff0050;
}

.social-link.instagram .social-icon {
    fill: url(#instagram-gradient);
}

.social-link:hover {
    color: #ffffff;
}

.social-link.xing:hover {
    background: linear-gradient(135deg, #026466, #0a7c7e);
    border-color: #026466;
}

.social-link.linkedin:hover {
    background: linear-gradient(135deg, #0077b5, #005885);
    border-color: #0077b5;
}

.social-link.facebook:hover {
    background: linear-gradient(135deg, #1877f2, #166fe5);
    border-color: #1877f2;
}

.social-link.tiktok:hover {
    background: linear-gradient(135deg, #ff0050, #e6004a);
    border-color: #ff0050;
}

.social-link.instagram:hover {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    border-color: #833ab4;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-links {
    margin-top: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
}

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

/* Legal Pages Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 1.5rem;
    border-radius: 0.8rem;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.2rem;
}

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

.legal-content h2 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.legal-content h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.8rem 0;
    font-size: 1.1rem;
}

.legal-content p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Light theme adjustments for background sections */
[data-theme="light"] .experience {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8)), url('../images/Flux_Dev_act_as_a_prfessiona_web_designer_I_am_a_Linux_Adminis_0.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

[data-theme="light"] .contact {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8)), url('../images/Flux_Dev_act_as_a_prfessiona_web_designer_I_am_a_Linux_Adminis_0.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

[data-theme="light"] .experience-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

[data-theme="light"] .contact-info-card,
[data-theme="light"] .qr-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

[data-theme="light"] .social-link {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 180px 1fr;
        gap: 1.5rem;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero, .experience, .contact {
        background-attachment: scroll;
    }

    .hero {
        height: 100vh;
        background-size: cover;
        background-position: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
        padding: 0 1rem;
        margin-top: 80px;
    }

    .hero-text {
        text-align: center;
        order: 2;
    }

    .profile-image {
        width: 150px;
        height: 150px;
        order: 1;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    .hero p {
        font-size: 0.9rem;
        max-width: none;
    }

    .controls {
        gap: 0.4rem;
    }

    .theme-toggle, .lang-toggle {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

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

    .social-links {
        gap: 0.8rem;
    }

    .social-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .section-title {
        font-size: 1.6rem;
        color: #ffffff;
        white-space: normal;
    }

    .qr-code {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 0.5rem;
        margin-top: 100px;
    }

    .profile-image {
        width: 130px;
        height: 130px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

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

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
    }

    .social-icon {
        width: 14px;
        height: 14px;
    }
}

/* Large screens optimization */
@media (min-width: 1400px) {
    .hero-content {
        max-width: 1200px;
        grid-template-columns: 1fr 250px 1fr;
        gap: 3rem;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

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

    .hero p {
        font-size: 1.1rem;
        max-width: 500px;
    }
}

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

/* Focus styles */
button:focus, a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Hidden content for language switching */
.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

/* Smooth scroll offset for fixed header */
section {
    scroll-margin-top: 60px;
}

.legal-content ul {
    margin: .2rem 0 0.8rem 2.5rem;
}

.legal-content ul li {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}