@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html{
    font-size: 62.5%;
}

body{
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    background-color: #000;
    color: white;
}

header{
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: transparent;
    filter: drop-shadow(10px);
    display: flex;
    justify-content: center;
    gap: 6rem;
    align-items: center;
    z-index: 100;
}

.logo{
    font-size: 3rem;
    color: #b74b4b;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo:hover{
    transform: scale(1.1);
}

nav a{
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active{
    color: #b74b4b;
    border-bottom: 3px solid #b74b4b;
}

@media(max-width:995px){
    nav{
        position: absolute;
        display: none;
        top: 0;
        right: 0;
        width: 40%;
        border-left: 3px solid #b74b4b;
        border-bottom: 3px solid #b74b4b;
        border-bottom-left-radius: 2rem;
        padding: 1rem solid;
        background-color: #000;
        border-top: 0.1rem solid rgba(0,0,0,0.1);
    }

    nav.active{
        display: block;
    }

    nav a{
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    nav a:hover,
    nav a.active{
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid #b74b4b;
    }
}

section{
    min-height: 100vh;
    padding: 5rem 9% 5rem;
}

.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: transparent;
}

.home .home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

span{
    color: #b74b4b;
}

.home-content h3{
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p{
    font-size: 1.6rem;
}

.home-img{
    border-radius: 50%;
}

.home-img img{
    position: relative;
    width: 32vw;
    border-radius: 50%;
    box-shadow: 0 0 25px solid #b74b4b;
    cursor: pointer;
    transition: 0.2s linear;
}

.home-img img:hover{
    font-size: 1.8rem;
    font-weight: 500;
}

.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #b74b4b;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: #b74b4b;
}

.social-icons a:hover{
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #b74b4b;
    box-shadow: 0  0 25px #b74b4b;
}

.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #b74b4b;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #b74b4b;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover{
    transform: scale3d(1.03);
    background-color: #b74b4b;
    color: black;
    box-shadow: 0 0 25px #b74b4b;
}

.typing-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.typing-text span{
    position: relative;
}

.typing-text span::before{
    content: "software Developer";
    color: #b74b4b;
    animation: words 20s infinite;
}

.typing-text span::after{
    content: "";
    background-color: transparent;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid transparent;
    right: -8;
    animation: cursor 0.6s infinite;
}

@keyframes cursor{
    to{
        border-left: 3px solid #b74b4b;
    }
}

@keyframes words{
    0%, 20%{
        content: "Web Developer";
    }
    21%, 40%{
        content: "Developer";
    }
    41%, 60%{
        content: "Web Designer";
    }
    81%, 100%{
        content: "Script Writer";
    }
}

@media (max-width: 1000px){
    .home{
        gap: 4rem;
    }
}

@media(max-width:995px){
    .home{
        flex-direction: column;
        margin: 5rem 4rem;
    }

    .home .home-content h3{
        font-size: 2.5rem;
    }

    .home-content h1{
        font-size: 5rem;
    }

    .home-img img{
        width: 70vw;
        margin-top: 4rem;
    }
}

html {
    scroll-behavior: smooth;
}

section {
    min-height: 100vh;
    scroll-margin-top: 80px;
}
section:not(.show) {
    display: none;
}

section.show {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
#bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: auto;
}
section:not(.home){
    padding-top: 12rem;
}
/* ===== Judul tiap section (dipakai ulang di halaman lain) ===== */
.heading{
    font-size: 5rem;
    text-align: center;
    margin-bottom: 5rem;
}

/* ===== Services ===== */
.services-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 3rem;
}

.service-box{
    background-color: rgba(0, 0, 0, 0.6);
    border: 0.2rem solid #b74b4b;
    border-radius: 2rem;
    padding: 4rem 3rem;
    text-align: center;
    transition: 0.3s ease;
}

.service-box:hover{
    transform: translateY(-1rem);
    box-shadow: 0 0 25px #b74b4b;
}

.service-box i{
    font-size: 6rem;
    color: #b74b4b;
    margin-bottom: 2rem;
}

.service-box h3{
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.service-box p{
    font-size: 1.6rem;
    line-height: 1.6;
}
/* ===== Skills ===== */
.skills-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(32rem, 1fr));
    gap: 3rem 6rem;
    max-width: 100rem;
    margin: 0 auto;
}

.skill-info{
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.skill-info h3{
    font-size: 2rem;
    font-weight: 500;
}

.skill-info p{
    font-size: 1.8rem;
    font-weight: 600;
    color: #b74b4b;
}

.skill-bar{
    height: 1.2rem;
    background-color: rgba(183, 75, 75, 0.2);
    border-radius: 1rem;
    overflow: hidden;
}

.skill-fill{
    width: var(--level);
    height: 100%;
    background-color: #b74b4b;
    border-radius: 1rem;
    box-shadow: 0 0 12px #b74b4b;
}

/* bar terisi dari kosong setiap kali halaman Skills dibuka */
section.show .skill-fill{
    animation: fillBar 1s ease;
}

@keyframes fillBar{
    from{ width: 0; }
}
/* ===== Education ===== */
.timeline{
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
    padding-left: 3rem;
    border-left: 0.2rem solid #b74b4b;
}

.timeline-item{
    position: relative;
    margin-bottom: 4rem;
    padding: 2.5rem 3rem;
    background-color: rgba(0, 0, 0, 0.6);
    border: 0.2rem solid #b74b4b;
    border-radius: 2rem;
    transition: 0.3s ease;
}

.timeline-item:last-child{
    margin-bottom: 0;
}

.timeline-item:hover{
    box-shadow: 0 0 25px #b74b4b;
}

/* titik di garis */
.timeline-item::before{
    content: "";
    position: absolute;
    left: -3.8rem;
    top: 3rem;
    width: 1.4rem;
    height: 1.4rem;
    background-color: #b74b4b;
    border-radius: 50%;
    box-shadow: 0 0 12px #b74b4b;
}

.timeline-date{
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    color: #b74b4b;
    margin-bottom: 0.5rem;
}

.timeline-item h3{
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
}

.timeline-item p{
    font-size: 1.6rem;
    line-height: 1.6;
}
/* ===== Contact ===== */
.contact-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
    gap: 3rem;
    max-width: 100rem;
    margin: 0 auto;
}

.contact-box{
    display: block;
    padding: 4rem 3rem;
    background-color: rgba(0, 0, 0, 0.6);
    border: 0.2rem solid #b74b4b;
    border-radius: 2rem;
    text-align: center;
    color: white;
    transition: 0.3s ease;
}

.contact-box:hover{
    transform: translateY(-1rem);
    box-shadow: 0 0 25px #b74b4b;
}

.contact-box i{
    font-size: 5rem;
    color: #b74b4b;
    margin-bottom: 1.5rem;
}

.contact-box h3{
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.contact-box p{
    font-size: 1.6rem;
    word-break: break-all;
}

.contact-cta{
    text-align: center;
    margin-top: 5rem;
}
:root{
    --shelf-wood-base: #3b1f16;
    --shelf-wood-mid: #4f2a1d;
    --shelf-wood-deep: #1f0f0a;
    --shelf-wood-edge: #2a140d;
    --shelf-brass: #a9814f;
    --shelf-brass-dim: #7c5f3c;
    --shelf-oxblood: #7a2a1f;
    --shelf-oxblood-dark: #561d15;
    --shelf-film: #3c3024;
    --shelf-film-dark: #241b12;
    --shelf-parchment: #ece0c4;
    --shelf-ink: #3a2a18;
    --shelf-cream: #f1e6d2;
}

/* ===== Shelf: dinding sampul ===== */
.cabinet{
    column-count: 4;
    column-gap: 10px;
    max-width: 100rem;
    margin: 0 auto;
}

.piece{
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 10px;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 0.8rem;
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.piece.square{ aspect-ratio: 1; }
.piece.tall{ aspect-ratio: 2 / 3; }

.piece:hover,
.piece:focus-visible{
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* ikon placeholder, tampil sebelum gambar termuat atau kalau gagal */
.piece i{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #b74b4b;
    opacity: 0.5;
}

.piece:not(.nocover) i{
    display: none;
}

/* judul & artis, muncul saat hover atau kalau belum ada sampul */
.piece-info{
    position: absolute;
    inset: auto 0 0;
    padding: 2.6rem 0.8rem 0.8rem;
    background: linear-gradient(transparent, rgba(5, 5, 7, 0.92));
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.piece:hover .piece-info,
.piece.playing .piece-info,
.piece.nocover .piece-info{
    opacity: 1;
    transform: none;
}

.piece-info h3{
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: #f0ede6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.piece-info p{
    margin: 0.2rem 0 0;
    font-size: 1rem;
    color: #b9b6ae;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* indikator lagu sedang diputar */
.piece.playing{
    box-shadow: 0 0 0 0.15rem #b74b4b;
}

.eqbars{
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 1;
    display: none;
    align-items: flex-end;
    gap: 0.2rem;
    height: 1.4rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.6rem;
    background-color: rgba(5, 5, 7, 0.65);
}

.piece.playing .eqbars{
    display: flex;
}

.eqbars i{
    position: static;
    width: 0.3rem;
    height: 100%;
    background-color: #b74b4b;
    opacity: 1;
    transform-origin: bottom;
    animation: eqbounce 0.9s ease-in-out infinite;
}

.eqbars i:nth-child(2){ animation-delay: 0.2s; }
.eqbars i:nth-child(3){ animation-delay: 0.4s; }

@keyframes eqbounce{
    0%, 100%{ transform: scaleY(0.3); }
    50%{ transform: scaleY(1); }
}

@media (hover: none){
    .piece:hover{ transform: none; box-shadow: none; }
}

@media (max-width: 640px){
    .cabinet{ column-gap: 6px; }
    .piece{ margin-bottom: 6px; border-radius: 0.5rem; }
    .piece-info{ padding: 1.8rem 0.6rem 0.6rem; }
    .piece-info h3{ font-size: 1rem; }
    .piece-info p{ display: none; }
}

/* ===== Tombol Musik Melayang ===== */
.music-toggle {
    position: fixed;
    right: 2.4rem;
    bottom: 2.4rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.6rem;
    font-size: 1.3rem;
    font-weight: 500;
    color: #ffffff;
    background: rgba(17, 17, 20, 0.9);
    border: 0.15rem solid rgba(183, 75, 75, 0.6);
    border-radius: 5rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.music-toggle:hover,
.music-toggle.playing {
    border-color: #b74b4b;
    box-shadow: 0 0 18px rgba(183, 75, 75, 0.45);
}

.music-toggle i {
    font-size: 1.5rem;
    color: #b74b4b;
}

.music-toggle span {
    max-width: 18rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* biarkan klik tembus ke background 3D, kecuali di elemen yang memang interaktif */
section{
    pointer-events: none;
}

header,
nav a,
.logo,
.btn,
.social-icons a,
.service-box,
.skill,
.timeline-item,
.contact-box,
.piece,
#music-toggle{
    pointer-events: auto;
}

section,
header{
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* kecuali email di Contact, biar tetap bisa di-blok & disalin manual */
.contact-box p{
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
}

.scene-toggle{
    position: fixed;
    top: 1.8rem;
    left: 1.8rem;
    z-index: 999;
    width: 3.6rem;
    height: 3.6rem;
    display: grid;
    place-items: center;
    background-color: rgba(5, 5, 7, 0.55);
    backdrop-filter: blur(6px);
    border: 0.15rem solid rgba(183, 75, 75, 0.5);
    border-radius: 50%;
    color: #e8e6e1;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.scene-toggle:hover{
    color: #b74b4b;
    border-color: #b74b4b;
}

header,
section,
.music-toggle{
    transition: opacity 0.5s ease;
}

/* mode "hanya background": sembunyikan semua isi halaman */
#ui-layer{
    transition: opacity 0.5s ease;
}

body.scene-only #ui-layer{
    opacity: 0;
}

body.scene-only #ui-layer *{
    pointer-events: none !important;
}