/* --- Variables --- */
:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --primary: #38bdf8;
    --accent: #a855f7;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --transition: all 0.3s ease;
}
[data-theme="light"] {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --primary: #0284c7;
    --accent: #9333ea;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-border: 1px solid rgba(0, 0, 0, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; scroll-behavior: smooth; }
body { background-color: var(--bg-color); color: var(--text-main); overflow-x: hidden; line-height: 1.6; transition: background 0.3s, color 0.3s; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; background: var(--card-bg); backdrop-filter: blur(10px); position: fixed; width: 100%; top: 0; z-index: 1000; border-bottom: var(--glass-border); }
.logo { font-size: 1.5rem; font-weight: 700; } .logo span { color: var(--primary); }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font-size: 0.9rem; font-weight: 500; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-extras { display: flex; gap: 15px; align-items: center; }
.theme-btn, .hamburger { background: none; border: none; color: var(--text-main); font-size: 1.3rem; cursor: pointer; }
.hamburger { display: none; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 80px; background: radial-gradient(circle at top, var(--card-bg) 0%, var(--bg-color) 70%); }
.profile-img-wrapper { width: 160px; height: 160px; margin: 0 auto 20px; border-radius: 50%; background: linear-gradient(45deg, var(--primary), var(--accent)); padding: 4px; }
.profile-pic { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg-color); }
.hero h1 { font-size: 3rem; margin-bottom: 10px; }
.gradient-text { background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.typewriter { font-size: 1.5rem; color: var(--text-muted); margin-bottom: 20px; height: 30px; }

/* Buttons */
.cta-buttons { margin: 30px 0; }
.btn { padding: 10px 25px; border-radius: 25px; font-weight: 600; margin: 0 10px; display: inline-block; border: none; cursor: pointer; transition: var(--transition); }
.btn.primary { background: var(--primary); color: #000; } .btn.primary:hover { background: var(--accent); color: #fff; box-shadow: 0 0 15px var(--accent); }
.btn.secondary { border: 1px solid var(--primary); color: var(--primary); background: transparent; } .btn.secondary:hover { background: rgba(56, 189, 248, 0.1); }
.btn-text { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; font-size: 0.9rem; margin-top: auto; align-self: flex-start; transition: var(--transition); } 
.btn-text:hover { color: var(--accent); transform: translateX(5px); }

/* Common Layouts */
.section { padding: 80px 10%; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 50px; } .section-title span { color: var(--primary); }
.container { max-width: 1200px; margin: 0 auto; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 30px; }

/* Cards & Hover Effects */
.about-card, .card { background: var(--card-bg); padding: 30px; border-radius: 12px; border: var(--glass-border); transition: var(--transition); }
.card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

/* About Details */
.about-details-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-top: 30px; }
.detail-column { background: var(--card-bg); padding: 20px; border-radius: 12px; border: var(--glass-border); }
.detail-column h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.1rem; }
.detail-list li { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 5px; list-style: disc; margin-left: 20px;}

/* Experience Timeline */
.experience-timeline { position: relative; max-width: 800px; margin: 0 auto; border-left: 2px solid var(--glass-border); padding-left: 30px; }
.timeline-item { margin-bottom: 40px; position: relative; }
.timeline-dot { width: 14px; height: 14px; background: var(--primary); border-radius: 50%; position: absolute; left: -37px; top: 5px; box-shadow: 0 0 10px var(--primary); }
.timeline-header h3 { color: var(--primary); font-size: 1.2rem; margin-bottom: 5px; }
.timeline-header .company { display: block; font-weight: 600; color: var(--text-main); }
.timeline-header .date { font-size: 0.85rem; color: var(--text-muted); font-style: italic; margin-bottom: 15px; display: block;}
.timeline-content ul { padding-left: 20px; list-style: disc; color: var(--text-muted); font-size: 0.95rem; }

/* Projects - New Card Design */
.project-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; height: 100%; min-height: 320px; }
.category-tag { 
    font-size: 0.75rem; 
    color: var(--accent); 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.project-card h3 { font-size: 1.5rem; margin-bottom: 10px; line-height: 1.3; }
.project-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }

.tech-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tech-stack span {
    font-size: 0.75rem; 
    background: rgba(56, 189, 248, 0.1); 
    color: var(--primary); 
    padding: 5px 12px; 
    border-radius: 20px; 
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Skills */
.skill-card h3 { font-size: 1.1rem; margin-bottom: 15px; color: var(--text-main); }
.tech-stack-large { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-stack-large span { font-size: 0.8rem; background: rgba(255,255,255,0.05); padding: 5px 10px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.1); }

/* Certifications */
.cert-card { text-align: center; }
.cert-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; }
.cert-card h3 { font-size: 1.1rem; margin-bottom: 5px; }
.issuer { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 15px; }
.cert-link { color: var(--primary); font-size: 0.9rem; font-weight: 600; }

/* Contact Form */
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.form-group { margin-bottom: 15px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; background: rgba(15, 23, 42, 0.5); border: var(--glass-border); color: var(--text-main); border-radius: 8px; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }

/* Footer - Left Aligned */
footer { padding: 40px 10%; background: var(--bg-color); border-top: var(--glass-border); text-align: left; }
footer .container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
footer p { color: var(--text-muted); font-size: 0.9rem; }
.footer-socials a { color: var(--text-muted); margin-left: 20px; font-size: 1.2rem; transition: 0.3s; }
.footer-socials a:hover { color: var(--primary); }

/* Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(5px); justify-content: center; align-items: center; }
.modal-content { background-color: #1e293b; margin: auto; padding: 40px; border: 1px solid #475569; width: 90%; max-width: 750px; border-radius: 12px; position: relative; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,0.5); text-align: left; }

.close-modal { color: #aaa; float: right; font-size: 24px; cursor: pointer; position: absolute; right: 25px; top: 20px; transition: 0.3s; }
.close-modal:hover { color: #fff; transform: rotate(90deg); }

/* Modal Elements based on screenshot */
.modal-header h2 { font-size: 2rem; margin-bottom: 5px; color: var(--text-main); }
.modal-header .subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 20px; display: block; }
.modal-tech-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.modal-tech-pills span { background: #334155; color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 0.85rem; }

.modal-section-title { font-size: 1.2rem; font-weight: 600; color: var(--text-main); margin-bottom: 10px; margin-top: 20px; }
.modal-desc { font-size: 1rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 20px; }
.modal-category { font-weight: 700; color: var(--text-main); margin-bottom: 20px; display: block;}

.modal-actions { display: flex; gap: 15px; margin-top: 30px; }
.btn-live { background: #8b5cf6; color: white; padding: 10px 25px; border-radius: 8px; font-weight: 600; transition: 0.3s; border: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.btn-live:hover { background: #7c3aed; }
.btn-code { background: transparent; color: white; border: 1px solid #475569; padding: 10px 25px; border-radius: 8px; font-weight: 600; transition: 0.3s; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.btn-code:hover { border-color: #fff; background: rgba(255,255,255,0.05); }

@media (max-width: 768px) {
    .nav-links { position: absolute; right: 0; top: 70px; background: var(--bg-color); height: 0; flex-direction: column; width: 100%; overflow: hidden; transition: 0.3s; text-align: center; padding: 0; border-bottom: 1px solid #333; }
    .nav-links.active { height: 350px; padding: 20px 0; }
    .hamburger { display: block; }
    .grid-2, .grid-3, .about-details-grid, .contact-container { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .experience-timeline { padding-left: 20px; border-left: none;}
    .timeline-dot { display: none; }
    footer .container { flex-direction: column; align-items: flex-start; gap: 15px; }
    .footer-socials a { margin-left: 0; margin-right: 20px; }
}