/* --- CSS Variables - Deep Blue Dark Theme --- */
:root {
    --bg-main: #020617; 
    --bg-card: rgba(15, 23, 42, 0.7); 
    --bg-darker: #010411; 
    --text-main: #f1f5f9; 
    --text-muted: #94a3b8; 
    
    --primary-blue: #3b82f6; 
    --primary-dark: #1d4ed8; 
    --primary-light: #60a5fa; 
    --glow-color: rgba(59, 130, 246, 0.3); 

    --accent-secondary: #f59e0b; 

    --grad-r: 29;
    --grad-g: 78;
    --grad-b: 216;

    --transition: all 0.3s ease;
    --border: 1px solid rgba(56, 189, 248, 0.1); 
}

/* --- Base Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Scroll padding offsets sticky nav, smooth behavior replaces jQuery scrolling */
html { scroll-padding-top: 100px; }

/* Restrict overflow-x ONLY to the body to prevent bugs */
body { font-family: 'Inter', sans-serif; background-color: var(--bg-main); color: var(--text-main); line-height: 1.5; overflow-x: hidden; max-width: 100vw; }
p{ margin:5px 0 10px 0; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.5px; margin-bottom: 0.5rem; }
a { text-decoration: none; color: var(--primary-blue); transition: var(--transition); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 10; }

.section-padding { padding: 4rem 0; position: relative; }
.bg-darker { background-color: var(--bg-darker); }
.text-center { text-align: center; }

/* --- Navigation --- */
nav { position: fixed; top: 0; width: 100%; z-index: 1000; transition: var(--transition); padding: 1.5rem 0; }
nav.sticky { background: rgba(2, 6, 23, 0.85); backdrop-filter: blur(10px); padding: 1rem 0; border-bottom: var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

.nav-content { display: flex; justify-content: flex-end; align-items: center; position: relative; }

.hamburger { display: none; font-size: 1.6rem; color: var(--text-main); cursor: pointer; transition: var(--transition); }
.hamburger:hover { color: var(--primary-light); }

.nav-links { list-style: none; display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.nav-links a:hover { color: var(--primary-light); }
.nav-btn { background: var(--primary-blue); color: #fff !important; padding: 0.6rem 1.2rem; border-radius: 6px; font-weight: 600; }
.nav-btn:hover { background: var(--primary-dark); }

/* --- Wrapper for Background SVG (overflow: clip prevents mobile scrolling bugs) --- */
.hero-summary-wrapper { position: relative; width: 100%; overflow: clip; }

/* --- Giant Background SVG Graphic --- */
.page-logo-graphic {
    position: absolute;
    top: -4%;
    right: -19vw; 
    height: 112%; 
    width: 65vw; 
    min-width: 500px;
    z-index: 1; 
    pointer-events: none;
    opacity: 0.16; 
    
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 100%);
}
.page-logo-graphic svg { width: 100%; height: 100%; }

/* --- Dynamic Gradient --- */
.background-visual { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: radial-gradient(circle at 10% 10%, rgba(var(--grad-r), var(--grad-g), var(--grad-b), 0.15) 0%, rgba(2, 6, 23, 1) 50%); 
    opacity: 0.8;
    z-index: 0;
}

/* --- Hero Section --- */
.hero { 
    min-height: 100vh;
    min-height: 100svh; 
    display: flex; align-items: center; position: relative; overflow: clip; 
}
.hero-content { position: relative; z-index: 10; }
.greeting { color: var(--primary-blue); font-weight: 600; font-size: 1.1rem; }
.name { font-size: clamp(3rem, 8vw, 5rem); margin-bottom: 0; }
.title { font-size: clamp(1.5rem, 4vw, 1.9rem); color: var(--text-muted); font-weight: 400; margin-bottom: 2rem; }
.typing-text { color: var(--primary-light); font-weight: 600; }
.cursor { display: inline-block; width: 3px; background-color: var(--accent-secondary); animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-desc { max-width: 600px; color: var(--text-muted); font-size: 1.1rem; margin-bottom: 3rem; }
.hero-btns { display: flex; gap: 1rem; }

.scroll-down { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); font-size: 2rem; color: var(--text-muted); animation: bounce 2.5s infinite; z-index: 20; }
.scroll-down:hover { color: var(--accent-secondary); }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -15px); } 60% { transform: translate(-50%, -7px); } }

/* --- Buttons & Cards --- */
.btn { display: inline-block; padding: 0.8rem 2rem; border-radius: 6px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: var(--transition); border: none; font-family: inherit; }
.primary-btn { background: var(--primary-blue); color: #fff; border: 1px solid var(--primary-blue); }
.primary-btn:hover { background: var(--primary-dark); box-shadow: 0 0 15px var(--glow-color); }
.secondary-btn { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.secondary-btn:hover { background: rgba(255,255,255,0.1); }

.card-glow { background: var(--bg-card); border: var(--border); border-radius: 12px; transition: var(--transition); position: relative; z-index: 10;}
.card-glow:hover { border-color: var(--primary-blue); transform: translateY(-5px); box-shadow: 0 10px 30px -10px var(--glow-color); }

.section-title { font-size: 2rem; margin-bottom: 3rem; position: relative; display: inline-block; z-index: 10;}
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 60%; height: 3px; background: linear-gradient(90deg, var(--primary-blue), transparent); }

/* --- Summary & Skills --- */
.summary-card { padding: 3rem; }
.summary-card p { font-size: 1.1rem; color: var(--text-muted); }
.summary-card strong{
	color: #ffffff;
}
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.skill-card { padding: 2.5rem; }
.skill-header { display: flex; align-items: center; gap: 20px; margin-bottom: 1.5rem; }
.skill-icon { font-size: 2rem; color: var(--primary-blue); }
.skill-header h4 { margin-bottom: 0; font-size: 1.2rem; line-height:1.4rem; }
.skill-list { list-style: none; color: var(--text-muted); }
.skill-list li { font-size:0.9rem; margin-bottom: 0.7rem; padding-left: 1.2rem; position: relative; }
.skill-list li::before {
	content: "\f054"; 
	/* 2. The Font Family */
	font-family: "Font Awesome 7 Free"; /* If v7 changes the name, use "Font Awesome 7 Free" */
	/* 3. The Font Weight (CRITICAL!) */
	font-weight: 900; 
	font-size:11px;
	/* Optional: Styling and spacing */
	display: inline-block;
	margin-right: 8px;
	color: #333;
	position: absolute; left: 0; top:3px; color: var(--accent-secondary); }

/* --- Interactive Timeline --- */
.timeline { position: relative; max-width: 900px; margin: 0 auto; z-index: 10; }
.timeline::after { content: ''; position: absolute; width: 2px; background: linear-gradient(to bottom, transparent 0%, rgba(59, 130, 246, 0.4) 10%, rgba(59, 130, 246, 0.4) 90%, transparent 100%); top: -40px; bottom: -40px; left: 50%; transform: translateX(-50%); z-index: 1; }
.timeline-item { width: 50%; position: relative; margin-bottom: 1.5rem; cursor: pointer; z-index: 2;}
.timeline-item.left { left: 0; padding-right: 2.5rem; }
.timeline-item.right { left: 50%; padding-left: 2.5rem; }
.timeline-content { padding: 2rem; } 

@keyframes slow-glow { 
    0% { box-shadow: 0 0 0px transparent; } 
    50% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); } 
    100% { box-shadow: 0 0 0px transparent; } 
}
.interactive-timeline .timeline-content { animation: slow-glow 3s infinite ease-in-out; }
.interactive-timeline:hover .timeline-content, .interactive-timeline.active .timeline-content { animation: none; }

.timeline-item::after { content: ''; position: absolute; width: 16px; height: 16px; background-color: var(--bg-main); border: 3px solid var(--primary-blue); border-radius: 50%; z-index: 3; transition: var(--transition); top: 40px; }
.timeline-item.left::after { right: -11px; }
.timeline-item.right::after { left: -11px; }

.timeline-item:hover::after { background-color: var(--primary-light); border-color: var(--primary-light); box-shadow: 0 0 10px var(--primary-light); }

@keyframes ripple { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); } 70% { box-shadow: 0 0 0 15px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
.timeline-item.active::after { background-color: var(--accent-secondary); border-color: var(--accent-secondary); animation: ripple 1.5s infinite; }
.timeline-item.active .card-glow { border-color: var(--accent-secondary); transform: translateY(-5px); box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.3); }

.job-meta { margin-bottom: 0; transition: var(--transition); }
.job-meta h4 { font-size: 1.1rem; }
.job-meta .company { color: var(--primary-light); font-size: 0.85rem; font-weight: 500; }
.job-details { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.3s ease; }

.timeline-item.active .job-meta { border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.5rem; }
.timeline-item.active .job-details { max-height: 1500px; opacity: 1; margin-top: 1rem; }
.job-bullets { color: var(--text-muted); font-size: 0.90rem; line-height: 1.2rem; padding-left: 1rem; }
.job-bullets li { margin-bottom: 0.8rem; }
.job-bullets li strong { color: var(--text-main); }


/* --- Expanding Portfolio Gallery --- */
.portfolio-gallery { display: flex; gap: 1rem; height: 400px; width: 100%; }
.portfolio-panel { 
    flex: 1; border-radius: 12px; background: rgba(15, 23, 42, 0.5); 
    border: 1px solid rgba(56, 189, 248, 0.1); position: relative; 
    overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; 
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease, box-shadow 0.3s ease; 
    animation: slow-glow 3s infinite ease-in-out; 
}
.portfolio-panel:hover { border-color: var(--primary-light); animation: none; } 
.portfolio-panel.active { flex: 4; border-color: var(--accent-secondary); box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.2); cursor: default; animation: none; }

/* Portfolio Image Background & Hover Effect */
.panel-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; transition: transform 0.6s ease; background-color: var(--bg-darker); }
.portfolio-panel:hover .panel-bg { transform: scale(1.05); } 

/* Dark Overlays for Text Legibility */
.panel-bg::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(2, 6, 23, 0.6) 0%, rgba(2, 6, 23, 0.9) 100%); transition: all 0.6s ease; }
.portfolio-panel.active .panel-bg::after { background: linear-gradient(to bottom, rgba(2, 6, 23, 0.3) 0%, rgba(2, 6, 23, 0.85) 50%, rgba(2, 6, 23, 1) 100%); }

.panel-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2.5rem; color: var(--primary-light); z-index: 2; transition: all 0.6s ease; }
.portfolio-panel.active .panel-icon { top: 2rem; left: 2rem; transform: translate(0, 0) scale(0.7); color: var(--accent-secondary); }

.panel-content { position: relative; z-index: 3; padding: 2rem; opacity: 0; transform: translateY(20px); transition: all 0.4s ease; white-space: nowrap; }
.portfolio-panel.active .panel-content { opacity: 1; transform: translateY(0); transition-delay: 0.2s; white-space: normal; }
.panel-content h4 { font-size: 1.6rem; margin-bottom: 0.5rem; color: #fff; }
.panel-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; max-width: 500px;}
.panel-tags { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap;}
.panel-tag { background: rgba(59, 130, 246, 0.15); color: var(--primary-light); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; border: 1px solid rgba(59, 130, 246, 0.3);}


/* --- Contact Section & Form --- */
#contact .section-title::after { left: 50%; transform: translateX(-50%); }
.contact-prompt { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2rem; }
.contact-form-wrapper { display: none; max-width: 650px; margin: 0 auto; }
.contact-form-wrapper.open { display: block; animation: slideDownFade 0.4s ease forwards; margin-top: 2rem; }

@keyframes slideDownFade { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }

.contact-form { padding: 2.5rem; text-align: left; position: relative; }
.close-btn { position: absolute; top: 20px; right: 25px; background: transparent; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; transition: var(--transition); }
.close-btn:hover { color: var(--accent-secondary); transform: scale(1.1); }
.hidden-btn { display: none !important; }

.form-row { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.5rem; flex: 1; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--primary-light); font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 0.9rem; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 6px; color: var(--text-main); font-family: 'Inter', sans-serif; transition: var(--transition); }
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(148, 163, 184, 0.5); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 12px rgba(59, 130, 246, 0.25); background: rgba(0, 0, 0, 0.4); }

/* --- Footer & Socials --- */
footer { padding: 1rem 0; background: var(--bg-darker); border-top: var(--border); font-size: 0.85rem; color: var(--text-muted); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }

.footer-left { display: flex; align-items: center; gap: 1.5rem; }
.footer-logo svg { height: 28px; width: auto; transition: transform 0.3s ease; }
.footer-logo:hover svg { transform: scale(1.05); }
.copyright { margin: 0; }

.footer-info { display: flex; align-items: center; gap: 2rem; }
.social-links { display: flex; justify-content: center; gap: 1rem; }
.social-links a { font-size: 1.2rem; color: var(--text-muted); background: rgba(255,255,255,0.05); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: var(--transition); }
.social-links a:hover { background: var(--primary-blue); color: #fff; transform: scale(1.1); }
.location { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.location i { color: #ef4444; margin-right: 5px; }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Mobile Responsiveness & Hamburger Menu --- */
@media (max-width: 768px) {

    .hamburger { display: block; }
    
    .nav-links { 
        position: absolute; top: 100%; left: 0; width: 100vw; flex-direction: column; 
        background: rgba(2, 6, 23, 0.98); backdrop-filter: blur(15px); border-bottom: var(--border);
        padding: 2rem 0; gap: 1.5rem; opacity: 0; visibility: hidden; transform: translateY(-15px); transition: all 0.3s ease;
    }
    .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }

    .hero-btns { flex-direction: column; }
    .page-logo-graphic { right: -15vw; opacity: 0.08; width: 85vw; } 
    .summary-card { padding: 2rem; }
    .timeline::after { left: 20px; transform: translateX(-50%); }
    .timeline-item { width: 100%; padding-left: 50px !Important; padding-right: 0; margin-bottom: 1.5rem; }
    .timeline-item.right { left: 0; }
    .timeline-item.left::after, .timeline-item.right::after { left: 10px; top: 40px; }
	.timeline-item.left{
		padding-right: 0;
	}
    /* Portfolio Mobile Adjustments */
    .portfolio-gallery { flex-direction: column; height: 750px; } 
    .portfolio-panel { justify-content: flex-end; }
    .portfolio-panel.active { flex: 3; }
    .panel-icon { display: block; } 
    
    /* Repositioned icon and added padding to clear it */
    .portfolio-panel.active .panel-icon { top: 1.5rem; left: 1.5rem; transform: scale(0.6); }
    .panel-content { padding: 1.5rem; }
    .portfolio-panel.active .panel-content { padding-top: 4.5rem; }

    .form-row { flex-direction: column; gap: 0; margin-bottom: 0; }
    .close-btn { top: 15px; right: 15px; }
    
    .footer-content { flex-direction: column; text-align: center; justify-content: center; }
    .footer-left { flex-direction: column; gap: 0.5rem; }
    .footer-info { flex-direction: column; gap: 1rem; }
}