/* =========================================
   STYLE.CSS — DARK & PREMIUM
   Portfolio Naufal S Faisal Majid
========================================= */

:root {
    --bg-base: #030305;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --primary: #a78bfa;
    --secondary: #38bdf8;
    --accent: #f472b6;
    --text-p: #f8fafc;
    --text-s: #94a3b8;
    --text-m: #475569;
    --border: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(167, 139, 250, 0.2);
    --gradient: linear-gradient(135deg, #a78bfa, #38bdf8);
    --gradient-alt: linear-gradient(135deg, #f472b6, #a78bfa);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-h: 70px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg-base);
    color: var(--text-p);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

canvas#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(167, 139, 250, 0.1);
    transform: translateY(-5px);
}

/* --- Container --- */
.containerWide {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.section { padding: 120px 0; position: relative; z-index: 2; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}
.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(167, 139, 250, 0.5);
    transform: translateY(-2px);
}
.btn-ghost {
    background: transparent;
    color: var(--text-p);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}
.btn-full { width: 100%; justify-content: center; }

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 1000;
    transition: all 0.3s ease;
}
.navbar.scrolled {
    background: rgba(3, 3, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -1px;
}
.logo-bracket { color: var(--primary); }
.logo-name { margin: 0 2px; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}
.nav-link {
    text-decoration: none;
    color: var(--text-s);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}
.nav-link.active, .nav-link:hover { color: var(--text-p); }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0; width: 0; height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

.nav-toggle { display: none; }

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 10px) 40px 100px;
    max-width: 1280px;
    margin: 0 auto;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-content { flex: 1.2; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 30px;
    color: #34d399;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; animation: pulse 2s infinite; }

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 25px;
}
.hero-surname {
    background: var(--gradient-alt);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle { font-size: 1.1rem; font-weight: 600; color: var(--primary); margin-bottom: 15px; }
.hero-desc { font-size: 1.1rem; color: var(--text-s); max-width: 550px; margin-bottom: 40px; }
.hero-cta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 50px; }

.hero-stats { display: flex; align-items: center; gap: 30px; }
.stat-number { display: block; font-size: 1.8rem; font-weight: 800; color: var(--text-p); border-bottom: 3px solid var(--primary); width: fit-content; }
.stat-label { font-size: 0.75rem; color: var(--text-m); text-transform: uppercase; letter-spacing: 1px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero-visual { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.hero-avatar-ring { width: 320px; height: 320px; border-radius: 50%; border: 1px solid var(--border); position: relative; }
.hero-avatar-glow { position: absolute; inset: -40px; background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 70%); }
.hero-avatar { position: absolute; inset: 20px; border-radius: 50%; background: rgba(255, 255, 255, 0.02); display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-glow); overflow: hidden; }

.floating-badge {
    position: absolute;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(3, 3, 5, 0.6);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: 700;
    animation: floating 3s ease-in-out infinite;
    animation-delay: var(--delay);
}
.b-html { top: 10%; left: 0; color: #f87171; border-color: rgba(248, 113, 113, 0.3); }
.b-js { top: 20%; right: -20px; color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); }
.b-laravel { bottom: 15%; left: -20px; color: #f87171; border-color: rgba(248, 113, 113, 0.3); }
.b-node { bottom: 5%; right: 0; color: #34d399; border-color: rgba(52, 211, 153, 0.3); }

/* --- Section Headers --- */
.section-header { text-align: center; margin-bottom: 80px; }
.section-tag { display: inline-block; padding: 6px 18px; border-radius: 30px; background: rgba(167, 139, 250, 0.1); border: 1px solid var(--border-glow); color: var(--primary); font-size: 0.75rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; }
.section-title { font-size: clamp(2.5rem, 4vw, 3.5rem); font-family: var(--font-heading); font-weight: 800; }
.section-subtitle { font-size: 1.1rem; color: var(--text-s); margin-top: 15px; }

/* --- About Grid --- */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.about-card { padding: 40px; text-align: center; }
.about-icon-wrap { width: 64px; height: 64px; border-radius: 18px; background: var(--gradient); color: white; display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; box-shadow: 0 10px 20px rgba(167, 139, 250, 0.3); }
.about-card h3 { margin-bottom: 15px; font-size: 1.3rem; font-family: var(--font-heading); }
.about-card p { font-size: 0.95rem; color: var(--text-s); }
.about-text { margin-top: 40px; padding: 40px; text-align: center; max-width: 900px; margin-inline: auto; font-size: 1.1rem; color: var(--text-s); }

/* --- Skills Grid --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.skill-card { padding: 30px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 15px; font-weight: 700; font-size: 0.95rem; }
.skill-bar { height: 8px; background: rgba(255, 255, 255, 0.05); border-radius: 10px; overflow: hidden; }
.skill-fill { height: 100%; background: var(--gradient); width: 0; transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1); }

/* --- Projects --- */
.projects-container { display: flex; flex-direction: column; gap: 40px; }
.project-card { padding: 40px; overflow: hidden; position: relative; }
.project-featured { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: center; }

.project-meta { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.live-badge { padding: 6px 14px; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 30px; color: #ef4444; font-size: 0.7rem; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.pulsating-dot { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; animation: flash 1s infinite; }
.project-category { font-size: 0.75rem; color: var(--text-m); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }

.project-header { display: flex; justify-content: space-between; align-items: flex-start; grid-column: 1 / -1; }
.external-link { color: var(--text-s); transition: color 0.3s; }
.external-link:hover { color: var(--primary); }

.project-title { font-size: 1.8rem; font-family: var(--font-heading); font-weight: 700; margin-bottom: 20px; }
.project-desc { color: var(--text-s); font-size: 1rem; margin-bottom: 30px; line-height: 1.8; }
.project-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.tag { padding: 6px 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); border-radius: 30px; font-size: 0.75rem; font-weight: 600; color: var(--text-s); }

/* Browser Preview */
.browser-frame { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #0a0a0f; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.browser-header { height: 40px; background: #111118; display: flex; align-items: center; padding: 0 15px; gap: 15px; border-bottom: 1px solid var(--border); }
.browser-dots { display: flex; gap: 8px; }
.b-dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
.browser-address { flex: 1; background: rgba(255, 255, 255, 0.03); height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: var(--text-m); gap: 8px; }

.browser-content { position: relative; height: 450px; overflow: hidden; }
#project-iframe { width: 100%; height: 100%; border: none; transform: scale(1); transform-origin: top left; }

.iframe-loader { position: absolute; inset: 0; background: #0a0a0f; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; z-index: 5; transition: opacity 0.5s; }
.iframe-loader.hidden { opacity: 0; pointer-events: none; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }

.projects-grid-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.project-icon-top { color: var(--primary); margin-bottom: 25px; }

/* --- Contact --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }
.contact-card { padding: 50px; }
.contact-card h3 { font-family: var(--font-heading); margin-bottom: 30px; font-size: 1.5rem; }
.contact-list { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; align-items: center; gap: 15px; text-decoration: none; color: var(--text-s); transition: 0.3s; }
.contact-item:hover { color: var(--primary); transform: translateX(5px); }
.c-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(167, 139, 250, 0.1); display: flex; align-items: center; justify-content: center; color: var(--primary); }

.contact-form { padding: 50px; display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-group label { font-size: 0.85rem; font-weight: 700; color: var(--text-s); text-transform: uppercase; }
.form-group input, .form-group textarea { padding: 16px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: 12px; color: white; font-family: inherit; font-size: 0.95rem; outline: none; transition: 0.3s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); background: rgba(255, 255, 255, 0.05); }

/* --- Footer --- */
.footer { padding: 80px 0 40px; border-top: 1px solid var(--border); position: relative; z-index: 2; }
.footer-container { max-width: 1280px; margin: 0 auto; text-align: center; padding: 0 40px; }
.footer-logo { font-size: 1.8rem; font-weight: 800; font-family: var(--font-heading); margin-bottom: 20px; }
.footer-logo span { color: var(--primary); }
.footer p { color: var(--text-m); font-size: 0.9rem; margin-bottom: 30px; }
.footer-bottom-line { height: 1px; width: 100%; background: linear-gradient(to right, transparent, var(--border), transparent); }

/* --- Animations --- */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@keyframes flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes floating { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero { flex-direction: column; text-align: center; padding-top: 150px; }
    .hero-desc { margin-inline: auto; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { width: 100%; }
    .project-featured { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .containerWide { padding: 0 24px; }
    .about-grid { grid-template-columns: 1fr; }
    .projects-grid-alt { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}
