:root {
    --header-height: 90px;
    --background: #272727;
    --secondary: #1d4ed8;
    /* TailwindCSS SKY COLLOR PALETTE */
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-300: #7dd3fc;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --sky-800: #075985;
    --sky-900: #0c4a6e;
    --sky-950: #082f49;
    --font: sans-serif;
}
* {
    color: white;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}
li {
    list-style: none;
    font-size: 24px;
}
li a {
    text-decoration: none;
}
body {
    background-color: var(--background);
    overflow-x: hidden;
}
header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0px;
    height: var(--header-height);
    width: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

footer {
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: center;
}

footer p {
    font-size: 24px;
}

.selected-header-item {
    color: var(--sky-300)
}

.header-items {
    height: 100%;
    width: 50%;
    transform: translate(50%, 0);
    display: flex;
    justify-content: space-around;
    align-items: center;
}
#home-section {
    min-height: calc(100svh - var(--header-height));
    position: relative; /* To ensure absolute positioning works relative to this section */
}
#about-section {
    min-height: 100svh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 36px;
    padding-top: 100px;
    padding-bottom: 64px;
}

#about-section > .content-box {
    flex: 0 0 auto;
}
#experience-section {
    display: flex;
    flex-direction: column;
    gap: 100px;
    padding-top: 100px;
    padding-bottom: 100px;
}

.home-element {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    text-align: center; /* Keep the text centered */
}

.button {
    cursor: pointer;
}

.button path {
    transition: 0.3s;
}

.button:hover path {
    stroke-width: 20px;
}

.scroll-button {
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.title-name {
    color: var(--sky-500);
    display: block;
    position: relative;
    height: 1.1em;
    width: 16ch;
    margin: 0 auto;
    white-space: nowrap;
    overflow: hidden;
}

.title-name-text {
    position: absolute;
    left: 0;
    top: 0;
    color: inherit;
    white-space: nowrap;
    line-height: inherit;
}

.title-name-caret {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--sky-300);
    animation: caret-blink 1s steps(1, end) infinite;
    pointer-events: none;
}

.secondary-color {
    color: var(--sky-300);
}
.welcome-header-text {
    font-size: 128px;
    line-height: 1.05;
}

.welcome-header-text p {
    line-height: 1.05;
}
.welcome-subheader-text {
    font-size: 36px;
}
.welcome-icons {
    padding-top: 20px;
    word-spacing: 30px;
}
.content-box {
    width: 80%;
    /* max-width: 1000px; Set your desired max width */
    margin: 0 auto; /* This will center the element */
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 20px;
    border-radius: 50px;
}

.content-box h1 {
    font-size: 36px;
    padding-bottom: 20px;
}

.content-box p {
    font-size: 24px;
}


.section {
    margin-bottom: 28px;         /* replaces <br> */
    scroll-margin-top: calc(var(--header-height) + 12px);
}


.project-box img {
    width: 230px;
    min-height: 170px;
    border-radius: 15px;
    padding-left: 10px;
    padding-right: 10px;
}

.project-picture {
    display: block;
}

.project-box h2 {
    margin-top: 10px;
}

.project-box a {
    margin: 10px auto;
    width: 80%;
    height: 44px;
    display: flex;
    background-color: var(--background);
    align-items: center;
    border-radius: 15px;
    border: none;
    gap: 10px;
    font-size: 24px;
    justify-content: center;
    text-decoration: none;
}

.project-box p {
    padding-right: 10px;
    padding-left: 10px;
}

.project-box {
    position: relative;
    z-index: 2;
    border-radius: 15px;
    width: 250px;
    padding-top: 10px;
    font-size: 16px;
    overflow: hidden;
    will-change: transform;
    transition:
        background-color 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
        outline-color 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
        outline-width 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}


.small-box {
    background-color: var(--sky-900);
    outline: 0px solid transparent;
    min-height: 314px;
}

.small-box #project-card-description {
    max-height: 0;
    opacity: 0;
}

.big-box {
    outline: 5px var(--sky-900) solid;
    min-height: 384px;
}

.secondary-horizontal-linebreak {
    border: 3px var(--sky-900) solid;
    width: 60%;
    margin: 10px auto;
    margin-bottom: 10px;
}

.secondary-vertical-linebreak {
    position: relative;
    z-index: 1;
    border: 2px var(--secondary) solid;
    width: 1px;
    height: 100px;
    opacity: 1;
    transform: scaleY(1);
    transform-origin: center;
    will-change: transform, opacity;
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

#project-card-description {
    max-height: 160px;
    overflow: hidden;
    transition:
        max-height 320ms cubic-bezier(0.22, 0.61, 0.36, 1),
        opacity 280ms ease;
}

.big-box #project-card-description {
    opacity: 1;
}

.project-carousel {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.projects-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    min-height: 384px;
}

.projects-container.carousel-animating {
    pointer-events: none;
}

.carousel-ghost {
    position: fixed;
    margin: 0;
    pointer-events: none;
}

.carousel-ghost-card {
    z-index: 200;
}

.carousel-ghost-divider {
    z-index: 1;
}

.flipped-chevron {
    transform: rotate(180deg);
}



/* Timeline Container */
.timeline {
    margin: 20px auto;
    padding: 20px;
}

.outer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Card container */
.card {
position: relative;
max-width: 50%;
}

/* setting padding based on even or odd */
.card:nth-child(odd) {
padding: 30px 0 30px 30px;
}
.card:nth-child(even) {
padding: 30px 30px 30px 0;
}
/* Global ::before */
.card::before {
content: "";
position: absolute;
width: 50%;
border: solid var(--sky-900);
}

/* Setting the border of top, bottom, left */
.card:nth-child(odd)::before {
left: 0px;
top: -5px;
bottom: -4.5px;
border-width: 5px 0 5px 5px;
border-radius: 50px 0 0 50px;
z-index: -1;
}

/* Setting the top and bottom to "-5px" because earlier it was out of a pixel in mobile devices */
@media only screen and (max-width: 400px) {
.card:nth-child(odd)::before {
    top: -5px;
    bottom: -5px;
}
}

/* Setting the border of top, bottom, right */
.card:nth-child(even)::before {
right: 0;
top: 0;
bottom: 0;
border-width: 5px 5px 5px 0;
border-radius: 0 50px 50px 0;
z-index: -1;
}

/* Removing the border if it is the first card */
.card:first-child::before {
border-top: 0;
border-top-left-radius: 0;
}

/* Removing the border if it is the last card  and it's odd */
.card:last-child:nth-child(odd)::before {
border-bottom: 0;
border-bottom-left-radius: 0;
}

/* Removing the border if it is the last card  and it's even */
.card:last-child:nth-child(even)::before {
border-bottom: 0;
border-bottom-right-radius: 0;
}

/* Information about the timeline */
.info {
display: flex;
flex-direction: column;
background: var(--background);
color: var(--background);
border-radius: 10px;
padding: 10px;
}

.experience-description {
text-align: left;
}

.experience-description p {
white-space: normal;
line-height: 1.4;
margin-bottom: 16px;
}

.experience-description ul {
padding-left: 28px;
margin-bottom: 16px;
}

.experience-description li {
list-style: disc;
font-size: 24px;
line-height: 1.4;
margin-bottom: 10px;
}

/* Title of the card */
.title {
color: var(--sky-200);
position: relative;
}

/* Timeline dot  */
.title::before {
content: "";
position: absolute;
width: 10px;
height: 10px;
background: white;
border-radius: 999px;
border: 3px solid var(--sky-500);
}

.date {
    content: "";
    position: absolute;
    top: 36px
}



/* text right if the card is even  */
.card:nth-child(even) > .info > .title {
text-align: center;
}

/* setting dot to the left if the card is odd */
.card:nth-child(odd) > .info > .title::before {
left: -45px;
}

/* setting dot to the left if the card is odd */
.card:nth-child(odd) > .info > .date {
left: -20%;
}
/* setting dot to the left if the card is odd */
.card:nth-child(even) > .info > .date {
right: -20%;
}

/* setting dot to the right if the card is odd */
.card:nth-child(even) > .info > .title::before {
right: -45px;
}

.card:first-child > .info > .title::before {
    animation: current-experience-pulsing 2.5s infinite;
}

@keyframes current-experience-pulsing {
    0% {
        background: #ffffff;
    }
    50% {
        background: var(--sky-500);
    }
    100% {
        background: #ffffff;
    }
}

@keyframes caret-blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@media only screen and (max-width: 1600px) {
    .card:nth-child(odd) > .info > .date {
        left: -30%;
    }
    .card:nth-child(even) > .info > .date {
        right: -30%;
    }
}

@media only screen and (max-width: 1150px) {
    .card:nth-child(odd) > .info > .date {
        left: -40%;
    }
    .card:nth-child(even) > .info > .date {
        right: -40%;
    }
}

@media only screen and (max-width: 900px) {
    .card:nth-child(odd) > .info > .date {
        left: -50%;
    }
    .card:nth-child(even) > .info > .date {
        right: -50%;
    }
}


#mouse-scroll {margin:auto;left:50%;-webkit-transform:translateX(-50%);z-index:20;}
#mouse-scroll span {display:block;width:10px;height:10px;-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);border-right:2px solid var(--sky-800);border-bottom:2px solid var(--sky-800);margin:0 0 6px 10px}
#mouse-scroll .unu {margin-top:12px}
#mouse-scroll .unu, #mouse-scroll .doi, #mouse-scroll .trei {-webkit-animation:mouse-scroll 1s infinite;-moz-animation:mouse-scroll 1s infinite}
#mouse-scroll .unu {-webkit-animation-delay:.1s;-moz-animation-delay:.1s;-webkit-animation-direction:alternate}
#mouse-scroll .doi {-webkit-animation-delay:.2s;-moz-animation-delay:.2s;-webkit-animation-direction:alternate}
#mouse-scroll .trei {-webkit-animation-delay:.3s;-moz-animation-delay:.3s;-webkit-animation-direction:alternate}
#mouse-scroll .mouse {height:42px;width:28px;border-radius:20px;-webkit-transform:none;-ms-transform:none;transform:none;border:4px solid var(--sky-500);top:170px}
#mouse-scroll .wheel {height:10px;width:4px;display:block;margin:5px auto;background:var(--sky-500);position:relative}
#mouse-scroll .wheel {-webkit-animation:mouse-wheel 1.2s ease infinite;-moz-animation:mouse-wheel 1.2s ease infinite}


@-webkit-keyframes mouse-wheel {
    0% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}
    100% {opacity:0;-webkit-transform:translateY(12px);-ms-transform:translateY(12px);transform:translateY(12px)}
}
@-webkit-keyframes mouse-scroll {
    0% {opacity:0}
    50% {opacity:.5}
    100% {opacity:1}
}
@keyframes mouse-scroll {
    0% {opacity:0}
    50% {opacity:.5}
    100% {opacity:1}
}

.header-item {
    transition: 0.3s;
}

.header-item:hover {
    color: var(--sky-300);
    text-shadow: 0px 0px 20px var(--sky-300);
}

@media only screen and (max-width: 1200px) {
    .header-items {
        width: min(88%, 900px);
        transform: none;
        margin: 0 auto;
    }

    .welcome-header-text {
        font-size: clamp(72px, 9vw, 110px);
    }

    .welcome-subheader-text {
        font-size: clamp(24px, 3.2vw, 32px);
    }

    .content-box {
        width: min(90%, 1100px);
    }

    .card {
        max-width: 72%;
    }
}

@media only screen and (max-width: 900px) {
    :root {
        --header-height: 72px;
    }

    header {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background-color: rgba(18, 18, 18, 0.92);
        border-bottom: 1px solid rgba(125, 211, 252, 0.22);
    }

    .header-items {
        width: 100%;
        padding: 0 18px;
        justify-content: space-between;
    }

    .header-items li {
        font-size: 20px;
    }

    #home-section {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .home-element {
        position: static;
        transform: none;
        padding: 0 20px;
    }

    .welcome-header-text {
        font-size: clamp(48px, 13vw, 78px);
    }

    .welcome-subheader-text {
        font-size: clamp(18px, 4.8vw, 24px);
        line-height: 1.4;
    }

    .welcome-icons {
        padding-top: 18px;
        word-spacing: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }

    .welcome-icons svg {
        width: 40px;
        height: 40px;
    }

    .scroll-button {
        display: block;
    }

    #mouse-scroll.scroll-button {
        position: absolute;
        top: auto;
        bottom: max(14px, env(safe-area-inset-bottom));
        left: 50%;
        transform: translateX(-50%);
        opacity: 0.85;
    }

    #about-section {
        justify-content: flex-start;
        gap: 24px;
        padding-top: 32px;
        padding-bottom: 40px;
    }

    #experience-section {
        gap: 56px;
        padding-top: 36px;
        padding-bottom: 56px;
    }

    .content-box {
        width: min(92%, 760px);
        border-radius: 26px;
        padding: 20px;
    }

    .content-box h1 {
        font-size: 32px;
    }

    .content-box p {
        font-size: 20px;
        line-height: 1.5;
    }

    .project-carousel {
        gap: 10px;
    }

    .project-carousel > .button {
        width: 76px;
        height: 76px;
        flex: 0 0 76px;
    }

    .projects-container {
        gap: 12px;
        min-height: 352px;
    }

    .project-box {
        width: min(74vw, 320px);
    }

    .project-box img {
        width: calc(100% - 20px);
        min-height: 0;
        aspect-ratio: 16 / 10;
        object-fit: cover;
    }

    .project-box h2 {
        font-size: 24px;
    }

    .project-box a {
        height: 42px;
        font-size: 19px;
    }

    .small-box {
        min-height: 284px;
    }

    .big-box {
        min-height: 352px;
    }

    #project-card-description {
        max-height: 120px;
    }

    .secondary-vertical-linebreak {
        height: 76px;
    }

    .timeline {
        padding: 12px 4px;
    }

    .card {
        max-width: 86%;
    }

    .date {
        font-size: 18px;
    }

    footer p {
        font-size: 20px;
    }
}

@media only screen and (max-width: 700px) {
    :root {
        --header-height: 64px;
    }

    .header-items {
        padding: 0 10px;
        justify-content: space-evenly;
    }

    .header-items li {
        font-size: 17px;
    }

    .welcome-header-text {
        font-size: clamp(36px, 12vw, 56px);
    }

    .welcome-subheader-text {
        font-size: 17px;
    }

    #mouse-scroll.scroll-button {
        bottom: max(10px, env(safe-area-inset-bottom));
        transform: translateX(-50%) scale(0.82);
        transform-origin: center bottom;
        opacity: 0.72;
    }

    .content-box {
        width: 94%;
        border-radius: 20px;
        padding: 16px;
    }

    #about-section {
        gap: 18px;
        padding-top: 24px;
        padding-bottom: 28px;
    }

    .content-box h1 {
        font-size: 27px;
    }

    .content-box p {
        font-size: 17px;
        text-align: center;
    }

    .welcome-header-text,
    .welcome-subheader-text,
    .about-me,
    .my-projects,
    #experience-section .content-box {
        text-align: center;
    }

    .project-carousel {
        width: 100%;
        gap: 8px;
    }

    .project-carousel > .button {
        width: 56px;
        height: 56px;
        flex: 0 0 56px;
    }

    .projects-container {
        min-height: 318px;
    }

    .projects-container > .small-box,
    .projects-container > .secondary-vertical-linebreak {
        display: none !important;
    }

    .project-box {
        width: min(76vw, 280px);
    }

    .project-box h2 {
        font-size: 20px;
    }

    .project-box a {
        height: 38px;
    }

    .project-box a p {
        font-size: 16px;
    }

    .big-box {
        min-height: 318px;
    }

    #project-card-description {
        max-height: 92px;
    }

    .timeline {
        margin: 8px auto;
        padding: 0;
    }

    .outer {
        align-items: stretch;
    }

    .card {
        max-width: 100%;
        padding: 0 0 18px !important;
    }

    .card::before {
        display: none;
    }

    .info {
        padding: 14px;
    }

    .card:nth-child(even) > .info > .title {
        text-align: left;
    }

    .card:nth-child(odd) > .info > .title::before,
    .card:nth-child(even) > .info > .title::before {
        left: -16px;
        right: auto;
    }

    .date {
        position: static;
        display: block;
        margin: 6px 0 12px;
        color: var(--sky-300);
        font-size: 15px;
    }

    .card:nth-child(odd) > .info > .date,
    .card:nth-child(even) > .info > .date {
        left: auto;
        right: auto;
    }

    .experience-description ul {
        padding-left: 20px;
    }

    .experience-description li {
        font-size: 17px;
        margin-bottom: 8px;
    }

    footer {
        height: auto;
        padding: 12px 12px 20px;
        text-align: center;
    }

    footer p {
        font-size: 16px;
        line-height: 1.45;
    }
}
