/* =========================================================
   4lif. Portfolio — style.css (SPIDER-MAN & VENOM THEME)
   Tema Terang: Spider-Man (Merah Crimson & Biru Navy)
   Tema Gelap : Venom (Hitam Pekat & Ungu/Simbiot Dark)
   ========================================================= */

/* --- TEMA TERANG DEFAULT (SPIDER-MAN) --- */
:root {
    --bg: #080d1a;           /* Dark Spider Navy Blue */
    --bg-soft: #0f172a;      /* Lighter Navy Section */
    --card: #162238;         /* Card Background Navy */
    --border: #1f3152;       /* Border Accent Blue */
    --text: #ffffff;
    --text-muted: #94a3b8;
    
    /* Warna Aksen Spider-Man */
    --accent: #ff2a2a;       /* Spider-Man Red */
    --accent-blue: #0066ff;  /* Spider-Man Electric Blue */
    --accent-soft: rgba(255, 42, 42, 0.15);
    --blue-soft: rgba(0, 102, 255, 0.15);
    
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: "Space Grotesk", sans-serif;
    --font-body: "Poppins", sans-serif;
}

/* --- TEMA GELAP (VENOM MODE) --- */
body.dark-venom {
    --bg: #050508;           /* Hitam Pekat Venom */
    --bg-soft: #0a0b10;      /* Section Gelap */
    --card: #10121d;         /* Card Background Dark Venom */
    --border: #1a1c2e;       /* Border Accent Dark */
    --text: #e2e8f0;
    --text-muted: #64748b;
    
    /* Warna Aksen Venom */
    --accent: #8b5cf6;       /* Ungu Simbiot Venom */
    --accent-blue: #a855f7;  /* Ungu Neon */
    --accent-soft: rgba(139, 92, 246, 0.18);
    --blue-soft: rgba(168, 85, 247, 0.18);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    background-image: 
        radial-gradient(circle at 15% 20%, var(--accent-soft) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, var(--blue-soft) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(139, 0, 255, 0.08) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Siluet Gedung Kota */
body::before {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: 
        repeating-linear-gradient(
            90deg,
            #0b1222 0px, #0b1222 40px,
            transparent 40px, transparent 50px,
            #070d18 50px, #070d18 110px
        );
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
    mask-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0));
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Canvas Background ---------- */
#spiderCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

main, .navbar, .footer { position: relative; z-index: 1; }

#themeTransitionCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* ---------- Reusable Elements ---------- */
.section-tag {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 10px;
    transition: color 0.5s ease;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.center { text-align: center; display: block; }
.services .container > .section-title.center,
.projects .container > .section-title.center,
.skills .container > .section-title.center,
.gallery .container > .section-title.center { margin-bottom: 50px; }

.accent { color: var(--accent); transition: color 0.5s ease; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn--filled {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 25px var(--accent-soft);
}
.btn--filled:hover { 
    filter: brightness(1.2); 
    transform: translateY(-3px); 
    box-shadow: 0 0 35px var(--accent);
}

.btn--outline {
    background: transparent;
    border-color: var(--accent-blue);
    color: var(--text);
    box-shadow: 0 0 15px var(--blue-soft);
}
.btn--outline:hover {
    background: var(--accent-blue);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 0 25px var(--accent-blue);
}

.btn.full { width: 100%; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.tag {
    font-size: 0.75rem;
    padding: 5px 12px;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 50px;
    background: var(--accent-soft);
    transition: all 0.5s ease;
}

/* ================= NAVBAR & THEME BUTTON ================= */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(8, 13, 26, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: background 0.5s ease, border-color 0.5s ease;
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.navbar__logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
}
.navbar__logo .dot { color: var(--accent); transition: color 0.5s ease; }

.navbar__menu ul { display: flex; gap: 34px; align-items: center; }

.nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0; bottom: -8px;
    width: 100%; height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-soft);
}

#themeIcon {
    font-size: 1.1rem;
    transition: transform 0.4s ease;
}

.theme-btn:hover #themeIcon {
    transform: scale(1.2) rotate(15deg);
}

.navbar__contact { padding: 10px 24px; font-size: 0.8rem; }

.navbar__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}
.navbar__burger span {
    width: 26px; height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* ================= HERO ================= */
.hero {
    padding: 160px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero__hi { color: var(--accent); font-weight: 600; margin-bottom: 12px; transition: color 0.5s ease; }

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 18px;
}

.hero__desc {
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 34px;
}

.hero__stats {
    display: flex;
    gap: 20px;
    margin-bottom: 34px;
}

.stat-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    flex: 1;
    text-align: center;
    transition: var(--transition), background-color 0.5s ease;
}
.stat-box:hover { 
    border-color: var(--accent-blue); 
    transform: translateY(-4px); 
    box-shadow: 0 0 20px var(--blue-soft);
}
.stat-box h3 { font-family: var(--font-heading); color: var(--accent); font-size: 1.5rem; transition: color 0.5s ease; }
.stat-box p { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.hero__actions { display: flex; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }

/* --- HERO IMAGE (2 FOTO KANAN & KIRI) --- */
.hero__image { 
    display: flex; 
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.hero__frame {
    position: relative;
    width: 100%;
    max-width: 210px;
    height: 270px;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 0 20px var(--accent-soft), 0 0 35px var(--blue-soft);
    transition: transform 0.3s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.hero__frame:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: var(--accent-blue);
    box-shadow: 0 0 25px var(--accent-blue);
}

.hero__frame img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.badge {
    position: absolute;
    background: var(--bg);
    border: 1px solid var(--accent-blue);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background-color 0.5s ease;
}
.badge--top { top: 20px; left: -20px; }
.badge--bottom { bottom: 20px; right: -20px; }

/* ================= IKON MEDIA SOSIAL ================= */
.hero__socials, .socials {
    display: flex;
    gap: 14px;
    align-items: center;
}

.hero__socials a, .socials a, .social-btn {
    position: relative;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 1;
}

.hero__socials a:hover, .socials a:hover, .social-btn:hover {
    border-color: var(--accent);
    color: #ffffff;
    background: var(--accent);
    transform: translateY(-5px) scale(1.15);
    box-shadow: 0 0 25px var(--accent);
}

/* ================= ABOUT ================= */
.about { padding: 100px 0; background: var(--bg-soft); transition: background-color 0.5s ease; }

.about__inner {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 60px;
    align-items: center;
}

.about__photo {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.about__photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }

.about__badge {
    position: absolute;
    bottom: 16px; left: 16px;
    background: var(--bg);
    border: 1px solid var(--accent);
    padding: 10px 16px;
    border-radius: 50px;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.5s ease;
}
.about__badge i { color: var(--accent); transition: color 0.5s ease; }

.about__desc { color: var(--text-muted); margin-bottom: 26px; }

.about__info { display: flex; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }

.info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: var(--radius);
    flex: 1;
    min-width: 200px;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}
.info-card i { color: var(--accent); font-size: 1.2rem; transition: color 0.5s ease; }
.info-label { font-size: 0.75rem; color: var(--text-muted); }
.info-value { font-weight: 600; }

/* ================= SERVICES ================= */
.services { padding: 100px 0; }

.services__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition), background-color 0.5s ease;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-6px); box-shadow: 0 0 25px var(--accent-soft); }

.service-card__icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 14px;
    font-size: 1.4rem;
    margin-bottom: 18px;
    transition: all 0.5s ease;
}

.service-card h3 { font-family: var(--font-heading); margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ================= GALLERY & PROJECTS ================= */
.gallery {
    padding: 100px 0;
    background: var(--bg-soft);
    transition: background-color 0.5s ease;
}

/* Filter Buttons */
.gallery__filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-soft);
    transform: translateY(-2px);
}

/* Gallery Grid & Cards */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.gallery-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition), background-color 0.5s ease;
    display: flex;
    flex-direction: column;
}

.gallery-card.hide {
    display: none;
}

.gallery-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 0 25px var(--accent-soft);
}

.gallery-card__thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.gallery-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-card__thumb img {
    transform: scale(1.08);
}

.gallery-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 13, 26, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card__overlay {
    opacity: 1;
}

.gallery-card__action {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.gallery-card__action:hover {
    transform: scale(1.15);
    background: var(--accent-blue);
}

.gallery-card__body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gallery-card__category {
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.gallery-card__body h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.gallery-card__body p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

/* ================= SKILLS ================= */
.skills { padding: 100px 0; }

.skills__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.skill-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 10px;
    text-align: center;
    transition: var(--transition), background-color 0.5s ease;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-6px); box-shadow: 0 0 20px var(--accent-soft); }
.skill-card i { font-size: 2rem; color: var(--accent); margin-bottom: 12px; transition: color 0.5s ease; }
.skill-card p { font-size: 0.8rem; font-weight: 600; }

/* ================= CONTACT ================= */
.contact { padding: 100px 0; background: var(--bg-soft); transition: background-color 0.5s ease; }

.contact__inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
}

.contact__desc { color: var(--text-muted); margin-bottom: 30px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.contact-item i {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 50%;
    font-size: 1.1rem;
    transition: all 0.5s ease;
}

.contact__form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}
.contact__form h3 { font-family: var(--font-heading); margin-bottom: 20px; }

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-family: var(--font-body);
    transition: var(--transition), background-color 0.5s ease;
    resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ================= FOOTER ================= */
.footer { padding: 40px 0; border-top: 1px solid var(--border); background: var(--bg); transition: background-color 0.5s ease; }
.footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}
.footer__text { color: var(--text-muted); font-size: 0.85rem; }

.scroll-top {
    position: fixed;
    right: 24px; bottom: 24px;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition), background-color 0.5s ease;
    z-index: 40;
}
.scroll-top.show { opacity: 1; pointer-events: auto; }

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .hero__inner, .about__inner, .contact__inner { grid-template-columns: 1fr; }
    .about__photo { max-width: 340px; margin: 0 auto; }
    .services__grid { grid-template-columns: 1fr; }
    .skills__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .navbar__menu {
        position: fixed;
        top: 76px; left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
    }
    .navbar__menu.open { max-height: 320px; }
    .navbar__menu ul { flex-direction: column; padding: 20px 24px; gap: 18px; align-items: flex-start; }
    .navbar__contact { display: none; }
    .navbar__burger { display: flex; }

    .hero__stats { flex-direction: column; }
    .gallery__grid { grid-template-columns: 1fr; }
    .skills__grid { grid-template-columns: repeat(2, 1fr); }
    
    .hero__image { gap: 10px; }
    .hero__frame { 
        max-width: 150px; 
        height: 200px; 
        margin: 0; 
    }
    
    .badge--top { left: 10px; top: 10px; }
    .badge--bottom { right: 10px; bottom: 10px; }
}