:root {
    --text-color: #1d1d1f;
    --subtext-color: #6e6e73;
    --bg-color: #ffffff;
    --accent-color: #0071e3;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 17px;
}

header {
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid #e5e5e7;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
}

.btn-nav {
    position: fixed;
    right: 3rem;
    top: 0.8rem;
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    background: var(--accent-color);
    color: #fff !important;
    border-radius: 20px;
    text-decoration: none !important;
    transition: background 0.3s ease;
    z-index: 1001;
}

.btn-nav:hover {
    background: #005bb5;
    color: #fff !important;
    text-decoration: none !important;
}

nav a {
    margin: 0 1rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* General hyperlinks */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #005bb5;
    text-decoration: underline;
}

/* Mobile hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile styles */
@media (max-width: 768px) {
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: right;
        width: 100%;
    }

    .hamburger {
        display: flex;
        order: 2;
    }

    .logo {
        order: 1;
    }

    nav {
        position: fixed;
        top: -200px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        border-top: 1px solid #e5e5e7;
        display: flex;
        flex-direction: column;
        padding: 1rem 0;
        transition: top 0.3s ease;
        z-index: 500;
        order: 3;
    }

    nav.active {
        top: calc(100% - 1px);
    }

    nav a {
        padding: 0.75rem 2rem;
        border-bottom: 1px solid #f0f0f0;
        margin: 0;
        text-align: right;
    }

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

    .btn-nav {
        position: absolute;
        right: 4rem;
        top: 50%;
        transform: translateY(-50%);
        display: inline-block;
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
        background: var(--accent-color);
        color: #fff !important;
        border-radius: 15px;
        text-decoration: none !important;
        transition: background 0.3s ease;
        z-index: 1001;
    }

    header {
        flex-wrap: wrap;
    }

    #hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

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

    .experience-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .experience-dates {
        align-items: flex-start;
        width: 100%;
        min-width: auto;
    }

    .experience-right {
        text-align: left;
        min-width: auto;
        width: 100%;
    }
}

.logo img {
    height: 35px;
    width: auto;
    max-width: 150px;
    margin-top: 5px;
}

section {
    max-width: 900px;
    margin: auto;
    padding: 6rem 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

#hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    gap: 3rem;
}

#hero h1 {
    flex: 1;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.hero-image {
    flex-shrink: 0;
    width: 400px;
    height: 400px;
    background-image: url('IMG_Marcin.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--subtext-color);
    font-size: 0.9rem;
}

section h1 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

section p {
    font-size: 1.15rem;
    color: var(--subtext-color);
    max-width: 650px;
    margin: auto;
    line-height: 1.7;
}

.section-padding-override {
    padding-top: 0;
    padding-bottom: 2rem;
}

/* CV sections */
.cv-section {
    margin-top: 4rem;
    text-align: left;
}

.cv-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.experience-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-left {
    flex: 1;
    min-width: 60%;
}

.experience-right {
    flex-shrink: 0;
    text-align: right;
    color: var(--subtext-color);
    min-width: 35%;
}

.experience-dates {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
    min-width: 35%;
}

/* Multiple experience-right divs in same item */
.experience-item .experience-right + .experience-right {
    margin-top: 0.25rem;
}

.experience-left h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.experience-left p {
    margin: 0.2rem 0;
    color: var(--subtext-color);
}

ul {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    color: var(--subtext-color);
}

/* Skills list */
.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.skills-list li {
    background: #f5f5f7;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    text-align: center;
}

.btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    background: var(--accent-color);
    color: #fff !important;
    border-radius: 30px;
    text-decoration: none !important;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #005bb5;
    color: #fff !important;
    text-decoration: none !important;
}

footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: var(--subtext-color);
    border-top: 1px solid #e5e5e7;
}
