html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

body.no-transition {
    transition: none;
}

:root{
    --header-padding-top: 20px;
    --header-padding-bottom: 20px;
    --header-highlight-color: white;

    --bg-color: rgb(169, 188, 250);
    --text-color: #222;
    --primary-color: #007bff;
}

[data-theme="dark"] {
    --header-highlight-color: #ff0066;
    --bg-color: black;
    --text-color: white;
    --primary-color: black;
}
/*#ffd900; yellow */

/* #region Theme Switcher */
.theme-switcher {
    display: none;
    position: relative;
    float: left;
    width: 64px;
    height: 34px;
    padding: 0;
    margin: 30px;
    border: none;
    border-radius: 50px;
    background: #d1d5db;
    cursor: pointer;
    /*display: flex;*/
    align-items: center;
    justify-content: space-around;
    transform: translateY(5px);
    transition: background-color 0.3s ease;
}

.switch-icon {
    z-index: 1;
    font-size: 16px;
    line-height: 1;
    color: #374151;
}

.switch-knob {
    position: absolute;
    left: 3px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px #0003;
    transition: transform 0.3s ease;
}

.theme-switcher.active {
    background: #374151;
}

.theme-switcher.active .switch-knob {
    transform: translateX(30px);
}

.theme-switcher.active .switch-icon {
    color: rgb(255, 255, 255);
}
/* #endregion */

/* #region Header */

.header {
    display: flow-root;
    background: var(--primary-color);
    border-bottom: 1px solid #656465;
    position: relative;
}

.header-right {
    float: right;
    display: flow-root;
}
.header-left {
    float: left;
}

/* #region NavBar */
.show-nav {
    display: none;
    color: white;
    background: transparent;
    font-size: 25px;
    font-weight: bolder;
    border: none;
    align-self: center;
    padding-right: 8px;
    cursor: pointer;
}

.show-nav:hover {
    color: var(--header-highlight-color);
}

.show-nav.active{
    color: var(--bg-color);
    background-color: white;
}

.show-nav.active:hover{
    background-color: var(--header-highlight-color);
}

/* #endregion */

.header-button {
    background: transparent;
    isolation: isolate;
    float: left;
    color: white;
    text-align: center;
    padding: calc(15px + var(--header-padding-top)) 25px calc(15px + var(--header-padding-bottom));
    text-decoration: none;
    font-size: 18px;
    line-height: 25px;
    border: none;
    position: relative;
    cursor: pointer;
    transition: color 0.s ease;
}

.header-button.title {
    font-size: 25px;
    font-weight: bold;
}

.header-button:hover, .header-button.active{
    color: var(--header-highlight-color);
}

.header-button::before{
    content: "";
    position: absolute;
    inset: 0px 20px 0px 20px;
    background: transparent;
    z-index: -1;
    transform: scale(0);
}

.header-button.clicked{
    color: var(--header-highlight-color);
}

.header-button.active{
    font-weight: bold;
}

.header-button.clicked::after{
    background-color: var(--header-highlight-color);
}

.header-button.clicked::before{
    animation: button-flash 0.3s ease;
}

@keyframes button-flash {
    0%, 100% {
        transform: scaleX(0.7);}
}

.header-button::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0px;
    right: 0px;
    height: 1px;
    background-color: var(--header-highlight-color);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    transition: color 0.s ease;
}

.header-button:hover::after{
    transform: scaleX(.3);
}

.header-button.active::after {
    transform: scaleX(1);
}
/* #endregion */


/* #region body */

/* #region Article */
.article {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9;
}

.article.active {
    display: block;
}

.article-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.155);
    z-index: 9;
    border: none;
}

.article-reader {
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.027);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.297);
    border-left: 1px solid rgba(255, 255, 255, 0.132);
    border-radius: 25px;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.089);
    z-index: 11;
    width: 80%;
    height: 80vh;
    max-width: 800px;
    max-height: 800px;
    min-height: 300px;
    margin: 10vh auto;
    padding: 20px;
}

.article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.132);
    padding-bottom: 15px;
}

.article-footer {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.132);
    background: transparent;
    flex-shrink: 0;
}

.article-title {
    font-size: 45px;
    margin: 0;
}

.article-date {
    border-radius: 15px;
    border: none;
    background-color: rgb(56, 56, 56);
    font-size: 15px;
    padding: 10px;
}

.article-subtitle {
    width: 100%;
    margin-top: 10px;
    font-size: 15px;
    font-style: italic;
}

.article-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
    background-color: #060606;
    border-radius: 15px;
}

.article-paragraph, .article-subHeader{
    padding: 15px;
    margin: 0 0 15px;
    font-size: 15px;
    line-height: 1.7;
    background-color: rgba(0, 0, 0, 0.363);
    font-family: Arial, Helvetica, sans-serif;
    text-align: justify;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.article-subHeader{
    font-size: 22px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.132);
}


.article-video {
    width: 80%;
    max-width: 800px;
    margin: 24px auto;
}

.article-video video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.video-description {
    color: white;
    padding-bottom: 15px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.132);
}



.gallery-swiper {
    width: 100%;
    height: auto;
    overflow: visible;
}

.gallery-swiper .swiper-wrapper {
    height: 220px;
}

.gallery-swiper .gallery-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.gallery-swiper .gallery-slide img {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
}



.gallery-caption-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gallery-description {
    margin: 0;
    text-align: center;
}

.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: fit-content;
    margin: 8px auto 0;
}

.gallery-controls .swiper-button-prev,
.gallery-controls .swiper-button-next {
    position: static;
    margin: 0;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--header-highlight-color);
}

.gallery-controls .swiper-button-prev::after,
.gallery-controls .swiper-button-next::after {
    font-size: 14px;
}

.gallery-controls .swiper-pagination {
    position: static;
    width: auto;
    display: flex;
    justify-content: center;
}

.gallery-controls .swiper-pagination-bullet {
    height: 9px;
    width: 9px;
    background: var(--header-highlight-color);
}





/* #endregion */
.Greeting {
    width: 100%;
    padding-top: 10%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 5%;
}

.about-me{
    width: 100%;
    border-bottom: 1px solid #656465;
    background: transparent;
    padding-bottom: 150px;
}

.about-me-button {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    color: var(--header-highlight-color);
    display: flex;
    flex-direction: column;
    margin: 0;
    align-items: center;
    text-align: center;
    padding: 0;

    border: none;
    border-top: 1px solid var(--header-highlight-color);
    border-bottom: 1px solid var(--header-highlight-color);
    border-radius: 0;

    background: none;
    transition: background-color 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.about-me-title {
    box-sizing: border-box;
    max-width: 100%;
    padding: 0;
    font-size: 25px;
    display: block;
    font-weight: normal;
    overflow-wrap: anywhere;
    color: inherit;
}

.about-me-button:hover, .about-me-button.active {
    background-color: color-mix(
        in srgb,
        var(--header-highlight-color) 50%,
        transparent
    );
    color: var(--text-color);
}

.about-me-text {
    box-sizing: border-box;
    width: 100%;
    max-width: 900px;
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: none;
}

.about-me-text.active {
    display: block;
}


.portfolio {
    margin-top: 5%;
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.portfolio-card-hidden {
    display: none;
}


.portfolio-card.swiper-slide {
    user-select: none;
    height: 220px;
    padding: 0;
    border: none;
    border-radius: 25px;
    background: #5b5b5b54;
    overflow: hidden;

    cursor: pointer;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.3s ease,
                box-shadow 0.3s ease;

    
}

.portfolio-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        #1e1e1e 100%
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover::after {
    opacity: 0;
}

.portfolio-card:hover {
    border: solid 1px;
    border-color: #aaa;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.portfolio-card.swiper-slide-active{
    height: auto;
}

.portfolio-card-image {
    display: block;
    flex-shrink: 0;
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-card-image {
    transform: scale(1.05);
}

.portfolio-card-open {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.65);
    color: white;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.portfolio-card:hover .portfolio-card-open {
    transform: scale(1.1);
    background-color:var(--header-highlight-color);
}

.portfolio-card-info {
    flex: 1;
    min-width: 0;
    padding: 4px 8px 20px;
    margin: 0;
    box-sizing: border-box;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-color);
    text-align: left;
}

.portfolio-card-title {
    margin: 4px 0;
    font-size: 1.5em;
    overflow-wrap: anywhere;
}

.portfolio-card-description {
    margin: 4px 0;
    font-size: 1em;
    font-weight: normal;
    white-space: normal;
    overflow-wrap: anywhere;
}

.portfolio .swiper-pagination {
    bottom: 8px;
    color: var(--header-highlight-color);
}


.portfolio .swiper-button-prev,
.portfolio .swiper-button-next {
    color: var(--header-highlight-color);
}

.portfolio .swiper-pagination-bullet{
    height: 9px;
    width: 9px;
    background: var(--header-highlight-color)
}

/* #region Timeline */

.timeline-wrapper {
    max-width: 1100px;
    margin: 50px auto;
    padding: 10px 0;
    overflow: visible;
}

.timeline {
    position: relative;
    min-width: 650px;
    height: 310px;
    margin: 0 auto;
}

.timeline-date {
    font-size: 13px;
    font-weight: bold;
    font-style: italic;
    overflow-wrap: anywhere;
    margin: 0 0 8px;
    line-height: 1.5;
}

.timeline-text {
    font-size: 15px;
    font-weight: bold;
    overflow-wrap: anywhere;
    margin: 0;
    line-height: 1.5;
}

.timeline-line {
    position: absolute;
    top: 303px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
    z-index: 2;
}

.year-marker {
    position: absolute;
    top: 293px;
    width: 18px;
    height: 18px;
    background: var(--header-highlight-color);
    border: 3px solid var(--text-color);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--header-highlight-color);
    transform: translateX(-50%);
    z-index: 3;
}

.year-label {
    position: absolute;
    top: 265px;
    transform: translateX(-50%);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.year-label.start {
    transform: translateX(0);
}

.year-label.end {
    transform: translateX(-100%);
}

.period {
    position: absolute;
    top: 0;
    width: 0;
    height: 230px;
}

.period::after {
    content: "";
    position: absolute;
    left: -1px;
    top: 100px;
    width: 2px;
    height: 130px;
    background: var(--header-highlight-color);
    z-index: 1;
}

.period-box {
    position: absolute;
    top: 20px;
    left: 0;
    transform: translateX(-50%);
    width: 190px;
    max-width: 190px;
    min-width: 0;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px;
    text-align: left;
    color: var(--text-color);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    background: var(--bg-color);
    border: 1px solid var(--bg-color);
    border-top: 3px solid var(--header-highlight-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
    z-index: 2;
}

.period-box h2 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: normal;
}

.period-1 { left: 12.5%; }
.period-2 { left: 37.5%; }
.period-3 { left: 56.25%; }
.period-4 { left: 75%; }

.y2018 { left: 0%; }
.y2020 { left: 25%; }
.y2022 { left: 50%; }
.y2023 { left: 62.5%; }
.y2025 { left: 87.5%; }
.y2026 { left: 100%; }


.period-1 .period-box,
.period-3 .period-box {
    top: 0;
}

.period-1::after,
.period-3::after {
    top: 100px;
    height: 200px;
}


.period-2 .period-box,
.period-4 .period-box {
    top: 330px;
}


.period-2::after,
.period-4::after {
    top: 300px;
    height: 30px;
}

/* #endregion */

/* #endregion */

h1 {
    color: white;
    font-size: 75px;
    font-family: Arial, Helvetica, sans-serif;
}

h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: lighter;
}

.highlightedGreeting{
    white-space: pre;
    color: var(--header-highlight-color);
}

span{
    color: white;
    font-size: 75px;
    font-family: Arial, Helvetica, sans-serif;
}

/* #endregion */


@media screen and (max-width: 767px) {
    .header-button{
        float: none;
        display: block;
        text-align: left;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .theme-switcher{
        display: none;
    }

    .show-nav {
        display: block;
        float: right;
        text-align: justify;
        white-space: nowrap;
    }

    .header-button.title{
        float: none;
        display: block;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }
    .header-right {
        float: none;
        display: none;
    }

    .header-right.active{
        display: block;
    }

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

    .header-button.title{
        padding-bottom: 15px;
        padding-top: 15px;
    }
    .header-button::after, .header-button.active::after {
        top: 0px;
        bottom: 0px;
        left: 0;
        right: auto;
        width: 3px;
        height: auto;
        transform: scaleY(0);
        transform-origin: center;
    }

    .header-button:hover::after,
    .header-button.active::after {
        transform: scaleY(1);
    }
    .header-button.active::after {
        width: 5px;
    }

    .about-me {
        margin-left: 2.5%;
        margin-right: 2.5%;
    }

    .article-reader{
        width:100%;
    }

    .timeline-wrapper {
      padding: 10px 0;
      overflow: visible;
    }

    .timeline {
        min-width: 0;
        width: 100%;
        height: auto;
        min-height: 0;
        display: grid;
        grid-template-columns: 64px 24px minmax(0, 1fr);
        grid-template-rows:
        36px
        minmax(100px, auto)
        minmax(100px, auto)
        minmax(80px, auto)
        minmax(100px, auto)
        36px;
        align-items: center;
        margin: 0;
        overflow: none;
    }

    .timeline-line {
        top: 0;
        left: 0;
        width: 0;
        height: 0;
    }

    .timeline::before {
        content: "";
        position: absolute;
        top: 18px;
        bottom: 18px;
        left: 75px;
        width: 3px;
        background: #cbd5e1;
        border-radius: 4px;
    }


    .year-marker {
        position: relative;
        grid-column: 2;
        grid-row: auto;
        top: auto;
        left: auto;
        justify-self: center;
        transform: none;
        width: 14px;
        height: 14px;
        margin: 0;
        z-index: 2;
    }

    .year-marker.y2018 { grid-row: 1; }
    .year-marker.y2020 { grid-row: 2; }
    .year-marker.y2022 { grid-row: 3; }
    .year-marker.y2023 { grid-row: 4; }
    .year-marker.y2025 { grid-row: 5; }
    .year-marker.y2026 { grid-row: 6; }


    .year-label,
    .year-label.start,
    .year-label.end {
        position: relative;
        grid-column: 1;
        grid-row: auto;
        top: auto;
        left: auto;
        width: auto;
        text-align: right;
        transform: none;
        padding-right: 8px;
        font-size: 13px;
        white-space: nowrap;
        align-self: center;
    }

    .year-label.y2018 { grid-row: 1; }
    .year-label.y2020 { grid-row: 2; }
    .year-label.y2022 { grid-row: 3; }
    .year-label.y2023 { grid-row: 4; }
    .year-label.y2025 { grid-row: 5; }
    .year-label.y2026 { grid-row: 6; }

    .period {
        position: relative;
        grid-column: 3;
        grid-row: auto;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        min-width: 0;
        padding-left: 14px;
        align-self: center;
    }

    .period.period-1 { grid-row: 2; }
    .period.period-2 { grid-row: 3; }
    .period.period-3 { grid-row: 4; }
    .period.period-4 { grid-row: 5; }

    .period::after {
        content: "";
        position: absolute;
        left: -1px;
        top: 50%;
        width: 15px;
        height: 2px;
        transform: translateY(-50%);
        background: var(--header-highlight-color);
    }

    .period .period-box {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 14px;
        gap: 10px;
        text-align: left;
    }
}