:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --dark-bg: #0a0a0f;
    --card-bg: #12121a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: #1e1e2e;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--dark-bg); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 12px; font-weight: 800; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 48px; font-size: 1.1rem; }
/* Navbar */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 16px 0; transition: all 0.3s ease; background: transparent; }
.navbar.scrolled { background: rgba(10, 10, 15, 0.95); backdrop-filter: blur(12px); box-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Fira Code', monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: -1px; }
.logo-highlight { color: var(--primary-color); }
.nav-links { display: flex; list-style: none; gap: 32px; }
.nav-links a { color: var(--text-secondary); font-size: 0.95rem; transition: color 0.3s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; padding-top: 80px; }
.hero-bg { 
    position: absolute; inset: 0; 
    background-image: url('../assets/generated/hero-banner.webp'), radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.15) 0%, transparent 60%);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,15,0.7) 0%, rgba(10,10,15,0.4) 60%, rgba(10,10,15,0.8) 100%);
}
.hero-content { text-align: center; position: relative; z-index: 1; }
.hero-greeting { font-size: 1.1rem; color: var(--accent-color); margin-bottom: 8px; font-family: 'Fira Code', monospace; }
.hero-name { font-size: 3.5rem; font-weight: 900; margin-bottom: 12px; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-title { font-size: 1.8rem; color: var(--text-secondary); margin-bottom: 24px; font-weight: 500; min-height: 44px; }
.typewriter { color: var(--primary-color); font-family: 'Fira Code', monospace; border-right: 2px solid var(--accent-color); animation: blink 0.7s step-end infinite; }
@keyframes blink { 50% { border-color: transparent; } }
.hero-description { max-width: 600px; margin: 0 auto 32px; color: var(--text-secondary); font-size: 1.1rem; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; }
.btn { padding: 14px 32px; border-radius: 8px; font-weight: 600; transition: all 0.3s ease; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--gradient); color: #fff; border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.4); }
.btn-outline { border: 2px solid var(--border-color); color: var(--text-secondary); background: transparent; }
.btn-outline:hover { border-color: var(--primary-color); color: var(--primary-color); transform: translateY(-2px); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.skill-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 32px; text-align: center; transition: all 0.3s ease; }
.skill-card:hover { border-color: var(--primary-color); transform: translateY(-4px); box-shadow: 0 8px 30px rgba(99,102,241,0.15); }
.skill-icon { font-size: 2rem; font-family: 'Fira Code', monospace; margin-bottom: 16px; color: var(--primary-color); }
.skill-card h3 { margin-bottom: 8px; font-size: 1.2rem; }
.skill-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Skill Icon Images */
.skill-icon.skill-img {
    font-size: 0;
    margin-bottom: 16px;
    line-height: 0;
}
.skill-icon.skill-img img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* About Section */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 32px; }
.about-image-side img { width: 100%; border-radius: 16px; box-shadow: 0 12px 40px rgba(99,102,241,0.2); border: 1px solid var(--border-color); }
.about-text p { margin-bottom: 16px; color: var(--text-secondary); font-size: 1rem; line-height: 1.8; }

.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text-primary); transition: 0.3s; }

/* Contact */
.contact-content { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; max-width: 900px; margin: 0 auto; }
.contact-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 24px; margin-bottom: 16px; transition: border-color 0.3s; }
.contact-card:hover { border-color: var(--primary-color); }
.contact-icon { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.contact-card h4 { margin-bottom: 4px; font-size: 1rem; }
.contact-card a, .contact-card p { color: var(--text-secondary); font-size: 0.95rem; }
.contact-card a:hover { color: var(--primary-color); }
.contact-form { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 32px; }
.form-group { margin-bottom: 16px; }
.form-group input, .form-group textarea { width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-family: 'Inter', sans-serif; font-size: 1rem; transition: border-color 0.3s; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary-color); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-secondary); opacity: 0.6; }

/* Footer */
.footer { border-top: 1px solid var(--border-color); padding: 48px 0 32px; margin-top: 40px; }
.footer-content { text-align: center; }
.footer-logo { font-family: 'Fira Code', monospace; font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
.footer-logo span { color: var(--primary-color); }
.copyright { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.95rem; }
.social-links { display: flex; justify-content: center; gap: 16px; }
.social-link { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.3s; }
.social-link:hover { border-color: var(--primary-color); color: var(--primary-color); transform: translateY(-2px); }

/* Back to top */
.back-to-top { position: fixed; bottom: 32px; right: 32px; width: 48px; height: 48px; border-radius: 50%; background: var(--gradient); color: #fff; border: none; cursor: pointer; font-size: 1.3rem; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 999; display: flex; align-items: center; justify-content: center; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(99,102,241,0.4); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.fade-in { animation: fadeInUp 0.6s ease forwards; }
.fade-up { opacity: 0; animation: fadeInUp 0.6s ease forwards; animation-delay: var(--delay, 0ms); }
.fade-in-left { opacity: 0; animation: fadeInLeft 0.6s ease forwards; }
.fade-in-right { opacity: 0; animation: fadeInRight 0.6s ease forwards; }

/* Responsive */
@media (max-width: 768px) {
    /* Navbar */
    .menu-toggle { display: flex; z-index: 1001; }
    .nav-links { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--card-bg); flex-direction: column; padding: 80px 32px 32px; gap: 24px; transition: right 0.3s ease; box-shadow: -4px 0 20px rgba(0,0,0,0.3); }
    .nav-links.active { right: 0; }

    /* Hero */
    .hero-name { font-size: 2.5rem; }
    .hero-title { font-size: 1.3rem; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 12px; }
    .hero-description { font-size: 1rem; padding: 0 8px; }

    /* Global */
    .section { padding: 48px 0; }
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 1rem; margin-bottom: 32px; }
    .container { padding: 0 16px; }

    /* Services grid - stack on mobile */
    .services-grid { grid-template-columns: 1fr; gap: 16px; }
    .service-card { padding: 24px; }
    .skill-icon.skill-img { width: 40px; height: 40px; }

    /* About content - stack vertically */
    .about-content { grid-template-columns: 1fr !important; gap: 24px; }
    .about-image-side img { border-radius: 12px; max-height: 300px; object-fit: cover; }

    /* Projects grid - single column */
    .projects-grid { grid-template-columns: 1fr !important; }
    .project-img { height: 200px; }

    /* Portfolio grid - 2 columns on mobile */
    .portfolio-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }

    /* Education grid */
    .education-grid { grid-template-columns: 1fr !important; }

    /* Contact */
    .contact-content { grid-template-columns: 1fr !important; gap: 24px; }
    .contact-form { padding: 24px; }

    /* Footer */
    .footer { padding: 32px 0 24px; }

    /* Timeline mobile - single column, left-aligned */
    .timeline::before { left: 20px; }
    .timeline-item { padding-right: 0 !important; padding-left: 50px !important; justify-content: flex-start; margin-bottom: 32px; }
    .timeline-item.timeline-right { padding-left: 50px !important; padding-right: 0 !important; }
    .timeline-dot { left: 20px; top: 28px; }

    /* Portfolio overlay — mobile friendly (touch devices can't hover) */
    .portfolio-overlay { opacity: 1 !important; background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.2) 100%); }
    .portfolio-overlay h4 { transform: translateY(0); margin-bottom: 4px; }
    .portfolio-overlay p { transform: translateY(0); color: rgba(255,255,255,0.85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
    .portfolio-link { transform: translateY(0) scale(1); }
}

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; margin-top: 48px; }
.project-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.project-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(99,102,241,0.15); }
.project-img { width: 100%; height: 220px; object-fit: cover; display: block; }
.project-info { padding: 24px; }
.project-info h3 { font-size: 1.25rem; margin-bottom: 8px; }
.project-info p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 16px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tags span { background: rgba(99,102,241,0.1); color: var(--primary-color); font-size: 0.8rem; padding: 4px 12px; border-radius: 20px; }

/* Portfolio Gallery */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 48px; }
.portfolio-item { border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 4/3; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.portfolio-item:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(99,102,241,0.25); }
.portfolio-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.portfolio-item:hover .portfolio-img { transform: scale(1.1); }
.portfolio-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%); opacity: 0; transition: opacity 0.3s ease; padding: 24px; text-align: center; }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay h4 { font-size: 1.4rem; margin-bottom: 8px; color: #fff; font-weight: 700; transform: translateY(10px); transition: transform 0.3s ease; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.portfolio-item:hover .portfolio-overlay h4 { transform: translateY(0); }
.portfolio-overlay p { color: rgba(255,255,255,0.9); font-size: 0.95rem; margin-bottom: 16px; transform: translateY(10px); transition: transform 0.3s ease 0.05s; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.portfolio-item:hover .portfolio-overlay p { transform: translateY(0); }
.portfolio-link { display: inline-flex; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.2); backdrop-filter: blur(4px); align-items: center; justify-content: center; color: #fff; font-size: 1.3rem; transition: all 0.3s ease 0.1s; transform: translateY(10px) scale(0.8); }
.portfolio-item:hover .portfolio-link { transform: translateY(0) scale(1); background: rgba(255,255,255,0.3); }

/* Experience / Timeline */
.timeline { max-width: 900px; margin: 48px auto 0; position: relative; padding: 20px 0; }
.timeline::before { content: ''; position: absolute; left: 50%; transform: translateX(-50%); top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, transparent, var(--primary-color), var(--secondary-color), transparent); }
.timeline-item { display: flex; justify-content: flex-end; padding-right: calc(50% + 30px); position: relative; margin-bottom: 40px; }
.timeline-item.timeline-right { justify-content: flex-start; padding-right: 0; padding-left: calc(50% + 30px); }
.timeline-dot { position: absolute; left: 50%; transform: translateX(-50%); top: 20px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary-color); border: 3px solid var(--dark-bg); z-index: 1; box-shadow: 0 0 15px rgba(99,102,241,0.5); }
.timeline-content { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 28px; max-width: 100%; transition: transform 0.3s, box-shadow 0.3s; }
.timeline-content:hover { transform: translateY(-4px); box-shadow: 0 15px 40px rgba(99,102,241,0.15); }
.timeline-date { display: inline-block; background: rgba(99,102,241,0.15); color: var(--primary-color); font-size: 0.85rem; padding: 4px 16px; border-radius: 20px; margin-bottom: 12px; font-weight: 600; }
.timeline-content h3 { font-size: 1.3rem; margin-bottom: 6px; color: var(--text-primary); }
.timeline-company { color: var(--accent-color); font-size: 0.95rem; margin-bottom: 12px; font-weight: 500; }
.timeline-content p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* Education Section */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 48px; }
.education-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 32px; text-align: center; transition: transform 0.3s, box-shadow 0.3s; }
.education-card:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(99,102,241,0.15); }
.education-icon { font-size: 2.5rem; margin-bottom: 16px; display: block; }
.education-card h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text-primary); }
.education-institution { color: var(--accent-color); font-size: 0.95rem; margin-bottom: 4px; font-weight: 500; }
.education-year { color: var(--primary-color); font-size: 0.85rem; margin-bottom: 12px; opacity: 0.8; }
.education-card > p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
