/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* General styles */
body {
    font-family: 'Poppins', sans-serif;
}

h2 {
    font-weight: 600;
    font-size: 2.5em;
    margin-bottom: 0.5em;
    color: #333;
}

/* About section styles */
.about-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #34495e;
    font-size: 0.95em;
}

/* Social icons styles */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
}

.social-icons a {
    color: #3498db;
    font-size: 2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(52, 152, 219, 0.1);
}

.social-icons a:hover {
    color: #fff;
    background-color: #9b6bb5;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.social-icons i {
    transition: transform 0.3s ease;
}

.social-icons a:hover i {
    transform: scale(1.1);
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    height: 80vh;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.expand-btn {
    background: none;
    background-color: #fefefe;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-right: 10px;
    color: #2c3e50;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.expand-btn:hover {
    background-color: #fefefe;
}

.close:hover,
.close:focus
{
    color: #2c3e50;
    text-decoration: none;
}

#cvPdf {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    border: none;
}

/* Project Grid Styles */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    height: auto;
    cursor: pointer;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
    min-width: 300px; /* Ensure minimum width */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.project-card.expanded {
    height: auto;
    width: calc(100% + 40px); /* Expand width */
    margin-left: -20px; /* Adjust to center */
    margin-right: -20px; /* Adjust to center */
}

.project-info h3 {
    margin-top: 0;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.2em;
}

.project-info p {
    color: #34495e;
    font-size: 0.9em;
    line-height: 1.4;
}

.expanded-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.project-card.expanded .expanded-content {
    max-height: 1000px;
    opacity: 1;
}

.project-links {
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #9b6bb5;
}

.project-link::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.project-link:hover::after {
    transform: translateX(3px);
}

.tech-icons {
    margin-top: 10px;
    color: #8e44ad;
}

.tech-icons i {
    margin-right: 10px;
    font-size: 1.2em;
}

.project-status {
    position: absolute;
    top: -10px; /* Adjusted */
    right: -10px; /* Adjusted */
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
}

.project-date {
    display: block;
    font-size: 0.8em;
    color: #7f8c8d;
    margin-top: 10px;
}

.project-card:hover .project-links,
.project-card.expanded .project-links {
    opacity: 1;
}

.project-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-btn {
    background: none;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 5px 15px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: #3498db;
    color: white;
}

.github-link {
  display: inline-flex;
  align-items: center;
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
  margin-right: 15px;
  transition: color 0.3s ease;
}

.contact-card .project-info {
  text-align: center;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.contact-icons .github-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #007bff;
}

.contact-icons .github-link:hover {
  color: #9b6bb5;
}

.contact-icons .github-link i {
  font-size: 1.5em;
}

/* Pagination Styles*/
.pagination {
  text-align: center;
  margin-top: 20px;
}

.pagination button {
  padding: 10px;
  margin: 0 5px;
  border: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

.pagination button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.page-info {
  font-size: 1.2em;
}


@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card,
    .project-card:hover {
        height: auto;
        min-height: 250px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
