body{
    background-color: #FEFFDC;
    background-image: url('image/background3x.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

#logo-area {
    position: relative;
    display: flex;
    justify-content: flex-start;
    padding-left: 100px;
}

#logo {
    display: block;
    max-width: 72vw;
    max-height: calc(100vh - 190px);
    width: auto;
    height: auto;

}

h1{
    color: #000; 
    font-family: Battambang;
    font-size: 50px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    letter-spacing: 4px;
}
h2 {
    position: absolute;
    bottom: 0;
    right: 100px;
    margin: 0;
    color: #000;
    font-family: 'Courier Prime', 'Courier New', Courier, monospace;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 1.5px;
}

h3{
    color: #000;
    text-align: center;
    font-family: Battambang;
    font-size: 20px;
font-style: normal;
font-weight: 300;
line-height: normal;
letter-spacing: 1px;
margin-top: 0;
}

p,ul,li{
    color: #000;
text-align: center;
font-family: Battambang;
font-size: 16px;
font-style: normal;
font-weight: 300;
line-height: normal;
letter-spacing: 1px;
}

ul {
    padding-left: 0;
    margin: 0;
}
#icon {
    display: flex;
    justify-content: space-between;
    padding: 30px 100px 0;
}

#aboutme, #contact, #resume, #portfolio{
    text-align: center;
}


#icon svg {
    height: 70px;
    width: auto;
    transition:
        transform 0.4s ease,
        filter 0.3s ease;
}

#icon svg:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.svg-title{
    margin-top:5px;
    text-align: center;
}

#homepage {
    width: auto;
    height: auto;
    position: fixed;
    bottom: 2%;
    right: 3%;
}

#lighticon{
    position: fixed;
    bottom: 5%;
    left:3%;
    visibility: visible;
}

#homepage svg {
    display: block;
    width: 55px;
    height: auto;
    transition:
        transform 0.4s ease,
        filter 0.3s ease;
}

#homepage svg:hover {
    transform: rotate(30deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

#lighticon svg {
    transition:
        transform 0.4s ease,
        filter 0.3s ease;
}

#lighticon svg:hover {
    transform: rotate(-20deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.title{
    position: fixed;
    top:0;
    left:3%;
}

#cicilogo{
    position: absolute;
    top: 100px;
    bottom: 0%;
    left: 3%;
    align-items: center;
}

#introduction{
    width:600px;
    height: 600px;
    background-color: #FFFFCC;
    position:absolute;
    top: 100px;
    bottom: 0%;
    left: 50%;
    border-radius: 40px;
}

#aboutme-paragraph{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px;
    padding-top:30px;
}

#resume-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 100px 50px;
    margin-top: 100px;
}

#education, #skills, #experience, #projects {
    background-color: #FFFFCC;
    border-radius: 20px;
    padding: 20px 30px;
    text-align: center;
}

#experience, #projects {
    grid-column: 1 / -1;
}

#contacticon{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 120px;
    gap:30px;
}

#contacticon svg {
    transition:
        transform 0.4s ease,
        filter 0.3s ease;
}

#contacticon svg:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

#contacticon > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 50px;
    padding: 0 80px;
    justify-items: center;
    row-gap: 40px;
}

#portfolio-grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.svg-styles {
    margin-top: 8px;
    text-align: center;
}

#project1{
    fill: #BEDEE6;
    stroke-width: 1px;
    stroke: #000;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    transform: translate(-20px, 25px) rotate(-3deg);
    transition:
        transform 0.4s ease,
        fill 0.3s ease,
        filter 0.3s ease;
}

#project1:hover {
    transform: translate(-20px, 25px) rotate(-3deg) scale(1.06);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

#project1 path {
    mask: none;
    stroke-width: 1.5;
}

#project2{
    fill: #CBD987;
    stroke-width: 1px;
    stroke: #000;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    transform: translate(25px, -10px) rotate(2deg);
    transition:
        transform 0.4s ease,
        fill 0.3s ease,
        filter 0.3s ease;
}

#project2:hover {
    transform: translate(-20px, 25px) rotate(-3deg) scale(1.06);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

#project3{
    fill: #FFFFBA;
    stroke-width: 1px;
    stroke: #000;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    transform: translate(15px, 15px) rotate(-2deg);
        transition:
        transform 0.4s ease,
        fill 0.3s ease,
        filter 0.3s ease;
}
#project3:hover {
    transform: translate(-20px, 25px) rotate(-3deg) scale(1.06);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

#project4{
    fill: #F2B6D5;
    stroke-width: 1px;
    stroke: #000;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    transform: translate(-10px, -20px) rotate(3deg);
        transition:
        transform 0.4s ease,
        fill 0.3s ease,
        filter 0.3s ease;
}
#project4:hover {
    transform: translate(-20px, 25px) rotate(-3deg) scale(1.06);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

.project-grid{
    width: 1250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 120px auto 0;
}

.project-grid img {
    max-width: 100%;
}

body.preview-light h1, body.preview-light h2, body.preview-light h3,
body.preview-light p, body.preview-light ul, body.preview-light li,
body.preview-light .svg-title, body.preview-light .svg-styles {
    color: #000;
}
body.preview-light #introduction,
body.preview-light #education,
body.preview-light #skills,
body.preview-light #experience,
body.preview-light #projects {
    background-color: #FFFFCC;
}

body.preview-dark h1, body.preview-dark h2, body.preview-dark h3,
body.preview-dark p, body.preview-dark ul, body.preview-dark li,
body.preview-dark .svg-title, body.preview-dark .svg-styles {
    color: #ffffff;
}
body.preview-dark #introduction,
body.preview-dark #education,
body.preview-dark #skills,
body.preview-dark #experience,
body.preview-dark #projects {
    background-color: #362A1D;
}

@media (prefers-color-scheme: dark){
    body{
        background-image: url(image/dark.png);
        background-color:#5F5347;
        color:#ffffff;
    }
    h1, h2, h3, p, ul, li{
        color: #ffffff;
    }
    .svg-title, .svg-styles{
        color: #ffffff;
    }
    #education, #skills, #experience, #projects, #introduction{
        background-color: #362A1D;
        color: #ffffff;
    }
}

@media screen and (max-width: 1030px) {
    #icon {
        display: block;
        padding: 0;
    }

    #icon svg {
        height: 70px;
    }

    #aboutme {
        position: fixed;
        top: 30px;
        left: 20px;
    }

    #resume {
        position: fixed;
        top: 30px;
        right: 20px;
    }

    #portfolio {
        position: fixed;
        bottom: 10px;
        left: 20px;
    }

    #contact {
        position: fixed;
        bottom: 10px;
        right: 20px;
    }

    #logo-area {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        width: 90vw;
    }

    #logo {
        max-width: 85vw;
        max-height: 65vh;
    }

    h2 {
        position: static;
        text-align: center;
        font-size: 30px;
        margin-top: 16px;
    }

    h1 {
        font-size: 28px;
    }

    .title {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        white-space: nowrap;
    }

    #cicilogo {
        display: none;
    }

    #introduction {
        position: relative;
        width: calc(100vw - 40px);
        height: auto;
        top: 20px;
        left: auto;
        margin: 60px auto 40px;
    }

    #resume-content {
        grid-template-columns: 1fr;
        padding: 20px;
        margin-top: 60px;
    }

    #experience, #projects {
        grid-column: 1;
    }

    #portfolio-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
        margin-top: 100px;
    }

    #portfolio-grid svg {
        width: 90%;
        max-width: 35vw;
        height: auto;
    }

    #project1, #project2, #project3, #project4 {
        transform: none;
    }

    #portfolio-grid > div:nth-child(odd) {
        justify-self: start;
    }

    #portfolio-grid > div:nth-child(even) {
        justify-self: end;
    }

    .project-grid {
        width: 95%;
        gap: 25px;
        margin: 80px auto 0;
    }

    #contacticon {
        margin-top: 110px;
        gap: 60px;
    }

    #homepage {
        position: fixed;
        bottom: 20px;
        right: 20px;
    }

    #homepage svg {
        width: 50px;
        height: auto;
    }
    
    #lighticon{
        visibility: hidden;
    }
}

@media screen and (max-width: 430px) {
    #icon svg {
        height: 50px;
    }

    #portfolio {
        bottom: 15px;
    }

    #contact {
        bottom: 15px;
    }

    h2 {
        font-size: 22px;
    }

    #portfolio-grid svg {
        width: 100%;
        max-width: 45vw;
    }

    .project-grid {
        margin-top: 100px;
    }

    #contacticon {
        margin-top: 100px;
        gap: 90px;
    }
    #lighticon{
        visibility: hidden;
    }
}
