/* main.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #0f172a; /* slate-900 */
    --text-primary: #f8fafc; /* slate-50 */
    --text-secondary: #94a3b8; /* slate-400 */
    --brand-blue: #3b82f6;
    --brand-purple: #9333ea;
    --brand-pink: #ec4899;
    --surface: #1e293b; /* slate-800 */
    --surface-soft: rgba(30, 41, 59, 0.5);
    --border: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
.section { 
    padding: 50px 0 100px; 
    content-visibility: auto; 
    contain-intrinsic-size: 0 500px; 
}

/* Background blur effects */
.bg-glow-1 { position: absolute; top: 10%; left: 5%; width: 400px; height: 400px; background: rgba(59, 130, 246, 0.2); filter: blur(120px); border-radius: 50%; z-index: -1; pointer-events: none; }
.bg-glow-2 { position: absolute; top: 30%; right: 5%; width: 500px; height: 500px; background: rgba(147, 51, 234, 0.2); filter: blur(140px); border-radius: 50%; z-index: -1; pointer-events: none; }
.bg-glow-3 { position: absolute; bottom: 10%; left: 30%; width: 450px; height: 450px; background: rgba(236, 72, 153, 0.15); filter: blur(120px); border-radius: 50%; z-index: -1; pointer-events: none; }

.container { width: min(1200px, 90%); margin: 0 auto; }

/* Text Gradients */
.text-gradient {
    background: linear-gradient(to right, var(--brand-blue), var(--brand-purple), var(--brand-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Navbar */
.nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-icon { display: flex; align-items: center; justify-content: center; background: linear-gradient(to right, var(--brand-blue), var(--brand-purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800;}
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.3s; position: relative; padding-bottom: 4px; text-transform: capitalize;}
.nav-links a:hover { color: var(--brand-blue); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: linear-gradient(to right, var(--brand-blue), var(--brand-purple)); transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }
.menu-toggle { display: none; background: transparent; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; padding: 5px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 99px; font-weight: 600; font-size: 0.95rem;
    text-decoration: none; transition: all 0.3s ease; cursor: pointer; border: none;
}
.btn-primary {
    background: linear-gradient(to right, var(--brand-blue), var(--brand-purple));
    color: white; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5); transform: translateY(-2px); color: white;}
.btn-outline {
    background: transparent; color: var(--text-primary); border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--brand-blue); color: var(--brand-blue); transform: translateY(-2px); }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; }
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-text { max-width: 600px; display: flex; flex-direction: column; gap: 24px; }
.greeting {font-size: 1.25rem; color: var(--text-secondary); font-weight: 600;}
.hero h1 { font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1.1; font-weight: 800; }
.hero p.lead { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.7; font-weight: 500;}
.hero-cta { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap;}

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; }
.avatar-wrap { position: relative; width: min(320px, 80vw); height: min(320px, 80vw); border-radius: 50%; background: linear-gradient(135deg, var(--brand-blue), var(--brand-pink)); padding: 4px; }
.avatar-inner { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--bg-color); display: flex; align-items: center; justify-content: center;}
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.floating-badge {
    position: absolute; background: rgba(30, 41, 59, 0.8); backdrop-filter: blur(8px);
    border: 1px solid var(--border); padding: 12px 20px; border-radius: 16px;
    display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); font-weight: 600;
}
.badge-1 { top: 10%; left: -15%; animation: float 6s ease-in-out infinite; }
.badge-2 { bottom: 15%; right: -15%; animation: float 8s ease-in-out infinite reverse; }

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

/* Stats Grid */
.stats { padding: 40px 0 80px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-card {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid var(--border); padding: 32px 24px;
    border-radius: 20px; text-align: center; transition: transform 0.3s ease, border-color 0.3s;
}
.stat-card:hover { transform: translateY(-5px); border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.stat-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple)); display: flex; align-items: center; justify-content: center; color: white; }
.stat-num { font-size: 2.2rem; font-weight: 800; margin-bottom: 4px; display: block; font-feature-settings: "tnum"; }
.stat-label { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; }

/* Sections */
.section { padding: 50px 0 100px; }
.section-header { margin-bottom: 50px; max-width: 600px;}
.section-title { font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 800; margin-bottom: 16px; }
.section-desc { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; }

/* About Text */
.about-text { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 24px; }
.about-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.chip { background: var(--surface); border: 1px solid var(--border); padding: 8px 16px; border-radius: 99px; font-weight: 500; font-size: 0.95rem; color: var(--text-primary); display: flex; align-items: center; gap: 8px;}
.chip i { color: var(--brand-blue); }

/* Projects Grid */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.project-card {
    background: linear-gradient(to bottom right, #ffffff05, var(--surface));
    border: 1px solid var(--border); border-radius: 24px; padding: 32px;
    transition: all 0.4s ease; position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.project-glow { position: absolute; inset: 0; background: linear-gradient(to right, rgba(59,130,246,0.05), rgba(168,85,247,0.05)); opacity: 0; transition: opacity 0.5s; z-index: 0; }
.project-card:hover .project-glow { opacity: 1; }
.project-card:hover { transform: translateY(-8px); border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.project-content { position: relative; z-index: 10; display: flex; flex-direction: column; height: 100%;}
.project-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.project-title { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); transition: color 0.3s; }
.project-card:hover .project-title { color: var(--brand-blue); }
.project-year { background: rgba(59, 130, 246, 0.1); color: #60a5fa; padding: 4px 12px; border-radius: 99px; font-size: 0.85rem; font-weight: 600; }
.project-desc { color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; flex-grow: 1; font-size: 0.95rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tag { font-size: 0.8rem; font-weight: 600; padding: 4px 12px; border-radius: 99px; }
.tag-1 { background: rgba(59, 130, 246, 0.1); color: #60a5fa; } /* Blue */
.tag-2 { background: rgba(168, 85, 247, 0.1); color: #c084fc; } /* Purple */
.tag-3 { background: rgba(236, 72, 153, 0.1); color: #f472b6; } /* Pink */
.tag-4 { background: rgba(34, 197, 94, 0.1); color: #4ade80; } /* Green */
.tag-5 { background: rgba(249, 115, 22, 0.1); color: #fb923c; } /* Orange */

.project-specs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.spec { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: rgba(30, 41, 59, 0.6); border-radius: 8px; font-size: 0.85rem; font-weight: 500;}

.project-action { margin-top: auto; border-top: 1px solid var(--border); padding-top: 24px;}
.btn-project { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: white; background: linear-gradient(to right, var(--brand-blue), var(--brand-purple)); padding: 12px 24px; border-radius: 12px; transition: all 0.3s; text-decoration: none;}
.btn-project:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(59,130,246,0.3); }

/* Contact CTA */
.contact-cta { text-align: center; background: linear-gradient(135deg, var(--surface) 0%, rgba(30, 41, 59, 0.5) 100%); border: 1px solid var(--border); border-radius: 32px; padding: 80px 20px; position: relative; overflow: hidden; margin-top: 50px; }
.contact-title { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 800; margin-bottom: 20px; }
.contact-desc { color: var(--text-secondary); font-size: 1.15rem; max-width: 500px; margin: 0 auto 30px; }
.cta-glow { position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(59,130,246,0.1), transparent 70%); pointer-events: none;}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 60px 0 40px; margin-top: 80px; position: relative; background: linear-gradient(to bottom, transparent, rgba(15,23,42,0.8));}
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 60px; }
.footer-brand { max-width: 300px; }
.footer-brand .brand { margin-bottom: 16px; display: inline-flex;}
.footer-brand p { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.95rem; line-height: 1.6;}
.socials { display: flex; gap: 16px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.3s; }
.socials a:hover { background: var(--brand-blue); color: white; border-color: var(--brand-blue); transform: translateY(-3px); }

.footer-links { display: flex; justify-content: flex-end; gap: 80px;}
.footer-col h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: var(--text-primary); position: relative; display: inline-block;}
.footer-col h4::after { content:''; position: absolute; left: 0; bottom: -6px; width: 30px; height: 2px; background: linear-gradient(to right, var(--brand-blue), var(--brand-purple)); border-radius: 2px;}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; transition: color 0.3s; display: flex; align-items: center; gap: 8px;}
.footer-col a:hover { color: var(--text-primary); }
.footer-col a i { font-size: 1rem; color: var(--brand-blue);}

.footer-bottom { margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; color: var(--text-secondary); font-size: 0.9rem;}

/* Mockup Grid */
.mockup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1024px) { .mockup-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .mockup-grid { grid-template-columns: 1fr; } }

.mockup-card {
    border-radius: 24px; overflow: hidden; border: 1px solid var(--border);
    position: relative; background: var(--surface); display: block;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); cursor: pointer;
    aspect-ratio: 16 / 10;
}
.mockup-card img {
    width: 100%; height: 100%; object-fit: cover; object-position: top;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.mockup-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); border-color: rgba(59, 130, 246, 0.4); }
.mockup-card:hover img { transform: scale(1.05); }
.mockup-overlay {
    position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,0.95) 0%, transparent 60%);
    pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.mockup-card:hover .mockup-overlay { opacity: 1; }
.mockup-info {
    position: absolute; bottom: 20px; left: 20px; right: 20px;
    transform: translateY(20px); opacity: 0; transition: all 0.3s;
}
.mockup-card:hover .mockup-info { transform: translateY(0); opacity: 1; }
.mockup-title { font-weight: 700; color: white; font-size: 1.15rem; margin-bottom: 4px; }
.mockup-cat { color: var(--brand-blue); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; }

/* Workflow Section */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.process-item { text-align: center; position: relative; }
.process-step { 
    width: 48px; height: 48px; background: linear-gradient(to right, var(--brand-blue), var(--brand-purple)); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    margin: 0 auto 20px; font-weight: 800; font-size: 1.2rem; color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}
.process-item h3 { margin-bottom: 12px; font-size: 1.25rem; }
.process-item p { color: var(--text-secondary); font-size: 0.95rem; }

/* Browser Mockup Header */
.mockup-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 24px;
    background: rgba(255,255,255,0.05); border-bottom: 1px solid var(--border);
    z-index: 5;
}
.mockup-card::after {
    content: '...'; position: absolute; top: -2px; left: 15px; color: var(--text-secondary);
    font-size: 24px; letter-spacing: 2px; z-index: 6; font-family: sans-serif;
}
.mockup-card img { padding-top: 24px; }

@media (max-width: 768px) {
    .process-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text { margin: 0 auto; align-items: center; }
    .hero-visual { margin-top: 40px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .badge-1 { left: 0; top: 0; transform: scale(0.85); }
    .badge-2 { right: 0; bottom: 0; transform: scale(0.85); }
    .footer-inner { grid-template-columns: 1fr; gap: 40px;}
    .footer-links { justify-content: flex-start; flex-wrap: wrap; gap: 40px;}
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.8rem; }
    .hero p.lead { font-size: 1rem; }
    .stats { margin-top: 20px; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center;}
    .contact-cta { padding: 60px 20px; border-radius: 24px; }
    .project-card { padding: 24px; }
    
    .menu-toggle { display: block; order: 3; }
    .nav-inner .btn-primary { order: 2; margin-left: auto; margin-right: 15px; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; width: 100%; 
        background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px);
        flex-direction: column; gap: 0; padding: 20px; border-bottom: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); width: 100%; }
    .nav-links a:last-child { border-bottom: none; }
    .nav-contact-text { display: none; }
    .nav-inner .btn-primary { padding: 10px; width: 44px; height: 44px; border-radius: 50%; }
    .nav-inner .btn-primary i { margin: 0; }
}

/* Floating Contact Bar for Mobile */
.floating-contact {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 400px; z-index: 100;
    display: none; grid-template-columns: 1fr 1fr; gap: 12px;
    background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(16px);
    padding: 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
@media (max-width: 768px) { .floating-contact { display: grid; } }

.float-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 99px; color: white; text-decoration: none;
    font-weight: 700; font-size: 0.9rem; transition: transform 0.2s;
}
.float-btn.zalo { background: #0068ff; }
.float-btn.phone { background: linear-gradient(to right, #22c55e, #16a34a); }
.float-btn:active { transform: scale(0.95); }

/* Animation optimizations */
* { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; transition: opacity 0.3s; }
img[loading] { opacity: 0; }
img.loaded { opacity: 1; }
