:root {
    --pd-cream: #f7f1e8;
    --pd-sand: #e7d9c8;
    --pd-tan: #c8a97e;
    --pd-olive: #6f7b4b;
    --pd-olive-dark: #56613a;
    --pd-text: #4a4037;
    --pd-muted: #7a6d62;
    --pd-white: #ffffff;
    --pd-shadow: 0 10px 30px rgba(74, 64, 55, 0.10);
    --pd-radius: 22px;
}

.pd-directory {
    color: var(--pd-text);
}

.pd-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
    gap: 16px;
    margin: 0 0 32px;
}

#pd-search,
#pd-category {
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    border: 1px solid var(--pd-sand);
    border-radius: 999px;
    background: var(--pd-white);
    color: var(--pd-text);
    font-size: 15px;
    line-height: 1.2;
    box-sizing: border-box;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#pd-search::placeholder {
    color: var(--pd-muted);
}

#pd-search:focus,
#pd-category:focus {
    outline: none;
    border-color: var(--pd-tan);
    box-shadow: 0 0 0 4px rgba(200, 169, 126, 0.18);
    background: #fffdfa;
}

.pd-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}

.pd-card {
    background: var(--pd-white);
    border: 1px solid #efe4d8;
    border-radius: var(--pd-radius);
    padding: 24px;
    box-shadow: var(--pd-shadow);
}

.pd-card-image {
    margin: -24px -24px 20px;
}

.pd-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 22px 22px 0 0;
}

.pd-card h3 {
    margin: 0 0 16px;
    color: var(--pd-text);
    font-size: 31px;
    line-height: 1.1;
    font-weight: 400;
    font-family: Georgia, "Times New Roman", serif;
}

.pd-card p {
    margin: 0 0 10px;
    color: var(--pd-text);
    font-size: 15px;
    line-height: 1.75;
}

.pd-card p strong {
    color: var(--pd-olive-dark);
    font-weight: 700;
}

.pd-card a {
    color: var(--pd-olive);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.pd-card a:hover {
    color: var(--pd-olive-dark);
    text-decoration: underline;
}

.pd-open-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 12px 24px;
    border: 1px solid var(--pd-olive);
    border-radius: 999px;
    background: var(--pd-olive);
    color: var(--pd-white);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pd-open-modal:hover,
.pd-open-modal:focus {
    background: var(--pd-olive-dark);
    border-color: var(--pd-olive-dark);
    color: var(--pd-white);
    transform: translateY(-1px);
}

.pd-hidden-bio {
    display: none;
}

#pd-results > p {
    margin: 0;
    padding: 24px;
    border: 1px solid #efe4d8;
    border-radius: var(--pd-radius);
    background: #fffdfa;
    color: var(--pd-muted);
}

#pd-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    padding: 24px;
    background: rgba(74, 64, 55, 0.45);
    overflow-y: auto;
    box-sizing: border-box;
}

.pd-modal-content {
    position: relative;
    width: min(760px, 100%);
    margin: 56px auto;
    padding: 40px 34px 32px;
    background: #fffdfa;
    border: 1px solid #efe4d8;
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(74, 64, 55, 0.18);
}

#pd-modal-title {
    margin: 0 40px 20px 0;
    color: var(--pd-text);
    font-size: 36px;
    line-height: 1.1;
    font-weight: 400;
    font-family: Georgia, "Times New Roman", serif;
}

#pd-modal-body {
    color: var(--pd-text);
    font-size: 16px;
    line-height: 1.85;
}

#pd-modal-body p:first-child {
    margin-top: 0;
}

#pd-modal-body p:last-child {
    margin-bottom: 0;
}

.pd-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--pd-muted);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.pd-close:hover,
.pd-close:focus {
    background: rgba(111, 123, 75, 0.10);
    color: var(--pd-olive-dark);
}

body.pd-modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .pd-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .pd-filters {
        grid-template-columns: 1fr;
    }

    .pd-card {
        padding: 20px;
    }

    .pd-card-image {
        margin: -20px -20px 18px;
    }

    .pd-card h3 {
        font-size: 27px;
    }

    #pd-modal {
        padding: 14px;
    }

    .pd-modal-content {
        margin: 24px auto;
        padding: 30px 20px 24px;
        border-radius: 22px;
    }

    #pd-modal-title {
        font-size: 30px;
        margin-right: 34px;
    }
}