/* custom root */
:root {
    --bg-dark: hsl(0, 0%, 10%);
    --window: hsl(210, 8%, 68%);
    --window-2: hsl(0, 0%, 78%);
    --grid: hsl(0, 0%, 95%);
    --font-jersey: "Jersey 10", sans-serif;
    --font-quicksand: "Quicksand", sans-serif;
    --font-anaheim: "Anaheim", sans-serif;
    --header-color: hsl(220, 13%, 26%);
    --shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-thumb {
    background: #989898;
    border-radius: 10px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    margin: 0;
    font-family: var(--font-anaheim);
}

/* splashsreen tampilan mobile */
.mobile-splash-screen{
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.mobile-splash-screen.hide{
    opacity: 0;
}
.splash-content{
    margin: 20px;
    color: var(--window);
    font-size: 1.5em;
    font-family: var(--font-jersey);
    letter-spacing: 2px;
    text-align: center;
}
.splash-content h3{
    margin-bottom: 0.5em;
    letter-spacing: 3px;
}
.splash-content p{
    font-size: 0.8em;
}
.splash-titik {
    margin-top: 15px;
    font-size: 2rem;
    letter-spacing: 5px;
}
.splash-titik span {
    animation: blink 1.4s infinite;
    animation-fill-mode: both;
}
.splash-titik span:nth-child(2) {
    animation-delay: 0.2s;
}
.splash-titik span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}
/* ============================================================================================================================== */

.desktop {
    position: relative;
    height: 100vh;
    overflow: hidden;
    /* border: 2px solid red; */
}

.copyright {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-anaheim);
    font-size: clamp(10px, 1vw, 14px);
    color: #fff;
    letter-spacing: 1px;
    user-select: none;
    z-index: 10;
    mix-blend-mode: difference;
}

/* easteregg */
.visitor {
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--window);
    font-family: var(--font-jersey);
    letter-spacing: 2px;
}

#visitor-text::after {
    content: "|";
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0;
    }
}

.main-window {
    /* background-color: var(--window) !important; */
    background-image: linear-gradient(135deg, #000000 25%, transparent 25%), linear-gradient(225deg, #000000 25%, transparent 25%), linear-gradient(45deg, #000000 25%, transparent 25%), linear-gradient(315deg, #000000 25%, var(--window) 30%);
    background-position: 4px 0, 4px 0, 0 0, 0 0;
    background-size: 4px 4px;
    background-repeat: repeat;
    box-shadow: var(--shadow);

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* width: 750px;
    height: 550px; */
    width: min(750px, calc(100vw - 40px));
    height: min(550px, calc(100vh - 40px));
    /* respomsif*/
    border: 1px solid #000;
    padding: 4px 8px;
    display: grid;
    grid-template-columns: 15% 85%;
    /* grid-template-rows: 70% 30%; */
    user-select: none;
    z-index: 1;
}

.left {
    display: grid;
    grid-template-rows: 70% 30%;
}

.right {
    display: grid;
    grid-template-rows: 85% 15%;
    min-height: 0;
}

.grid {
    border: 1px solid #000;
    background-color: var(--grid);
    margin: .3rem;
}

.grid-1,
.grid-2,
.grid-3,
.grid-4 {
    position: relative;
    overflow: hidden;
}

/* grid1 */
.grid-1 {
    border-width: 1px 2px 3px 1px;
}

.grid-1 .nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.grid-1 .nav li {
    font-family: var(--font-jersey);
    padding: 10px 0 10px 5px;
    letter-spacing: 1px;
    color: hsl(0, 0%, 18%);
    border-bottom: 1px solid #555;
    box-shadow: inset -2px -2px 0 #fff;
    user-select: none;
}

.grid-1 .nav li:hover {
    background: rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.grid-1 .nav li.active {
    background: var(--header-color);
    box-shadow: inset 2px 2px 0 #0c0f1a;
    color: #fff;
}

/* grid2 */
.grid-2 {
    display: grid;
    grid-template-rows: 8% 92%;
    background: var(--header-color);
    border-width: 1px 3px 2px 1px;
}

.grid-2 .name-trigger {
    cursor: pointer;
    display: inline-block;
    margin-bottom: 5px !important;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.grid-2 .name-trigger i {
    font-size: 20px;
    color: #555;
}

.grid-2 .header .mobile-txt {
    display: none;
}

.grid-2 .sm-grid {
    border: 1px solid #000;
    border-width: 2px 3px 3px 2px;
    background-color: var(--grid);
    margin: 0 .3rem .3rem .3rem;
}

.grid-2 .sm-grid:nth-child(1) {
    border: none;
    background-color: transparent;
}

.grid-2 .sm-grid:nth-child(1) .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .4rem;
    font-family: var(--font-jersey);
    color: #fff
}

.grid-2 .sm-grid:nth-child(1) .header p {
    font-size: 20px;
}

.grid-2 .sm-grid:nth-child(1) .header i {
    font-size: 18px;
}

.grid-2 .sm-grid:nth-child(2) {
    overflow: auto;
    min-height: 0;
}

.grid-2 .sm-grid .main-content {
    margin: 20px;
}

.grid-2 .main-content h4 {
    margin-bottom: 20px;
}

.grid-2 .main-content p {
    margin-bottom: 10px;
}

.grid-2 .content-section {
    display: none;
}

.grid-2 .content-section.active {
    display: block;
}

.grid-2 .content-section h1 {
    margin-bottom: 20px;
}

.content-section .edu-timeline {
    position: relative;
    /* margin-top: 30px; */
    padding-left: 30px;
}

.content-section .edu-timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--window);
    border-radius: 2px;
}

.content-section .edu-timeline .timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.content-section .edu-timeline .timeline-item::before {
    content: "";
    position: absolute;
    left: -27px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--window);
    border-radius: 100%;
}

.edu-timeline .timeline-item .timeline-year {
    font-family: var(--font-jersey);
    font-size: 20px;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
    opacity: 0.8;
}

.content-section .tools-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.content-section .tools-header {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-section .tools-header i {
    font-size: 22px;
    cursor: pointer;
}

.content-section .tool-item {
    display: flex;
    border: 1px solid #000;
    border-width: 1px 3px 2px 1px;
    justify-content: center;
    align-items: center;
    padding: 2px 5px;
    background: hsl(0, 0%, 90%);
    box-shadow: inset -2px -2px 0 #fff;
    flex: 0 0 calc((60% - 60px) / 4);
}

.content-section .tool-item:hover {
    background: var(--window-2);
}

.content-section .tool-item i {
    margin-right: 5px;
}

.content-section .tool-item p {
    margin: 0;
}

.tools-wrapper {
    /*easteregg */
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 310px;
    overflow: hidden;
}

.container-gravitasi {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* .container-gravitasi .tool-item {
    position: absolute;
    margin: 0;
} */
.content-section .contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    width: max-content;
}

.content-section .contact-header {
    padding-bottom: 15px;
}

.content-section .contact-header span {
    font-size: 12px;
}

.content-section .contact-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: #000;
    color: var(--window);
    font-size: 16px;
    width: fit-content;
    border: 1px solid #000;
    border-width: 1px 3px 2px 1px;
    box-shadow: inset -2px -2px 0 hsl(0, 0%, 75%);
}

.content-section .contact-item:hover {
    background: var(--bg-dark);
    color: #fff;
}

.content-section .contact-item.instagram {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    gap: 20px;
}

.ig-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #000;
    color: var(--window);
    font-size: 16px;
    width: fit-content;
    border: 1px solid #000;
    border-width: 1px 3px 2px 1px;
    box-shadow: inset -2px -2px 0 #fff;
}

.ig-item:hover {
    background: var(--bg-dark);
    color: #fff;
}

.content-section .project-wrapper {
    /* background-color: #ff0000; */
    width: 100%;
    height: 100%;
}

.content-section .project-wrapper {
    width: 100%;
}

.projects-header {
    margin-bottom: 14px;
}

.project-grid {
    display: grid;
    grid-template-rows: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.project-item {
    border: 1px solid #000;
    border-width: 1px 3px 2px 1px;
    background: var(--window-2);
    box-shadow: inset -2px -2px 0 #fff;
    padding: 6px;
    display: flex;
    flex-direction: column;
}

.project-item img {
    width: 100%;
    /* height: 120px; */
    object-fit: cover;
    border: 1px solid #000;
}

.project-item .project-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-title i {
    padding: 2px;
    font-size: 18px;
    margin-right: 5px;
    background-color: #000000;
    color: #fff;
    border: #555 solid 1px;
    border-width: 1px 2px 2px 1px;
}

.project-item .project-desc {
    margin-top: 10px;
}

.project-item .project-desc p {
    margin-top: 8px;
}

.content-section .exp-header {
    margin-bottom: 14px;
}

.exp-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.exp-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.exp-nav-item {
    text-decoration: none;
    color: var(--window-2);
    padding: 2px 5px;
    border: 1px solid #000;
    border-width: 1px 3px 2px 1px;
    background: hsl(0, 0%, 0%);
    box-shadow: inset -2px -2px 0 #979797;
}

.exp-nav-item:hover {
    color: #fff;
    background: var(--bg-dark);
}

/* .exp-section{
    margin-bottom: 30px;
} */
.exp-section-title {
    padding: 6px 12px;
    /* margin-bottom: 15px; */
    border: 1px solid #000;
    border-width: 1px 3px 2px 1px;
    background: hsl(0, 0%, 90%);
    box-shadow: inset -2px -2px 0 #fff;
    font-weight: bold;
}

.exp-wrapper {
    border: 1px solid #000;
    border-width: 1px 3px 2px 1px;
    background: hsl(0, 0%, 90%);
    padding: 10px;
}

.exp-item {
    margin-bottom: 20px;
    margin-top: 15px;
}

.exp-item h4 {
    margin: 0 0 6px 0 !important;
    font-size: 18px;
}

.exp-role {
    display: block;
    font-size: 16px;
}

.exp-time {
    display: block;
    font-size: 15px;
    opacity: 0.7;
    margin-bottom: 6px;
}

.exp-item p {
    margin: 0;
    font-size: 16px;
}

.exp-item i {
    font-size: 14px;
    color: #555;
}

/* grid3 */
.grid-3 {
    border-width: 1px 3px 3px 1px;
}

.grid-3 p {
    font-size: 16px;
    position: absolute;
    top: 6px;
    left: 10px;
    z-index: 2;
    font-family: var(--font-jersey);
}

.grid-3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 20px 3px 3px 5px;
}

/* grid4 */
.grid-4 {
    border-width: 1px 2px 3px 1px;
    background-color: var(--grid);
}

.grid-4-content {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 9em;
    margin: 6px;
}

.l-right {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.grid4-item {
    background-color: var(--window);
    border: 1px solid #000;
    border-width: 1px 3px 2px 1px;
    box-shadow: inset 2px 2px 0 #fff;
    padding: 4px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.grid4-item:first-child {
    flex: 0 0 90px;
}

.grid4-item:last-child {
    flex: 1;
    min-width: 0;
    flex-direction: row;
    gap: 2em;
}

.feedback{
    margin: 0;
}
.feedback i {
    font-size: 1.6em;
    color: #000000;
}

.feedback p {
    font-size: 12px;
}

.feedback:hover {
    background-color: hsl(0, 0%, 61%);
}

.last-updated {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 1.3em;
    font-family: var(--font-jersey);
    letter-spacing: 1px;
}

.grid4-item button {
    padding: 10px 20px;
    background-color: #000000;
    color: var(--window);
    box-shadow: inset -2px -2px 0 hsl(0, 0%, 84%);
}

/* modal */
#modalTemplate {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* background: rgba(255,0,0,0.5); */
    /* z-index: 999; */
}
/* .modal.show {
    display: block;
} */
 #modalLayer {
    position: absolute;
    inset: 0;
    /* height: 100%; */
    width: 100%;
}
.modal-window {
    background: var(--window-1);
    border: 1px solid #000;
    border-width: 1px 3px 3px 2px;
    position: absolute;
    pointer-events: auto;
    /* left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); */
    opacity: 0;
    transform: scale(0.8); 
    transition: opacity 0.15s ease, transform 0.1s ease;
}
.modal-window.modal-visible {
    opacity: 1; 
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    padding: 6px;
    background: var(--header-color);
    color: #fff;
    border-bottom: 3px solid #000;
    box-shadow: inset -2px -2px 0 #c3c4ff;
    user-select: none;
}
.modal-header .modal-title{
    /* font-family: var(--font-jersey); */
    /* letter-spacing: 1px; */
    font-size: 0.9em;
    font-weight: 700;
    align-content: center;
    cursor: move;
}
.modal-body {
    padding: 10px;
    background-color: var(--window-2);
    box-shadow: inset -2px -2px 0 #fff;
}
.modal-body img {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
    user-select: none;
}
.modal-newtab {
    margin-top: 5px;
    display: flex;
    justify-content: center;
}
.modal-newtab a {
    text-decoration: none;
    color: #000;
    font-size: 0.9em;
    font-weight: 600;   
}   
.modal-close{
    aspect-ratio: 1/1;
    padding: 0 3px;
    border: 1px solid #000;
    border-width: 1px 2px 2px 1px;
}

/* cat */
.cat-modal{
    width: 300px !important;
}
.modal-body.cat-body{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0 5px 0 5px;
    justify-content: center;
}
.cat-body img{
    width: 6em;
    object-fit: cover;
    /* animation: float 2s ease-in-out infinite; */
    image-rendering: crisp-edges;
    filter: drop-shadow(2px 4px 1px rgba(0,0,0,0.6));
}
.cat-body p{
    text-align: center;
    font-size: 1.4em;
    font-family: var(--font-jersey);
    letter-spacing: 1px;
    color: var(--bg-dark);
    animation: float 2s ease-in-out infinite;
    user-select: none;
    text-shadow: 0 0 4px rgba(0,0,0,0.6), 0 0 4px rgba(0,0,0,0.4);
    /* filter: blur(0.2px); */
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* fromdeedback */
.fback{
    max-width: 380px;
}
.feedback-form {
    padding: 15px;
    min-width: 350px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9em;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 2px solid #000;
    border-width: 2px 2px 3px 2px;
    background: white;
    font-family: inherit;
    box-sizing: border-box;
}
.form-group input[readonly] {
    background: #f0f0f0;
    font-weight: bold;
    user-select: none;  
}
.feedback-alert{
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1em;
    /* min-height: 18px; */
    opacity: 0;
    transition: opacity 0.15s ease;
    justify-content: center;
    display: flex;
}
.feedback-alert.show {
    opacity: 1;
}
.feedback-alert.success {
    color: #1a7f37;
}
.feedback-alert.error {
    color: #b42318;
}
.btn-send {
    background: var(--window);
    border: 2px solid #000;
    border-width: 2px 3px 3px 2px;
    padding: 10px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-send:active {
    border-width: 3px 2px 2px 3px;
}
.btn-send:disabled {
    background: var(--window-2);
    cursor: not-allowed;
}

/* cat modal */


/* layout hp ==========================================================================================================================================*/
.layout-wrapper {
    display: contents;
}

@media (max-width: 768px) {
    .main-window {
        width: min(750px, calc(100vw - 20px));
        height: 580px;
        display: grid;
        grid-template-columns: 25% 75%;
        grid-template-rows: 42px 1fr 60px;
        gap: 8px;
        padding: 6px 14px 6px 6px;
        overflow: hidden;
        box-sizing: border-box;
        font-size: clamp(0.95rem, 2.8vw, 1rem);
    }

    .left,
    .right {
        display: contents;
    }

    .grid {
        margin: 0;
        min-height: 0;
        min-width: 0;
    }

    /* grid1 */
    .grid-1 {
        grid-column: 1 / -1;
        grid-row: 1;
        display: flex;
        align-items: stretch;
    }

    .grid-1 .nav {
        width: 100%;
    }

    .grid-1 .nav ul {
        display: flex;
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .grid-1 .nav li {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
        padding: 0;
        margin: 0;
        border: none;
        box-shadow: none;
        border-bottom: none;
        padding-left: 5px;
    }

    .grid-1 .nav li i {
        font-size: 20px;
    }

    .grid-1 .nav li.active {
        background: var(--header-color);
        box-shadow: inset 2px 2px 0 #0c0f1a;
        color: #fff;
    }

    /* grid2 */
    .grid-2 {
        grid-column: 1 / -1;
        grid-row: 2;
        min-height: 0;
        overflow: hidden;
    }

    .grid-2 .sm-grid:nth-child(2) {
        min-height: 0;
        overflow: auto;
    }

    .desktop-txt {
        display: none;
    }

    .grid-2 .header .mobile-txt {
        display: block;
    }

    .main-content {
        margin: 12px !important;
    }

    /* grid3 */
    .grid-3 {
        grid-column: 1;
        grid-row: 3;
        overflow: hidden;
    }

    .grid-3 img {
        position: absolute;
        left: 6px;
        padding: 5px 5px 0 5px;
        height: 100%;
        object-fit: cover;
    }

    .grid-3 p {
        top: 2px;
        left: 6px;
        color: #fff;
        mix-blend-mode: difference;
        pointer-events: none;
        font-size: 14px;
    }

    /* grid4 */
    .grid-4 {
        grid-column: 2;
        grid-row: 3;
        overflow: hidden;
    }

    .grid-4-content {
        flex-direction: row-reverse;
        height: 48px;
        gap: 0.5em;
        margin: 5px;
    }
    .last-updated i{
        display: none;
    }
    .feedback i {
        font-size: 1.5em;
        color: #000000;
    }
    

    .last-updated {
        align-items: center;
        font-size: 1em;
        font-family: var(--font-jersey);
        letter-spacing: 1px;
    }
    .grid4-item button {
        display: none;
    }
    #modalLayer {
        position: absolute;
        inset: 0;
        width: 100%;
        pointer-events: none; 
    }
    .modal-window {
        position: absolute !important; 
        transform: scale(0.8); 
        transition: opacity 0.15s ease, transform 0.1s ease;
    }
    .modal-window.modal-visible {
        transform: scale(1);
    }
    .modal-newtab {
        display: none;
    }    
    .feedback-form {
        padding: 15px;
        min-width: 0;
    }
}

@media(min-width:769px) {
    .mobile-splash-screen {
        display: none;
    }
}

/* layout tablet========================================================================================================================================== */
/* @media (max-width: 1024px){
    .main-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 40px);
    }
} */