:root {
    --bg-base: #050505;
    --card-bg: rgba(20, 20, 23, 0.45);
    --card-bg-hover: rgba(30, 30, 35, 0.6);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(255, 255, 255, 0.15);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #4b5563;
    
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, .hero-headline {
    font-family: 'Outfit', sans-serif;
}

/* ================= BACKGROUND MESH ================= */
.bg-mesh {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2; overflow: hidden; background: #000;
}
.mesh-blob {
    position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.3;
}
.blob-purple {
    top: -10%; right: -5%; width: 50vw; height: 50vw;
    background: radial-gradient(circle, var(--accent-purple), transparent);
    animation: drift 25s infinite alternate ease-in-out;
}
.blob-blue {
    bottom: -10%; left: -10%; width: 40vw; height: 40vw;
    background: radial-gradient(circle, var(--accent-blue), transparent);
    animation: drift 20s infinite alternate-reverse ease-in-out;
}
.blob-cyan {
    top: 40%; left: 30%; width: 30vw; height: 30vw;
    background: radial-gradient(circle, var(--accent-cyan), transparent);
    opacity: 0.15;
}

.grid-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
}

@keyframes drift {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(50px) scale(1.1); }
}

/* ================= LAYOUT ================= */
.portfolio-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Card Base */
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(40px);
}

.bento-card.glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.bento-card:hover {
    border-color: var(--border-glow);
    background: var(--card-bg-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.7);
}

.bento-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.bento-card.visible:hover {
    transform: translateY(-4px);
}

/* ================= LEFT SIDEBAR ================= */
.profile-sidebar {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.avatar-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.avatar-img {
    width: 100%; height: 100%; object-fit: cover;
}

.status-badge {
    position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.6); padding: 0.4rem 0.8rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 6px;
    backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

.status-dot {
    width: 8px; height: 8px; background: #10b981; border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.name {
    font-size: 2.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 0.5rem;
}

.title-primary {
    color: var(--text-muted); font-size: 1rem; font-weight: 500;
}

.divider {
    height: 1px; background: var(--border-color); width: 100%; margin: 0.5rem 0;
}

.contact-item {
    display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.8rem;
}

.contact-item .icon { font-size: 1.2rem; }

.social-links {
    display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem;
}

.social-btn {
    text-decoration: none; color: var(--text-main); background: rgba(255,255,255,0.05);
    padding: 0.8rem 1rem; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
    text-align: center; border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2);
}

.social-btn.primary-btn {
    background: var(--text-main); color: #000;
}
.social-btn.primary-btn:hover { background: #e5e5e5; }

/* ================= RIGHT BENTO GRID ================= */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.span-2 { grid-column: span 2; }

/* Hero Section */
.badge-wrap { margin-bottom: 1.5rem; }
.glow-badge {
    background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan); padding: 0.4rem 1rem; border-radius: 20px;
    font-size: 0.8rem; font-weight: 600; font-family: 'Outfit', sans-serif;
    letter-spacing: 1px; text-transform: uppercase;
}

.hero-headline {
    font-size: 3rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: linear-gradient(135deg, #fff, var(--accent-cyan));
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.text-gradient-purple {
    background: linear-gradient(135deg, #fff, var(--accent-purple));
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite reverse;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px #10b981; }
    50% { opacity: 0.6; box-shadow: 0 0 20px #10b981, 0 0 40px rgba(16, 185, 129, 0.3); }
}

.hero-body {
    font-size: 1.1rem; color: var(--text-muted); max-width: 800px;
    margin-bottom: 2rem; font-weight: 300;
}
.hero-body b { color: #fff; font-weight: 500; }

.tech-stack { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.tech-pill {
    padding: 0.5rem 1rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; font-size: 0.85rem; color: #ccc; transition: all 0.3s;
}
.tech-pill:hover { color: #fff; background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }

/* Stat Cards */
.stat-card {
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.stat-number { font-size: 4.5rem; font-weight: 900; line-height: 1; margin-bottom: 0.5rem; }
.plus { color: var(--accent-purple); }
.stat-label { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }

/* Sections Common */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; display: block; width: 4px; height: 1.2em; background: var(--accent-cyan); border-radius: 2px; }

/* Services */
.services-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.service-item.boxed {
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem; border-radius: 16px;
}
.service-icon {
    font-size: 2rem; margin-bottom: 1rem; width: 48px; height: 48px; display: flex;
    align-items: center; justify-content: center; border-radius: 12px; background: rgba(255,255,255,0.05);
}
.service-item h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.service-item p { font-size: 0.95rem; color: var(--text-muted); }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 1.5rem; position: relative; padding-left: 1rem; }
.timeline::before {
    content: ''; position: absolute; left: 4px; top: 10px; bottom: 0; width: 2px; background: rgba(255,255,255,0.1);
}
.timeline-item { position: relative; padding-left: 2rem; }
.timeline-dot {
    position: absolute; left: -19px; top: 6px; width: 14px; height: 14px;
    border-radius: 50%; background: var(--accent-purple); border: 3px solid var(--bg-base);
}
.timeline-date { font-size: 0.8rem; font-weight: 700; color: var(--accent-cyan); text-transform: uppercase; margin-bottom: 0.3rem; letter-spacing: 1px; }
.timeline-content h4 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.timeline-role { font-size: 0.95rem; color: #fff; margin-bottom: 0.5rem; font-weight: 500; }
.timeline-desc { font-size: 0.9rem; color: var(--text-muted); }

/* Certifications */
.cert-list { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.cert-list li { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: var(--text-main); background: rgba(0,0,0,0.2); padding: 0.8rem 1.2rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); transition: background 0.3s; }
.cert-list li:hover { background: rgba(255,255,255,0.05); }
.cert-icon { font-size: 1.2rem; }

/* Cert Grid Layout */
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.cert-group { display: flex; flex-direction: column; gap: 0.5rem; }
.cert-provider { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent-cyan); margin-bottom: 0.3rem; }

/* Education */
.education-box { display: flex; flex-direction: column; gap: 0.5rem; }
.edu-item { padding: 1rem; border-left: 3px solid var(--accent-cyan); background: rgba(255,255,255,0.03); border-radius: 0 12px 12px 0; margin-bottom: 1rem; }
.edu-item h4 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.edu-item p { font-size: 0.9rem; color: var(--text-muted); }
/* Insights */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.view-all { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.view-all:hover { color: #fff; }

.articles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.article-card {
    display: block; text-decoration: none; color: inherit; background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05); padding: 1.5rem; border-radius: 16px;
    transition: all 0.3s ease;
}
.article-card:hover {
    background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); transform: translateY(-3px);
}
.article-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tag { font-size: 0.75rem; padding: 0.3rem 0.8rem; border-radius: 6px; font-weight: 600; background: rgba(255,255,255,0.1); }
.tag.risk { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.tag.tech { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.date { font-size: 0.8rem; color: var(--text-muted); }
.article-title { font-size: 1.15rem; margin-bottom: 0.8rem; line-height: 1.4; }
.article-desc { font-size: 0.9rem; color: var(--text-muted); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .portfolio-container { grid-template-columns: 1fr; }
    .profile-sidebar { position: relative; top: 0; flex-direction: row; align-items: flex-start; padding: 2rem; }
    .avatar-container { width: 150px; height: 150px; flex-shrink: 0; }
    .profile-info { flex: 1; }
}

@media (max-width: 768px) {
    body { padding: 1rem; }
    .profile-sidebar { flex-direction: column; align-items: center; text-align: center; }
    .avatar-container { width: 200px; height: 200px; }
    .contact-item { justify-content: center; }
    .content-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .services-wrapper, .articles-grid { grid-template-columns: 1fr; }
    .cert-grid { grid-template-columns: 1fr; }
    .hero-headline { font-size: 2.2rem; }
}

/* ================= FOOTER ================= */
.site-footer {
    max-width: 1280px;
    margin: 3rem auto 0;
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width 0.3s ease;
}

.footer-links a:hover { color: var(--text-main); }
.footer-links a:hover::after { width: 100%; }

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-dark);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: var(--card-bg-hover);
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

@media (max-width: 768px) {
    .site-footer { flex-direction: column; text-align: center; padding: 2rem 1rem; }
    .footer-brand { justify-content: center; }
    .footer-links { justify-content: center; }
    .back-to-top { bottom: 1rem; right: 1rem; }
}
