/* ========================================
CORE VARIABLES & RESET
========================================
*/
:root {
    --bg-dark: #030304;
    --bg-card: rgba(12, 12, 14, 0.7);
    --bg-card-hover: rgba(18, 18, 21, 0.9);
    
    --primary: #6366f1;
    --primary-dim: rgba(99, 102, 241, 0.05);
    --primary-glow: rgba(99, 102, 241, 0.4);
    
    --text-main: #ffffff;
    --text-muted: #94949e;
    
    --border-light: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(99, 102, 241, 0.3);
    
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { 
    scroll-behavior: smooth; 
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
FX: ATMOSPHERE & ANIMATIONS
========================================
*/
.noise-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999; opacity: 0.035;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.glow-orb {
    position: fixed; width: 60vh; height: 60vh;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0,0,0,0) 70%);
    filter: blur(100px); pointer-events: none; z-index: -1;
    opacity: 0.4;
    transition: all 2s ease;
}
.orb-1 { top: -15%; right: -15%; animation: breathe 8s infinite alternate ease-in-out; }
.orb-2 { bottom: -15%; left: -15%; background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, rgba(0,0,0,0) 70%); animation: breathe 12s infinite alternate-reverse ease-in-out; }

@keyframes breathe {
    0% { transform: scale(1) translate(0, 0); opacity: 0.4; }
    100% { transform: scale(1.2) translate(-20px, 20px); opacity: 0.2; }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
TYPOGRAPHY & UTILS
========================================
*/
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-main); font-weight: 700; letter-spacing: -0.03em; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }

.text-gradient {
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.highlight { color: var(--primary); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 32px; border-radius: 12px;
    font-size: 0.95rem; font-weight: 600; text-decoration: none;
    transition: all 0.3s var(--ease-smooth); position: relative; overflow: hidden;
    z-index: 1; border: none; cursor: pointer; font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary); color: #fff;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5), 0 10px 30px -10px rgba(99, 102, 241, 0.5);
}
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg); transition: 0.5s; z-index: -1;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--primary), 0 15px 40px -10px rgba(99, 102, 241, 0.7); }
.btn-primary:hover::after { left: 200%; transition: 0.7s; }

.btn-outline {
    background: rgba(255,255,255,0.02); border: 1px solid var(--border-light); color: #fff;
    backdrop-filter: blur(10px);
}
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; transform: translateY(-3px); }

/* ========================================
NAVBAR
========================================
*/
.navbar {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 1200px; z-index: 1000;
    padding: 12px 24px; transition: all 0.4s var(--ease-smooth);
    background: rgba(3, 3, 4, 0.6); backdrop-filter: blur(20px);
    border: 1px solid var(--border-light); border-radius: 100px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; text-decoration: none; color: #fff; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a { 
    color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500; 
    transition: color 0.3s; position: relative;
}
.nav-links a:hover { color: #fff; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px;
    background: var(--primary); transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

/* ========================================
HERO SECTION
========================================
*/
.hero {
    min-height: 100vh; display: flex; align-items: center; padding-top: 100px;
    position: relative; overflow: hidden;
}
.hero-text h1 {
    font-size: clamp(2.8rem, 7vw, 6rem); line-height: 1.05; margin-bottom: 24px;
    background: linear-gradient(to bottom, #fff 40%, rgba(255,255,255,0.6));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-text p {
    font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 580px; margin-bottom: 40px; line-height: 1.7;
}

.status-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; background: rgba(99, 102, 241, 0.08); 
    border: 1px solid rgba(99, 102, 241, 0.2); border-radius: 100px;
    font-size: 0.75rem; color: var(--primary); margin-bottom: 32px;
    font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
    position: relative; overflow: hidden;
}
.status-badge::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
    animation: shimmer 3s infinite;
}
@keyframes shimmer { 0% { left: -100%; } 20% { left: 100%; } 100% { left: 100%; } }

.status-dot { 
    width: 6px; height: 6px; background: var(--primary); border-radius: 50%; 
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); 
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6); } 70% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); } 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); } }

/* ========================================
SPOTLIGHT CARDS
========================================
*/
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s var(--ease-smooth);
    display: flex; flex-direction: column;
    backdrop-filter: blur(12px);
}

.card::after {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(99, 102, 241, 0.08), transparent 40%);
    opacity: 0; transition: opacity 0.5s; pointer-events: none; z-index: 2;
}
.card:hover::after { opacity: 1; }
.card:hover { 
    border-color: var(--border-hover); 
    transform: translateY(-5px) scale(1.01); 
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.8);
}

/* ========================================
BENTO GRID PROJECTS
========================================
*/
.projects-section { padding: 120px 0; }
.section-header { margin-bottom: 70px; }
.section-header h4 { font-size: 0.8rem; letter-spacing: 0.1em; color: var(--primary); margin-bottom: 12px; text-transform: uppercase; }
.section-header h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 16px; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 380px 380px;
    gap: 24px;
}

.bento-item.span-2 { grid-column: span 2; }
.bento-item.span-1 { grid-column: span 1; }

.project-img-wrapper {
    width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 0;
    overflow: hidden;
}
.project-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s var(--ease-smooth);
    opacity: 0.5; filter: grayscale(40%);
}
.card:hover .project-img { transform: scale(1.1); opacity: 0.3; filter: grayscale(0%); }

.overlay-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, #030304 15%, transparent 100%);
    z-index: 1;
}

.project-content {
    position: relative; z-index: 3;
    height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 32px; pointer-events: none;
    transform: translateY(10px); transition: transform 0.4s var(--ease-smooth);
}
.card:hover .project-content { transform: translateY(0); }

.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
    padding: 5px 10px; background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: #ccc;
    backdrop-filter: blur(4px);
}

/* ========================================
SKILLS GRID
========================================
*/
.skills-section { padding: 60px 0; }
.skills-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px;
}
.skill-card {
    padding: 30px; align-items: center; justify-content: center; text-align: center; gap: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
}
.skill-card i { font-size: 40px; color: var(--text-muted); transition: 0.4s var(--ease-elastic); }
.skill-card:hover i { color: var(--primary); transform: scale(1.2) rotate(5deg); text-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
.skill-name { font-weight: 500; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--text-muted); }
.skill-card:hover .skill-name { color: #fff; }

/* ========================================
CONTACT (DISESUAIKAN DENGAN HTML)
========================================
*/
.contact-section { padding: 120px 0; padding-bottom: 60px; }
.contact-wrapper {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: start;
}

.contact-info h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; }
.contact-info p { color: var(--text-muted); margin-bottom: 40px; max-width: 400px; line-height: 1.7; }

/* Social Links (Sesuai class di HTML) */
.social-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--primary-dim); border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--primary); font-size: 1.3rem; text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
}
.social-link:hover {
    background: rgba(99, 102, 241, 0.15); color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px -5px rgba(99, 102, 241, 0.4);
}

/* Form Styling (Sesuai class di HTML) */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.input-group { position: relative; }

.input-group input, 
.input-group textarea {
    width: 100%; padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 12px; color: #fff;
    font-family: var(--font-body); font-size: 0.95rem;
    transition: all 0.3s var(--ease-smooth);
    outline: none;
}
.input-group textarea { resize: vertical; min-height: 140px; }
.input-group input::placeholder, 
.input-group textarea::placeholder { color: rgba(148, 148, 158, 0.5); }

.input-group input:focus, 
.input-group textarea:focus {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 0 20px -5px rgba(99, 102, 241, 0.2);
}

/* ========================================
FOOTER (PINDAHKAN INLINE STYLE KE CSS)
========================================
*/
footer {
    padding: 40px 0; 
    border-top: 1px solid var(--border-light);
    text-align: center; 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    background: rgba(0,0,0,0.3);
}

/* ========================================
MOBILE NAV TOGGLE (HAMBURGER)
========================================
*/
.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 30px; height: 24px; position: relative; z-index: 1001;
}
.nav-toggle span {
    display: block; width: 100%; height: 2px; background: #fff;
    border-radius: 2px; transition: all 0.3s var(--ease-smooth);
    position: absolute; left: 0;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }

.nav-toggle.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ========================================
RESPONSIVE DESIGN
========================================
*/
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    .bento-item.span-2 { grid-column: span 2; }
}

@media (max-width: 768px) {
    .navbar { width: 95%; top: 10px; padding: 10px 20px; }
    
    .nav-toggle { display: block; }
    
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 70%; height: 100vh;
        background: rgba(3, 3, 4, 0.95); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; gap: 40px;
        transition: right 0.4s var(--ease-smooth);
        border-left: 1px solid var(--border-light);
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.2rem; }

    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-item.span-2 { grid-column: span 1; }
    .bento-grid { grid-template-rows: auto; }
    .bento-item { height: 350px; }

    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }

    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 2.5rem; }
    .btn { padding: 12px 24px; font-size: 0.85rem; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
SCROLLBAR STYLING
========================================
*/
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.6); }

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}