:root {
    --color1: #001233;
    --color2: #efe0ca;
    --color3: #fe5000;
    --color4: #f9f3ea;
    --color5: #0d7164;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color2);
    color: var(--color1);
    overflow-x: hidden;
}

::selection {
    background: var(--color3);
    color: white;
}

.formula {
    position: absolute;
    font-family: "Times New Roman", serif;
    color: rgba(0, 18, 51, 0.16);
    font-size: clamp(1rem, 2vw, 2rem);
    animation: float 8s ease-in-out infinite;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

.formula.orange {
    color: rgba(254, 80, 0, 0.22);
}

.formula.green {
    color: rgba(13, 113, 100, 0.22);
}

.formula.light {
    color: rgba(249, 243, 234, 0.24);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-18px) rotate(1deg);
    }
}

.dot-grid {
    background-image: radial-gradient(rgba(254, 80, 0, 0.30) 1px, transparent 1px);
    background-size: 18px 18px;
}

.navy-grid {
    background-image:
        linear-gradient(rgba(0, 18, 51, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 18, 51, 0.08) 1px, transparent 1px);
    background-size: 36px 36px;
}

.atom-panel {
    background:
        radial-gradient(circle at center, rgba(249, 243, 234, 0.95) 0%, rgba(239, 224, 202, 0.72) 46%, rgba(254, 80, 0, 0.13) 72%, transparent 100%);
}


.puzzle-card {
    position: relative;
    overflow: hidden;
    transition: transform .35s ease, filter .35s ease;
}

.puzzle-card:hover {
    transform: translateY(-4px);
    filter: contrast(1.04);
    z-index: 2;
}

.puzzle-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(currentColor 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: .08;
    pointer-events: none;
}

.word {
    font-weight: 900;
    line-height: .9;
    display: inline-block;
    transition: transform .25s ease;
}

.word:hover {
    transform: scale(1.08) rotate(0deg);
    color: var(--color3);
}

input,
textarea,
button {
    border-radius: 0 !important;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.resource-step {
    position: relative;
    min-height: 126px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid rgba(239, 224, 202, .12);
    transition: filter .3s ease, box-shadow .3s ease;
}

.resource-step:hover {
    z-index: 1;
    filter: brightness(1.06);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.22);
}

.resource-step--orange { color: #fff; background: #fe5000; }
.resource-step--sand { color: #001233; background: #efe0ca; }
.resource-step--white { color: #001233; background: #fff; }
.resource-step--green { color: #fff; background: #0d7164; }
.resource-step--blue { color: #efe0ca; background: #163054; }

.resource-index {
    align-self: start;
    color: currentColor;
    opacity: .48;
    font: 600 13px "Cormorant Garamond", serif;
}

.resource-name {
    margin-bottom: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 12px;
}

.resource-desc {
    max-width: 390px;
    font-size: 13px;
    line-height: 1.65;
    opacity: .76;
}

.resource-arrow {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    opacity: .55;
    transition: opacity .3s ease, transform .3s ease;
}

.resource-step:hover .resource-arrow { opacity: 1; transform: translate(2px, -2px); }

/* ============================================
   OVERLAY CONTACT
   ============================================ */
.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 18, 51, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
}

.contact-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-overlay-content {
    background: #efe0ca;
    border-radius: 0;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 50px;
    position: relative;
    transform: translateY(40px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.3);
}

.contact-overlay.active .contact-overlay-content {
    transform: translateY(0) scale(1);
}

/* Scrollbar personnalisée */
.contact-overlay-content::-webkit-scrollbar {
    width: 6px;
}

.contact-overlay-content::-webkit-scrollbar-track {
    background: rgba(0, 18, 51, 0.05);
    border-radius: 10px;
}

.contact-overlay-content::-webkit-scrollbar-thumb {
    background: #fe5000;
    border-radius: 10px;
}

.contact-close-btn {
    position: sticky;
    top: 0;
    float: right;
    background: #001233;
    color: #efe0ca;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    margin-bottom: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-close-btn:hover {
    background: #fe5000;
    transform: rotate(90deg);
    box-shadow: 0 8px 25px rgba(254, 80, 0, 0.3);
}

.contact-overlay-content::after {
    content: '';
    display: table;
    clear: both;
}

.contact-grid-full {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    clear: both;
}

.contact-info-full {
    padding-right: 20px;
}

.contact-badge {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.45em;
    color: #fe5000;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
}

.contact-title {
    font-family: serif;
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #001233;
}

.contact-line {
    width: 60px;
    height: 3px;
    background: #fe5000;
    margin-bottom: 20px;
    border-radius: 2px;
}

.contact-text {
    font-size: 18px;
    color: rgba(0, 18, 51, 0.7);
    line-height: 1.8;
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-detail-item i {
    color: #fe5000;
    font-size: 20px;
    margin-top: 4px;
    width: 24px;
    flex-shrink: 0;
}

.contact-detail-item div {
    display: flex;
    flex-direction: column;
}

.contact-detail-item strong {
    color: #001233;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.contact-detail-item a,
.contact-detail-item span {
    color: rgba(0, 18, 51, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-detail-item a:hover {
    color: #fe5000;
}

/* Formulaire */
.contact-form-styled {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(0, 18, 51, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    transition: all 0.3s ease;
    color: #001233;
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #fe5000;
    background: white;
    box-shadow: 0 0 0 4px rgba(254, 80, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group label {
    position: absolute;
    left: 20px;
    top: 16px;
    color: rgba(0, 18, 51, 0.5);
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 16px;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 14px;
    font-size: 12px;
    background: #efe0ca;
    padding: 0 6px;
    color: #fe5000;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

.contact-submit-btn {
    background: #001233;
    color: #efe0ca;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 10px;
}

.contact-submit-btn:hover {
    background: #fe5000;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(254, 80, 0, 0.3);
}

.contact-submit-btn:active {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .contact-overlay-content {
        padding: 40px 30px;
    }
    
    .contact-grid-full {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info-full {
        padding-right: 0;
        order: 2;
    }
    
    .contact-form-full {
        order: 1;
    }
    
    .contact-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    /* Responsive existant */
    .formula {
        display: none;
    }

    .grid.md\:grid-cols-6 {
        display: flex;
        flex-direction: column;
    }

    .blog-card-min-h {
        min-height: 280px;
    }

    /* Responsive overlay */
    .contact-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .contact-overlay-content {
        padding: 25px 20px 30px;
        border-radius: 0;
        max-height: 95vh;
    }
    
    .contact-close-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .contact-title {
        font-size: 32px;
    }
    
    .contact-text {
        font-size: 15px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .contact-submit-btn {
        padding: 16px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .contact-overlay-content {
        padding: 20px 15px 25px;
        border-radius: 0;
    }
    
    .contact-title {
        font-size: 28px;
    }
    
    .contact-close-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 14px;
        left: 14px;
        top: 12px;
    }
    
    .contact-submit-btn {
        padding: 14px 20px;
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    /* Responsive existant */
    .word {
        line-height: 1.2;
    }

    .resources-grid { grid-template-columns: 1fr; }

    .resource-step {
        min-height: 112px;
        grid-template-columns: 32px minmax(0, 1fr) auto;
        padding: 18px 16px;
        gap: 12px;
    }

    .resource-name { font-size: 11px; }
    .resource-desc { font-size: 11px; }
    .resource-arrow { width: 32px; height: 32px; }
}


/* ============================================
   OVERLAY RECHERCHE (APPLE-LIKE)
   ============================================ */
   .search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 18, 51, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 100%;
    max-width: 720px;
    padding: 0 24px;
    transform: translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

/* Header de recherche */
.search-header {
    margin-bottom: 32px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fe5000;
    box-shadow: 0 0 0 4px rgba(254, 80, 0, 0.1);
}

.search-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-left: 20px;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: #fe5000;
}

.search-input {
    flex: 1;
    padding: 18px 16px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 18px;
    color: #efe0ca;
    font-family: inherit;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-close-btn {
    flex-shrink: 0;
    margin-right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
}

.search-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

/* Résultats */
.search-results {
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;
}

.search-results::-webkit-scrollbar {
    width: 4px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #fe5000;
    border-radius: 10px;
}

/* Placeholder */
.search-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.3);
}

.search-placeholder-icon {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.1);
}

.search-placeholder-text {
    font-size: 16px;
    margin-bottom: 24px;
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.search-suggestion-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-suggestion-tag:hover {
    background: rgba(254, 80, 0, 0.2);
    color: #fe5000;
    transform: scale(1.05);
}

/* Liste des résultats */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(254, 80, 0, 0.2);
    transform: translateX(4px);
}

.search-result-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.search-result-icon.blog {
    background: rgba(254, 80, 0, 0.15);
    color: #fe5000;
}

.search-result-icon.project {
    background: rgba(13, 113, 100, 0.15);
    color: #0d7164;
}

.search-result-icon.page {
    background: rgba(0, 18, 51, 0.15);
    color: #001233;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.search-result-title mark {
    background: rgba(254, 80, 0, 0.3);
    color: #fe5000;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-description mark {
    background: rgba(254, 80, 0, 0.2);
    color: #fe5000;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-left: 8px;
}

.search-result-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.3);
}

.search-result-empty svg {
    margin: 0 auto 16px;
    color: rgba(255, 255, 255, 0.1);
}

.search-result-empty p {
    font-size: 16px;
}

/* Résultat de recherche chargement */
.search-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.search-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fe5000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .search-overlay {
        padding-top: 40px;
    }
    
    .search-overlay-content {
        padding: 0 16px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 14px 12px;
    }
    
    .search-result-item {
        padding: 12px 16px;
    }
    
    .search-result-title {
        font-size: 14px;
    }
    
    .search-result-description {
        font-size: 12px;
    }
}
/* Unified interface components */
:root {
    --od-navy: #001233;
    --od-beige: #efe0ca;
    --od-orange: #fe5000;
    --od-soft: #f9f3ea;
    --od-green: #0d7164;
    --od-danger: #9f2d20;
    --od-shadow: 0 28px 80px rgba(0, 18, 51, .28);
}
body.overlay-open { overflow: hidden; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.contact-overlay, .search-overlay {
    background: rgba(0, 18, 51, .78);
    backdrop-filter: blur(14px);
}
.contact-overlay-content {
    max-width: 1080px; padding: 0; background: var(--od-soft);
    border-top: 5px solid var(--od-orange); box-shadow: var(--od-shadow);
}
.contact-grid-full { gap: 0; grid-template-columns: .86fr 1.14fr; }
.contact-info-full {
    padding: 64px 52px; background: var(--od-navy); color: var(--od-beige);
}
.contact-form-full { padding: 64px 52px; }
.contact-title { color: var(--od-beige); font-size: clamp(2.5rem, 5vw, 4rem); }
.contact-text, .contact-detail-item a, .contact-detail-item span { color: rgba(239,224,202,.72); }
.contact-detail-item strong { color: var(--od-beige); }
.contact-fallback-link {
    display: inline-block; margin-top: 32px; color: var(--od-orange);
    font-size: 12px; text-transform: uppercase; letter-spacing: .18em;
}
.contact-close-btn {
    position: absolute; top: 18px; right: 18px; margin: 0; float: none;
    background: var(--od-orange); color: white;
}
.contact-form-styled { gap: 18px; }
.form-group label {
    position: static; display: block; margin-bottom: 8px; color: var(--od-navy);
    font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.form-group input, .form-group textarea,
.search-page__form input {
    border: 1px solid rgba(0,18,51,.2); background: white; padding: 15px 16px;
}
.form-group input:focus, .form-group textarea:focus,
.search-page__form input:focus {
    border-color: var(--od-orange); box-shadow: 0 0 0 3px rgba(254,80,0,.14);
}
.field-error { min-height: 18px; margin-top: 5px; color: var(--od-danger); font-size: 12px; }
.form-status { min-height: 22px; font-size: 14px; }
.form-status.is-success { color: var(--od-green); }
.form-status.is-error { color: var(--od-danger); }
.contact-submit-btn {
    background: var(--od-orange); color: white; justify-content: space-between;
    box-shadow: 8px 8px 0 var(--od-navy);
}
.contact-submit-btn:hover { background: var(--od-navy); box-shadow: 8px 8px 0 var(--od-green); }
.contact-submit-btn:disabled { opacity: .65; cursor: wait; }

.search-overlay { padding: 6vh 20px 20px; }
.search-overlay-content {
    max-width: 800px; padding: 0; background: var(--od-soft);
    border-top: 5px solid var(--od-orange); box-shadow: var(--od-shadow);
}
.search-panel-header {
    display: flex; align-items: start; justify-content: space-between;
    padding: 30px 34px 24px; color: var(--od-navy);
}
.search-panel-header h2 { font-family: "Cormorant Garamond", serif; font-size: 32px; }
.search-eyebrow {
    display: block; color: var(--od-orange); text-transform: uppercase;
    letter-spacing: .35em; font-size: 11px; font-weight: 800; margin-bottom: 6px;
}
.search-close-btn {
    margin: 0; background: var(--od-navy); color: var(--od-beige);
    width: 42px; height: 42px;
}
.search-input-wrapper {
    margin: 0 34px 24px; border: 1px solid rgba(0,18,51,.18);
    background: white; border-radius: 0; box-shadow: 6px 6px 0 var(--od-green);
}
.search-input-wrapper:focus-within {
    background: white; border-color: var(--od-orange); box-shadow: 6px 6px 0 var(--od-orange);
}
.search-icon { color: var(--od-navy); }
.search-input { color: var(--od-navy); }
.search-input::placeholder { color: rgba(0,18,51,.45); }
.search-shortcut {
    margin-right: 16px; padding: 5px 7px; color: var(--od-navy);
    border: 1px solid rgba(0,18,51,.2); font-size: 10px;
}
.search-results { padding: 0 34px 20px; max-height: 48vh; }
.search-placeholder { color: rgba(0,18,51,.55); padding: 34px 20px 50px; }
.search-suggestion-tag {
    border: 1px solid rgba(0,18,51,.18); background: var(--od-beige);
    color: var(--od-navy); border-radius: 0;
}
.search-suggestion-tag:hover { background: var(--od-orange); color: white; transform: none; }
.search-result-item {
    border-radius: 0; color: var(--od-navy); background: white;
    border-left: 3px solid transparent; margin-bottom: 6px;
}
.search-result-item:hover, .search-result-item.is-active {
    background: var(--od-beige); border-color: var(--od-orange); transform: translateX(3px);
}
.search-result-title { color: var(--od-navy); }
.search-result-description { color: rgba(0,18,51,.62); display: block; }
.search-result-meta { color: var(--od-green); }
.search-result-icon {
    border-radius: 0; background: var(--od-navy) !important; color: var(--od-beige) !important;
    font-weight: 800;
}
.search-result-icon.project { background: var(--od-green) !important; }
.search-result-icon.resource { background: var(--od-orange) !important; }
.search-result-empty { color: rgba(0,18,51,.6); }
.search-footer {
    display: flex; gap: 18px; padding: 16px 34px; border-top: 1px solid rgba(0,18,51,.1);
    color: rgba(0,18,51,.5); font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
}
.search-footer a { margin-left: auto; color: var(--od-orange); }

.standalone-panel {
    min-height: 100vh; padding: 150px max(24px, calc((100vw - 1100px)/2)) 90px;
    display: grid; grid-template-columns: .85fr 1.15fr; background: var(--od-soft);
}
.standalone-panel__intro { padding: 60px 52px; background: var(--od-navy); color: var(--od-beige); }
.standalone-panel__intro h1, .search-page h1 {
    font-family: "Cormorant Garamond", serif; font-size: clamp(3rem, 7vw, 5rem); line-height: .95;
}
.standalone-panel__intro p { margin-top: 28px; color: rgba(239,224,202,.72); line-height: 1.8; }
.standalone-panel__content { padding: 60px 52px; background: var(--od-beige); }
.notice { margin-top: 26px; padding: 16px; }
.notice--success { background: var(--od-green); color: white; }

.search-page { min-height: 100vh; padding-top: 80px; background: var(--od-soft); }
.search-page__header {
    padding: 80px max(24px, calc((100vw - 1050px)/2)); background: var(--od-navy); color: var(--od-beige);
}
.search-page__form { display: flex; margin-top: 38px; max-width: 760px; }
.search-page__form input { flex: 1; min-width: 0; }
.search-page__form button {
    padding: 0 28px; background: var(--od-orange); color: white; font-weight: 800;
    text-transform: uppercase; letter-spacing: .12em; font-size: 12px;
}
.search-page__results { max-width: 1050px; margin: 0 auto; padding: 48px 24px 90px; }
.result-count { margin-bottom: 22px; color: rgba(0,18,51,.6); }

@media (max-width: 800px) {
    .contact-grid-full, .standalone-panel { grid-template-columns: 1fr; }
    .contact-info-full { padding: 48px 28px; }
    .contact-form-full, .standalone-panel__content { padding: 44px 28px; }
    .standalone-panel { padding: 110px 16px 50px; }
    .standalone-panel__intro { padding: 44px 28px; }
    .search-overlay { padding: 0; }
    .search-overlay-content { min-height: 100%; }
    .search-panel-header, .search-results, .search-footer { padding-left: 20px; padding-right: 20px; }
    .search-input-wrapper { margin-left: 20px; margin-right: 20px; }
    .search-result-meta, .search-shortcut { display: none; }
    .search-page__form { flex-direction: column; }
    .search-page__form button { padding: 16px; }
}

.blog-search {
    display: flex; max-width: 680px; margin-bottom: 42px; box-shadow: 7px 7px 0 var(--od-green);
}
.blog-search input {
    flex: 1; min-width: 0; padding: 16px; background: white;
    border: 1px solid rgba(0,18,51,.18); outline: none;
}
.blog-search input:focus { border-color: var(--od-orange); }
.blog-search button {
    padding: 0 24px; background: var(--od-navy); color: var(--od-beige);
    text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800;
}
.article-gallery { display: grid; gap: 24px; margin: 48px 0; }
.article-gallery img { width: 100%; }
.article-gallery figcaption { margin-top: 8px; color: rgba(0,18,51,.58); font-size: 13px; }
.similar-articles { margin: 52px 0; padding: 30px; background: var(--od-navy); color: var(--od-beige); }
.similar-articles h2 { font-family: "Cormorant Garamond", serif; font-size: 30px; margin-bottom: 18px; }
.similar-articles div { display: grid; gap: 10px; }
.similar-articles a { color: var(--od-orange); }
.prose h2 { margin: 2.1em 0 .7em; font-family: "Cormorant Garamond", serif; font-size: 2rem; color: var(--od-navy); }
.prose h3 { margin: 1.7em 0 .5em; font-size: 1.25rem; font-weight: 800; color: var(--od-navy); }
.prose p { margin: 1em 0; }
.prose ul { margin: 1em 0; padding-left: 1.4em; list-style: square; }
.prose blockquote { margin: 1.5em 0; padding: 18px 22px; border-left: 4px solid var(--od-orange); background: var(--od-soft); }
.prose code { padding: 2px 5px; background: var(--od-navy); color: var(--od-beige); }
@media (max-width: 640px) {
    .blog-search { flex-direction: column; }
    .blog-search button { padding: 15px; }
}
.pagination {
    display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 42px;
}
.pagination a { padding: 12px 18px; background: var(--od-navy); color: var(--od-beige); }
.pagination span { color: rgba(0,18,51,.6); font-size: 14px; }

/* Keep the viewport perfectly stable while a modal hides page scrolling. */
body,
#navbar {
    transition: padding-right 0s;
}
body.overlay-open {
    overflow: hidden;
    padding-right: var(--scrollbar-compensation, 0px);
}
body.overlay-open #navbar {
    padding-right: var(--scrollbar-compensation, 0px);
}
.contact-overlay,
.search-overlay {
    overscroll-behavior: contain;
}
.contact-overlay-content,
.search-overlay-content {
    will-change: transform, opacity;
}
@media (prefers-reduced-motion: reduce) {
    .contact-overlay,
    .search-overlay,
    .contact-overlay-content,
    .search-overlay-content {
        transition-duration: .01ms !important;
    }
}

/* Modal motion: page locks first, panel animates on the next frame. */
.contact-overlay,
.search-overlay {
    opacity: 0;
    visibility: hidden;
    transition:
        opacity .32s cubic-bezier(.22, .61, .36, 1),
        visibility 0s linear .42s;
}
.contact-overlay.active,
.search-overlay.active {
    opacity: 1;
    visibility: visible;
    transition:
        opacity .32s cubic-bezier(.22, .61, .36, 1),
        visibility 0s linear 0s;
}
.contact-overlay-content,
.search-overlay-content {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(.985);
    transition:
        opacity .28s ease,
        transform .42s cubic-bezier(.16, 1, .3, 1);
}
.contact-overlay.active .contact-overlay-content,
.search-overlay.active .search-overlay-content {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.prose .math-block {
    margin: 2.2rem 0; padding: 1.4rem; overflow-x: auto; overflow-y: hidden;
    background: #f9f3ea; border-left: 4px solid #fe5000; text-align: center;
}
.prose pre {
    margin: 2rem 0; padding: 0; overflow: auto; border-left: 4px solid #fe5000;
    background: #001233;
}
.prose pre code { display: block; padding: 1.4rem; background: transparent; font-size: .9rem; line-height: 1.65; }
.prose .article-chart {
    position: relative; height: min(430px, 65vw); margin: 2.5rem 0 4rem;
    padding: 1rem; background: #f9f3ea; border: 1px solid rgba(0,18,51,.12);
}
.prose .chart-caption { margin-top: .8rem; text-align: center; color: rgba(0,18,51,.55); font-size: .8rem; }
.prose .article-chart--error { height: auto; color: #9f2d20; }

/* Modern scientific hero */
.modern-hero {
    position: relative; min-height: 100svh; padding: 118px 0 70px; display: grid;
    align-items: center; overflow: hidden; isolation: isolate;
    color: #efe0ca; background: #001233;
}
.modern-hero__grid-bg {
    position: absolute; inset: 0; z-index: -3;
    background-image:
        linear-gradient(rgba(239,224,202,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(239,224,202,.045) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to right, black, rgba(0,0,0,.28));
}
.modern-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,18,51,.96) 0%, rgba(0,18,51,.84) 46%, rgba(0,18,51,.25) 100%),
        radial-gradient(circle at 80% 45%, rgba(13,113,100,.2), transparent 34%);
}
.modern-hero__glow {
    position: absolute; z-index: -1; border-radius: 50%; filter: blur(110px);
    opacity: .18; pointer-events: none;
}
.modern-hero__glow--orange { width: 380px; height: 380px; left: -180px; bottom: -120px; background: #fe5000; }
.modern-hero__glow--green { width: 480px; height: 480px; right: -180px; top: 8%; background: #0d7164; }
.modern-hero__inner {
    width: min(1380px, calc(100% - 64px)); margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(500px, 1.1fr);
    align-items: center; gap: clamp(35px, 6vw, 100px);
}
.modern-hero__content { position: relative; z-index: 3; }
.modern-hero__eyebrow {
    display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
    color: rgba(239,224,202,.65); font-size: 10px; font-weight: 700;
    letter-spacing: .3em; text-transform: uppercase;
}
.modern-hero__eyebrow span { width: 34px; height: 2px; background: #fe5000; }
.modern-hero h1 {
    margin: 0; max-width: 760px; color: #f9f3ea;
    font: 600 clamp(54px, 6vw, 88px)/.82 "Cormorant Garamond", serif;
    letter-spacing: -.045em;
}
.modern-hero h1 span { display: block; color: #fe5000; font-style: italic; transform: translateX(clamp(12px, 4vw, 58px)); }
.modern-hero__lead {
    max-width: 610px; margin: 36px 0 0; color: rgba(239,224,202,.7);
    font-size: clamp(16px, 1.4vw, 20px); line-height: 1.75;
}
.modern-hero__actions { display: flex; flex-wrap: wrap; gap: 0; margin-top: 38px; }
.hero-action {
    min-height: 54px; padding: 0 24px; display: inline-flex; align-items: center;
    justify-content: center; gap: 24px; border: 1px solid transparent;
    text-decoration: none; text-transform: uppercase; letter-spacing: .16em;
    font-size: 10px; font-weight: 800; transition: .3s cubic-bezier(.16,1,.3,1);
}
.hero-action > span { pointer-events: none; }
.hero-action--primary { color: white; background: #fe5000; }
.hero-action--primary:hover { color: #001233; background: #efe0ca; transform: translateY(-3px); }
.hero-action--secondary { color: #efe0ca; border-color: rgba(239,224,202,.2); background: transparent; }
.hero-action--secondary:hover { border-color: #0d7164; background: #0d7164; }
.modern-hero__signals {
    display: flex; gap: clamp(20px, 4vw, 48px); margin: 54px 0 0;
}
.modern-hero__signals div { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline; }
.modern-hero__signals dt { color: #fe5000; font: 600 18px "Cormorant Garamond", serif; }
.modern-hero__signals dd {
    margin: 0; color: rgba(239,224,202,.46); font-size: 9px;
    letter-spacing: .15em; text-transform: uppercase;
}

.science-visual {
    position: relative; height: clamp(500px, 66vh, 690px); min-width: 0;
    overflow: hidden; border: 1px solid rgba(239,224,202,.12);
    background:
        radial-gradient(circle at 50% 48%, rgba(13,113,100,.18), transparent 34%),
        radial-gradient(circle at 18% 22%, rgba(61,91,216,.12), transparent 28%),
        linear-gradient(145deg, #020b1b, #001233 52%, #020711);
    box-shadow: 0 45px 120px rgba(0,0,0,.3);
    cursor: crosshair;
}
.science-visual::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        linear-gradient(rgba(239,224,202,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(239,224,202,.025) 1px, transparent 1px);
    background-size: 32px 32px;
}
.science-visual::after {
    content: ""; position: absolute; inset: -12%; z-index: 0; pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.95) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(117,205,216,.75) 0 .8px, transparent 1.2px),
        radial-gradient(circle, rgba(239,224,202,.5) 0 .6px, transparent 1px);
    background-size: 97px 83px, 137px 121px, 53px 67px;
    background-position: 13px 21px, 47px 68px, 7px 42px;
    opacity: .72; animation: fallback-star-drift 26s ease-in-out infinite alternate;
}
.science-visual__frame {
    position: absolute; inset: 18px; z-index: 4; pointer-events: none;
    border: 1px solid rgba(239,224,202,.08);
}
.science-visual__frame::before,
.science-visual__frame::after {
    content: ""; position: absolute; width: 42px; height: 42px;
    border-color: #fe5000; opacity: .75;
}
.science-visual__frame::before { left: -1px; top: -1px; border-left: 2px solid; border-top: 2px solid; }
.science-visual__frame::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }
.science-visual__fallback {
    position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
    transition: opacity .8s ease, transform .8s cubic-bezier(.16,1,.3,1);
}
.fallback-solar-stage {
    position: relative; display: grid; place-items: center;
    width: min(90%, 520px); aspect-ratio: 1; perspective: 900px;
    transform-style: preserve-3d;
}
.fallback-orb {
    position: absolute; z-index: 2; width: clamp(42px, 5vw, 64px); aspect-ratio: 1; border-radius: 50%;
    transform: translateZ(18px);
    background: radial-gradient(circle at 35% 32%, #fff8c9, #ffb52e 28%, #fe5000 70%);
    box-shadow: 0 0 35px rgba(255,181,46,.82), 0 0 105px rgba(254,80,0,.42);
}
.fallback-orbit {
    position: absolute; z-index: 1; width: var(--diameter); aspect-ratio: 1;
    border: 1px solid rgba(239,224,202,var(--orbit-opacity, .16)); border-radius: 50%;
    transform-style: preserve-3d;
    animation: fallback-solar-orbit var(--duration) linear infinite;
}
.fallback-planet {
    position: absolute; z-index: 3; left: 50%; top: 0; width: var(--size); aspect-ratio: 1;
    translate: -50% -50%; border-radius: 50%; background-color: var(--planet-color);
    background-image: radial-gradient(circle at 32% 28%, rgba(255,255,255,.78), transparent 22%), linear-gradient(135deg, transparent 45%, rgba(0,0,0,.38));
    box-shadow: 0 0 16px color-mix(in srgb, var(--planet-color) 55%, transparent), inset -2px -2px 4px rgba(0,0,0,.32);
    animation: fallback-planet-upright var(--duration) linear infinite reverse;
}
.fallback-orbit--one { --diameter: 18%; --size: 6px; --duration: 5s; --planet-color: #9c8b7b; --tilt: -4deg; }
.fallback-orbit--two { --diameter: 28%; --size: 9px; --duration: 8s; --planet-color: #e2ad62; --tilt: -2deg; }
.fallback-orbit--three { --diameter: 39%; --size: 10px; --duration: 12s; --planet-color: #2f7ed8; --orbit-opacity: .28; --tilt: 0deg; }
.fallback-orbit--four { --diameter: 50%; --size: 8px; --duration: 16s; --planet-color: #c85232; --tilt: 2deg; }
.fallback-orbit--five { --diameter: 63%; --size: 18px; --duration: 25s; --planet-color: #d19a68; --orbit-opacity: .22; --tilt: -3deg; }
.fallback-orbit--six { --diameter: 75%; --size: 15px; --duration: 32s; --planet-color: #d9c58f; --tilt: 1deg; }
.fallback-orbit--six .fallback-planet::after { content: ""; position: absolute; inset: 42% -45%; height: 18%; border: 1px solid rgba(239,224,202,.78); border-radius: 50%; transform: rotate(-18deg); }
.fallback-orbit--seven { --diameter: 87%; --size: 12px; --duration: 40s; --planet-color: #75cdd8; --tilt: 3deg; }
.fallback-orbit--eight { --diameter: 98%; --size: 11px; --duration: 49s; --planet-color: #3d5bd8; --orbit-opacity: .24; --tilt: -1deg; }
@keyframes fallback-solar-orbit {
    from { transform: rotateZ(var(--tilt)) rotateX(62deg) rotateZ(0deg); }
    to { transform: rotateZ(var(--tilt)) rotateX(62deg) rotateZ(360deg); }
}
@keyframes fallback-planet-upright {
    from { transform: rotateZ(0deg) rotateX(-62deg); }
    to { transform: rotateZ(360deg) rotateX(-62deg); }
}
@keyframes fallback-star-drift {
    from { transform: translate3d(-4px, -3px, 0); opacity: .55; }
    to { transform: translate3d(7px, 5px, 0); opacity: .9; }
}
.science-visual__header,
.science-visual__footer {
    position: absolute; left: 34px; right: 34px; z-index: 5;
    display: flex; justify-content: space-between; align-items: center;
    color: rgba(239,224,202,.55); font-size: 8px; font-weight: 700;
    letter-spacing: .22em; text-transform: uppercase; pointer-events: none;
}
.science-visual__header { top: 34px; }
.science-visual__footer { bottom: 34px; }
.visual-status { display: inline-flex; align-items: center; gap: 8px; }
.visual-status i {
    width: 6px; height: 6px; border-radius: 50%; background: #0d7164;
    box-shadow: 0 0 0 5px rgba(13,113,100,.12);
}
.science-visual__formula {
    position: absolute; left: 34px; bottom: 70px; z-index: 5; pointer-events: none;
}
.science-visual__formula span {
    display: block; color: #fe5000; font-size: 8px; letter-spacing: .2em; text-transform: uppercase;
}
.science-visual__formula strong {
    display: block; margin-top: 5px; color: rgba(239,224,202,.72);
    font: 600 22px "Cormorant Garamond", serif;
}
.modern-hero__scroll {
    position: absolute; right: 28px; bottom: 28px; z-index: 5;
    display: flex; align-items: center; gap: 12px; color: rgba(239,224,202,.45);
    text-decoration: none; font-size: 8px; letter-spacing: .2em; text-transform: uppercase;
    writing-mode: vertical-rl;
}
.modern-hero__scroll i { width: 1px; height: 34px; background: linear-gradient(#fe5000, transparent); }

@media (max-width: 1050px) {
    .modern-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(400px, .85fr); }
    .modern-hero h1 { font-size: clamp(50px, 6.8vw, 72px); }
}
@media (max-width: 899px) {
    .modern-hero { padding: 118px 0 80px; }
    .modern-hero__inner { width: min(100% - 36px, 720px); grid-template-columns: 1fr; gap: 54px; }
    .modern-hero h1 { font-size: clamp(46px, 12vw, 68px); }
    .modern-hero h1 span { transform: translateX(0); }
    .science-visual { height: min(420px, 92vw); cursor: default; }
    .science-visual__fallback { opacity: 1 !important; transform: none !important; }
    .modern-hero__scroll { display: none; }
}
@media (max-width: 560px) {
    .modern-hero__signals { justify-content: space-between; gap: 10px; }
    .modern-hero__signals div { grid-template-columns: 1fr; gap: 2px; }
    .modern-hero__actions { display: grid; grid-template-columns: 1fr; }
    .hero-action { padding: 0 14px; gap: 8px; }
    .science-visual__header, .science-visual__footer { left: 24px; right: 24px; }
    .science-visual__formula { left: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .science-visual__fallback, .hero-action { transition: none !important; }
    .fallback-orbit, .fallback-planet, .science-visual::after { animation: none !important; }
}

/* Scientific expertise universe */
.expertise-universe {
    position: relative; padding: clamp(100px, 12vw, 170px) 0 clamp(64px, 8vw, 110px); overflow: hidden;
    isolation: isolate; color: #001233; background: #f9f3ea;
}
.expertise-universe::before {
    content: ""; position: absolute; inset: 0; z-index: -3; opacity: .3;
    background-image: radial-gradient(rgba(0,18,51,.18) .7px, transparent .7px);
    background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, black, transparent 68%);
}
.expertise-universe__aura {
    position: absolute; z-index: -2; border-radius: 50%; filter: blur(110px);
    pointer-events: none; opacity: .13;
}
.expertise-universe__aura--one { width: 480px; height: 480px; top: 3%; right: -180px; background: #fe5000; }
.expertise-universe__aura--two { width: 520px; height: 520px; bottom: 10%; left: -230px; background: #0d7164; }
.expertise-universe__line {
    position: absolute; z-index: -1; top: 88px; left: 50%; width: 1px; height: 230px;
    background: linear-gradient(transparent, rgba(254,80,0,.55), transparent);
}
.expertise-universe__inner { width: min(1320px, calc(100% - 64px)); margin: 0 auto; }
.expertise-intro {
    display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
    gap: clamp(45px, 8vw, 120px); align-items: end;
}
.expertise-kicker {
    display: flex; align-items: center; gap: 12px; margin: 0 0 28px;
    color: #0d7164; font-size: 9px; font-weight: 800; letter-spacing: .32em;
    text-transform: uppercase;
}
.expertise-kicker span { width: 34px; height: 2px; background: #fe5000; }
.expertise-intro h2 {
    margin: 0; max-width: 880px; font: 600 clamp(58px, 8vw, 106px)/.82 "Cormorant Garamond", serif;
    letter-spacing: -.045em;
}
.expertise-intro h2 em { color: #fe5000; font-weight: 600; }
.expertise-intro__copy { padding: 0 0 8px 26px; border-left: 1px solid rgba(0,18,51,.15); }
.expertise-index {
    display: block; margin-bottom: 18px; color: #fe5000; font-size: 9px;
    font-weight: 800; letter-spacing: .24em;
}
.expertise-intro__copy p { margin: 0; color: rgba(0,18,51,.64); font-size: 14px; line-height: 1.85; }


.expertise-grid { margin-top: clamp(70px, 9vw, 120px); display: grid; grid-template-columns: repeat(12, 1fr); gap: 0; }
.expertise-card {
    position: relative; min-height: 390px; padding: clamp(26px, 4vw, 48px);
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden; border: 1px solid rgba(0,18,51,.1); background: rgba(255,255,255,.64);
    transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s ease, border-color .45s ease;
}
.expertise-card::before {
    content: ""; position: absolute; right: -70px; top: -70px; width: 180px; height: 180px;
    border: 1px solid currentColor; border-radius: 50%; opacity: .055;
    transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.expertise-card:hover {
    z-index: 2; border-color: rgba(254,80,0,.42);
    box-shadow: inset 0 0 0 1px rgba(254,80,0,.2), 0 24px 60px rgba(0,18,51,.1);
}
.expertise-card:hover::before { transform: scale(1.35); }
.expertise-card--math { grid-column: span 5; color: #efe0ca; background: #001233; }
.expertise-card--physics { grid-column: span 7; }
.expertise-card--teaching { grid-column: span 7; color: white; background: #0d7164; }
.expertise-card--code { grid-column: span 5; color: #efe0ca; background: #163054; }
.expertise-card--data {
    grid-column: 1 / -1; min-height: 350px; color: #001233;
    background: linear-gradient(135deg, #efe0ca, #f9f3ea);
}
.expertise-card__top { display: flex; justify-content: space-between; align-items: center; }
.expertise-card__top span {
    color: #fe5000; font: 600 22px "Cormorant Garamond", serif;
}
.expertise-card__top i {
    opacity: .55; font-size: 8px; font-style: normal; font-weight: 800;
    letter-spacing: .24em; text-transform: uppercase;
}
.expertise-card h3 {
    margin: 0 0 16px; font: 600 clamp(35px, 4vw, 52px)/.95 "Cormorant Garamond", serif;
}
.expertise-card p { max-width: 560px; margin: 0; opacity: .68; line-height: 1.8; }
.expertise-card ul {
    margin: 35px 0 0; padding: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px;
    border-top: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 15%, transparent);
    list-style: none;
}
.expertise-card li {
    opacity: .72; font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.expertise-card li::before { content: "—"; margin-right: 7px; color: #fe5000; }

@media (max-width: 900px) {
    .expertise-universe { padding-top: clamp(76px, 11vw, 110px); }
    .expertise-universe__inner { width: min(100% - 36px, 720px); }
    .expertise-intro { grid-template-columns: minmax(0, 1fr); gap: 38px; }
    .expertise-intro__copy { max-width: 580px; }
    .expertise-card--math, .expertise-card--physics,
    .expertise-card--teaching, .expertise-card--code, .expertise-card--data {
        grid-column: 1 / -1;
    }
    .expertise-card { min-height: 340px; }
}

@media (max-width: 560px) {
    .expertise-universe { padding: 72px 0 58px; }
    .expertise-universe__inner { width: calc(100% - 28px); }
    .expertise-kicker {
        gap: 9px; margin-bottom: 20px; font-size: 8px; line-height: 1.55;
        letter-spacing: .2em;
    }
    .expertise-kicker span { width: 22px; flex: 0 0 22px; }
    .expertise-intro { gap: 30px; }
    .expertise-intro h2 { font-size: clamp(44px, 14vw, 64px); line-height: .9; }
    .expertise-intro__copy { padding-left: 18px; }
    .expertise-grid { margin-top: 52px; }
    .expertise-card { min-height: 310px; padding: 24px 20px; }
    .expertise-card h3 { font-size: clamp(32px, 11vw, 43px); overflow-wrap: anywhere; }
    .expertise-card p { font-size: 14px; line-height: 1.65; }
    .expertise-card ul { margin-top: 26px; gap: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .expertise-card, .expertise-card::before { transition: none; }
}


/* Article reading rhythm */
.article-content { font-size: 1rem; line-height: 1.65; }
.article-content p, .article-content li { line-height: inherit; }
.article-content p { margin-top: .85em; margin-bottom: .85em; }
@media (min-width: 768px) { .article-content { font-size: 1.08rem; line-height: 1.68; } }

/* Rich article image layout */
.prose .article-image-row { width: 100%; margin: 2rem 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0; }
.prose .article-image-row > figure.article-image { margin: 0 !important; }
.prose figure.article-image { display: block; max-width: 100%; margin-top: 2rem; margin-bottom: 1.65rem; }
.prose figure.article-image.image-align-left { margin-left: 0; margin-right: auto; }
.prose figure.article-image.image-align-center { margin-left: auto; margin-right: auto; }
.prose figure.article-image.image-align-right { margin-left: auto; margin-right: 0; }
.prose figure.article-image img { display: block; width: 100%; height: auto; margin: 0; }
.prose figure.article-image figcaption { margin-top: .6rem; text-align: center; color: rgba(0,18,51,.58); font-size: .78rem; }
.prose span[style*="color"] { font-weight: inherit; }
@media (max-width: 560px) { .prose > figure.article-image { width: 100% !important; } }


/* Footer wordmark */
.footer-wordmark {
    position: relative; width: fit-content; margin-bottom: 2rem; display: block;
    color: #efe0ca; font: 700 clamp(2.45rem, 4vw, 3.15rem)/.88 "Cormorant Garamond", serif;
    letter-spacing: -.065em; text-decoration: none;
}
.footer-wordmark span { color: #fe5000; font-size: 1.12em; }
.footer-wordmark i { color: #0d7164; font-style: normal; }
.footer-wordmark::after {
    content: "SCIENCES · TRANSMISSION · NUMÉRIQUE"; display: block; margin-top: 10px;
    color: rgba(239,224,202,.48); font: 700 6px/1 Inter, sans-serif;
    letter-spacing: .28em; white-space: nowrap;
}
.footer-wordmark:hover { color: white; }
@media (max-width: 420px) { .footer-wordmark::after { letter-spacing: .18em; } }
/* Flexible article charts */
.prose .article-chart { box-sizing: border-box; max-width: 100%; min-width: 0; }
.prose .article-chart.chart-align-left { margin-left: 0; margin-right: auto; }
.prose .article-chart.chart-align-center { margin-left: auto; margin-right: auto; }
.prose .article-chart.chart-align-right { margin-left: auto; margin-right: 0; }
.prose .article-chart-row {
    width: 100%; margin: 2.5rem 0 4rem; display: flex; align-items: stretch; gap: 1rem;
}
.prose .article-chart-row > .article-chart { flex: 0 0 auto; height: min(390px, 55vw); margin: 0 !important; }
@media (max-width: 680px) {
    .prose .article-chart-row { flex-wrap: wrap; }
    .prose .article-chart-row > .article-chart { width: 100% !important; height: min(390px, 78vw); }
}
/* Contact fields: explicit contrast in modal and standalone page */
.contact-form-styled .form-group input,
.contact-form-styled .form-group textarea {
    color: #001233 !important;
    caret-color: #fe5000;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #001233;
}
.contact-form-styled .form-group input::selection,
.contact-form-styled .form-group textarea::selection { color: white; background: #0d7164; }
.contact-form-styled .form-group input:-webkit-autofill,
.contact-form-styled .form-group textarea:-webkit-autofill {
    -webkit-text-fill-color: #001233;
    box-shadow: 0 0 0 1000px white inset;
}

/* Four projects arranged as a true + cross. */
.projects-grid { grid-auto-rows: auto; gap: 14px; }
.projects-grid .project-card {
    min-height: 300px; display: flex; flex-direction: column;
    color: #efe0ca; overflow: hidden;
}
.projects-grid .project-card__description { color: currentColor; opacity: .75; }
.projects-grid .project-card > a { margin-top: auto; padding-top: 2rem; color: inherit; }
.projects-grid .project-card--studio-editorial-scientifique { background: rgba(255,255,255,.055); }
.projects-grid .project-card--laboratoire-scientifique-interactif { background: #0d7164; color: white; }
.projects-grid .project-card--portfolio-scientifique-numerique { background: #fe5000; color: white; }
.projects-grid .project-card--animations-threejs { background: #efe0ca; color: #001233; }
@media (min-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(3, minmax(0,1fr)) !important;
        grid-template-rows: repeat(2, minmax(310px,auto));
        column-gap: clamp(22px,2.4vw,34px);
        row-gap: 0;
    }
    .projects-grid .project-card { min-height: 310px; }
    .projects-grid .project-card--laboratoire-scientifique-interactif { grid-column: 2; grid-row: 1; }
    .projects-grid .project-card--animations-threejs { grid-column: 2; grid-row: 2; }
    .projects-grid .project-card--studio-editorial-scientifique {
        grid-column: 1; grid-row: 1 / 3; align-self: center;
    }
    .projects-grid .project-card--portfolio-scientifique-numerique {
        grid-column: 3; grid-row: 1 / 3; align-self: center;
    }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .projects-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 18px; }
}
@media (max-width: 767px) {
    .projects-grid { grid-template-columns: 1fr !important; }
    .projects-grid .project-card { min-height: 300px; }
}

/* Link from the home selection to the complete portfolio. */
.projects-more { display: flex; justify-content: center; margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.projects-more__link { display: inline-flex; align-items: center; gap: 1.5rem; padding: .75rem .75rem .75rem 1.5rem; border: 1px solid rgba(239,224,202,.32); color: #efe0ca; text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; font-weight: 700; transition: border-color .3s ease, background-color .3s ease, transform .3s ease; }
.projects-more__arrow { display: grid; place-items: center; width: 2.75rem; aspect-ratio: 1; background: #fe5000; color: #fff; font-size: 1rem; transition: transform .3s ease; }
.projects-more__link:hover, .projects-more__link:focus-visible { border-color: #fe5000; background: rgba(255,255,255,.05); transform: translateY(-2px); }
.projects-more__link:hover .projects-more__arrow { transform: rotate(45deg); }
@media (max-width: 480px) { .projects-more__link { width: 100%; justify-content: space-between; } }


/* Client work: visible proof of web-development expertise on the home page. */
.home-client-work { padding: clamp(5rem, 9vw, 8rem) 0; background: #f9f3ea; color: #001233; }
.home-client-work__heading { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.65fr); align-items: end; gap: clamp(2rem,7vw,7rem); margin-bottom: clamp(3rem,6vw,5rem); }
.home-client-work__heading h2 { max-width: 850px; line-height: .98; }
.home-client-work__heading > p { color: rgba(0,18,51,.68); line-height: 1.75; }
.home-client-work__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: rgba(0,18,51,.16); border: 1px solid rgba(0,18,51,.16); }
.home-client-card { position: relative; min-height: 400px; display: flex; flex-direction: column; padding: clamp(1.75rem,3vw,3rem); background: #fff; overflow: hidden; transition: transform .35s ease, box-shadow .35s ease; }
.home-client-card:nth-child(3n + 2) { background: #efe0ca; }
.home-client-card:nth-child(3n) { background: #0d7164; color: #fff; }
.home-client-card:nth-child(4n) { background: #001233; color: #efe0ca; }
.home-client-card:nth-child(5n) { background: #fff; color: #001233; }
.home-client-card:hover { z-index: 1; transform: translateY(-4px); box-shadow: 0 22px 55px rgba(0,18,51,.14); }
.home-client-card__number { position: absolute; top: 1.4rem; right: 1.6rem; color: #fe5000; font: 700 .7rem/1 sans-serif; letter-spacing: .2em; }
.home-client-card__category { max-width: calc(100% - 3rem); margin-bottom: 1.25rem; color: #fe5000; font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.home-client-card h3 { max-width: 90%; margin-bottom: 1.25rem; font-family: Georgia,serif; font-size: clamp(2rem,3.2vw,3.25rem); line-height: 1; }
.home-client-card__description { max-width: 34rem; color: currentColor; opacity: .7; line-height: 1.7; }
.home-client-card__footer { margin-top: auto; padding-top: 2rem; }
.home-client-card__skills { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.5rem; }
.home-client-card__skills span { padding: .42rem .68rem; border: 1px solid currentColor; opacity: .62; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.home-client-card__footer > a { display: inline-flex; align-items: center; gap: .8rem; color: #fe5000; font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.home-client-card__footer > a span { transition: transform .3s ease; }
.home-client-card__footer > a:hover span { transform: translate(3px,-3px); }
@media (max-width: 767px) {
    .home-client-work__heading { grid-template-columns: 1fr; gap: 1.5rem; }
    .home-client-work__grid { grid-template-columns: 1fr; }
    .home-client-card { min-height: 350px; }
}


/* Client-work refinements: seamless blocks and orange pressbook card. */
.home-client-work__grid {
    gap: 0;
    border: 0;
    background: transparent;
}
.home-client-card:nth-child(5n) {
    background: #fe5000;
    color: #fff;
}
.home-client-card:nth-child(5n) .home-client-card__category,
.home-client-card:nth-child(5n) .home-client-card__number,
.home-client-card:nth-child(5n) .home-client-card__footer > a {
    color: #001233;
}


/* Six-column puzzle layout for the five client/editorial projects. */
@media (min-width: 1100px) {
    .home-client-work__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-auto-rows: 300px;
    }
    .home-client-card {
        min-height: 0;
    }
    .home-client-card:nth-child(1) {
        grid-column: span 3;
        grid-row: span 2;
    }
    .home-client-card:nth-child(2),
    .home-client-card:nth-child(3) {
        grid-column: span 3;
        grid-row: span 1;
    }
    .home-client-card:nth-child(4) {
        grid-column: span 2;
        grid-row: span 2;
    }
    .home-client-card:nth-child(5) {
        grid-column: span 4;
        grid-row: span 2;
    }
    .home-client-card:nth-child(2),
    .home-client-card:nth-child(3) {
        padding: 1.8rem 2rem;
    }
    .home-client-card:nth-child(2) h3,
    .home-client-card:nth-child(3) h3 {
        margin-bottom: .8rem;
        font-size: clamp(1.8rem, 2.5vw, 2.65rem);
    }
    .home-client-card:nth-child(2) .home-client-card__description,
    .home-client-card:nth-child(3) .home-client-card__description {
        font-size: .9rem;
        line-height: 1.55;
    }
    .home-client-card:nth-child(2) .home-client-card__footer,
    .home-client-card:nth-child(3) .home-client-card__footer {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1rem;
        padding-top: 1rem;
    }
    .home-client-card:nth-child(2) .home-client-card__skills,
    .home-client-card:nth-child(3) .home-client-card__skills {
        margin-bottom: 0;
    }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .home-client-work__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-client-card {
        min-height: 380px;
    }
    .home-client-card:last-child {
        grid-column: 1 / -1;
    }
}


/* More compact, proportional puzzle dimensions. */
@media (min-width: 1100px) {
    .home-client-work__grid {
        grid-auto-rows: clamp(235px, 20vw, 260px);
    }
    .home-client-card {
        padding: clamp(1.65rem, 2.3vw, 2.35rem);
    }
    .home-client-card:nth-child(1) h3,
    .home-client-card:nth-child(4) h3,
    .home-client-card:nth-child(5) h3 {
        font-size: clamp(2.2rem, 3vw, 3rem);
    }
    .home-client-card__footer {
        padding-top: 1.25rem;
    }
    .home-client-card__skills {
        margin-bottom: 1rem;
    }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .home-client-card {
        min-height: 320px;
    }
}
@media (max-width: 767px) {
    .home-client-card {
        min-height: 0;
    }
}


/* Six-piece client puzzle: balanced final row. */
@media (min-width: 1100px) {
    .home-client-card:nth-child(4),
    .home-client-card:nth-child(5),
    .home-client-card:nth-child(6) {
        grid-column: span 2;
        grid-row: span 1;
        padding: 1.7rem 1.8rem;
    }
    .home-client-card:nth-child(4) h3,
    .home-client-card:nth-child(5) h3,
    .home-client-card:nth-child(6) h3 {
        margin-bottom: .75rem;
        font-size: clamp(1.7rem, 2.25vw, 2.35rem);
    }
    .home-client-card:nth-child(4) .home-client-card__description,
    .home-client-card:nth-child(5) .home-client-card__description,
    .home-client-card:nth-child(6) .home-client-card__description {
        font-size: .86rem;
        line-height: 1.5;
    }
    .home-client-card:nth-child(4) .home-client-card__footer,
    .home-client-card:nth-child(5) .home-client-card__footer,
    .home-client-card:nth-child(6) .home-client-card__footer {
        padding-top: .8rem;
    }
    .home-client-card:nth-child(4) .home-client-card__skills,
    .home-client-card:nth-child(5) .home-client-card__skills,
    .home-client-card:nth-child(6) .home-client-card__skills {
        margin-bottom: .8rem;
    }
}


/* Six projects: calm, symmetrical 3 × 2 composition. */
.home-client-card:nth-child(6) {
    background: #fff;
    color: #001233;
}
@media (min-width: 1100px) {
    .home-client-work__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: auto;
    }
    .home-client-card,
    .home-client-card:nth-child(1),
    .home-client-card:nth-child(2),
    .home-client-card:nth-child(3),
    .home-client-card:nth-child(4),
    .home-client-card:nth-child(5),
    .home-client-card:nth-child(6) {
        grid-column: auto;
        grid-row: auto;
        min-height: 360px;
        padding: clamp(1.7rem, 2.2vw, 2.25rem);
    }
    .home-client-card:nth-child(1) h3,
    .home-client-card:nth-child(2) h3,
    .home-client-card:nth-child(3) h3,
    .home-client-card:nth-child(4) h3,
    .home-client-card:nth-child(5) h3,
    .home-client-card:nth-child(6) h3 {
        margin-bottom: 1rem;
        font-size: clamp(1.85rem, 2.35vw, 2.55rem);
    }
    .home-client-card:nth-child(1) .home-client-card__description,
    .home-client-card:nth-child(2) .home-client-card__description,
    .home-client-card:nth-child(3) .home-client-card__description,
    .home-client-card:nth-child(4) .home-client-card__description,
    .home-client-card:nth-child(5) .home-client-card__description,
    .home-client-card:nth-child(6) .home-client-card__description {
        font-size: .9rem;
        line-height: 1.55;
    }
    .home-client-card:nth-child(1) .home-client-card__footer,
    .home-client-card:nth-child(2) .home-client-card__footer,
    .home-client-card:nth-child(3) .home-client-card__footer,
    .home-client-card:nth-child(4) .home-client-card__footer,
    .home-client-card:nth-child(5) .home-client-card__footer,
    .home-client-card:nth-child(6) .home-client-card__footer {
        display: block;
        padding-top: 1.2rem;
    }
    .home-client-card:nth-child(1) .home-client-card__skills,
    .home-client-card:nth-child(2) .home-client-card__skills,
    .home-client-card:nth-child(3) .home-client-card__skills,
    .home-client-card:nth-child(4) .home-client-card__skills,
    .home-client-card:nth-child(5) .home-client-card__skills,
    .home-client-card:nth-child(6) .home-client-card__skills {
        margin-bottom: 1rem;
    }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .home-client-work__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-client-card,
    .home-client-card:last-child {
        grid-column: auto;
        min-height: 340px;
    }
}


/* Sixth brick and project actions in the editorial expertise masonry. */
.expertise-card--data {
    grid-column: span 4;
    min-height: 390px;
}
.expertise-card--editorial {
    grid-column: span 8;
    min-height: 390px;
    color: #fff;
    background: #fe5000;
}
.expertise-card--editorial .expertise-card__top span,
.expertise-card--editorial li::before {
    color: #001233;
}
.expertise-card__footer ul {
    margin-bottom: 18px;
}
.expertise-card__footer > a {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: #fe5000;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.expertise-card--editorial .expertise-card__footer > a {
    color: #001233;
}
.expertise-card__footer > a span {
    transition: transform .3s ease;
}
.expertise-card__footer > a:hover span {
    transform: translate(3px, -3px);
}
@media (max-width: 900px) {
    .expertise-card--editorial {
        grid-column: 1 / -1;
    }
}


/* Belsékens highlight in the four-project editorial masonry. */
.expertise-grid .expertise-card--code {
    background: #fe5000;
    color: #fff;
}
.expertise-grid .expertise-card--code .expertise-card__top span,
.expertise-grid .expertise-card--code li::before,
.expertise-grid .expertise-card--code .expertise-card__footer > a {
    color: #001233;
}


/* Prevent iOS from zooming the viewport when a form field receives focus. */
@media (max-width: 767px) {
    input, textarea, select {
        font-size: 16px !important;
    }
}
