:root {
    /* Color Palette - Swiss/International Style */
    --bg-body: #ffffff;
    --bg-alt: #f5f5f7;
    /* Light gray for sections */
    --text-primary: #1d1d1f;
    /* Almost black */
    --text-secondary: #86868b;
    /* Medium gray */
    --accent: #0071e3;
    /* Professional Technical Blue */
    --accent-dark: #004d9c;
    --border-light: #d2d2d7;

    /* Spacing */
    --container-width: 1000px;
    /* Tighter container for readability */
    --header-height: 64px;
    --section-spacing: 120px;

    /* Typography */
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;
    --font-weight-heavy: 700;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 9999;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    transition: color 0.2s ease;
}

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

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid var(--border-light);
}

.lang-btn {
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lang-btn.active {
    color: var(--bg-body);
    background-color: var(--text-primary);
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.05);
}

.divider {
    display: none;
    /* Hide divider, using button style instead */
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 30px;
    height: 30px;
    z-index: 100;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hero Section */
#hero {
    padding-top: calc(var(--header-height) + 100px);
    padding-bottom: 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 900px;
    /* Left align for a more technical/editorial look */
    text-align: left;
}

#hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 32px;
}

#hero .subtitle {
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--text-secondary);
    font-weight: var(--font-weight-regular);
    margin-bottom: 24px;
    max-width: 700px;
}

#hero .hero-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background-color: var(--text-primary);
    /* Black button */
    color: var(--bg-body);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    border-radius: 999px;
    /* Pill shape */
    transition: transform 0.2s ease, background-color 0.2s ease;
}

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

/* Section Common */
section {
    padding: var(--section-spacing) 0;
}

section h2 {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    margin-bottom: 64px;
    color: var(--text-primary);
}

/* About Section */
#about {
    background-color: var(--bg-alt);
}

.about-text {
    max-width: 800px;
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.about-text p {
    margin-bottom: 32px;
}

.about-text p:last-child {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Specialties Section */
#specialties {
    background-color: var(--bg-body);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns on desktop */
    gap: 40px;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 0;
}

.card ul {
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
    flex-grow: 1;
}

.card li {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-left: 16px;
    position: relative;
}

.card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Experience Section */
#experience {
    background-color: var(--bg-alt);
}

.experience-content {
    max-width: 800px;
    border-left: 2px solid var(--accent);
    padding-left: 40px;
}

.experience-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* Education Section */
#education {
    background-color: var(--bg-body);
}

.timeline {
    margin-bottom: 48px;
}

.timeline-item {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.timeline-content h3 {
    font-size: 1.8rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.education-note {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 700px;
}

/* Contact Section */
#contact {
    background-color: #111;
    /* Dark footer area */
    color: #fff;
    text-align: center;
    padding: 120px 0;
}

#contact h2 {
    color: #fff;
    margin-bottom: 32px;
}

#contact p {
    color: #888;
    margin-bottom: 16px;
}

.email-link {
    display: block;
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: var(--font-weight-bold);
    color: #fff;
    margin: 32px 0;
    transition: color 0.3s ease;
}

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

.contact-note {
    font-size: 0.9rem !important;
    opacity: 0.5;
    margin-top: 32px;
}

/* Footer */
footer {
    background-color: #000;
    color: #666;
    padding: 40px 0;
    font-size: 0.85rem;
}

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

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-nav a {
    color: #666;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: 1fr;
        /* Stack cards on mobile/tablet */
        gap: 60px;
    }

    .card ul {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --section-spacing: 80px;
    }

    /* Mobile Navigation */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 90;
    }

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

    .nav-links a {
        font-size: 1.5rem;
        color: var(--text-primary);
    }

    .lang-switch {
        margin-left: auto;
        margin-right: 16px;
        padding-left: 0;
        border-left: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}