* {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
}

.container {
    display: grid;
    grid-template-rows: auto min-content auto;
}

/* ============================================================================================ */

/* Navbar */

.navbar {
    display: flex;
    position: sticky;
    top: 0;
    height: 60px;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    background-color: #2a2524;
    z-index: 9;
}

.logo a {
    color: #d2ecf5;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.menu ul {
    display: flex;
    width: 100%;
    list-style: none;
}

.menu ul li {
    width: 100%;
    padding: 10px 0;
}

.menu ul li a {
    display: block;
    width: 100%;
    color: #fbf7f4;
    padding: 10px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.menu ul li a:hover {
    background-color: #444;
}

.menu-icon {
    display: none;
    cursor: pointer;
    background-color: #5ed2ff;
    padding: 5px;
    border-radius: 5px;
}

/* ============================================================================================ */

/* Home Page */

/* Content */

.home-page {
    display: grid;
    grid-template-columns: 45% auto;
    gap: 0;
    background-color: #1a1624;
}

.content {
    padding: 15px 50px;
}

.image {
    background-image: url("/assests/bg.png");
    background-repeat: no-repeat;
    background-position: right top;
    background-size: 100%;
}

.title {
    margin-bottom: 2.5vw;
}

.title > * {
    line-height: .9;
}

.title h2 {
    font-size: 7vw;
    color: #69c4e0;
}

.title h1 {
    font-size: 9vw;
    color: #f4f4f4;
}

.title h3 {
    font-size: 7vw;
    color: #e4ebed;
}

.description h2 {
    font-size: 2vw;
    margin-bottom: 1vw;
    color: #bee0ee;
}

.description p {
    font-size: 1.4vw;
    max-width: 88%; 
    word-wrap: break-word;
    color: #d9cdcd;
}

/* ============================================================================================ */

/* Skills */

.skills-page , .projects-page {
    padding: 5vw;
    background-color: #1a1624;
}

.skills-page .content , .projects-page .content {   
    padding: 3vw 4vw;
    text-align: center;
    border-radius: 5px;
    background-color: #384759;
}

.skills-page .title , .projects-page .title {
    width: 100%;
}

.skills-page .title h1 , .projects-page .title h1 {
    font-size: 2.1vw;
    font-weight: 300;
    width: 100%;
    padding: 10px;
    background-color: #259496;
}

.skills , .projects {
    display: flex;
    gap: 20px;
    width: 100%;
}

.card {
    background-color: #e3ebf0;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    padding: 15px;
    width: 100%;
    text-align: center;
}

.card-header {
    background-color: #2d4373;
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px 5px 0 0;
}

.card ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.card ul li {
    padding: 8px;
    border-bottom: 1px solid #cbc9c9;
}

.card ul li:last-child {
    border-bottom: none;
}

/* ============================================================================================ */

/* Projects */

.projects-page {
    padding: 0 5vw 5vw 5vw;
}

.projects-page .card img { 
    width: 100%;    
    aspect-ratio: 16/9;
    background-color: black;
}

.projects-page .description {
    padding: 2vw 0;  
}

.projects-page .links {
    display: flex;
}

.projects-page .links a {
    flex: 1;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    text-align: center;
    color: white;
    background-color: black;
}


.projects-page .links a:hover {
    background-color: #396482; ;
    color: white;
}

.projects {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Jarak antar kartu */
}

.card {
  flex: 1 1 calc(33.33% - 20px); /* 3 kolom */
  box-sizing: border-box;
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 8px;
  background-color: #fff;
}


/* ============================================================================================ */

/* Footer */

.footer {
    text-align: center;
    padding: 1vw 0;
    background-color: #396482;
    position: relative;
}

.social-icons {
    margin-bottom: 10px;
}

.social-icons a {
    text-decoration: none;
    font-size: 24px;
    color: #c3cad6;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #47ce32;
}

.footer p {
    font-size: 14px;
    color: white;
}

.back-to-top {
    position: absolute;
    right: 20px;
    top: 20px;
    color: white;
    background-color: #be4646;
    padding: 12px;
    border-radius: 15%;
    text-decoration: none;
    cursor: pointer;
    transition: ease-in 0.3s;
}

.back-to-top:hover {
    color: black;
    background-color: #65e935;
}

/* ============================================================================================ */

/* Mobile Responsive */

@media (max-width: 768px) {

    /* Menu */

    .menu {
        align-items: center;
        position: absolute;
        right: 0;
        height: 0;
        width: 100%;
        text-align: center;
        overflow: hidden;
        background-color: #2a2524;
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    }

    .menu ul {
        display: flex;
        flex-direction: column;
    }

    @keyframes openMenu {
        from {
            transform: translateY(-10px);
        }
        to {
            top: 60px;
            height: min-content;
            transform: translateY(0);
        }
    }
    
    @keyframes closeMenu {
        from {
            top: 60px;
            height: min-content;
            transform: translateY(0);
        }
        to {
            height: 0;
            transform: translateY(-10px);
        }
    }

    .menu-icon {
        display: block;
        cursor: pointer;
        background-color: #5ed2ff;
        padding: 8px;
        border-radius: 5px;
    }

    .menu.active {
        animation: openMenu 0.5s ease-in-out forwards;
    }

    .menu.inactive {
        animation: closeMenu 0.5s ease-in-out;
    }

    /* ============================================================================================ */

    /* Content */

    #home-page {
        display: flex;
        flex-direction: column-reverse;
        align-items: center; 
    }
    
    .content {
        display: flex;
        flex-direction: column;
        align-items: center; 
        text-align: center; 
        padding: 30px 0;
        width: 100%;
    }
    
    .title {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2vw;
        align-items: center;
        width: 70%;
    }
    
    .title :is(h1, h2, h3) {
        font-size: 9vw;
        color: #d6e5e5;
    }

    .description {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .description h2 {
        font-size: 5vw;
        margin: 2vw 0;
        color: #bee0ee;
    }
    
    .description p {
        font-size: 4vw;
        color: #d9cdcd;
    }
     
    .image {
        min-height: 100px;
        width: 100%;
        aspect-ratio: 10/6;
        background-size: cover;
    }

    /* ============================================================================================ */

    /* Skills */

    .skills , .projects {
        flex-direction: column;
        align-items: center;
    }

    .skills-page .title h1 , .projects-page .title h1 {
        font-size: 4.5vw;
    }

    /* ============================================================================================ */

    /* Footer */

    .back-to-top {
        padding: 1.6vw;
    }
    
}
