/* ===== CSS Variables & Reset ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #ec4899;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --section-padding: 100px 0;
    --container-max: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Inter', sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; transition: var(--transition); overflow-x: hidden; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== Typography ===== */
.section { padding: var(--section-padding); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-subtitle { display: inline-block; color: var(--primary); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
.section-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--text-primary); position: relative; display: inline-block; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: var(--gradient); border-radius: 2px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; border-radius: 50px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: var(--transition); border: 2px solid transparent; text-align: center; }
.btn-primary { background: var(--gradient); color: white; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4); }
.btn-outline { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-full { width: 100%; justify-content: center; }

/* ===== Navigation ===== */
.navbar { position: fixed; top: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); z-index: 1000; padding: 15px 0; transition: var(--transition); border-bottom: 1px solid transparent; }
[data-theme="dark"] .navbar { background: rgba(15, 23, 42, 0.95); }
.navbar.scrolled { padding: 10px 0; border-bottom-color: var(--border); box-shadow: var(--shadow); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.logo-bracket { color: var(--primary); }
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-link { color: var(--text-secondary); font-weight: 500; transition: var(--transition); position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--gradient); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.theme-toggle { background: var(--bg-tertiary); border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-primary); transition: var(--transition); }
.theme-toggle:hover { background: var(--primary); color: white; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; }
.hamburger span { width: 25px; height: 3px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* ===== Hero Section ===== */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; position: relative; background: var(--bg-primary); overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; right: 0; width: 50%; height: 100%; background: var(--gradient); opacity: 0.05; clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%); }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-greeting { color: var(--primary); font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.hero-name { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; line-height: 1.1; margin-bottom: 15px; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-typing { font-size: 1.5rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 20px; min-height: 40px; }
.cursor { animation: blink 1s infinite; color: var(--primary); }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.hero-description { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 30px; max-width: 500px; }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-social { display: flex; gap: 15px; }
.hero-social a { width: 45px; height: 45px; border-radius: 50%; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 1.2rem; transition: var(--transition); }
.hero-social a:hover { background: var(--gradient); color: white; transform: translateY(-3px); }
.hero-image { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-shape { width: 400px; height: 400px; background: var(--gradient); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; animation: morph 8s ease-in-out infinite; opacity: 0.2; }
@keyframes morph { 0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } 50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; } }
.hero-avatar { position: absolute; width: 300px; height: 300px; border-radius: 50%; overflow: hidden; box-shadow: var(--shadow-lg); border: 5px solid var(--bg-primary); z-index: 2; }
.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Change 35% to 65% to move the photo up (focus on the bottom part where your face is) */
    object-position: center 65%; 
}
.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.85rem; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } }

/* ===== About Section ===== */
.about { background: var(--bg-secondary); }
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: center; }
.about-image { position: relative; }
.about-img-wrapper { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.about-placeholder { width: 100%; height: 400px; background: var(--gradient); display: flex; align-items: center; justify-content: center; color: white; font-size: 6rem; }
.experience-badge { position: absolute; bottom: -20px; right: -20px; background: white; padding: 20px; border-radius: 15px; box-shadow: var(--shadow-lg); text-align: center; display: flex; align-items: center; gap: 10px; }
[data-theme="dark"] .experience-badge { background: var(--bg-tertiary); }
.exp-number { font-size: 2.5rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.exp-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.3; }
.about-content h3 { font-size: 2rem; margin-bottom: 20px; color: var(--text-primary); }
.about-content p { color: var(--text-secondary); margin-bottom: 15px; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px 0; padding: 30px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-item { text-align: center; }
.stat-number { display: block; font-size: 2.5rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { color: var(--text-secondary); font-size: 0.9rem; }

/* ===== Skills Section ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-bottom: 60px; }
.service-card { background: var(--bg-secondary); padding: 40px 30px; border-radius: 20px; text-align: center; transition: var(--transition); border: 1px solid var(--border); }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.service-icon { width: 80px; height: 80px; background: var(--gradient); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: white; font-size: 2rem; transition: var(--transition); }
.service-card:hover .service-icon { transform: rotateY(360deg); }
.service-card h3 { font-size: 1.3rem; margin-bottom: 15px; color: var(--text-primary); }
.service-card p { color: var(--text-secondary); font-size: 0.95rem; }
.tech-stack { text-align: center; }
.tech-title { font-size: 1.5rem; margin-bottom: 30px; color: var(--text-primary); }
.tech-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.tech-item { background: var(--bg-secondary); padding: 20px 30px; border-radius: 15px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); transition: var(--transition); cursor: default; }
.tech-item:hover { transform: translateY(-5px); border-color: var(--primary); color: var(--primary); }
.tech-item i { font-size: 1.8rem; }
.tech-item span { font-weight: 600; }

/* ===== Projects Section ===== */
.projects { background: var(--bg-secondary); }
.project-filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { padding: 10px 25px; border: 2px solid var(--border); background: transparent; border-radius: 50px; cursor: pointer; font-weight: 600; color: var(--text-secondary); transition: var(--transition); }
.filter-btn:hover, .filter-btn.active { background: var(--gradient); border-color: transparent; color: white; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.project-card { background: var(--bg-primary); border-radius: 20px; overflow: hidden; transition: var(--transition); border: 1px solid var(--border); }
.project-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.project-card.hide { display: none; }
.project-image { position: relative; overflow: hidden; height: 250px; }
.project-placeholder { width: 100%; height: 100%; background: var(--gradient); display: flex; align-items: center; justify-content: center; color: white; font-size: 4rem; transition: var(--transition); }
.project-card:hover .project-placeholder { transform: scale(1.1); }
.project-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.8); display: flex; align-items: center; justify-content: center; gap: 20px; opacity: 0; transition: var(--transition); }
.project-card:hover .project-overlay { opacity: 1; }
.project-link { width: 50px; height: 50px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; transition: var(--transition); transform: translateY(20px); }
.project-card:hover .project-link { transform: translateY(0); }
.project-link:hover { background: var(--primary); color: white; }
.project-info { padding: 25px; }
.project-category { display: inline-block; color: var(--primary); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.project-info h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--text-primary); }
.project-info p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 15px; }
.project-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tech span { background: var(--bg-tertiary); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }

/* ===== Experience Section ===== */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--gradient); }
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -38px; top: 0; width: 16px; height: 16px; background: var(--gradient); border-radius: 50%; border: 3px solid var(--bg-primary); box-shadow: 0 0 0 3px var(--primary); }
.timeline-content { background: var(--bg-secondary); padding: 25px; border-radius: 15px; border: 1px solid var(--border); transition: var(--transition); }
.timeline-content:hover { transform: translateX(10px); box-shadow: var(--shadow); }
.timeline-date { display: inline-block; color: var(--primary); font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; }
.timeline-content h3 { font-size: 1.3rem; margin-bottom: 5px; color: var(--text-primary); }
.timeline-content h4 { color: var(--text-secondary); font-weight: 500; margin-bottom: 15px; }
.timeline-content p { color: var(--text-secondary); font-size: 0.95rem; }

/* ===== Education Section ===== */
.education { background: var(--bg-primary); }
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.education-card { background: var(--bg-secondary); padding: 30px; border-radius: 20px; text-align: center; border: 1px solid var(--border); transition: var(--transition); }
.education-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.education-icon { width: 70px; height: 70px; background: var(--gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: white; font-size: 1.8rem; }
.education-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-primary); }
.education-school { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 8px; }
.education-year { color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.education-result { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Contact Section ===== */
.contact { background: var(--bg-secondary); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; }
.contact-info h3 { font-size: 1.8rem; margin-bottom: 15px; color: var(--text-primary); }
.contact-info > p { color: var(--text-secondary); margin-bottom: 30px; }
.contact-details { margin-bottom: 30px; }
.contact-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.contact-icon { width: 50px; height: 50px; background: var(--gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; flex-shrink: 0; }
.contact-label { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2px; }
.contact-item a, .contact-item span { color: var(--text-primary); font-weight: 500; }
.contact-item a:hover { color: var(--primary); }
.contact-social { display: flex; gap: 10px; }
.contact-social a { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: var(--transition); }
.contact-social a:hover { background: var(--gradient); color: white; transform: translateY(-3px); }
.contact-form { background: var(--bg-primary); padding: 40px; border-radius: 20px; border: 1px solid var(--border); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-primary); font-weight: 500; font-size: 0.95rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 15px; border: 2px solid var(--border); border-radius: 10px; background: var(--bg-secondary); color: var(--text-primary); font-family: inherit; font-size: 1rem; transition: var(--transition); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ===== Footer ===== */
.footer { background: var(--bg-primary); padding: 60px 0 30px; border-top: 1px solid var(--border); }
.footer-content { text-align: center; margin-bottom: 30px; }
.footer-logo { font-size: 2rem; font-weight: 800; margin-bottom: 15px; }
.footer-text { color: var(--text-secondary); margin-bottom: 20px; }
.footer-social { display: flex; justify-content: center; gap: 15px; }
.footer-social a { width: 45px; height: 45px; border-radius: 50%; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 1.2rem; transition: var(--transition); }
.footer-social a:hover { background: var(--gradient); color: white; transform: translateY(-3px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; }
.footer-bottom i { color: #ef4444; }

/* ===== Back to Top ===== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: var(--gradient); color: white; border: none; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: var(--transition); box-shadow: var(--shadow-lg); z-index: 999; }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-5px); }

/* ===== Animations ===== */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-description { margin: 0 auto 30px; }
    .hero-buttons { justify-content: center; }
    .hero-social { justify-content: center; }
    .hero-image { order: -1; margin-bottom: 40px; }
    .hero-shape { width: 300px; height: 300px; }
    .hero-avatar { width: 220px; height: 220px; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --section-padding: 70px 0; }
    .nav-menu { position: fixed; top: 70px; left: -100%; width: 100%; height: calc(100vh - 70px); background: var(--bg-primary); flex-direction: column; justify-content: flex-start; padding: 40px 20px; gap: 20px; transition: var(--transition); }
    .nav-menu.active { left: 0; }
    .hamburger { display: flex; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
    .hero-name { font-size: 2.5rem; }
    .hero-typing { font-size: 1.2rem; }
    .about-stats { grid-template-columns: 1fr; gap: 15px; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
    .contact-form { padding: 25px; }
}
