:root { 
--glow-color: hsl(190, 100%, 50%);
}

html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #02040a;
    background-image: radial-gradient(circle at top, #0d1a2e 0%, #02040a 40%);
    color: #e2e8f0;
    overflow-x: hidden;
}
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Efek kartu kaca (Glassmorphism) */
.glass-card {
    background: rgba(10, 25, 47, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* PERBAIKAN: Efek hover yang lebih menarik pada kartu */
.glass-card:hover {
    background: rgba(10, 25, 47, 0.7);
    border-color: rgba(0, 191, 255, 0.5);
    box-shadow: 0 0 35px rgba(0, 191, 255, 0.25);
    transform: translateY(-5px);
}

.text-glow {
     text-shadow: 0 0 8px var(--glow-color), 0 0 20px rgba(0, 191, 255, 0.5);

}
.btn-gradient{
    background-image: linear-gradient(to right, #00c6ff, #0072ff);
    background-size: 200% auto;
    transition: all 0.5s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-gradient:hover {
    background-position: right center;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* Tombol transparan (ghost button) */
.btn-ghost {
    background: transparent;
    border: 2px solid #00bfff;
    color: #00bfff;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-ghost:hover {
    background: #00bfff;
    color: #02040a;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* Logo utama dengan efek pulse */
.main-logo {
    width: 7rem; height: 7rem;
    border-radius: 9999px;
    padding: 0.5rem;
    box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.4);
    animation: pulse-glow 2.5s infinite alternate;
    /* PENAMBAHAN: Transisi untuk animasi scroll */
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@media (min-width: 640px) {
    .main-logo { width: 10rem; height: 10rem; }
}

/* Navigasi atas yang muncul saat scroll */
.top-nav {
    position: fixed;
    top: 1rem; left: 50%;
    z-index: 50;
    width: calc(100% - 2rem);
    max-width: 600px;
    transform: translateX(-50%) translateY(-150%);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.top-nav.visible {
    transform: translateX(-50%) translateY(0);
}
.top-nav a {
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    position: relative;
}
/* PERBAIKAN: Indikator link aktif dan hover yang lebih jelas */
.top-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 4px;
    left: 50%;
    background-color: var(--glow-color);
    transition: all 0.3s ease-out;
    box-shadow: 0 0 5px var(--glow-color);
}
.top-nav a:hover:after, .top-nav a.active:after {
    width: 50%;
    left: 25%;
}
.top-nav a.active {
     color: #ffffff;
}
.top-nav a:hover {
    color: #00bfff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- PENAMBAHAN: Gaya untuk transisi logo --- */
#nav-logo {
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
    opacity: 0;
    transform: scale(0);
}
.top-nav.visible #nav-logo {
    opacity: 1;
    transform: scale(1);
}
.top-nav.visible ~ .relative .main-logo {
    opacity: 0;
    transform: scale(0.3) translateY(-100px);
    pointer-events: none;
}
/* --- Akhir penambahan --- */

/* Animasi saat elemen muncul di layar */
.initial-load-reveal {
    opacity: 0;
    transform: translateY(25px);
    animation: initial-reveal-animation 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes initial-reveal-animation {
    to { opacity: 1; transform: translateY(0); }
}

header .initial-load-reveal:nth-child(2) { animation-delay: 0.1s; }
header .initial-load-reveal:nth-child(3) { animation-delay: 0.2s; }
header .initial-load-reveal:nth-child(4) { animation-delay: 0.3s; }
@keyframes pulse-glow {
    from { box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.4), 0 0 15px rgba(0, 191, 255, 0.4); }
    to { box-shadow: 0 0 0 6px rgba(0, 191, 255, 0.8), 0 0 30px rgba(0, 191, 255, 0.8); }
}
/* Preloader (layar pemuatan) */
#preloader {
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}
#preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}
.glow-text {
    text-shadow: 0 0 5px #00fff7, 0 0 10px #00fff7, 0 0 20px #00fff7;
}
@keyframes text-flicker-subtle {
    0% { opacity: 1; } 50% { opacity: 0.9; } 100% { opacity: 1; }
}
#preloader-status {
    animation: text-flicker-subtle 1.5s infinite linear;
}

/* Animasi scroll-reveal untuk setiap seksi */
.reveal {
    opacity: 0;
    transform-origin: center top;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
/* PERBAIKAN: Penambahan hover pada tag keahlian */
.skill-tag {
    transition: all 0.3s ease;
}
.skill-tag:hover {
    transform: scale(1.1);
    background-color: #0891b2; /* cyan-600 */
    color: white;
    box-shadow: 0 0 10px #0891b2;
}

/* GAYA BARU UNTUK PORTOFOLIO INTERAKTIF */
.project-button.active {
    background-color: #0891b2;
    color: #ffffff;
}
.project-button.active .text-slate-400 {
    color: #e2e8f0;
}
#project-details, #contact-details {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.detail-item, .contact-detail-item {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
#project-details.is-updating .detail-item, #contact-details.is-updating .contact-detail-item {
    opacity: 0;
    animation: none;
}
.detail-item:nth-child(2), .contact-detail-item:nth-child(2) { animation-delay: 0.1s; }
.detail-item:nth-child(3), .contact-detail-item:nth-child(3) { animation-delay: 0.2s; }
.detail-item:nth-child(4), .contact-detail-item:nth-child(4) { animation-delay: 0.3s; }
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* GAYA BARU: Ikon pada tag teknologi */
.project-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgb(51 65 85 / 1); /* slate-700 */
    color: rgb(203 213 225 / 1); /* slate-300 */
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}
.project-tag-item svg {
    width: 1rem;
    height: 1rem;
}

.btnmedsos {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 60px;
}
.cta-tt {
    display: flex;
    align-items: center;
    gap: 0px;
    height: 50pxpx;
    width: 50px;           /* hanya selebar ikon */
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0px 15px #474747c0;
    border: 2px solid #6d6d6dc0;      /* teks terpotong */
    transition: width 0.6s, background-color 0.3s, color 1s;
}

.cta-tt:hover {
    width: 120px;          /* lebar penuh saat hover */
    background-color: #000000;
    color: #ffffff;
    box-shadow: -2px 2px 18px #ffffffbb,
            inset 0 0px 10px #ffffff94;
    border: 2px solid #ffffffcc;
}

.cta-tt .icont {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-left: -1px
}

.cta-tt .tekst {
    white-space: nowrap;  /* teks tidak wrap */
}

.cta-ig {
    display: flex;
    align-items: center;
    gap: 0px;
    height: 50pxpx;
    width: 50px;           /* hanya selebar ikon */
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0px 15px #474747c0;
    border: 2px solid #6d6d6dc0;      /* teks terpotong */
    transition: width 0.6s, background-color 0.3s, color 1s;
}

.cta-ig:hover {
    width: 145px;          /* lebar penuh saat hover */
    background-image: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #ffffff;
    box-shadow:-2px 2px 18px #ffffff, inset 0 0px 10px #0200019c;
    border: 2px solid #ffffffcc;
}

.cta-ig .iconig {
    width: 50px;
    height: 50px;
    flex-shrink: 0;  
    margin-left: -2px;
}

.cta-ig .teksig {
    white-space: nowrap;
}

.cta-yt {
    display: flex;
    align-items: center;
    gap: 0px;
    height: 50pxpx;
    width: 50px;           /* hanya selebar ikon */
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0px 15px #474747c0;
    border: 2px solid #6d6d6dc0;      /* teks terpotong */
    transition: width 0.6s, background-color 0.3s, color 1s;
}

.cta-yt:hover {
    width: 135px;          /* lebar penuh saat hover */
    background:rgb(0, 0, 0);
    color: #ff0000;
    box-shadow:-2px 2px 18px #ffffff, inset 0 0px 10px #ffffff9c;
    border: 2px solid #ffffffcc;
}

.cta-yt .icony {
    width: 50px;
    height: 50px;
    flex-shrink: 0;  
    margin-left: -1px;
}

.cta-yt .teksy {
    white-space: nowrap;
    color: #ffffff;
}
.cta-yt .teksyt {
    white-space: nowrap;
    color: #ff0000;
}

.cta-tt .tekst,
.cta-ig .teksig,
.cta-yt .teksy,
.cta-yt .teksyt {
    opacity: 0;
    transition: opacity 0.3s;
}

.cta-tt:hover .tekst,
.cta-ig:hover .teksig,
.cta-yt:hover .teksy,
.cta-yt:hover .teksyt {
    opacity: 1;
}

.tekster {
    margin-top: -40px;
    justify-content: center;
    text-align: center;
}

@media (max-width: 400px) {
  #nav-logo {
    display: none !important;
  }
}

