* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: white;

}

/*=========Body==========*/
@font-face {
    font-family: "r1b1b1";
    src: url("./fonts/r1b1b1.otf");
}

a {
    color: #c61d23;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

body {
    background-color: #000;
    font-family: "r1b1b1";
}

main {
    margin-top: 6rem;
}

/*=========Cursor==========*/
/* Hide default mouse cursor */
body {
    cursor: none;
}

/* Show pointer for touch devices */
@media (hover: none) {
    body {
        cursor: auto;
    }

    #custom-cursor {
        display: none;
    }
}

#custom-cursor {
    width: 20px;
    height: 20px;

    background: rgba(255, 255, 255, 0.9);

    border-radius: 0;

    position: fixed;
    top: 0;
    left: 0;

    pointer-events: none;
    z-index: 99999;

    transform: translate(-50%, -50%);

    mix-blend-mode: difference;

    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(255, 255, 255, 0.15);

transition:
    width 0.08s linear,
    height 0.08s linear;
}

#custom-cursor.hover {
    width: 32px;
    height: 32px;
}
html,
body,
a,
button,
input,
textarea,
select {
  cursor: none;
}
.trail-square {
  position: fixed;
  pointer-events: none;
  z-index: 9998;

  background: #c61d23;

  transform: translate(-50%, -50%);
  animation: fadeTrail 0.8s ease-out forwards;
}

@keyframes fadeTrail {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
}
/*=========Header==========*/

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000;
    height: 5rem;
    padding: 0 2rem;
}

header img {
    height: 2rem;
}

header a:hover {
    border-bottom: 1px solid #000;
}

header nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

/*=========Homepage==========*/

@media (min-width: 577px) {
    .mobile img {
        display: none;
    }

    .pc img {
        height: auto;
        max-height: 90vh;
        position: fixed;
        position: fixed;
        bottom: 0;
    }
}

@media (max-width: 577px) {
    .pc img {
        display: none;
    }

    .mobile img {
        width: 100vw;
        height: auto;
        position: fixed;
    }
}

.scrolllogo {
    position: fixed;
    bottom: 0;
}

/*=========Work==========*/

.container {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 577px) {
    .container {
        padding: 1.5rem;
        grid-template-columns: 1fr;
    }
}

.card-image {
    aspect-ratio: 4/2.5;
    background-color: gray;
    margin-bottom: 1rem;
}

.card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

}

.card-title {
    margin-bottom: 4rem;
}

/*=========About==========*/

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    padding: 0 2rem;
    gap: 1.25rem;
}

section {
    padding: 10rem 0;
}

section.about div .grid .about-text {
    grid-column: 2 / span 4;
}

@media (max-width: 577px) {
    section.about div .grid .about-text {
        grid-column: span 12;
    }
}

section.about div .grid .about-image {
    grid-column: 8/ span 4;
}

@media (max-width: 577px) {
    section.about div .grid .about-image {
        grid-column: span 12;
        overflow-x: hidden;
    }
}

section.about div .grid .about-image img {
    width: auto;
    height: 100vh;

}

@media (min-width: 577px) {

    body .about{
        margin: 0;
        height: calc(100vh - 6rem);
        overflow: hidden
    }
}

section.about .grid p:nth-child(3) {
    color: #7e7e7e;
}

/*=========Projects==========*/
.project .container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    padding: 2rem;
}

@media (max-width:577px) {
    .project .container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}

.container .project-text {
    margin-bottom: 1rem;
    position: sticky;
    top: 8rem;
}

.container div .project-text p:nth-child(3) {
    font-size: small;
    margin: 0;
}

.container div .project-text p:nth-child(4) {
    font-size: small;
}

.project .project-images img {
    width: 100%;
    height: fit-content;
    display: block;
    margin-bottom: 1.5rem;
}

.project .project-images img~img,
.project .project-images img~iframe,
.project .project-images iframe~iframe,
.project .project-images iframe~img {
    margin-top: 1.5rem;

}

.container .project-images iframe {
    width: 100%;
    height: auto;
    max-height: 100vh;
    display: block;
    aspect-ratio: 16/9;
}