:root {
    --bg-color: #f4f4f4;
    --text-color: #2d2d2d;
    --secondary-text-color: #6d6d6d;
    --accent-color: #c1082e;
}

body {
    font-family: 'Jost', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.portfolio-container {
    display: flex;
    height: 100vh;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-radius: 15px;
}

/* Left Sidebar Styles */
.sidebar {
    width: 350px;
    background-color: var(--bg-color);
    flex-shrink: 0; /* Prevents the sidebar from shrinking when content overflows */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
    overflow-y: auto;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    object-fit: cover;
}

.name {
    font-size: 2.2rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-text-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--secondary-text-color);
    font-size: 1.6rem; /* Larger icons */
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: scale(1.15); /* Slight zoom effect on hover */
}

.resume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.resume-btn:hover {
    background-color: #a30626; /* Darker accent */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.contact-section,
.about-section,
.skills-section {
    width: 100%;
    text-align: left;
    margin-bottom: 2rem;
    padding: 0 1rem;
    box-sizing: border-box;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.section-card h2 {
    display: flex;
    align-items: center;
}

.section-card h2 i {
    margin-right: 0.75rem;
    /* vertical-align is no longer needed with flexbox */
}

.contact-section p,
.about-section p {
    font-size: 0.9rem;    
    color: var(--secondary-text-color);
}

.contact-section p {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Space between icon and text */
}

.contact-section p a {
    color: inherit;
    text-decoration: none;
}

.contact-section p a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* Experience Timeline Section */
.experience-section {
    width: 100%;
    text-align: left;
    margin-bottom: 2rem;
    padding: 0 1rem;
    box-sizing: border-box;
}

.experience-section h2 i {
    vertical-align: middle;
    margin-right: 0.5rem;
}

.timeline {
    position: relative;
    margin-top: 1.5rem;
    padding-left: 1.5rem; /* Space for the timeline line */
    border-left: 2px solid #ddd;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: calc(-1.5rem - 6px + 1px); /* -(padding) - (dot_width/2) + (border_width/2) */
    top: 0.2rem;
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.timeline-content .job-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--text-color);
}

.timeline-content .company-info,
.timeline-content .date-info {
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
    color: var(--secondary-text-color);
}

.skills-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.skills-section li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-text-color);
}

.skills-section h3 i {
    vertical-align: middle;
    margin-right: 0.5rem;
}
.tool-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tool-list span {
    background-color: #e0e0e0;
    color: #444;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Right Main Content Styles */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
}

.project-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.section-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.project-tile {
    position: relative; /* Required for the overlay */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Add cursor pointer to indicate it's clickable */
}

.project-tile:hover {
    transform: translateY(-5px);
}

.project-tile img {
    width: 100%;
    height: 200px; /* Set a fixed height for all tiles */
    display: block;
    object-fit: cover; /* Ensures the image fills the space without distortion */
}

.project-tile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.project-tile:hover .project-tile-overlay {
    transform: translateY(0);
}

.project-tile-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.project-tile-desc {
    font-size: 0.85rem;
    margin: 0;
    color: #e0e0e0;
    /* Hide description initially, show on hover */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0.1s; /* Delay to sync with overlay */
}

.project-tile:hover .project-tile-desc {
    opacity: 1;
}

.tile-view-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 0.8rem;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    transition-delay: 0.2s;
}

.project-tile:hover .tile-view-btn {
    opacity: 1;
    transform: translateY(0);
}

.tile-view-btn:hover {
    background-color: #a30626; /* Darker accent */
}

/* New CSS for Project Filtering */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem; /* Provides spacing for rows and columns */
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid var(--secondary-text-color);
    color: var(--secondary-text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.filter-btn i {
    margin-right: 0.5rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
}
/* New CSS for Contact Section in main content */
.contact-section-main {
    /* Detach from above and make it stylish */
    margin-top: 4rem; /* Increased margin for separation */
    background: linear-gradient(45deg, var(--accent-color), #a30626); /* Stylish gradient */
    color: #fff; /* Text color for contrast */
    text-align: center; /* Center align all content */
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-section-main h2 {
    color: #fff; /* Override default accent color for h2 */
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto; /* Center the paragraph and add bottom margin */
    line-height: 1.6;
}

.contact-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.contact-options .book-btn, .contact-options .email-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}


.book-btn, .email-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.book-btn {
    /* Make buttons pop on the new background */
    background-color: #fff;
    color: var(--accent-color);
    border: none;
    cursor: pointer;
}

.book-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.email-btn {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
    display: inline-block;
    text-align: center;
}

.email-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

#contactForm input,
#contactForm textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Jost', sans-serif;
    color: var(--text-color); /* Text color when typing */
    background-color: #f4f4f4; /* Lighter background for fields */
}

#contactForm button {
    padding: 0.75rem;
    background-color: #fff;
    color: var(--accent-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#contactForm button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* New CSS for Image Modal */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-container {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 1100px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation-name: zoom;
    animation-duration: 0.6s;
}

.modal-body {
    display: flex;
    gap: 2rem;
}

.modal-gallery {
    flex: 2; /* Takes up 2/3 of the space */
}

.modal-main-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.modal-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modal-thumbnail-img {
    width: 100px;
    height: 65px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.modal-thumbnail-img:hover, .modal-thumbnail-img.active {
    border-color: var(--accent-color);
}

.modal-description {
    flex: 1; /* Takes up 1/3 of the space */
    color: var(--secondary-text-color);
    overflow-y: auto;
    max-height: 70vh;
}

.modal-description h2 {
    margin-top: 0;
}

.modal-description p {
    line-height: 1.6;
}

.modal-view-btn {
    display: none; /* Hidden by default, shown by JS */
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-view-btn:hover {
    background-color: #a30626; /* Darker accent */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.modal-view-btn i {
    font-size: 1.2rem;
}
@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.close {
    position: absolute; /* Relative to modal-container */
    top: 1rem;
    right: 1.5rem;
    color: #f1f1f1;
    font-size: 2.5rem; /* 40px */
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
}

.modal-container .close {
    color: #333; /* Make close button visible on white background */
    opacity: 0.6;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
}

/* Responsive design */
@media (max-width: 992px) {
    .portfolio-container {
        flex-direction: column;
        height: auto;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    .main-content {
        padding: 1rem;
    }
    .modal-body {
        flex-direction: column;
    }
}

/* Class used by JavaScript to hide project sections */
.hidden {
    display: none;
}