/* ==========================================================================
   Franco Leone Portfolio - Custom Stylesheet (Editorial Grayscale)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda+SC:wght@700&family=Inter:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* Design Tokens & Variables */
:root {
    --bg-color: #ffffff;
    --bg-secondary: #fafafa;
    --text-color: #555555;
    --text-muted: #888888;
    --heading-color: #111111;
    --border-color: #f0f0f0;
    
    /* Dark Theme Footer Variables */
    --footer-bg: #0d0d0d;
    --footer-text: #ffffff;
    --footer-text-secondary: #888888;
    --footer-border: #1f1f1f;
    
    /* Layout */
    --max-width: 680px;
}

/* Reset & Baseline Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

html {
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.625;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    padding-bottom: 0 !important; /* Strict reset to prevent dynamic overflow bleed under the footer */
}

/* Primary Container */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 0 1.5rem;
}

/* Header and Language Selector */
.portfolio-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.cv {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cv-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--heading-color);
    padding: 0 0.15rem;
    transition: color 0.2s ease;
}

.header-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0 0.15rem;
    transition: color 0.2s ease;
    color: var(--text-muted);
}

.header-icons svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.header-icons:hover {
    color: var(--heading-color);
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.15rem;
    transition: color 0.2s ease;
}

.lang-btn:hover {
    color: var(--heading-color);
}

.lang-btn.active {
    color: var(--heading-color);
    font-weight: 600;
}

.lang-divider {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    color: #dddddd;
    font-size: 0.65rem;
    pointer-events: none;
    user-select: none;
}

/* Generic Section Styles */
section {
    padding: 4.5rem 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--heading-color);
    margin-bottom: 2.25rem;
}

/* Section 1: Hero / Introduction (Inter ONLY) */
.hero {
    border-top: none;
    padding-top: 0;
    padding-bottom: 5rem;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.65;
    color: var(--text-color);
    letter-spacing: -0.01em;
    margin-bottom: 2.5rem;
    text-align: justify; /* Justified Hero Subtitle */
}

.hero-objective {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--heading-color);
    border-left: 2px solid var(--heading-color);
    padding-left: 1.25rem;
    margin-top: 2rem;
}

/* Section 2: Live Learning Log */
.log-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-container::before {
    content: '';
    position: absolute;
    top: 0.9rem;
    bottom: 0.9rem;
    left: 97px;
    width: 1px;
    background-color: var(--border-color);
}

.log-entry {
    display: grid;
    grid-template-columns: 85px 1fr;
    gap: 1.5rem;
    align-items: baseline;
    padding: 0.5rem 0.8rem;
    margin: 0 -0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.log-container:hover .log-entry {
    opacity: 0.75;
}

.log-container .log-entry:hover {
    opacity: 1;
    background-color: var(--bg-secondary);
}

.log-container:hover .log-entry:hover .log-stamp {
    color: var(--heading-color);
}

.log-container:hover .log-entry:hover .log-stamp::after {
    background-color: var(--heading-color);
}

.log-container:hover .log-entry:first-child:not(:hover) .log-stamp {
    color: var(--text-muted);
}

.log-container:hover .log-entry:first-child:not(:hover) .log-stamp::after {
    background-color: var(--text-muted);
}

.log-stamp {
    display: inline-block;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.log-stamp::after {
    content: '';
    position: absolute;
    left: 97px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--text-muted);
    transform: translate(-50%, -50%);
    border: 2px solid var(--bg-color);
    z-index: 1;
    transition: background-color 0.2s ease;
}

.log-entry:first-child .log-stamp {
    color: var(--heading-color);
}

.log-entry:first-child .log-stamp::after {
    background-color: var(--heading-color);
}

.log-entry {
    margin-bottom: 0.5rem;
}

.log-entry:last-child {
    margin-bottom: 0;
}

/* By default, Entry 3 has no bottom margin when collapsed */
.log-container:not(.is-open) .log-entry:nth-child(3) {
    margin-bottom: 0;
}

/* Expandable Drawer Styling */
.log-extra-drawer {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.log-extra-drawer.is-open {
    max-height: 1200px;
    opacity: 1;
}

/* Drawer open margins */
.log-container.is-open .log-entry:nth-child(3) {
    margin-bottom: 0.5rem;
}

/* Interactive Log Toggle Button */
.log-toggle-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.log-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--heading-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    background-color: var(--bg-color);
}

.log-toggle-btn:hover {
    background-color: var(--heading-color);
    color: var(--bg-color);
    border-color: var(--heading-color);
}

.log-toggle-btn .toggle-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

@media (max-width: 480px) {
    .log-container {
        padding-left: 20px;
    }
    .log-container::before {
        left: 6px;
        top: 0.8rem;
        bottom: 0.8rem;
    }
    .log-entry {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.4rem 0.6rem;
        margin: 0 -0.6rem;
    }
    .log-stamp::after {
        left: 6px;
    }
}

.log-detail {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-color);
    text-align: justify; /* Justified Live Log description */
}

.log-meta {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--heading-color);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    margin-left: 0.5rem;
    display: inline-block;
}

/* Section 3: Skills Section - Horizontal Marquee */
.skills-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    background-color: var(--bg-color);
}

.skills-marquee {
    display: flex;
    gap: 3rem;
    white-space: nowrap;
    overflow-x: hidden;
    user-select: none;
    pointer-events: none; /* Disables mouse dragging and text highlighting entirely */
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--heading-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.skill-tag img,
.skill-tag svg {
    width: 13px;
    height: 13px;
    object-fit: contain;
    /* Native brand colors enabled */
}

.skill-separator {
    color: #cccccc;
    font-weight: 300;
}

/* Interactive Skills Toggle and Expandable Drawer Styling */
.skills-toggle-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.skills-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--heading-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    background-color: var(--bg-color);
}

.skills-toggle-btn:hover {
    background-color: var(--heading-color);
    color: var(--bg-color);
    border-color: var(--heading-color);
}

.skills-toggle-btn .toggle-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.skills-detail-drawer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s ease, margin-top 0.4s ease;
}

.skills-detail-drawer.is-open {
    max-height: 900px; /* Adjust to hold content comfortably */
    opacity: 1;
    margin-top: 2rem;
}

/* Restoring matrix list rules inside the drawer */
.skills-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

.skills-matrix-cell {
    padding: 1.75rem;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 580px) {
    .skills-matrix {
        grid-template-columns: 1fr;
    }
}

.skill-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.85rem;
    letter-spacing: 0.02em;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.skill-item {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-bullet {
    width: 4px;
    height: 4px;
    background-color: var(--text-muted);
    border-radius: 50%;
    display: inline-block;
}

/* Section 4: Project Registry - Editorial 1:1 Card Carousel (Mouse Scroll Only) */
.carousel-wrapper {
    position: relative;
    width: 100%;
}

.project-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    padding: 0.5rem 0;
    cursor: grab; /* Desktop visual hint for drag */
    user-select: none; /* Prevent highlighting text during drag */
}

.project-carousel:active {
    cursor: grabbing;
}

.project-carousel::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome/Safari */
}

.project-card {
    flex: 0 0 75%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 3rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--bg-color);
    aspect-ratio: 1 / 1; /* Strict 1:1 square card constraint */
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.project-card-case {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--heading-color);
    letter-spacing: 0.05em;
}

.project-card-metrics {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--heading-color);
    letter-spacing: -0.01em;
}

.project-card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-card-title {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--heading-color);
    margin-bottom: 0.75rem;
}

.project-card-desc {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-card-quote-wrap {
    margin-top: 1.5rem;
    position: relative;
    padding: 0;
}

.quote-icon {
    width: 20px;
    height: 20px;
    color: var(--text-color);
    margin-bottom: 0.6rem;
    display: block;
}

.project-card-quote {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.625;
    margin: 0;
    padding: 0 1rem;
    border-left: none;
    text-align: center;
}

@media (max-width: 520px) {
    .project-card {
        flex: 0 0 88%;
        padding: 1.75rem;
    }
    .project-card-title {
        font-size: 1.15rem;
        margin-bottom: 0.5rem;
    }
    .project-card-desc {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    .project-card-quote {
        font-size: 0.78rem;
        padding-left: 1rem;
    }
}

/* Section 5: Certifications and Badges - Styled in Matrix-like Pattern */
/* ==========================================================================
   Certifications Matrix Styles (4 reimagined options stack)
   ========================================================================== */

/* Reusable Certifications Demo Utilities */
.certs-demo-option {
    margin-top: 3.5rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 2rem;
}

.certs-demo-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: block;
}

/* ==========================================
   OPTION 3: Minimalist Horizontal Ledger Rows
   ========================================== */
.certs-ledger {
    display: flex;
    flex-direction: column;
}

.cert-row-ledger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    gap: 2rem;
    cursor: pointer;
}

.certs-ledger .cert-row-ledger:first-child {
    border-top: 1px solid var(--border-color);
}

.cert-row-ledger:hover {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    background-color: var(--bg-secondary);
    border-bottom-color: var(--heading-color);
}

.cert-left-ledger {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cert-badge-box-ledger {
    width: 56px; /* Unified square layout width */
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cert-badge-ledger {
    width: 100%; /* Force all icons to have the exact same width */
    height: auto;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.cert-row-ledger:hover .cert-badge-ledger {
    opacity: 1;
}

.cert-info-ledger {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cert-title-ledger {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--heading-color);
}

.cert-org-ledger {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
}

.cert-right-ledger {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.cert-status-tag-ledger {
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: bold;
    color: #10b981;
    letter-spacing: 0.05em;
}

.cert-status-tag-ledger.expired {
    color: #e4c413;
    letter-spacing: 0.11em;
}

.cert-status-tag-ledger.expected {
    color: #ef4444;
}

.cert-arrow-ledger {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.cert-row-ledger:hover .cert-arrow-ledger {
    transform: translateX(4px);
    color: var(--heading-color);
}



/* Section 6: Footer Layout & Constraints */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden; /* Avoid layout offset bleed */
    padding: 5.5rem 0 0 0;
    box-sizing: border-box;
    margin-top: 6rem;
}

.footer-content-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1.7fr;
    gap: 2rem;
    margin-bottom: 2.0rem;
}

@media (max-width: 650px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 2.0rem;
    }
}

.footer-col {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}

.footer-col.col-brand {
    border-right: 1px solid var(--footer-border);
    padding-right: 1.5rem;
}

@media (max-width: 650px) {
    .footer-col.col-brand {
        border-right: none;
        border-bottom: 1px solid var(--footer-border);
        padding-right: 0;
        padding-bottom: 2rem;
    }
}

.footer-brand-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--footer-text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.footer-brand-subtitle {
    font-weight: 300;
    color: var(--footer-text-secondary);
    margin-bottom: 1.75rem;
}

/* Reimaged status display as technical indicator */
.footer-status-wrapper {
    margin-bottom: 1.5rem;
}

.status-indicator {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--footer-text);
    border: 1px solid var(--footer-border);
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: #121212;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.pulse-green {
    background-color: #00ff66;
    box-shadow: 0 0 8px rgba(0, 255, 102, 0.6);
    animation: statusPulse 2s infinite ease-in-out;
}

.pulse-blue {
    background-color: #0099ff;
    box-shadow: 0 0 8px rgba(0, 153, 255, 0.6);
    animation: statusPulse 2s infinite ease-in-out 0.5s;
}

@keyframes statusPulse {
    0% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0.3; transform: scale(0.9); }
}

.footer-copyright {
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--footer-text-secondary);
}

.footer-col-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--footer-text-secondary);
    margin-bottom: 1.25rem;
}

/* Nav links: gray titles, white hover with animated slide line from left */
.footer-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-nav-links a {
    color: var(--footer-text-secondary); /* same gray as titles */
    text-decoration: none;
    font-weight: 400;
    font-size: 0.85rem;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.footer-nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: bottom left;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.footer-nav-links a:hover {
    color: #ffffff;
}

.footer-nav-links a:hover::after {
    transform: scaleX(1);
    opacity: 1;
}

/* Location Clock styling */
.footer-clock-wrapper {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--footer-text-secondary);
    margin-bottom: 1.75rem;
    font-variant-numeric: tabular-nums;
}

.footer-social-icons {
    display: flex;
    gap: 1.25rem;
}

.social-icon-link {
    color: var(--footer-text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    will-change: transform, color;
}

.social-icon-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.social-icon-link:hover {
    color: var(--footer-text);
    transform: translateY(-2px);
}

/* Bottom Anchor Signature Clipping styling with hardware optimization layers to prevent flash bugs */
.footer-signature-container {
    width: 100%;
    overflow: hidden; /* Clips signature at baseline */
    display: flex;
    justify-content: center;
    user-select: none;
    pointer-events: none;
    transform: translate3d(0, 0, 0); /* Force composition layer */
    backface-visibility: hidden;
    margin-top: 1.5rem;
}

.footer-signature-text {
    font-family: 'Bodoni Moda SC', Georgia, serif; /* Final font choice */
    font-size: 12em;
    font-weight: 700;
    color: var(--footer-text);
    line-height: 0.85;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.01em;
    transform: translateY(0.65vw) translateZ(0); /* Pushes signature down & isolates layer rendering */
    backface-visibility: hidden;
    will-change: transform;
    display: block;
}

/* ==========================================================================
   Certifications Details Modal Overlay
   ========================================================================== */
.cert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 13, 13, 0.7); /* high-contrast dark overlay */
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-modal-overlay.is-active {
    display: flex;
    opacity: 1;
}

.cert-modal-box {
    position: relative;
    width: auto;
    height: 80vh;
    max-width: 90vw;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cert-modal-overlay.is-active .cert-modal-box {
    transform: translateY(0);
}

.cert-modal-content {
    width: auto;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    background-color: #fdfdfb;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cert-modal-canvas {
    height: 100%;
    width: auto;
    max-height: 80vh;
    display: block;
}

.cert-modal-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 1510;
}

.cert-modal-close:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .cert-modal-box {
        width: 95vw;
        height: auto;
        max-height: 75vh;
    }
    .cert-modal-canvas {
        width: 100%;
        height: auto;
        max-height: 75vh;
    }
    .cert-modal-close {
        top: 1rem;
        right: 1rem;
        color: #111111;
        background-color: rgba(255, 255, 255, 0.85);
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
}

/* Footer Hosting & Build Credits */
.footer-credits-container {
    margin-top: 0;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    text-align: center;
    width: 100%;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.footer-credits-text {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--footer-text-secondary);
    letter-spacing: 0.04em;
    line-height: 1.6;
    margin: 0.3rem auto;
    text-align: center;
}

.credits-logo-inline {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 0.25rem;
}

.credits-svg{
    filter: grayscale(100%);
    fill: currentColor;
    height: 0.8rem;
}