/* --------- */
/* CSS RESET */
/* --------- */

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
    /* border: 1px solid red */
}

img, picture, svg, video {
    display: block;
    max-width: 100%;
}

:root {
    /* font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; */
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
}

/* --------------- */
/* COMMON ELEMENTS */
/* --------------- */

body {
    min-height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #002032;
    color: #b8c5d2;
}

h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 160%;
    margin-bottom: 20px;
}

a {
    color:#bb0a51;
    text-underline-offset: 2px;
}
a:hover, a:focus {
    color:#930f43;
}

.section {
    padding: 30px max(calc(50vw - 500px), 20px);
}


/* --------------- */
/* NAV BAR SECTION */
/* --------------- */

nav {
    display: flex;
    gap: 20px;
    background-color: transparent;
    align-items: center;
    position: absolute;
    width: 100%;
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
}

nav ul {
    display: flex;
    gap: 25px;
}
nav li {
    padding-left: 0px;
    list-style: none;
    cursor: pointer;
}

nav a {
    color: #fff7;
    text-decoration: none;
    white-space: nowrap;
    transition: 200ms;
    position: relative;
}

/* nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 5px;
    bottom: -8px;
    left: 0;
    background-color: #fffc;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

nav a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
} */

nav a:hover {
    text-decoration:underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 3px;
    color: #fffc;
    transition: 200ms;
}

.nav-items {
    margin-left: auto;
}

.mobile-nav-items {
    margin-left: auto;
    padding: 80px 16px;
    text-align: right;
    user-select: none;
}

.mobile-nav-items ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 30px;
    font-size: 2rem;
    font-weight: 600;
}

.mobile-nav-items a {
    color: #fffa;
    text-decoration: none;
    cursor: pointer;
}
.mobile-nav-items a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 3px;
    color: #fff;
}

.mobile-nav {
    position: absolute;
    height: 100%;
    width: 100vw;
    display: none;
    padding: 30px 20px;
}

/* Hamburger Animation */

.hamburger-btn {
    padding: 5px 8px;
    border: 0px;
    cursor: pointer;
    background-color: transparent;
    fill: #fff6;
    display: none;
    z-index: 200;
}

.hamburger-btn:hover {
    background-color: transparent;
    fill: #fffc;
}

.hamburger-svg-off .line {
    transition: 
        y 250ms ease-in-out 250ms,
        transform 250ms ease-in-out,
        opacity 0ms 250ms
    ;
    transform-origin: center;
}

.hamburger-svg-on .line {
    transition: 
        y 250ms ease-in-out,
        transform 250ms ease-in-out 250ms,
        opacity 0ms 250ms
    ;
    transform-origin: center;
    fill: #fff;
}

.hamburger-svg-on :is(.top, .bottom) {
    y:45;
}

.hamburger-svg-on .top {
    transform: rotate(45deg);
}
.hamburger-svg-on .middle {
    opacity: 0;
}
.hamburger-svg-on .bottom {
    transform: rotate(-45deg);
}

@media only screen and (max-width: 800px) {
    .nav-items {
        display: none;
    }
    .hamburger-btn {
        display: inline;
        margin-left: auto;
    }
    .mobile-nav {
        position: fixed;
        flex-direction: column;
        z-index: 2;
    }
}

/* Mobile menu animations */

@keyframes slide {
    0% {transform: translateX(100%); opacity: 0; background-color: #09315b;}
    30% {background-color: #09315b;}
    100% {transform: translateX(0%); opacity: 1; background-color: #650d46;}
}
@keyframes slide-back {
    0% {transform: translateX(0%); opacity: 1; background-color: #650d46;}
    100% {transform: translateX(100%); opacity: 0; background-color: #09315b;}
}


/* -------------- */
/* HEADER SECTION */
/* -------------- */

header {
    position: relative;
    z-index: -100;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    justify-content: center;
    padding: 140px max(calc(50vw - 500px), 20px) 100px !important;
    min-height: 70vh;
}

.header-background {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: 
        radial-gradient(ellipse at top left, #280534, transparent), 
        radial-gradient(ellipse at top right,#0d405d, transparent),
        radial-gradient(ellipse at bottom right,#66072a, transparent),
        radial-gradient(ellipse at bottom left,#0b5154, transparent);
    z-index: -300;
    animation: hue-change 20s infinite;
}

.header-foreground {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: url(./images/triangle.svg) repeat;
    background-size: 100px;
    background-position: center;
    background-attachment: fixed;
    transition: background-size 15ms ease-in-out;
    z-index: -200;
    animation: hue-change 20s infinite;
    opacity: 1.5%;
    transform-origin: right;
}

@keyframes hue-change {
    0% {filter: hue-rotate(0deg);}
    25% {filter: hue-rotate(45deg);}
    50% {filter: hue-rotate(0deg);}
    75% {filter: hue-rotate(-45deg);}
    100% {filter: hue-rotate(0deg);}
}

.header-image {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0;
}

.header-image img {
    border-radius: 0%;
    outline: 0vw solid #fff2;
    max-width: clamp(180px ,30vw, 280px);
    box-shadow: 0 0 10px 10px #0b1b3022;
    -webkit-mask-image: url(./images/mask-02.svg);
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    color: #d7add3;
}

.header-text h1 {
    font-size: clamp(2.2rem, 4.8vw, 3rem);
}
.header-text h2 {
    font-size: clamp(1.25rem, 1.95vw, 1.5rem);
}

.header-text h1 .jp {
    font-size: 2.8rem;
}

.header-text h2 .jp {
    font-size: clamp(1.3rem, 1.95vw, 1.35rem);
    line-height: normal;
}

.highlight {
    color: transparent;
    background: linear-gradient(to right, #fa509a 0%, #ffd747 100%);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
}

@media only screen and (max-width: 800px) {
    header {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, min-content);
        height: min-content;
        padding-bottom: 40px !important;
        padding-top: 110px !important;
        gap: 30px

    }
    .header-text {
        padding: 0 20px;
        text-align: center;
        grid-row: 2 / 3;
    }
    .header-text h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    .header-text h1 .jp {
        font-size: 1.6rem;
    }
    .header-text h2 {
        font-size: 1.2rem;
    }
    .header-text h2 .jp {
        font-size: 1.1rem;
    }
    .header-image {
        max-width: 45vw;
        place-self: center;
        grid-row: 1 / 2;
    }
}

/* ----------------------- */
/* CODING PROJECTS SECTION */
/* ----------------------- */

.projects {
    /* background-color: #d0d8e1; */
    background-color: #dedadd;
    padding-block: 80px;
}
.projects h2 {
    font-weight: 600;
    font-size: 2.4rem;
    text-align: left;
    color: #8c1361;
}

.projects > h3 {
    font-size: 1.3rem;
    margin-top: 40px;
    color: #6a4a65;

}

.projects p {
    color: #576571;
    line-height: 170%;
}

.categories {
    display: grid;
    gap: 20px;
    margin: 20px 0 40px 0;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.categories button {
    background-color: #eee;
    padding: 10px 20px 10px 10px;
    min-width: 100px;
    border-radius: 5px;
    border: 1px solid #cdcad1;
    /* cursor: pointer; */
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    justify-items: center;
    gap: 10px;
    white-space: nowrap;
    color: #222;
}

.categories button svg {
    height: 22px !important;
    width: 22px !important;
    color: #d01a69;
}

.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.card {
    background-color: #fff;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    transition: 0.2s;
    box-shadow: 0px 2px 4px 0px #00000009;
    min-height: 400px;
}

.card:hover {
    transform: scale(1.01);
    transition: 0.2s;
}

.card-image {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-radius: 0 5px 5px 0;
}

.card-overlay {
    width: 100%;
    height: 100%;
    color: #fff;
    z-index: 1;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s ease-out;
    padding-bottom: 20px;
    background: 
    radial-gradient(ellipse at top left, #161e85, transparent), 
    radial-gradient(ellipse at top right,#c36b13, transparent),
    radial-gradient(ellipse at bottom left,#015d62, transparent),
    radial-gradient(ellipse at bottom right,#e31e94, transparent);
    opacity: 0;
}

.card-overlay:hover {
    border-radius: 0 5px 5px 0;
    transform: scale(1.1);
    transition: 0.3s ease-out;
    font-size: 1rem;
    opacity: 1;
}

.card-overlay:hover + .card-image {
    transform: scale(1.1);
}

.card-overlay h3 {
    pointer-events: none;
}

.card-image img {
    border-radius: 0 5px 5px 0;
    min-width: 100%;
    min-height:100%;
    object-fit: cover;
    flex-shrink: 0;
    transition: 0.5s;
}

.card-image img:hover {
    transform: scale(1.1);
    justify-self: flex-start;
    transition: 0.5s ease-out;
    cursor: pointer;
}

.card-content {
    padding: 40px;
    color: #002032;
    display: flex;
    flex-direction: column;
    gap: 15px
}

.card-content h3 {
    font-size: 1.4rem;
    color: #d82f83;
}

.card-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 20px 0px;
}

.card-tags > div {
    padding: 3px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.7rem;
}

.tag-html {
    background-color: #ffe4cf;
    color:#f26427;
    border-color: #f26427 !important;
}

.tag-css {
    background-color: #daf0fa;
    color: #129ad5;
    border-color: #129ad5 !important;
}

.tag-js {
    background-color: #f9ebbe;
    color: #bb891d;
    border-color: #bb891d !important;
}

.tag-python {
    background-color: #d3e5f7;
    color: #014db0;
    border-color: #014db0 !important;
}

.tag-django {
    background-color: #dcf8d8;
    color: #277a1b;
    border-color: #277a1b !important;
}

.tag-sqlite {
    background-color: #d2f7f5;
    color: #1b757a;
    border-color: #1b757a !important;
}

.card-btns {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.card-btns button {
    background-color:#bb3975;
    border: 0;
    color: #fff;
    font-size: 1rem;
    border-radius: 5px;
    flex: 1;
    padding: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.card-btns button:hover {
    background-color:#a2205d;
    color: #fff;
    transform: scale(1.02);
}

.card-btns button:last-child {
    background-color: #f5eaef;
    color: #a2205d;
    border: 1px solid #e7cdd9;
}

.card-btns button:last-child:hover {
    background-color: #f7e4ed;
    color: #a2205d;
    border: 1px solid #d495b3;
    transform: scale(1.02);
}

@media only screen and (max-width: 650px) {
    .projects {
        padding-block: 40px;
    }
    .projects > h2 {
        text-align: center;
        font-size: 2rem;
    }

    .projects h2 .jp {
        font-size: 1.6rem;
    }
    .projects > h3 {
        text-align: center;
    }
    .card {
        grid-template-columns: 1fr;
        grid-template-rows: 250px 1fr;
    }

    .card-content {
        grid-row: 2 / 3;
    }

    .card-image {
        grid-row: 1 / 2;
        align-items:flex-start;
        border-radius: 5px 5px 0 0;
    }

    .card-image img {
        position: top;
        top: 0;
        border-radius: 5px 5px 0 0;
    }
}

/* ------------------- */
/* DESIGN WORK SECTION */
/* ------------------- */

.design-work {
    /* background-color: #d0d8e1; */
    background-color: #f5f3f5;
    padding-block: 80px;
}
.design-work h2 {
    font-weight: 600;
    font-size: 2.4rem;
    text-align: left;
    color: #8c1361;
}

.design-work > h3 {
    font-size: 1.3rem;
    margin-top: 40px;
    color: #6a4a65;

}

.design-work p {
    color: #576571;
    line-height: 170%;
}

.design-card {
    background-color: #ffffff;
    border-radius: 5px;
    padding: 40px;
    margin-block: 30px;
    box-shadow: 0px 2px 4px 0px #00000009;
}

.design-card h3 {
    font-size: 1.4rem;
    color: #d82f83;
    margin-bottom: 20px;
}

.design-slider {
    display: grid;
    grid-template-columns: 1fr 40px;
    margin-top: 30px;

}

.design-images {
    max-height: 240px;
    display: flex;
    gap: 20px;
    overflow:scroll;
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    padding-right: 40px;

}

.design-images img {
    height: 100%;
    max-width: fit-content;
    flex: 0;
    align-self: center;
}

.arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: rgb(194, 193, 207);
    background: linear-gradient(to right, transparent 0%, #ffffff 80%);
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    z-index: 2;
}

.arrow-image {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 5px 5px #00000008;
    transition: 0.2s;
    cursor: pointer;
}
.arrow-image:hover {
    transform: scale(1.05);
    transition: 0.2s;
}

@media only screen and (max-width: 600px) {
    .design-work {
        padding-block: 40px;
    }

    .design-work h2 {
        text-align: center;
        font-size: 2rem;
    }

    .design-work h2 .jp {
        font-size: 1.6rem;
    }

    .design-work > h3 {
        text-align: center;
    }

    .design-images {
        max-height: 150px;
    }
}

/* --------------- */
/* CONTACT SECTION */
/* --------------- */

.contact {
    padding-block: 80px;
    background-color: #002032;
    /* background: 
        radial-gradient(ellipse at top left, #280534, transparent), 
        radial-gradient(ellipse at top right,#0d405d, transparent),
        radial-gradient(ellipse at bottom right,#66072a, transparent),
        radial-gradient(ellipse at bottom left,#0b5154, transparent); */
}

.contact h2{
    font-weight: 600;
    font-size: 2.4rem;
    color: #dce7ee;
}

.contact p {
    margin-bottom: 30px;
}

form {
    display: flex;
    flex-direction: column;
    gap:20px;
    margin: 20px 0px;
}

form input, form textarea {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 0;
    font: inherit;
}

form textarea {
    height: 100px;
}

form input:focus, form textarea:focus {
    outline: 3px solid #de6e6a;
}

form button {
    padding: 12px 20px;
    border-radius: 5px;
    border: 0;
    background-color: #36526b;
    color: #fff;
    font:inherit;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

form button:hover {
    background-color: #ec625e;
    transition: 0.3s;
    transform: scale(1.01);


}

@media only screen and (max-width: 600px) {
    .contact {
        padding-block: 40px;
    }
    
    .contact h2 {
        text-align: center;
        font-size: 2rem;
    }
    .contact h2 .jp {
        font-size: 1.6rem;
    }
}

/* -------------- */
/* FOOTER SECTION */
/* -------------- */

footer {
    height: min-content;
    color: #3d6d81;
    text-align: center;
    background-color: #041a28;
}

footer a {
    color: #c8eec8;
    text-underline-offset: 3px;
}

footer a:hover {
    color: #96b896;
    text-underline-offset: 3px;
}

.mobile-break {
    display: none;
}

@media only screen and (max-width:600px) {
    .mobile-break {
        display: block;
    }
}


/* TOP BUTTON */

.top-btn {
    display: grid;
    place-content: center;
    background-color: #eeec;
    position: fixed;
    border-radius: 5px;
    width: 50px;
    height: 50px;
    z-index: 400;
    bottom: 30px;
    right: 30px;
    cursor: pointer;
    transition: opacity 200ms, display 200ms, scale 200ms;
    opacity: 0;
    color: #00203299;
}
.top-btn:hover {
    background-color: #eeef;
    transform: scale(1.05);
}

.top-btn-visible {
    transition: opacity 200ms;
    opacity: 1;
}