/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    /* Brand */
    --primary: #2563eb; /* Indigo-600 */
    --secondary: #1e40af; /* Indigo-800 */

    /* Neutrals (light mode) */
    --bg: #ffffff;
    --bg-muted: #f8fafc; /* slate-50 */
    --card: #ffffff;
    --elevated: #ffffff;
    --border: #e5e7eb; /* gray-200 */
    --dark: #1f2937; /* legacy strong text */
    --text: #4b5563; /* legacy text */
    --text-muted: #64748b; /* slate-500 */
    --light: #f3f4f6;
    --white: #ffffff;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --blur: saturate(180%) blur(10px);

    /* Transitions */
    --ts: 200ms ease;
    --ts-lg: 400ms ease;
    /* Layout */
    --header-h: 72px;
}

/* Dark mode tokens */
html.dark {
    --bg: #0b1220;
    --bg-muted: #0f172a;
    --card: #0f1a2b;
    --elevated: #0f1f35;
    --border: #1f2a44;
    --dark: #e2e8f0;
    --text: #cbd5e1;
    --text-muted: #94a3b8;
    --light: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.45);
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color var(--ts-lg), color var(--ts-lg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 96px 0;
}

h1, h2, h3 {
    color: var(--dark);
    margin-bottom: 16px;
}

h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 48px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 999px;
}

a {
    text-decoration: none;
    color: var(--primary);
}

/* Header & Navigation */
header {
    background: rgba(255,255,255,0.6);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}
html.dark header { background: rgba(15,23,42,0.5); }

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text);
    font-weight: 600;
    transition: color var(--ts);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    display: grid; place-items: center;
    cursor: pointer;
    transition: background var(--ts), color var(--ts), transform var(--ts);
}
.theme-toggle:hover { transform: translateY(-2px); color: var(--primary); }

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: var(--header-h) 5% 0;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(37,99,235,0.12), transparent 60%),
                radial-gradient(1000px 500px at 90% 20%, rgba(14,165,233,0.15), transparent 60%),
                var(--bg);
    position: relative;
    overflow: hidden;
}

/* Ensure anchor scrolling accounts for fixed header */
section { scroll-margin-top: calc(var(--header-h) + 12px); }
.hero-bg-animation {
    position: absolute; inset: -20% -20% auto -20%; height: 60%;
    background: conic-gradient(from 180deg at 50% 50%, rgba(37,99,235,0.25), rgba(14,165,233,0.25), rgba(37,99,235,0.25));
    filter: blur(80px) saturate(160%);
    opacity: 0.6;
    pointer-events: none;
}
.particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particles .particle {
    position: absolute; width: 6px; height: 6px; border-radius: 50%;
    background: rgba(37,99,235,0.6);
    box-shadow: 0 0 12px rgba(37,99,235,0.6);
    animation: rise 12s linear infinite;
}
@keyframes rise {
    0% { transform: translateY(0) scale(0.8); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(-120vh) scale(1.2); opacity: 0; }
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-muted);
}

.greeting { display: inline-block; color: var(--text-muted); margin-bottom: 6px; }
.typing-text { border-right: 2px solid var(--primary); padding-right: 6px; white-space: nowrap; }
.hero-subtitle { margin: 8px 0 16px; font-weight: 600; color: var(--text); }
.hero-description { margin: 12px 0 24px; max-width: 640px; }

.cta-buttons {
    display: flex;
    gap: 20px;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 999px;
    font-weight: 700;
    transition: all var(--ts);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    filter: brightness(0.95);
    transform: translateY(-3px);
}

.btn-secondary {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--bg-muted);
    color: var(--primary);
}

.hero-image {
    flex: 1;
    text-align: center;
}

/* Hero stats */
.hero-stats { display: flex; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.stat-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; min-width: 120px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-number { display: block; font-size: 1.75rem; font-weight: 800; background: linear-gradient(90deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { display: block; color: var(--text-muted); font-weight: 600; font-size: 0.85rem; }

.profile-card {
    display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
    background: var(--card); border: 1px solid var(--border); padding: 24px;
    border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
}
.profile-img { position: relative; }
.profile-img img { width: 220px; height: 220px; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow-lg); }
.status-indicator {
    position: absolute; right: 10px; bottom: 14px; width: 16px; height: 16px; border-radius: 50%;
    background: #22c55e; border: 3px solid var(--card);
    box-shadow: 0 0 0 0 rgba(34,197,94,0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
    70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.profile-info h3 { color: #22c55e; font-size: 0.95rem; }
.profile-info p { color: var(--text-muted); font-size: 0.9rem; }

.floating-cards { position: relative; }
.float-card { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
    background: var(--elevated); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm);
    color: var(--text); font-weight: 600; }
.float-card i { color: var(--primary); }
.card-1 { top: -20px; right: 10%; animation: float 6s ease-in-out infinite; }
.card-2 { bottom: 30px; left: -10%; animation: float 7s ease-in-out infinite reverse; }
.card-3 { top: 60px; left: 20%; animation: float 8s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text { flex: 2; }
.intro-text { font-size: 1.125rem; color: var(--text); margin-bottom: 12px; }
.about-highlights { display: flex; gap: 12px; margin: 16px 0 20px; flex-wrap: wrap; }
.highlight-item { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.btn-download { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 10px; background: var(--bg-muted); color: var(--text); border: 1px solid var(--border); font-weight: 600; transition: transform var(--ts), background var(--ts); }
.btn-download:hover { transform: translateY(-2px); background: var(--card); }

.about-image {
    flex: 1;
    text-align: center;
}

.image-container { position: relative; display: inline-block; }
.image-container img { max-width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.image-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 12px; background: linear-gradient(180deg, rgba(2,6,23,0) 20%, rgba(2,6,23,0.4)); border-radius: var(--radius-lg); }
.tech-stack { display: flex; gap: 8px; flex-wrap: wrap; }
.tech-stack span { padding: 6px 10px; border-radius: 999px; background: rgba(37,99,235,0.12); color: var(--primary); font-weight: 600; font-size: 0.85rem; }

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.skills-category { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.skills-category h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.skill-items { display: flex; flex-direction: column; gap: 14px; }
.skill-item { display: flex; flex-direction: column; gap: 8px; }
.skill-info { display: flex; justify-content: space-between; color: var(--text); font-weight: 600; }
.skill-percentage { color: var(--text-muted); font-weight: 700; }
.skill-bar { height: 10px; background: var(--bg-muted); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.skill-progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 999px; transition: width 1000ms ease; }

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--ts), box-shadow var(--ts);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image { position: relative; }
.project-card img { width: 100%; height: 220px; object-fit: cover; }
.project-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,6,23,0) 30%, rgba(2,6,23,0.7)); display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 16px; opacity: 0; transition: opacity var(--ts); }
.project-card:hover .project-overlay { opacity: 1; }
.btn-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--border); color: var(--text); transition: transform var(--ts), color var(--ts); }
.btn-icon:hover { transform: translateY(-3px); color: var(--primary); }

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
}
.project-category { color: var(--text-muted); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.tech-tag { display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--bg-muted); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 0.85rem; margin: 6px 6px 0 0; }
.projects-filter { display: flex; gap: 10px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.filter-btn { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 600; cursor: pointer; transition: all var(--ts); }
.filter-btn:hover { transform: translateY(-2px); }
.filter-btn.active { background: var(--bg-muted); color: var(--primary); border-color: var(--primary); }

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
/* Contact section intro text */
.contact-intro { text-align: center; color: var(--text-muted); max-width: 680px; margin: 0 auto 24px; }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.contact-item i {
    font-size: 1.25rem;
    color: var(--primary);
    width: 36px; height: 36px; display: grid; place-items: center;
    background: rgba(37,99,235,0.12);
    border-radius: 50%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }
.contact-form label { font-weight: 700; color: var(--text); }
.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.contact-form button {
    align-self: flex-start;
}

/* Footer */
footer {
    background: var(--bg-muted);
    color: var(--text);
    padding: 48px 0 24px;
    border-top: 1px solid var(--border);
}
.footer-content { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.footer-logo h3 { margin: 0; }
.footer-description { color: var(--text-muted); margin-top: 8px; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.footer-section h4 { margin-bottom: 12px; }
.footer-section ul { list-style: none; padding: 0; }
.footer-section li { margin: 8px 0; }
.footer-section a { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.footer-social a { color: var(--text); font-size: 1.25rem; margin-right: 12px; }
.footer-social a:hover { color: var(--primary); }

/* Testimonials */
.testimonials-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); opacity: 0.7; transform: scale(0.98); transition: transform var(--ts), opacity var(--ts), box-shadow var(--ts); }
.testimonial-card.active { opacity: 1; transform: scale(1); box-shadow: var(--shadow-md); }
.testimonial-content { color: var(--text); position: relative; }
.quote-icon { color: var(--primary); margin-bottom: 8px; }
.rating { color: #f59e0b; margin-top: 8px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.author-image img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.testimonial-nav { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.nav-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); border: none; cursor: pointer; transition: transform var(--ts), background var(--ts); }
.nav-dot.active { background: var(--primary); transform: scale(1.2); }

/* Experience Timeline */
.experience .timeline { position: relative; margin: 0 auto; max-width: 900px; }
.experience .timeline:before { content: ''; position: absolute; left: 24px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-left: 64px; margin-bottom: 28px; }
.timeline-dot { position: absolute; left: 16px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.15); }
.timeline-content { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.timeline-date { font-weight: 800; color: var(--text-muted); margin-bottom: 6px; font-size: 0.9rem; }
.timeline-content h3 { margin: 0 0 6px; }
.timeline-content h4 { margin: 0 0 8px; color: var(--text-muted); font-weight: 700; }
.timeline-content .tech-tags { margin-top: 10px; }
.timeline-content .tech-tags span { display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--bg-muted); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 0.85rem; margin-right: 6px; }

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: var(--header-h);
        background: var(--card);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .burger {
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 50px;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .testimonials-container { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
}

/* Scroll reveal utility */
.will-reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--ts-lg), transform var(--ts-lg); }
.in-view { opacity: 1 !important; transform: none !important; }