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

:root {
    --work-main-color: #4a2e1d;
    --work-accent-color: #C3B091;
    --life-main-color: #646C49;
    --life-accent-color: #ACC08C;
    --text-dark: #333;
    --text-light: #666;
    --white: #fff;
    --black: #000;
    --border-radius: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

.header {
    transition: all 1s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-top {
    background: transparent;
    box-shadow: none;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link-work {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link-work.active {
    color: var(--work-main-color);
}

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

.nav-link-life {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link-life.active {
    color: var(--life-main-color);
}

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

.section-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section:nth-of-type(even) {
    background: white;
}

.section:not(.home-section):nth-of-type(odd) {
    background: #f3f3f3;
}

.home-section {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 5rem 2rem;
    background: url("./photos/portrait.webp");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.home-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.home-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hello-text,
.title-text {
    font-size: 1.5rem;
    color: var(--text-light);
}

.main-color.work {
    color: var(--work-main-color);
}

.main-color.life {
    color: var(--life-main-color);
}

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

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

.name-text {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--work-main-color);
    margin: -0.5rem 0;
}

.description-text {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    width: auto;
    border: 2px solid var(--black);
}

.btn.work {
    border: 2px solid var(--work-main-color);
}

.btn.life {
    border: 2px solid var(--life-main-color);
}

.btn-primary {
    color: var(--black);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-primary.work:hover {
    background-color: darken(var(--work-main-color), 10%);
}

.btn-primary.life:hover {
    background-color: darken(var(--life-main-color), 10%);
}

.btn.work.active {
    background: var(--work-main-color);
    color: white;
}

.btn.life.active {
    background: var(--life-main-color);
    color: white;
}

.section-intro {
    margin-bottom: 4rem;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.section-intro h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.work {
    box-shadow: 0 1px 4px var(--work-main-color);
}

.card.life {
    box-shadow: 0 1px 4px var(--life-main-color);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-light);
}

.timeline {
    margin-top: 5rem;
    margin-bottom: 5rem;
}

.timeline-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.timeline-column {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    width: 13px;
    height: 13px;
    left: -29px;
    top: 8px;
    border-radius: 50%;
}

.timeline-dot.work::before {
    background-color: var(--work-main-color);
}

.timeline-dot.life::before {
    background-color: var(--life-main-color);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 2rem;
    bottom: -1.33rem;
    width: 2px;
}

.timeline-item.work::before {
    background-color: var(--work-main-color);
}

.timeline-item.life::before {
    background-color: var(--life-main-color);
}

.timeline h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.timeline h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.timeline-timespan {
    display: inline-block;
    color: var(--white);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-timespan.work {
    background-color: var(--work-accent-color);
}

.timeline-timespan.life {
    background-color: var(--life-accent-color);
}

.timeline-description h5 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.timeline-description img {
    display: block;
    width: 100%;
    height: auto;
}

.timeline-description {
    color: var(--text-light);
    font-size: 0.95rem;
}

.timeline-description ul {
    margin-left: 0;
    padding-left: 0.5em;
    list-style: none;
    margin-bottom: 1em;
}

.timeline-description li {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-description li::before {
    content: '';
    position: absolute;
    top: 0.35em;
    left: 0;
    width: 0.8rem;
    height: 0.8rem;
    background: url('images/check.svg') center / contain no-repeat;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    display: block;
}

.gallery-item.is-hidden {
    display: none;
}

.gallery-item-content {
    height: 100%;
    background: white;
}

.gallery-item img {
    display: block;
    width: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gallery-item h4 {
    display: none;
}

.gallery-item p {
    display: none;
}

.gallery-item-content img.full-size {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem 5rem;
    background: rgb(0 0 0 / 90%);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-content {
    max-width: 1100px;
    max-height: 100%;
    text-align: center;
    color: white;
}

.lightbox-content img {
    display: block;
    max-width: 90vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.lightbox-content h3 {
    margin: 1rem 0 0.4rem;
}

.lightbox-content p {
    max-width: 700px;
    margin: 0 auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: 0;
    color: white;
    background: transparent;
    cursor: pointer;
}

.lightbox-close {
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    padding: 1rem;
    font-size: 2.5rem;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

@media (max-width: 450px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-container {
        grid-template-columns: 1fr;
    }

    .name-text {
        font-size: 2.5rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .timeline-container {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .header-content {
        padding: 1rem 1.5rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lightbox {
        padding: 3rem 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.5rem;
        font-size: 1.8rem;
    }
}