:root {
    /* Color palette */
    --primary: #326ce5;
    --primary-dark: #2655b4;
    --primary-light: #5484eb;
    --accent: #ff5900;

    /* Light theme */
    --bg-light: #ffffff;
    --text-light: #1f2937;
    --card-light: #f9fafb;
    --border-light: #e5e7eb;
    --surface-light: #f3f4f6;

    /* Dark theme */
    --bg-dark: #121820;
    --text-dark: #f9fafb;
    --card-dark: #1f2937;
    --border-dark: #374151;
    --surface-dark: #1a2230;
}

[data-theme="light"] {
    --bg: var(--bg-light);
    --text: var(--text-light);
    --card: var(--card-light);
    --border: var(--border-light);
    --surface: var(--surface-light);
}

[data-theme="dark"] {
    --bg: var(--bg-dark);
    --text: var(--text-dark);
    --card: var(--card-dark);
    --border: var(--border-dark);
    --surface: var(--surface-dark);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Smooth transitions for translated content */
[data-translate] {
    transition: opacity 0.2s ease;
}

[data-translate].loading {
    opacity: 0.6;
}

header {
    position: relative;
    padding: 6rem 1rem 4rem; /* Adjusted for new navbar height */
    text-align: center;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    opacity: 0.05;
    z-index: -1;
}

/* Galaxy background for dark mode only */
[data-theme="dark"] header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 800 800"><g fill="white" opacity="0.1"><circle cx="400" cy="400" r="1.5"/><circle cx="500" cy="100" r="1"/><circle cx="600" cy="200" r="1.2"/><circle cx="200" cy="600" r="1.2"/><circle cx="100" cy="300" r="1"/><circle cx="750" cy="550" r="0.8"/><circle cx="650" cy="650" r="1.4"/><circle cx="50" cy="750" r="1"/><circle cx="250" cy="200" r="1"/><circle cx="350" cy="50" r="1.5"/><circle cx="450" cy="350" r="0.7"/><circle cx="550" cy="450" r="1"/><circle cx="650" cy="350" r="1.2"/><circle cx="750" cy="250" r="0.9"/><circle cx="150" cy="450" r="1.2"/><circle cx="250" cy="550" r="0.9"/><circle cx="350" cy="250" r="1.3"/><circle cx="50" cy="150" r="1"/><circle cx="150" cy="650" r="1.4"/><circle cx="250" cy="750" r="1"/><circle cx="450" cy="750" r="1"/><circle cx="550" cy="650" r="0.8"/><circle cx="700" cy="450" r="1.2"/><circle cx="100" cy="500" r="1"/></g></svg>');
    opacity: 0.3;
    z-index: -1;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-container {
    position: relative;
}

.logo-container img {
    height: 40px;
    position: relative;
    z-index: 2;
}

/* White prism behind logo - only visible in dark mode */
.logo-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 50px;
    height: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 50%, #ffffff 100%);
    clip-path: polygon(15% 0%, 85% 0%, 100% 50%, 85% 100%, 15% 100%, 0% 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Hero logo prism */
.hero-logo-container {
    position: relative;
    display: inline-block;
}

.hero-logo-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 120px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 50%, #ffffff 100%);
    clip-path: polygon(15% 0%, 85% 0%, 100% 50%, 85% 100%, 15% 100%, 0% 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.hero-logo-container img {
    position: relative;
    z-index: 2;
}

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

.nav-links {
    display: flex;
    gap: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 1rem;
}

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

.nav-links a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Mobile menu button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle .hamburger {
    width: 25px;
    height: 3px;
    background-color: var(--text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

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

.mobile-menu-toggle[aria-expanded="true"] .hamburger:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 1rem;
}

section.highlight {
    background-color: var(--surface);
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.9rem 1.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
    border: none;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.btn.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

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

.btn.btn-accent:hover {
    background-color: #e05000;
}

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

.feature {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature:hover .feature-icon {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Center images in feature cards */
.feature > img,
.feature-image {
    display: block;
    margin: 0 auto 1.5rem auto;
    height: 4rem;
    width: auto;
}

/* About section with avatar */
.about-header {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.about-avatar {
    flex-shrink: 0;
    order: 2; /* Avatar on the right on desktop */
}

.avatar-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.about-text {
    flex: 1;
    text-align: left;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 1rem;
}

.about-text .section-description {
    text-align: left;
    max-width: none;
}

.clients {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    align-items: center;
}

.client-logo {
    padding: 1.5rem;
    background-color: white;
    border-radius: 0.75rem;
    height: 80px;
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.client-logo:hover {
    transform: translateY(-5px);
}

.client-logo.cultura {
    background-color: #00417a;
    padding: 1rem 1.5rem;
}

[data-theme="dark"] .client-logo {
    background-color: #2a2a2a;
}

.client-logo img {
    max-height: 50px;
    object-fit: contain;
}

.client-logo.sauermann img {
    max-height: 90px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background-color: var(--card);
    cursor: pointer;
    border: 1px solid var(--border);
    font-size: 1.25rem;
    transition: background 0.2s, transform 0.2s;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background-color: var(--surface);
    transform: scale(1.1);
}

.theme-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--border);
    background-color: var(--card);
    color: var(--text);
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
}

.lang-btn:hover {
    transform: scale(1.05);
}

.lang-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

.lang-btn.active {
    background-color: var(--primary);
    color: white;
}

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

/* Hide nav-links on mobile by default */
@media (max-width: 768px) {
    .nav-links {
        display: none !important;
    }

    .nav-links.active {
        display: flex !important;
    }
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    justify-items: center;
}

.certification-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: var(--card);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: 140px;
    justify-content: center;
}

.certification-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.certification-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.certification-item span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    opacity: 0.8;
}

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

.section-title {
    position: relative;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: inline-block;
}

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

.section-subtitle {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    margin-right: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-section {
    background: radial-gradient(circle at top left, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 5rem 1rem;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.linkedin-badge-container {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    line-height: 1;
}

.linkedin-badge-container > div {
    margin: 0;
    padding: 0;
}

.linkedin-badge-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.certification-badge {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    position: relative;
    margin-top: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem 3.5rem 1rem 2rem;
    border-radius: 0.75rem;
    width: min(100%, 640px);
    margin-left: auto;
    margin-right: auto;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

[data-theme="light"] .certification-badge {
    background-color: rgba(17, 24, 39, 0.06);
}

.certification-badge:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .certification-badge:hover {
    background-color: rgba(17, 24, 39, 0.1);
}

.certification-badge:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 4px;
}

.certification-badge > img {
    height: 60px;
}

.badge-text {
    flex: 1;
    text-align: left;
}

.badge-text p {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .badge-text p {
        white-space: normal;
    }
}

footer {
    padding: 4rem 1rem 2rem;
    background-color: var(--surface);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

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

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

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

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--card);
    transition: transform 0.2s, background 0.2s;
    color: var(--text);
    font-size: 1.25rem;
}

.social-icon:hover {
    transform: translateY(-3px);
}

.social-icon img {
    width: 20px;
    height: 20px;
    transition: filter 0.2s;
}

.social-icon:hover img {
    filter: brightness(1.1);
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

/* Layout utilities */
.text-center {
    text-align: center;
}

/* Credly link in certification badge */
.badge-credly-link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.certification-badge:hover .badge-credly-link {
    transform: scale(1.15);
}

.badge-credly-icon {
    width: auto;
    height: 14px;
    display: block;
    transition: opacity 0.2s;
}

.badge-credly-link:hover .badge-credly-icon {
    opacity: 1;
}

/* News gallery */
.news-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-item {
    background: var(--card);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    font-size: 4rem;
}

.news-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1.25rem 1.25rem 0.5rem;
}

.news-item p {
    padding: 0 1.25rem 1.25rem;
    opacity: 0.85;
    font-size: 0.95rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 2rem;
}

/* Theme-specific image handling */
.theme-aware-image {
    display: block;
}

[data-theme="light"] .dark-only {
    display: none;
}

[data-theme="dark"] .light-only {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1rem;
        height: 60px;
    }

    .logo-container img {
        height: 32px;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--bg);
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--border);
        text-align: center;
        margin: 0;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    .nav-controls {
        gap: 0.25rem;
        order: 3;
    }

    .lang-switch {
        margin-left: 0;
        gap: 0.25rem;
    }

    .lang-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 36px;
        min-height: 36px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        margin-left: 0.25rem;
        font-size: 1rem;
    }

    header {
        padding: 4rem 1rem 4rem; /* Less top padding on mobile */
    }

    .about-header {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .about-avatar {
        order: 0; /* Avatar at the top on mobile */
    }

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

    .about-text .section-title,
    .about-text .section-description {
        text-align: center;
    }

    .avatar-image {
        width: 120px;
        height: 120px;
    }

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

    .feature {
        padding: 1.75rem;
    }

    .clients {
        gap: 1.5rem;
    }

    .client-logo {
        padding: 1rem;
        height: 70px;
    }

    .client-logo img {
        max-height: 40px;
    }

    .client-logo.sauermann img {
        max-height: 90px;
    }

    .certification-badge {
        flex-direction: column;
        padding: 1.5rem;
    }

    /* LinkedIn badge responsive - switch to vertical on mobile */
    .linkedin-badge-container {
        padding: 1rem;
        max-width: 100%;
        overflow-x: auto;
    }

    .linkedin-badge-container .badge-base {
        transform: scale(0.85);
        transform-origin: center center;
    }
}