/* ===== VARIABLES & RESET ===== */
:root {
    --primary-color: #00d4ff; /* Electric Cyan - Tech Feel */
    --secondary-color: #0056b3; /* Deep Blue */
    --bg-dark: #0f172a; /* Dark Slate Background */
    --bg-card: #1e293b; /* Lighter Slate for Cards */
    --text-main: #f8fafc; /* White text */
    --text-muted: #94a3b8; /* Grey text */
    --accent: #f59e0b; /* Safety Orange/Amber */
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --nav-height: 80px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
}

section {
    padding: 5rem 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== UTILITIES ===== */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn.primary {
    background: var(--primary-color);
    color: #000;
}
.btn.primary:hover { background: #fff; box-shadow: 0 0 15px var(--primary-color); }

.btn.secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 1rem;
    background: transparent;
}
.btn.secondary:hover { background: rgba(0, 212, 255, 0.1); }

/* ===== NAVBAR ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: box-shadow 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    height: 100%;
    padding: 0 1.5rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.logo span { color: var(--primary-color); font-weight: 400; }
.logo i { color: var(--accent); margin-right: 5px; }

.nav-links { display: flex; gap: 2rem; align-items: center; }

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }

.nav-btn {
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
}
.nav-btn:hover { border-color: var(--primary-color); color: var(--primary-color) !important; }

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

/* ===== HERO ===== */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    overflow: hidden;
    padding-top: var(--nav-height);
}

/* Engineering Grid Background Effect */
.grid-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.home-content {
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 1rem;
}

.badge {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: inline-block;
}

.home h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.home h2 {
    font-size: 1.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.highlight { color: var(--primary-color); font-weight: 600; }

.home p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat h3 { font-size: 1.8rem; color: var(--accent); margin-bottom: 0.2rem; }
.stat p { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: center;
}

.profile-card {
    position: relative;
    max-width: 350px;
    margin: 0 auto;
}

.profile-pic {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 20px 20px 0 rgba(0,0,0,0.3);
}

.profile-badge {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: var(--bg-card);
    padding: 10px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    font-weight: 600;
    color: var(--primary-color);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    color: #fff;
}

.about-text p { margin-bottom: 1.5rem; color: var(--text-muted); font-size: 1.05rem; }

.check-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.check-list i { color: var(--primary-color); }

/* ===== SKILLS ===== */
.bg-dark { background: #0b101d; } 

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border-top: 3px solid var(--primary-color);
    transition: transform 0.3s;
}

.skill-card:hover { transform: translateY(-5px); }

.skill-card .icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 { margin-bottom: 1.5rem; font-family: var(--font-heading); color: #fff;}

.tags { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.tags span {
    background: rgba(255,255,255,0.05);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-color);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(-5px);
}

.card-header h3 { font-size: 1.3rem; margin-bottom: 0.3rem; color: #fff;}
.role { font-size: 0.85rem; color: var(--accent); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }

.project-card p {
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.tech-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 12px;
    display: inline-block;
}
.tech-tag::before { content: '#'; color: var(--primary-color); }

/* ===== CONTACT ===== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 10px;
}

.contact-details h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-main); }
.contact-details p { margin-bottom: 2rem; color: var(--text-muted); }

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-main);
}
.info-item i { color: var(--primary-color); font-size: 1.2rem; width: 20px; text-align: center; }

.social-links { margin-top: 2rem; display: flex; gap: 1rem; }
.social-links a {
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    font-size: 1.2rem;
    color: var(--text-main);
}
.social-links a:hover { background: var(--primary-color); color: #000; transform: translateY(-3px); }

.contact-form .form-group { position: relative; margin-bottom: 1.5rem; }

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1rem;
    resize: vertical;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form label {
    position: absolute;
    top: 10px; left: 0;
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.3s;
}

/* Label animation on focus or valid input */
.contact-form input:focus ~ label,
.contact-form input:valid ~ label,
.contact-form textarea:focus ~ label,
.contact-form textarea:valid ~ label {
    top: -20px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.full-width { width: 100%; }

.form-message { margin-top: 1rem; text-align: center; color: var(--accent); }

footer {
    text-align: center;
    padding: 2rem;
    background: #000;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
    .profile-card { margin-bottom: 2rem; }
    .contact-wrapper { padding: 2rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: var(--nav-height);
        right: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-150%);
        transition: 0.4s ease;
        border-bottom: 1px solid var(--primary-color);
    }
    .nav-links.active { transform: translateY(0); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
    
    .home h1 { font-size: 2.5rem; }
    .hero-btns { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
    .btn.secondary { margin-left: 0; }
    .stats-row { flex-wrap: wrap; gap: 2rem; }
    .section-title { font-size: 2rem; }
}

@media (max-width: 480px) {
    .home h1 { font-size: 2rem; }
    .project-card, .skill-card { padding: 1.5rem; }
}