:root {
    --bg: #0b0e14;
    --card-bg: rgba(22, 27, 34, 0.7);
    --border: rgba(48, 54, 61, 0.8);
    --accent: #58a6ff;
    --text: #adbac7;
    --heading: #f0f6fc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* Background Glow */
.glow-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 80% 20%, #162a4a 0%, transparent 40%),
                radial-gradient(circle at 15% 80%, #10182b 0%, transparent 40%);
    z-index: -1;
}

/* Header */
header { padding: 8rem 0 6rem; }
.hero-flex { display: flex; align-items: center; gap: 4rem; justify-content: space-between; }
.job-title { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-weight: 500; text-transform: uppercase; letter-spacing: 2px; font-size: 0.9rem; }
h1 { font-size: 4rem; color: var(--heading); margin: 0.5rem 0 1.5rem; letter-spacing: -2px; line-height: 1; }
.text-gradient { background: linear-gradient(90deg, #58a6ff, #bc8cf2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-bio { font-size: 1.1rem; max-width: 600px; margin-bottom: 2rem; }

.contact-info { margin-bottom: 2rem; display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.85rem; font-family: 'JetBrains Mono'; }
.contact-info span { display: flex; align-items: center; gap: 8px; }
.contact-info i { color: var(--accent); width: 16px; }

.social-links { display: flex; gap: 1rem; }
.social-icon { color: var(--text); padding: 10px; border-radius: 8px; background: var(--card-bg); border: 1px solid var(--border); transition: 0.3s; line-height: 0; }
.social-icon:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

.hero-photo img { width: 300px; height: 300px; border-radius: 24px; object-fit: cover; }
.photo-border { padding: 10px; background: linear-gradient(135deg, var(--border), transparent); border-radius: 34px; border: 1px solid var(--border); }

/* Experience & Skills Grid Layout */
.section-title { display: block; font-size: 1.5rem; color: var(--heading); font-weight: 700; margin-bottom: 2rem; border-bottom: 2px solid var(--accent); width: fit-content; padding-bottom: 5px; }
.section-title.secondary { margin-top: 4rem; }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.skill-card { background: var(--card-bg); border: 1px solid var(--border); padding: 2rem; border-radius: 16px; backdrop-filter: blur(10px); transition: 0.3s; }
.skill-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.skill-card h4 { color: var(--heading); margin-bottom: 0.5rem; }

.exp-item { margin-bottom: 3rem; padding-left: 1.5rem; border-left: 2px solid var(--border); }
.exp-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.exp-role { color: var(--heading); font-weight: 700; font-size: 1.2rem; }
.exp-date { font-family: 'JetBrains Mono'; color: var(--accent); font-size: 0.9rem; }
.exp-bullets { list-style: none; margin-top: 1rem; }
.exp-bullets li { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.exp-bullets li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }

/* PROJECT GALLERY - FIXED (Grid wrap instead of scroll) */
.project-block { background: var(--card-bg); border: 1px solid var(--border); padding: 2.5rem; border-radius: 20px; margin-bottom: 3rem; }
.project-info h3 { color: var(--heading); margin-bottom: 1rem; }
.project-gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 15px; 
    margin: 2rem 0; 
}
.photo-slot img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--border); transition: 0.3s; }
.photo-slot img:hover { border-color: var(--accent); transform: scale(1.03); }

.stack-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.tag { background: #1c2128; border: 1px solid var(--border); color: var(--accent); padding: 4px 12px; border-radius: 6px; font-family: 'JetBrains Mono'; font-size: 0.7rem; }

/* Lightbox */
.lightbox { position: fixed; z-index: 1000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 14, 20, 0.98); display: none; justify-content: center; align-items: center; flex-direction: column; }
.lightbox.active { display: flex; }
.lightbox-content { max-width: 90%; max-height: 80%; border-radius: 8px; box-shadow: 0 0 30px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 20px; right: 30px; font-size: 40px; color: white; cursor: pointer; }
#lightbox-caption { margin-top: 15px; font-family: 'JetBrains Mono'; color: var(--accent); }

/* Animations */
.animate { opacity: 0; transform: translateY(20px); transition: 0.6s ease-out; }
.animate.visible { opacity: 1; transform: translateY(0); }

footer { padding: 4rem 0; text-align: center; border-top: 1px solid var(--border); font-size: 0.9rem; }

@media (max-width: 850px) {
    .hero-flex { flex-direction: column-reverse; text-align: center; gap: 3rem; }
    h1 { font-size: 2.5rem; }
    .contact-info { justify-content: center; }
    .hero-photo img { width: 220px; height: 220px; }
    .project-gallery { grid-template-columns: repeat(2, 1fr); }
}