/*==================== MODERN SHARED SECTIONS ====================*/

/* GRID LAYOUTS */
.modern-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    /* Add side padding for mobile */
}

@media screen and (min-width: 768px) {
    .modern-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Base Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 1.25rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.85);
    border-color: #fff;
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
    .glass-card {
        padding: 1.25rem;
        /* Reduced padding on mobile */
    }

    .cert-header {
        gap: 0.75rem;
        /* Tighter gap */
    }

    .cert-icon-box {
        width: 40px;
        /* Smaller icon on mobile */
        height: 40px;
        font-size: 1.2rem;
    }
}

/*==================== CERTIFICATIONS ====================*/
.cert-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cert-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.cert-icon-box {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, hsl(var(--hue-color), 20%, 97%), #fff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1.5rem;
    color: var(--first-color);
    overflow: hidden;
    /* Ensure image doesn't overflow border-radius */
    padding: 5px;
    /* Padding for the image */
    background: #fff;
    /* White background for logos */
}

.cert-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cert-info {
    flex: 1;
}

.cert-title {
    font-size: var(--normal-font-size);
    font-weight: 600;
    color: var(--title-color);
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.cert-issuer {
    font-size: var(--smaller-font-size);
    color: var(--text-color);
    opacity: 0.8;
}

.cert-body {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cert-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cert-date {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 1rem;
    color: var(--text-color-light);
}

.cert-link {
    font-size: var(--small-font-size);
    color: var(--first-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cert-link:hover {
    gap: 0.6rem;
}

/*==================== PUBLICATIONS ====================*/
/* Full width for publications often looks better */
.pub-grid {
    grid-template-columns: 1fr;
}

.pub-card {
    border-left: 4px solid var(--first-color);
}

.pub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.pub-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--first-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
}

.pub-title {
    font-size: var(--h3-font-size);
    font-weight: 600;
    color: var(--title-color);
    margin-bottom: 0.5rem;
}

.pub-meta {
    display: flex;
    gap: 1rem;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.pub-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pub-snippet {
    font-size: var(--small-font-size);
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.pub-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pub-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/*==================== MODERN FOOTER ====================*/
.modern-footer {
    background-color: var(--first-color);
    /* Reverted to original brand color */
    padding-top: 3rem;
    padding-bottom: 3rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media screen and (min-width: 768px) {
    body {
        margin: 0;
        /* Fix: Remove bottom mobile-nav margin on desktop */
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
        align-items: center;
    }
}

/* Brand Section */
.footer-brand h1 {
    font-size: var(--h1-font-size);
    color: #fff;
    /* White title on dark bg */
    margin-bottom: 0.25rem;
}

.footer-brand span {
    font-size: var(--small-font-size);
    color: #fff;
    /* White subtitle */
    font-style: normal;
    /* Override existing span italic */
}

/* Links Section */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #fff;
    /* White links */
    font-weight: 500;
    font-size: var(--small-font-size);
    transition: color 0.3s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #fff;
    /* White underline */
    transition: width 0.3s ease;
}

.footer-link:hover {
    opacity: 0.8;
}

.footer-link:hover::after {
    width: 100%;
}

/* Social Icons - Glassmorphic Buttons */
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

@media screen and (min-width: 768px) {
    .footer-socials {
        justify-content: flex-end;
    }
}

.social-glass {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Glass Effect for Dark Bg */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    font-size: 1.25rem;
    color: #fff;
    /* White icon */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-glass:hover {
    transform: translateY(-5px) scale(1.1);
    background: #fff;
    /* White fill on hover */
    color: var(--first-color);
    /* Brand color icon on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: #fff;
}

/* Copyright */
.footer-copy {
    text-align: center;
    margin-top: 3rem;
    font-size: var(--smaller-font-size);
    color: rgba(255, 255, 255, 0.6);
    /* Light text */
}