/* =================== Global =================== */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
}

::selection {
    color: #fff;
    background: #3b3b3b;
}

/* =================== Header =================== */
header {
    text-align: center;
    padding: 60px 20px 40px 20px;
}

header h1 {
    margin: 0 0 12px 0;
    font-weight: 700;
    font-size: 2.4rem;
    letter-spacing: 0.5px;
}

header p {
    margin: 6px 0 25px 0;
    font-weight: 400;
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}

header p.description {
    color: #34495e;
    font-size: 1rem;
    margin-top: 8px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 4px 0 0 0;
}

/* =================== Social Vignettes =================== */
.social-vignettes {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #111;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.social-card img {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
    transition: transform 0.25s ease;
}

.social-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

.social-card:hover img {
    transform: scale(1.1);
}

.social-card:hover span {
    opacity: 0.8;
}

/* =================== Main / Links =================== */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    margin-bottom: 500px;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 400px;
}

.link-card {
    display: block;
    padding: 22px;
    text-align: center;
    background: #111;
    color: #fff;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s ease, background 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: relative;
}

.link-card:hover {
    transform: translateY(-4px);
    background: #333;
}

/* =================== Filters =================== */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.filters input, .filters select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    flex: 0 1 250px;
    min-width: 150px;
}

/* =================== About Me =================== */
.about-me {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: justify;
    color: #333;
    font-size: 1rem;
    line-height: 1.7;
}

.about-me h2 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: #2c3e50;
}

/* =================== Project Cards =================== */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.project-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 16px;
    border-radius: 8px;
    background-color: #ecf0f1;
    padding: 10px;
    flex-shrink: 0;
}

.project-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.project-module {
    font-size: 0.9rem;
    color: #2980b9;
    margin-bottom: 6px;
    font-weight: 500;
}

.project-title {
    margin: 0 0 6px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.project-dates {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 0 0 8px 0;
}

.project-summary {
    font-size: 0.95rem;
    color: #34495e;
    margin-bottom: 10px;
    line-height: 1.4;
}

.project-link a {
    display: inline-block;
    padding: 8px 14px;
    background-color: #111;
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}

.project-link a:hover {
    background-color: #333;
}

.favorite-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.4em;
    color: #7f8c8d;
}

/* =================== Navigation Links =================== */
.nav-link {
    color: #7f8c8d !important;
}

.nav-link.active {
    color: #2c3e50 !important;
}

.nav-link:hover {
    color: black !important;
}

/* =================== Project Link Cards =================== */
.project-link-card {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.project-link-card .card {
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #fff;
    position: relative;
}

.project-link-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 0.5rem;
}

.project-link-card .card img {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease, filter 0.3s ease;
    margin-right: 1rem;
}

.project-link-card:hover .card {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

.project-link-card:hover .card-body,
.project-link-card:hover img {
    filter: blur(3px);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(43, 129, 186, 0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.project-link-card:hover .card-overlay {
    opacity: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-text {
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
}

.text-muted small {
    font-size: 0.85rem;
}

.card-header {
    display: flex;
    align-items: center;
    padding: 1rem;
}

/* =================== Favorite Projects Container =================== */
#favoriteProjects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

#favoriteProjects .col-12,
#favoriteProjects .col-sm-6,
#favoriteProjects .col-lg-4 {
    display: flex;
    justify-content: center;
}

/* =================== Responsive =================== */
@media(max-width: 600px) {
    .project-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project-image {
        margin: 16px auto 0 auto;
    }

    .project-content {
        padding: 12px;
    }

    .project-link {
        text-align: center;
    }
}

@media (max-width: 500px) {
    .links-container {
        gap: 18px;
    }

    .link-card {
        font-size: 1rem;
        padding: 18px;
    }

    .social-vignettes {
        gap: 15px;
    }
}
