.intro-text {
    margin-bottom: 40px;
    line-height: 1.8;
    font-size: 1.1em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #555;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.staff-member {
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.staff-member:hover {
    transform: translateY(-5px);
}

.staff-content-top {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.staff-photo-container {
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.staff-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.staff-photo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(to top, rgba(0, 123, 255, 0.3) 0%, rgba(0, 123, 255, 0) 50%);
    z-index: 1;
}

.role-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: bold;
    z-index: 2;
}

/* Staff card footer styles */
.staff-card-footer {
    background-color: #f3f3f3;
    margin-left: auto;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 90%;
    box-sizing: border-box;
}

.staff-names-footer {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.staff-name-jp {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 5px;
    color: #34495e;
    line-height: 1.2;
}

.staff-name-en {
    font-size: 1em;
    color: #8c8c8c;
    margin-top: 0;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 300;
    line-height: 1.2;
}

.more-button {
    background-color: black;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    outline: none;
    flex-shrink: 0;
}

.more-button:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    animation: slideInTop 0.4s ease-out;

    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Common style for all modal close triggers */
.modal-close-trigger {
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close-trigger:hover,
.modal-close-trigger:focus {
    color: #333;
}

.top-close-button {
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
}

.bottom-close-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: bold;
    display: block;
    margin: 20px auto 0;
    width: fit-content;
    transition: background-color 0.3s ease;
}

.bottom-close-button:hover {
    background-color: #0056b3;
}


.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

@media (min-width: 600px) {
    .modal-header {
        flex-direction: row;
        text-align: left;
    }
}

.staff-photo-container-modal {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid #007bff;
    flex-shrink: 0;
}

@media (min-width: 600px) {
    .staff-photo-container-modal {
        margin-right: 25px;
        margin-bottom: 0;
    }
}

.staff-photo-container-modal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.staff-info-modal {
    text-align: center;
}

@media (min-width: 600px) {
    .staff-info-modal {
        text-align: left;
    }
}

.staff-info-modal h3 {
    margin: 0;
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.staff-info-modal p {
    margin: 5px 0;
    color: #7f8c8d;
    font-size: 1.1em;
}

.staff-info-modal .staff-role {
    font-size: 1.2em;
    font-weight: bold;
    color: #28a745;
    margin-top: 10px;
}

.modal-body {
    text-align: left;
    line-height: 1.7;
    font-size: 1.05em;
    color: #444;

    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
}

.modal-body p {
    margin-bottom: 1em;
}

.modal-body h4 {
    margin-top: 25px;
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 1.3em;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.modal-body ul {
    list-style-type: none;
    padding-left: 0;
    margin-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.modal-body li::before {
    content: '•';
    color: #007bff;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Career Table Styles */
.career-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.career-table th,
.career-table td {
    border: 1px solid #ddd;
    padding: 10px 15px;
    text-align: left;
    vertical-align: top;
}

.career-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    white-space: nowrap;
    width: 100px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInTop {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .staff-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .staff-photo-container {
        width: 120px;
        height: 120px;
    }

    .staff-name-jp {
        font-size: 1.3em;
    }

    .staff-name-en {
        font-size: 0.9em;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .top-close-button {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }

    .modal-header {
        flex-direction: column;
        text-align: center;
    }

    .staff-photo-container-modal {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .staff-info-modal {
        text-align: center;
    }

    .staff-info-modal h3 {
        font-size: 1.8em;
    }

    .staff-info-modal p {
        font-size: 1em;
    }

    .career-table th,
    .career-table td {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    .career-table th {
        width: 70px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 2em;
    }

    .intro-text {
        font-size: 1em;
    }

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

    .staff-photo-container {
        width: 100px;
        height: 100px;
    }
}