/* Color palette */
:root {
    --primary-color: #e8eaed; /* Main color */
    --visited-link-color: #e8eaed; /* Visited link color */
    --active-link-color: #579aff; /* Active link color */
    --button-bg-color: #e8eaed; /* Background color for buttons */
    --button-text-color: #202124; /* Text color for buttons */
    --font-family: "Bebas Neue", sans-serif;
    --font-weight: 400;
    --font-style: normal;
    --font-size-base: 15px; /* Base font size */
    --font-family2: "Montserrat", sans-serif;
    --font-optical-sizing: auto;
    --font-weight2: <400>; /* Use a value from 100 to 900 */
    --font-style2: normal;
}

/* Basic layout for the entire page */
body, html {
    height: 100%; /* Ensures that HTML and body take the full height of the window */
    margin-bottom: 0px;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* Main content takes up the remaining space */
}

body {
    color: var(--primary-color);
    background-color: var(--button-text-color);
    font-family: var(--font-family2);
    font-weight: var(--font-weight2);
    font-size: var(--font-size-base);
    line-height: 1.6;
}

h1 {
    font-family: var(--font-family);
    color: var(--primary-color);
    font-style: var(--font-style);
    font-size: 52px;
    font-weight: bold;
    text-transform: uppercase;
}

h2 {
    font-family: var(--font-family);
    font-size: 45px;
    font-weight: bold;
    text-transform: uppercase; 
}

h3 {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
}

.white-box {
    padding: 10px; /* Adds some space between text and border */
    border: 2px solid white; /* Sets a white border with a thickness of 2 pixels */
    display: inline-block; /* The border is only as big as the content and padding */
}

a {
    color: var(--primary-color);
}

a:visited {
    color: var(--visited-link-color);
}

a:hover, a:focus {
    text-decoration: none;
}

a:active {
    color: var(--active-link-color);
}

button {
    border: none;
    font-family: inherit;
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    text-decoration: none;
    padding: 10px;
    border-radius: 3px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
}

button:hover, button:focus {
    cursor: pointer;
    opacity: 0.8;
}

.button__secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.button_cv {
    border: none;
    display: inline-block;
    font-family: inherit;
    background-color: var(--primary-color);
    color: var(--button-text-color);
    text-decoration: none;
    padding: 10px;
    border-radius: 3px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
    transition-duration: 0.2s;
    transition-property: opacity;
    text-align: center;
    margin: auto;
}

.button_cv:hover,
.button_cv:focus {
    cursor: pointer;
    opacity: 0.8;
    font-size: 18px;
    transition: 0.4s font-size;
}

.navigation-list__item--active {
    text-decoration: none;
}

.profile__portrait {
    float: left;
    width: 250px;
    margin-right: 40px;
    border-radius: 50%;
}

.profile {
    max-width: 700px;
    margin: 0 auto;
}

* {
    box-sizing: border-box;
}

.page-footer {
    clear: both;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-bottom: 10px;
}

.page-header {
    display: flex;
    width: 100%;
    padding: 20px;
}

.page-header__item {
    flex: 0 1 200px;
}

.page-header__item:last-child {
    flex-grow: 1;
    text-align: right;
}

.navigation-list {
    list-style-type: none;
}

.navigation-list li {
    display: inline-block;
    margin-left: 15px;
}

.grid__item {
    display: inline-block;
    border-radius: 12px;
    width: auto; /* Remove fixed width */
}

/* HOME.HTML */

.profile {
    text-align: center;
}

.profile__portrait {
    margin: 0 auto;
    float: none;
}

/* WORK.HTML */

@supports (display: grid) {
    .grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-gap: 30px; /* Increase the gap between grid items */
        margin: 16px 24px;
    }

    .grid__item {
        background-color: rgb(44, 41, 41);
        color: white;
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 24px;
        transition: transform 0.3s ease; /* Add smooth transition for hover effect */
    }

    /* .grid__item:last-child {
        grid-column: 3 / 2;
    } */
}

.link-spacing {
    margin-left: 20px; /* Adjust this value to increase the spacing */
}

.chat-images-row {
    display: flex;
    justify-content: space-between;
    gap: 10px; /* Space between the images */
}

.chat-image {
    width: 48%; /* Each image takes up 48% of the available width */
    height: auto; /* Maintain aspect ratio */
}

/* ultra-wide screens */
@media all and (min-width: 1920px) {
    .grid {
        margin: 16px 400px;
    }
}

/* big screens */
@media all and (min-width: 750px) and (max-width: 1920px) {
    .grid {
        margin: 16px 100px;
    }
}

/* Adjusting the gap for smaller screens */
@media all and (max-width: 750px) {
    .grid {
        grid-gap: 20px; /* Reduce the gap slightly for smaller screens */
    }
}

@media all and (max-width: 500px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .grid__item {
        padding: 12px;
        margin: 8px 0;
    }

    .heading_work h1 {
        font-size: 36px; /* Adjust heading size for small screens */
    }

    .grid__item:last-child {
        grid-column: auto / auto;
        grid-row: auto / auto;
    }
}

@media all and (min-width: 500px) and (max-width: 750px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid__item {
        padding: 16px;
    }

    .grid__item:last-child {
        grid-column: 2 / 1;
    }
}

@media all and (max-width: 750px) {
    .grid {
        grid-gap: 10px;
    }
}

@media all and (max-width: 500px) {
    .grid__item p {
        font-size: 0.9rem; /* Slightly smaller on small screens */
    }
}

.grid__item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.grid__item:hover {
    transform: scale(1.1); /* Enlarge the grid item on hover */
}

.grid__item p {
    font-size: 1rem; /* Default size */
}

.custom-list {
    list-style-type: none;
}

.heading_work {
    margin-left: 24px;
}

/* ABOUT.HTML */

.about_content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

@media all and (max-width: 600px) {
    .about_content {
        text-align: center;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 20px;
    }

    .about_content h2.white-box {
        font-size: 30px;
    }
}

/* Toolbelt */
@keyframes toolbelt {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-100%);
    }
}

.toolbelt {
    margin: 5vh auto;
    max-width: 75%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.toolbelt h1 {
    text-align: center;
    padding: 10px;
}

.toolbelt:before,
.toolbelt:after {
    position: absolute;
    content: "";
    top: 0;
    width: 250px;
    height: 100%;
    z-index: 2;
}

.toolbelt:before {
    left: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), var(--button-text-color));
}

.toolbelt:after {
    right: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--button-text-color));
}

.toolbelt:hover .toolbelt__logos {
    animation-play-state: paused;
}

.toolbelt__logos {
    display: inline-block;
    padding: 30px 0;
    animation: 25s toolbelt infinite linear;
}

.toolbelt__logos img {
    height: 60px;
    margin: 0 30px;
}

/* Slightly reduce Express logo size for visual balance */
.toolbelt__logos img[src$="express.svg"] {
    height: 52px;
}

@media all and (max-width: 750px) {
    .toolbelt:before,
    .toolbelt:after {
      width: 50px;
    }
  
    .toolbelt__logos img {
      height: 50px;
      margin: 0 15px;
    }

        /* Mobile: keep Express a bit smaller too */
        .toolbelt__logos img[src$="express.svg"] {
            height: 44px;
        }
}

/* CONTACT HTML */

.address {
    margin: 50px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.contact__animation {
    margin-right: 10%; 
}

.contact__animation img {
    width: 270px; /* Standard image size for desktop */
    height: 270px;
}

/* SVG animation */
.contact__animation img:hover {
    animation: shake 0.3s infinite;
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0eg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

/* For tablets (screen width up to 1024px) */
@media (max-width: 1024px) {
    .address {
        flex-direction: column;
        align-items: center;
        margin: 20px;
        text-align: center;
        justify-content: space-evenly;
    }

    .contact__animation {
        margin-right: 0; /* Place image under the text */
    }

    .contact__animation img {
        width: 270px; /* Image size for tablets */
        height: 270px;
    }

    .address h1 {
        font-size: 60px; /* Slightly smaller font size */
    }

    .address p {
        font-size: 20px; /* Slightly smaller font size */
    }

    .page-footer p,a {
        font-size: 20px;
    }

    .page-footer .social.media img {
        width: 36px;
        height: 36px;
    }

    .page-header img {
        width: 190px;
        height: 120px; 
    }

    .outer_rim_button {
        font-size: 20px;
    }
}

/* For smartphones (screen width up to 768px) */
@media (max-width: 768px) {
    .address {
        margin: 15px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: space-evenly;
    }

    .contact__animation {
        margin-right: 0; /* Place image under the text */
    }

    .contact__animation img {
        width: 200px; /* Image size for smartphones */
        height: 200px;
    }

    .address h1 {
        font-size: 55px; /* Smaller font size */
    }

    .address p {
        font-size: 16px; /* Smaller font size */
    }

    .page-footer p,a {
        font-size: 16px;
    }

    .page-footer .social.media img {
        width: 30px;
        height: 30px;
    }

    .page-header img {
        width: 190px;
        height: 120px; 
    }

    .outer_rim_button {
        font-size: 16px;
    }
}

/* For very small smartphones (screen width up to 480px) */
@media (max-width: 480px) {
    .address {
        margin: 10px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: space-evenly;
    }

    .contact__animation img {
        width: 120px; /* Image size for small smartphones */
        height: 120px;
    }

    .address h1 {
        font-size: 28px; /* Even smaller font size */
    }

    .address p {
        font-size: 12px; /* Even smaller font size */
    }

    .page-footer p,a {
        font-size: 1rem;
    }

    .page-footer .social.media img {
        width: 28px;
        height: 28px;
    }

    .outer_rim_button {
        font-size: 11px;
    }
}

/* For ultra-wide screens (screen width from 1920px) */
@media (min-width: 1920px) {
    .contact__animation img {
        width: 300px; /* Larger image for big screens */
        height: 300px;
    }

    .address h1 {
        font-size: 64px; /* Larger font size */
    }

    .address p {
        font-size: 18px; /* Larger font size */
    }

    .outer_rim_button {
        font-size: 18px;
    }
}