/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-darkest: #050a14;   
    --bg-secondary: #0f172a; 
    --text-primary: #e2e8f0; 
    --text-secondary: #94a3b8; 
    --accent-color: #00e5ff; 
    --accent-glow: rgba(0, 229, 255, 0.4); 
    --role-bg: rgba(15, 23, 42, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-darkest); color: var(--text-primary); line-height: 1.8; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }

/* =========================================
   2. KEY ANIMATIONS
   ========================================= */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 10px var(--accent-glow); } 50% { box-shadow: 0 0 25px var(--accent-color); } 100% { box-shadow: 0 0 10px var(--accent-glow); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} } 
@keyframes textShimmer { 0% { background-position: -200%; } 100% { background-position: 200%; } }
@keyframes modalEntry { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =========================================
   3. NAVIGATION
   ========================================= */
nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem 5%; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); position: fixed; width: 100%; top: 0; z-index: 1000; border-bottom: 1px solid #1e293b; height: 80px; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--accent-color); letter-spacing: 1px; }
.nav-links { display: flex; gap: 30px; }
.nav-item { color: var(--text-secondary); font-weight: 600; font-size: 0.95rem; transition: 0.3s; padding: 5px 10px; position: relative; }
.nav-item::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--accent-color); transition: width 0.3s ease; }
.nav-item:hover::after, .nav-item.active::after { width: 100%; }
.nav-item:hover, .nav-item.active { color: var(--accent-color); }

/* =========================================
   4. HERO & TYPING EFFECT
   ========================================= */
.hero { min-height: 100vh; display: flex; flex-direction: row; align-items: center; justify-content: space-between; padding: 120px 10% 80px 10%; background: radial-gradient(circle at top right, #0f172a 0%, var(--bg-darkest) 70%); gap: 4rem; position: relative; }
.hero-content { flex: 1; max-width: 600px; z-index: 2; }
.hero h1 { font-size: clamp(2.8rem, 5vw, 4.5rem); margin-bottom: 0.5rem; font-weight: 800; line-height: 1.2; background: linear-gradient(90deg, var(--text-primary), var(--accent-color), var(--text-primary)); background-size: 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: textShimmer 4s linear infinite; }
.typing-text { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.5rem; color: var(--accent-color); font-weight: 400; height: 50px; }
.txt-type > .txt { border-right: 0.2rem solid var(--text-primary); padding-right: 5px; animation: blink 0.7s infinite; }
@keyframes blink { 0% { border-color: transparent } 50% { border-color: var(--text-primary) } 100% { border-color: transparent } }
.hero p { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--text-secondary); margin-bottom: 3rem; max-width: 90%; }
.profile-pic { width: 100%; max-width: 400px; aspect-ratio: 1/1; object-fit: cover; border-radius: 50%; border: 4px solid var(--accent-color); box-shadow: 0 0 40px var(--accent-glow); animation: float 6s ease-in-out infinite; }
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; }
.btn { padding: 14px 35px; font-size: 1.05rem; font-weight: bold; border: none; border-radius: 6px; cursor: pointer; transition: 0.3s; white-space: nowrap; }
.btn-primary { background-color: var(--accent-color); color: var(--bg-darkest); animation: pulseGlow 3s infinite; }
.btn-primary:hover { transform: scale(1.05); }
.btn-secondary { background: transparent; border: 2px solid var(--accent-color); color: var(--accent-color); }
.btn-secondary:hover { background: rgba(0, 229, 255, 0.1); transform: scale(1.05); }
.scroll-down { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 2rem; color: var(--text-secondary); animation: bounce 2s infinite; cursor: pointer; }

/* =========================================
   5. CENTRALIZED STATISTICS
   ========================================= */
.stats-section { display: flex; justify-content: center; padding: 6rem 5%; background: var(--bg-secondary); border-top: 1px solid #1e293b; border-bottom: 1px solid #1e293b; flex-wrap: wrap; gap: 5rem; opacity: 1; width: 100%; }
.stats-section.visible { animation: fadeInUp 1s forwards; }
.stat-item { text-align: center; min-width: 150px; }
.counter { font-size: 3.5rem; font-weight: 800; color: var(--accent-color); margin-bottom: 0.5rem; }
.stat-item p { color: var(--text-secondary); font-size: 1.2rem; }

/* =========================================
   6. GRID & CARDS
   ========================================= */
.grid-container, .grid-container-compact { padding: 8rem 5%; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 380px)); gap: 4rem; background-color: var(--bg-darkest); justify-content: center; max-width: 1600px; margin: 0 auto; }
.glow-card { background: var(--bg-secondary); border-radius: 16px; border: 1px solid #1e293b; padding: 2.5rem; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; justify-content: space-between; opacity: 1; }
.glow-card.visible { animation: fadeInUp 0.8s backwards; }
.glow-card:hover { border-color: var(--accent-color); transform: translateY(-10px) scale(1.02); box-shadow: 0 15px 30px -5px var(--accent-glow); }
.card-content h3 { font-size: 1.6rem; margin-bottom: 1.2rem; color: var(--text-primary); }
.card-content p { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; }
.card-btn { width: 100%; padding: 14px; background: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); border-radius: 6px; cursor: pointer; font-weight: 600; transition: 0.3s; }
.card-btn:hover { background: var(--accent-color); color: var(--bg-darkest); box-shadow: 0 0 15px var(--accent-glow); }
.github-card { border: 2px dashed #334155 !important; background: rgba(15, 23, 42, 0.5) !important; }

/* =========================================
   7. SKILLS
   ========================================= */
.skills-section { padding: 8rem 5%; background: var(--bg-darkest); text-align: center; opacity: 1; }
.skills-section.visible { animation: fadeInUp 1s forwards; }
.skills-title { font-size: 2.5rem; margin-bottom: 4rem; color: var(--text-primary); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 5rem; max-width: 1400px; margin: 0 auto; }
.skill-category h4 { color: var(--accent-color); margin-bottom: 2rem; font-size: 1.4rem; border-bottom: 2px solid #1e293b; padding-bottom: 10px; display: inline-block; }
.skills-wrapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.skill-tag { padding: 10px 20px; border-radius: 30px; font-size: 1rem; transition: 0.3s; cursor: default; }
.skill-tag:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.skill-tag.accent { border: 1px solid var(--accent-color); color: var(--accent-color); }
.skill-tag.dark { border: 1px solid #334155; color: var(--text-secondary); background: #1e293b; }

/* =========================================
   8. TIMELINE
   ========================================= */
.page-header { padding: 10rem 5% 5rem 5%; text-align: center; background: radial-gradient(circle at top, #1e293b 0%, var(--bg-darkest) 70%); }
.section-title { font-size: 2.2rem; margin-bottom: 4rem; text-align: center; border-left: none !important; color: var(--text-primary); position: relative; padding-bottom: 20px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: var(--accent-color); border-radius: 2px; }
.timeline { border-left: 3px solid #1e293b; margin: 0 auto; max-width: 800px; padding-left: 40px; position: relative; }
.timeline-item { position: relative; margin-bottom: 5rem; opacity: 1; transition: 1s; }
.timeline-item.visible { animation: fadeInUp 0.8s backwards; }
.timeline-dot { position: absolute; left: -52px; top: 5px; width: 22px; height: 22px; background-color: var(--accent-color); border-radius: 50%; box-shadow: 0 0 10px var(--accent-glow); }
.role-description { background: var(--role-bg); border-left: 3px solid var(--accent-color); padding: 20px; border-radius: 0 8px 8px 0; margin: 20px 0; font-size: 1rem; }

/* =========================================
   9. CONTACT PAGE STYLES
   ========================================= */
.contact-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; max-width: 1200px; margin: 0 auto; padding: 4rem 5%; align-items: start; opacity: 0; animation: fadeInUp 1s forwards 0.3s; }
.contact-info { background: var(--bg-secondary); padding: 2.5rem; border-radius: 16px; border: 1px solid #1e293b; }
.contact-info h3 { color: var(--text-primary); margin-bottom: 1rem; font-size: 1.5rem; }
.info-text { color: var(--text-secondary); margin-bottom: 2rem; }
.info-item { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 1.5rem; }
.icon-box { background: rgba(0, 229, 255, 0.1); color: var(--accent-color); width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border-radius: 50%; flex-shrink: 0; }
.label { display: block; font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; margin-bottom: 3px; }
.value { color: var(--text-primary); font-weight: 500; }
.value-box { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 500; }
.copy-btn { background: transparent; border: none; color: var(--accent-color); cursor: pointer; transition: 0.2s; }
.copy-btn:hover { transform: scale(1.1); color: #fff; }
.social-links { display: flex; gap: 15px; margin-top: 2rem; }
.social-btn { width: 45px; height: 45px; border-radius: 50%; border: 1px solid var(--accent-color); display: flex; justify-content: center; align-items: center; color: var(--accent-color); transition: 0.3s; font-size: 1.2rem; }
.social-btn:hover { background: var(--accent-color); color: var(--bg-darkest); box-shadow: 0 0 15px var(--accent-glow); }

.contact-form { background: var(--bg-secondary); padding: 3rem; border-radius: 16px; border: 1px solid #1e293b; }
.contact-form h3 { color: var(--text-primary); margin-bottom: 2rem; font-size: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; color: var(--text-secondary); margin-bottom: 0.5rem; font-size: 0.95rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 15px; background: var(--bg-darkest); border: 1px solid #334155; border-radius: 8px; color: var(--text-primary); font-size: 1rem; transition: 0.3s; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-color); box-shadow: 0 0 10px rgba(0, 229, 255, 0.1); }

/* =========================================
   10. MODAL & FOOTER
   ========================================= */
.footer { padding: 3rem; text-align: center; background: var(--bg-darkest); color: var(--text-secondary); border-top: 1px solid #1e293b; font-size: 0.95rem; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 10, 20, 0.95); z-index: 2000; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: var(--bg-secondary); padding: 3rem; border-radius: 16px; width: 100%; max-width: 650px; border: 1px solid var(--accent-color); box-shadow: 0 0 50px rgba(0, 229, 255, 0.15); max-height: 85vh; overflow-y: auto; animation: modalEntry 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 2.2rem; cursor: pointer; color: var(--text-secondary); }
.close-btn:hover { color: var(--accent-color); transform: rotate(90deg); transition: 0.3s; }
.code-block { background: #020617; padding: 20px; border-radius: 8px; overflow-x: auto; font-family: monospace; font-size: 0.9rem; margin: 25px 0; border: 1px solid #1e293b; color: #a5b4fc; }
.code-keyword { color: var(--accent-color); }

/* =========================================
   11. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
    .grid-container { padding: 6rem 5%; }
}

@media (max-width: 768px) {
    .logo { font-size: 1.2rem; }
    .nav-links { gap: 15px; }
    .nav-item { font-size: 0.85rem; padding: 5px; }
    .hero { flex-direction: column-reverse; justify-content: center; text-align: center; padding-top: 110px; height: auto; gap: 2rem; }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .hero-buttons { justify-content: center; width: 100%; }
    .btn { width: 100%; max-width: 320px; }
    .profile-pic { width: 260px; height: 260px; margin-bottom: 1rem; }
    
    .stats-section { flex-direction: column; gap: 3rem; padding: 4rem 5%; }
    .stat-item { padding-bottom: 2rem; border-bottom: 1px solid #1e293b; }
    .stat-item:last-child { border-bottom: none; }
    
    .timeline { margin: 0; width: 100%; max-width: 100%; padding-left: 25px; border-left: 2px solid #1e293b; }
    .timeline-dot { left: -37px; width: 18px; height: 18px; top: 6px; }
    .timeline-item { padding-right: 0; margin-bottom: 4rem; }
    
    .grid-container { padding: 3rem 5%; gap: 2.5rem; grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; gap: 4rem; }
    .section-title { font-size: 1.6rem; margin-bottom: 2.5rem; }
    .modal-content { padding: 1.5rem; }

    /* Contact Page Mobile */
    .contact-container { grid-template-columns: 1fr; gap: 2rem; }
    .contact-info, .contact-form { padding: 1.5rem; }
}
