/* --- 1. Variables (Modern Tech Palette) --- */
:root {
    --primary-color: #1B5E20;
    --secondary-color: #2E7D32;
    --accent-color: #66BB6A;
    --light-bg-color: #F8F9FA;
    --white-color: #ffffff;
    --dark-text-color: #343A40;
    --light-text-color: #6c757d;
    --card-bg-color: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

/* --- 2. Base & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.8;
    background-color: var(--light-bg-color);
    color: var(--dark-text-color);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.3s ease-in-out;
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- 3. Header --- */
header {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 70px 0;
    text-align: center;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

header p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 35px;
}

.social-links a {
    color: var(--white-color);
    font-size: 1.6rem;
    margin: 0 15px;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- 4. Navigation --- */
nav {
    background-color: rgba(27, 94, 32, 0.95);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--secondary-color);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 10px 0;
}

nav ul li a {
    color: var(--white-color);
    font-weight: 400;
    padding: 15px 25px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.4s ease;
}

nav ul li a:hover::after {
    width: 50%;
}

/* --- 5. Sections --- */
.section {
    padding: 100px 0;
    scroll-margin-top: 90px;
}

.section h2 {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 70px;
    position: relative;
    color: var(--primary-color);
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: var(--accent-color);
}

/* --- 5.1 About Section --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 960px;
    margin: 0 auto;
    text-align: left;
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 7px solid var(--white-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.9;
    text-align: justify;
}

/* --- 5.5 NEW PROJECT CARDS (Minimal Style) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card-minimal {
    background: var(--white-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card-minimal:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.project-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f8f9fa;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card-minimal:hover .project-image-wrapper img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 94, 32, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card-minimal:hover .project-overlay {
    opacity: 1;
}

.project-overlay i {
    color: var(--white-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.project-overlay span {
    color: var(--white-color);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.project-card-title {
    padding: 25px;
    text-align: center;
    background: linear-gradient(to bottom, #f8f9fa 0%, var(--white-color) 100%);
    border-top: 3px solid var(--accent-color);
}

.project-card-title h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 700;
}

/* --- 5.6 MODAL STYLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white-color);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    border-radius: 15px;
    padding: 50px 40px 40px 40px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--light-text-color);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    z-index: 10;
    background: none;
    border: none;
    padding: 5px 10px;
}

.close-btn:hover {
    color: var(--primary-color);
}

.modal-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-right: 40px;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

.project-details {
    margin-bottom: 30px;
}

.detail-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.detail-section h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h4 i {
    color: var(--accent-color);
}

.detail-section p {
    color: var(--dark-text-color);
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

.project-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* --- 6. EXPERIENCE SECTION --- */
.exp-timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.exp-item {
    background: var(--card-bg-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    border: 1px solid #eef2ef;
}

.exp-meta h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.exp-dates {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--light-text-color);
    margin-right: 12px;
}

.exp-points {
    margin: 14px 0 10px 18px;
    text-align: justify;
}

.exp-points li {
    margin-bottom: 8px;
}

/* --- 6.5 EDUCATION SECTION --- */
.edu-timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.edu-item {
    background: var(--card-bg-color);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    border: 1px solid #eef2ef;
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 20px;
}

.edu-title h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.edu-institution {
    font-size: 1.1rem;
    color: var(--dark-text-color);
    font-weight: 600;
}

.edu-dates {
    font-size: 0.95rem;
    color: var(--light-text-color);
    white-space: nowrap;
}

.edu-description {
    color: var(--light-text-color);
    line-height: 1.8;
    text-align: justify;
}

/* --- 7. NEW SKILLS SECTION --- */
#skills .container {
    max-width: 1200px;
}

.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.skill-category {
    background: var(--white-color);
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 2px solid #e9ecef;
}

.skill-category h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 3px solid var(--accent-color);
    font-weight: 700;
}

.skill-category h3 i {
    color: var(--accent-color);
    font-size: 1.4rem;
}

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

.skill-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px 15px;
    text-align: center;
    border: 2px solid #e9ecef;
}

.skill-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
}

.skill-item span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text-color);
    display: block;
}

/* --- 8. Contact Form --- */
#contact .container {
    max-width: 800px;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
}

.contact-form p {
    margin-bottom: 30px;
    text-align: center;
    color: var(--light-text-color);
}

.form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--dark-text-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.25);
}

.contact-form button.btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

/* --- 9. Footer --- */
footer {
    background: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 40px 0;
    margin-top: 80px;
}

footer p {
    opacity: 0.7;
}

/* --- 10. Responsive Design --- */
@media (max-width: 992px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.8rem;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-category {
        padding: 25px;
    }

    nav ul {
        flex-wrap: wrap;
    }

    nav ul li a {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .project-buttons {
        flex-direction: column;
    }

    .modal-content {
        padding: 45px 20px 20px 20px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        font-size: 2rem;
    }

    .modal-image {
        max-height: 250px;
    }

    .edu-header {
        flex-direction: column;
        gap: 8px;
    }

    .edu-dates {
        white-space: normal;
    }

    .exp-item {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 0;
    }

    .section h2 {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }
}
