:root {
    --bg: #ffffff;
    --text: #111111;
    --accent: #007AFF;
    --secondary: #666666;
    --card-bg: #f9f9fb;
    --nav-height: 80px;
}

html {
    scroll-behavior: smooth;
}

* {
    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;
    -webkit-font-smoothing: antialiased;
}

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

section {
    margin-bottom: 5rem;
    scroll-margin-top: var(--nav-height);
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-cv {
    background: var(--text);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.65rem;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

/* Hero Section */
.hero {
    padding: 4rem 0 3rem 0;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-content {
    flex: 1.5;
}

.hero-image {
    flex: 1;
    text-align: right;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: block;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

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

.subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text);
}

.bio-detail {
    color: var(--secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.stats-bar {
    display: flex;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 600;
}

h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.card {
    background: var(--card-bg);
    padding: 1.8rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 10px;
}

.card-header h3 {
    font-size: 1.1rem;
    line-height: 1.3;
    flex: 1;
}

.date {
    font-size: 0.8rem;
    color: var(--secondary);
    white-space: nowrap;
    font-weight: 500;
}

.company {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.location {
    display: inline;
}

.project-tag {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.project-summary {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--secondary);
}

ul {
    padding-left: 1.2rem;
    color: var(--secondary);
    font-size: 0.9rem;
}

li {
    margin-bottom: 0.5rem;
}

.skill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tag {
    background: #eee;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

.cert-tag {
    background: #fff;
    border: 1px solid #ddd;
}

.skills-wrapper {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
}

.language {
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
}

.license-section {
    margin-top: 2rem;
}

.distinction {
    margin-top: 1rem;
    border-top: 1px dashed #ddd;
    padding-top: 0.8rem;
}

.badge {
    background: #eef6ff;
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: inline-block;
}

.distinction p {
    font-size: 0.85rem;
    color: var(--secondary);
}

.hobby-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hobby-card {
    border: 1px solid #eee;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    background: #fff;
}

.contact-card {
    background: var(--text);
    color: white;
    padding: 2.5rem;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.3rem;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #333;
    transition: 0.2s;
}

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

.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
    z-index: 99;
}

footer {
    padding: 3rem 0;
    font-size: 0.75rem;
    color: var(--secondary);
    border-top: 1px solid #eee;
    text-align: center;
}

/* --- MOBILE OPTIMIZATIONS --- */
@media (max-width: 850px) {
    :root {
        --nav-height: 180px;
    }

    nav {
        padding: 0.8rem 0;
    }

    nav .container {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }

    .hero-wrapper {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-image {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .hero-image img {
        max-width: 250px;
    }

    h1 {
        font-size: 2rem;
    }

    .stats-bar {
        justify-content: center;
        gap: 1.5rem;
    }

    .skills-wrapper,
    .contact-card {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
    }

    .date {
        margin-top: 4px;
        border-left: 2px solid var(--accent);
        padding-left: 8px;
    }

    /* FIX FOR LOCATION SPLITTING */
    .company {
        display: flex;
        flex-direction: column;
    }

    .location {
        display: block;
        margin-top: 2px;
        font-weight: 500;
        color: var(--accent);
    }

    .scroll-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}