/* --- Variables & Reset --- */
:root {
    --primary-color: #4a90e2; 
    --secondary-color: #313131;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --text-color: #161616;
    --heading-color: #222;
    --transition: all 0.3s ease;
    --font-main: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-white);
    position: relative; /* For modal positioning context */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- Layout Utilities --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--heading-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 10px;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

/* --- Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
}

.logo span { color: var(--primary-color); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links li a {
    font-weight: 500;
    color: #333;
    transition: var(--transition);
}

.nav-links li a:hover { color: var(--primary-color); }

.nav-btn {
    background: var(--primary-color);
    color: white !important;
    padding: 8px 18px;
    border-radius: 20px;
}

.nav-btn:hover { background: #357abd; }

/* Hamburger Icon (Hidden on PC) */
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(353deg, #f5f7fa 0%, #ffffff73 100%);
    text-align: center;
    padding: 0 20px;
}


.hero h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: #222;
    font-weight: 700;
}

.hero .tagline {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #000000;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

/* --- About Section --- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.education-timeline {
    margin-top: 30px;
    border-left: 3px solid var(--primary-color);
    padding-left: 20px;
}

.education-timeline h4 { margin-bottom: 15px; }

.edu-item {
    margin-bottom: 25px;
    position: relative;
}

.edu-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 5px;
    width: 15px;
    height: 15px;
    background: #fff;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
}

.edu-item .year {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

/* --- Skills Grid --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
}

.skill-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.project-info { padding: 25px; }

.tech-stack { margin: 15px 0; }

.tech-stack span {
    background: #eee;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 5px;
    color: #555;
    display: inline-block;
    margin-bottom: 5px;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-link:hover { text-decoration: underline; }

/* --- Contact Section --- */
.contact-container {
    display: flex;
    gap: 50px;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

.contact-info, .contact-form { flex: 1; }

.info-item {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.social-links { margin-top: 30px; }

.social-links a {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.social-links a:hover { color: var(--primary-color); }

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-msg {
    color: red;
    font-size: 0.8rem;
    display: none;
    margin-top: 5px;
}

/* --- Footer --- */
footer {
    background: #222;
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* --- SUCCESS MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 4rem;
    color: #2ecc71; /* Green success color */
    margin-bottom: 20px;
}

.modal-content h3 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 25px;
}

/* --- RESPONSIVE --- */
@media (max-width: 850px) {
    .hamburger { display: block; }
    
    .nav-links {
        position: absolute;
        top: 70px;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 50px;
        gap: 30px;
        transition: 0.4s ease-in-out;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .nav-links.active { right: 0; }
    .nav-links li a { font-size: 1.2rem; display: block; }
    
    .hero h1 { font-size: 2.5rem; }
    .about-content { grid-template-columns: 1fr; }
    .contact-container { flex-direction: column; padding: 25px; }
    .about-text, .contact-info { text-align: center; }
    .info-item { justify-content: center; }
    .social-links { text-align: center; }
}
