/* ------------------- */
/*        Reset        */
/* ------------------- */

:root {
    --bg: #0f172a;
    --primary-color: rgb(109, 67, 0);
    --secondary-color: rgb(254, 215, 173);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%;
    /*1rem = 10px */
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(to right, rgb(255, 255, 255), rgb(254, 215, 173));
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ------------------- */
/* Navbar              */
/* ------------------- */

.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.navbar {
    position: relative;
    max-width: 1200px;
    height: 70px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    color: black;
    font-size: 3.2rem;
    font-weight: bold;
}

.logo span {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    color: black;
    font-size: 1.4rem;
    font-weight: 500;
    transform: 0.3s linear;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links .contact-btn {
    background-color: var(--primary-color);
    padding: 0.5rem 2.5rem;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
}

.nav-links .contact-btn:hover {
    opacity: 0.85;
}

.nav-links .contact-btn a {
    color: white;
    font-weight: 500;
}

.hamburg,
.cancel {
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
    color: black;
    font-size: 3.2rem;
    display: none;
    z-index: 101;
}

.dropdown {
    z-index: 100;
    position: absolute;
    top: 70px; 
    left: 0;
    right: 0;
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto;
    transform: translateY(-500px); 
    height: auto;
    backdrop-filter: brightness(40%) blur(3px);
    background: rgba(255, 255, 255, 0.95); 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
    transition: 0.2s linear;
}

.dropdown .links a {
    color: rgb(0, 0, 0);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
}

.dropdown .links a:hover {
    background-color: var(--primary-color);
}

/* Sembunyikan checkbox */
#menu-toggle {
    display: none;
}

/* Saat checkbox di-check, dropdown muncul */
#menu-toggle:checked~.dropdown {
    transform: translateY(0);
}

/* Saat checkbox di-check, sembunyikan hamburger dan tampilkan cancel */
#menu-toggle:checked~.hamburg {
    display: none;
}


#menu-toggle:checked~.cancel {
    display: block;
}


/* ------------------- */
/* Main section        */
/* ------------------- */

.main-section {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-container {
    margin-top: 10rem;
    max-width: 1200px;
    margin: 0 auto 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container .img img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}


.content {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    gap: 1rem;
}

.content h1 {
    font-size: 3.2rem;
}

.content h1 span {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.content .typewriter {
    font-weight: 600px;
    font-size: 1.5rem;
}

.content .typewriter span {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
    position: relative;
    min-width: 140px;
    text-align: left;
}

.typewriter span::before {
    content: "Programmer";
    animation: words 15s infinite;
    display: inline-block;
    overflow-wrap: break-word;
}

.typewriter span::after {
    content: "";
    position: absolute;
    border-left: 1.5px solid black;
    width: 100%;
    height: 100%;
    animation: cursor 0.6s linear infinite;
}

.content p {
    font-size: 1.6rem;
    color: black;
    line-height: 1.5;
}

.social-links {
    gap: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-links a {
    color: black;
    font-size: 2.4rem;
}

/* ------------------- */
/* About Section       */
/* ------------------- */

.about {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: center;
}

.about-content {
    display: flex;
    flex-direction: column;
}


.about-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: black;
}

.about-title .dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--primary-color);
}

.about-content p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: black;
    opacity: 0.9;
}

.about-content ul {
    margin-top: 1.5rem;
    font-size: 1.4rem;
    line-height: 1.6;
    color: black;
}

.about-content ul li {
    margin-bottom: 0.6rem;
}

.about-img {
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.about-img img {
    width: 100%;
    display: block;
}

/* ------------------- */
/* Education Section   */
/* ------------------- */

.edu-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: black;
}

.section-title .dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--primary-color);
}

.edu-timeline {
    position: relative;
    margin-left: 1.5rem;
    padding-left: 2rem;
    border-left: 3px solid rgba(109, 67, 0, 0.25);
}

.edu-item {
    position: relative;
    padding: 2rem 2rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
}

.edu-item::before {
    content: "";
    position: absolute;
    left: -3.1rem;
    top: 2.4rem;
    width: 14px;
    height: 14px;
    background: var(--secondary-color);
    border: 3px solid var(--primary-color);
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(109, 67, 0, 0.08);
}

.edu-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    width: 100%;
}

.edu-degree {
    font-size: 2rem;
    font-weight: 700;
    color: black;
}

.edu-school {
    font-size: 1.6rem;
    font-weight: 500;
    opacity: 0.9;
}

.edu-meta {
    margin-left: auto;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 1.2rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.edu-desc {
    margin-top: 1rem;
    font-size: 1.4rem;
    line-height: 1.6;
    color: black;
    opacity: 0.9;
}

.edu-image {
    width: 100px; 
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
    margin-top: 1rem;
    display: block; 
}


/* ------------------- */
/* Skills Section      */
/* ------------------- */

.skills {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skills-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: black;
}

.skills-title .dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h4 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: .5rem;
    color: black;
}

.skill-card p {
    font-size: 1.3rem;
    color: black;
    opacity: 0.8;
}

/* ------------------- */
/* Portfolio Section   */
/* ------------------- */

.portfolio {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: black;
}

.portfolio-title .dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

.project-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: #f5f5f5;
    display: block;
}

.project-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.project-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: black;
}

.project-content p {
    font-size: 1.4rem;
    line-height: 1.5;
    color: black;
    opacity: 0.85;
}

.project-links {
    margin-top: auto;
    display: flex;
    gap: 1.2rem;
}

.project-links a {
    font-size: 1.3rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 24px;
    border: 1px solid var(--primary-color);
    transition: 0.2s;
}

.project-links a.demo {
    background: var(--primary-color);
    color: white;
}

.project-links a.code {
    background: transparent;
    color: black;
}

.project-links a:hover {
    opacity: 0.85;
}

/* ------------------- */
/* Footer              */
/* ------------------- */

footer {
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #ddd;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-p{
    font-size: 1.5rem;
    color: black;
    margin-bottom: 10px;
}

footer p {
    margin: 5px 0;
    color: #555;
}

.social-links {
    margin-top: 10px;
}

.social-links a {
    margin: 0 10px;
    color: black;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}




/* ------------------- */
/* Animations          */
/* ------------------- */
@keyframes cursor {
    0% {
        border-color: transparent;
    }

    50% {
        border-color: black;
    }

    100% {
        border-color: transparent;
    }
}

@keyframes words {
    0% {
        content: "Programmer";
    }

    33% {
        content: "Web Developer";
    }

    66% {
        content: "Game Developer";
    }

    100% {
        content: "Programmer";
    }
}



/* ------------------- */
/* Responsive Design   */
/* ------------------- */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburg {
        display: block;
    }

    .main-container {
        flex-direction: column;
        text-align: center;
    }

    .main-container .img {
        margin-right: 0;
        max-width: 90%;
        justify-content: center;
        align-items: center;
    }

    .content {
        max-width: 90%;
    }

    .about {
        flex-direction: column;
        text-align: center;
    }

    .about-img {
        margin: 0 auto;
    }

    .section {
        padding: 6rem 1.5rem;
    }

    .edu-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .edu-meta {
        margin-left: 0;
    }

    .social-links a {
        font-size: 2rem;
    }

    
}

@media (max-width: 480px) {
    .logo {
        font-size: 2.4rem;
    }

    .dropdown .links a {
        font-size: 1.8rem;
    }

    .content h1 {
        font-size: 2.8rem;
    }

    .content .typewriter {
        font-size: 1rem;
    }

    .content p {
        font-size: 1.4rem;
    }

    .social-links a {
        font-size: 1.4rem;
    }

    .main-container .img {
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 1.6rem;
    }

    .content h1 {
        font-size: 1.8rem;
    }

    .content .typewriter {
        font-size: 0.9rem;
    }

    .content p {
        font-size: 1.1rem;
    }

    .about-content h2 {
        font-size: 1.6rem;
    }

    .about-content p {
        font-size: 1.1rem;
    }
}