/* =============================================
   MUHAMMAD ANNAS IBRAHIM — PORTFOLIO
   Theme: Light Beige + Deep Blue (from original CV)
   Features: Inspired by yuviani-cv.netlify.app
   ============================================= */

/* ---------- VARIABLES ---------- */
:root {
    --bg: #f5f0e8;
    --bg-alt: #efe9dd;
    --surface: rgba(255, 255, 255, 0.6);
    --surface-hover: rgba(255, 255, 255, 0.85);
    --border: rgba(13, 110, 253, 0.12);
    --border-hover: rgba(13, 110, 253, 0.35);
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-glow: rgba(13, 110, 253, 0.25);
    --accent: #6f42c1;
    --text: #1a1a2e;
    --text-secondary: #555;
    --text-muted: #888;
    --white: #fff;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow: 0 8px 32px rgba(0,0,0,0.06);
    --shadow-hover: 0 12px 40px rgba(13,110,253,0.15);
    --blur: blur(16px);
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

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

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- PARTICLES ---------- */
#particles-js {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- GLASS CARD ---------- */
.glass-card {
    background: var(--surface);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* ---------- NAVBAR ---------- */
#navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 900px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0 8px;
    transition: var(--transition);
}

#navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    background: rgba(255, 255, 255, 0.85);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 16px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    font-weight: 800;
    font-size: 0.8rem;
}

.nav-menu {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(13, 110, 253, 0.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---------- HERO ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
    z-index: 1;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px; height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typed-role {
    color: var(--primary);
    font-weight: 700;
}

.typed-cursor {
    color: var(--primary);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 540px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(13, 110, 253, 0.35);
}

.btn-outline {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    backdrop-filter: var(--blur);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

/* ---------- HERO STATS ---------- */
.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-plus {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* ---------- PROFILE CARD ---------- */
.hero-right {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.profile-card {
    position: relative;
    width: 360px;
    height: 430px;
}

.profile-glow {
    position: absolute;
    top: 50%;  left: 50%;
    transform: translate(-50%, -50%);
    width: 320px; height: 320px;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    filter: blur(60px);
    opacity: 0.6;
    z-index: 0;
}

.profile-frame {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 30px;
    overflow: hidden;
    z-index: 2;
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
}

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

/* Floating Icons Orbit */
.glass-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 14px;
    font-size: 1.3rem;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.orbit-icon {
    position: absolute;
    z-index: 3;
    animation: float-orbit 5s ease-in-out infinite;
}

.orbit-1 { top: -10px; left: 20px; animation-delay: 0s; }
.orbit-2 { top: 15%;  right: -20px; animation-delay: 0.8s; }
.orbit-3 { bottom: 20%; right: -25px; animation-delay: 1.6s; }
.orbit-4 { bottom: -5px; left: 30px; animation-delay: 2.4s; }
.orbit-5 { top: 45%; left: -25px; animation-delay: 3.2s; }

@keyframes float-orbit {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---------- SECTIONS ---------- */
.section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 12px auto 0;
}

/* ---------- ABOUT ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.about-text strong {
    color: var(--text);
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.highlight-card {
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.highlight-icon {
    width: 48px; height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    font-size: 1.2rem;
}

.highlight-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.highlight-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- SKILLS ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-card {
    padding: 28px;
}

.skill-icon {
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(13,110,253,0.1), rgba(111,66,193,0.1));
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.skill-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.skill-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 100px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 100px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.project-card {
    padding: 32px;
}

.project-card-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
    align-items: start;
    position: relative;
    overflow: hidden;
}



.project-card-featured .project-header {
    grid-column: 1 / -1;
}

.project-card-featured h3 {
    grid-column: 1;
    font-size: 1.45rem;
}

.project-card-featured > p {
    grid-column: 1;
    margin-bottom: 0;
}

.project-card-featured .project-tags {
    grid-column: 2;
    align-self: center;
    justify-content: flex-start;
}

.project-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-live {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.project-icon {
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--white);
    font-size: 1.3rem;
}

.project-status {
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-done {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-progress {
    background: rgba(234, 179, 8, 0.1);
    color: #ca8a04;
}

.project-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-card > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(13, 110, 253, 0.06);
    color: var(--primary);
    border: 1px solid rgba(13, 110, 253, 0.1);
}

/* ---------- TIMELINE ---------- */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 14px; top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    opacity: 0.25;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-dot {
    position: absolute;
    left: -33px; top: 28px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
}

.timeline-content {
    padding: 24px;
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-content p,
.timeline-content li {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.timeline-content ul {
    padding-left: 18px;
    list-style: disc;
}

.timeline-content li {
    margin-bottom: 4px;
}

/* ---------- CONTACT ---------- */
.contact-wrapper {
    text-align: center;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    padding: 32px 24px;
    text-align: center;
    display: block;
}

.contact-icon {
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    font-size: 1.3rem;
    margin: 0 auto 16px;
}

.contact-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.contact-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-all;
}

/* ---------- FOOTER ---------- */
footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 32px;
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
}

.footer-content .nav-logo {
    color: var(--white);
    justify-content: center;
    margin-bottom: 8px;
}

.footer-content > p:first-of-type {
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.footer-links a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.footer-links a:hover { color: var(--white); }

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 48px; }
    .hero-right { order: -1; }
    .hero-desc { margin: 0 auto 32px; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .profile-card { width: 280px; height: 340px; }
    .about-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-cards { grid-template-columns: 1fr; max-width: 400px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    .skills-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card-featured {
        grid-column: 1;
        grid-template-columns: 1fr;
    }
    .project-card-featured h3,
    .project-card-featured > p,
    .project-card-featured .project-tags {
        grid-column: 1;
    }
    .project-card-featured .project-tags {
        margin-top: 16px;
    }
    .hero-stats { flex-direction: column; gap: 16px; }
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    
    /* Mobile menu */
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px; left: 12px; right: 12px;
        background: rgba(255,255,255,0.95);
        backdrop-filter: var(--blur);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px;
        box-shadow: var(--shadow);
    }
}
