/* Staff Profile Styles */
:root {
    --mint-border: #e6f3f0;
    --primary-color: #00875A;
    --primary-gradient: linear-gradient(90deg,#00986a,#00b07f);
    --text-dark: #1A1A1A;
    --text-light: #4A5568;
    --background: #FFFFFF;
    --border-light: #E2E8F0;
    --muted: #6B7280;
}

/* Profile Card & Layout */
.staff-profile {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Make the outer container fluid on very large screens */
@media (min-width: 1600px) {
    .staff-profile {
        max-width: 1400px;
    }
}

.staff-card {
    background: var(--background);
    border-radius: 16px;
    border: 1px solid var(--mint-border);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(9,30,40,0.06);
}

/* Header Container */
.staff-header-container {
    background: var(--background);
    border-bottom: 2px solid var(--mint-border);
    padding-bottom: 0;
}

.staff-card-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 2rem;
}

/* Tabs Section Container */
.staff-tabs-section {
    background: #ffffff;
    padding: 1.5rem 0;
}

/* Adjust layout for medium screens */
@media (max-width: 1024px) {
    .staff-card-content {
        grid-template-columns: 1fr 1.1fr;
        gap: 1.25rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .staff-card-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .staff-image {
        margin: 0 auto;
    }

    .staff-tabs-section {
        padding: 1rem 0;
    }

    .staff-tabs {
        gap: 0.75rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0.5rem;
        max-width: 100%;
        justify-content: flex-start;
        margin: 0 1rem;
    }

    .staff-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* Profile Image */
.staff-image {
    width: 200px;
    height: 240px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(11,34,25,0.06);
    border: 4px solid rgba(0,135,90,0.06);
}

.staff-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Profile Info */
.staff-info {
    padding: 1rem 0;
}

.staff-info h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.staff-title {
    color: var(--text-dark);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.staff-type {
    display:inline-block;
    margin-left:0.35rem;
    padding: 0.15rem 0.5rem;
    background: rgba(0,135,90,0.06);
    color: var(--primary-color);
    font-size: 0.85rem;
    border-radius: 999px;
    vertical-align: middle;
    font-weight:600;
}

.staff-department {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* Navigation Tabs (centered card with bordered tabs) */
.staff-tabs {
    display: flex;
    justify-content: center; /* center the group */
    padding: 0.75rem;
    gap: 0.75rem;
    margin: 0 auto; /* center horizontally */
    max-width: 760px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: #ffffff;
}

/* Allow wrapping of tabs on narrow widths and improve scrolling */
@media (max-width: 640px) {
    .staff-tabs {
        justify-content: flex-start;
        gap: 0.5rem;
        padding: 0.6rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .tab-item {
        white-space: nowrap;
        padding: 0.5rem 0.9rem;
        font-size: 0.95rem;
    }
}

.tab-item {
    color: var(--text-light);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    min-height: 44px;
}

.tab-item:hover {
    color: var(--primary-color);
}

.tab-item.active {
    color: var(--primary-color);
    background: var(--mint-border);
    border-color: #b8dfd7;
    box-shadow: none;
}

/* Visible focus styles for keyboard users */
.tab-item:focus {
    outline: none; /* prefer focus-visible for browsers that support it */
}
.tab-item:focus-visible {
    box-shadow: 0 8px 20px rgba(0,135,90,0.12);
    outline: 3px solid rgba(0,135,90,0.12);
    outline-offset: 3px;
    border-radius: 8px;
}

/* Content Sections */
.staff-content {
    padding: 2rem;
    border-top: 1px solid var(--border-light);
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.content-section:first-child {
    display: block;
}

/* About Section */
.about-section {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

.content-section h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

/* Research Interests */
.research-interests h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.research-interests ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Publications */
.publications-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.publications-list li {
    padding: 0;
    border-bottom: none;
    margin: 0;
}

.publications-list li:last-child {
    border-bottom: none;
}

.publications-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    background: #e6f3f0;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--mint-border);
}

.publications-list a:hover {
    color: #005d42;
    background: #c8e6df;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 135, 90, 0.15);
}

.publications-list a::after {
    content: "↗";
    font-size: 0.9em;
    font-weight: 600;
}

/* Get in Touch Section */
.get-in-touch {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(90deg, rgba(0,135,90,0.06), rgba(0,176,127,0.03));
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 0 8px 24px rgba(3,40,26,0.04);
}

.get-in-touch h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.get-in-touch p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* Contact Methods Grid */
.contact-info {
    margin: 2rem 0;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 135, 90, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: rgba(0, 135, 90, 0.04);
    border-color: rgba(0, 135, 90, 0.2);
    box-shadow: 0 6px 16px rgba(0, 135, 90, 0.08);
}

.contact-detail {
    flex: 1;
}

.contact-label {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    word-break: break-word;
}

.contact-link:hover {
    text-decoration: underline;
    color: #006644;
}

.contact-text {
    color: var(--text-light);
    line-height: 1.5;
    font-size: 0.95rem;
}

.contact-action {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 135, 90, 0.1);
}

.contact-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-gradient);
    color: var(--background);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 22px rgba(2, 70, 45, 0.12);
}

/* Responsive contact methods */
@media (max-width: 768px) {
    .contact-methods {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .contact-method {
        padding: 1rem;
    }
    .contact-icon {
        font-size: 1.5rem;
    }
    .contact-button {
        width: 100%;
        padding: 0.9rem 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .staff-profile {
        padding: 0 1rem;
    }

    .staff-card-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .staff-image {
        margin: 0 auto;
    }

    .staff-tabs {
        gap: 0.75rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0.5rem;
        max-width: 100%;
        justify-content: flex-start;
    }

    .staff-tabs::-webkit-scrollbar {
        display: none;
    }

    .get-in-touch {
        margin: 1rem;
        padding: 2rem;
    }

    /* Stack contact info on small screens */
    .contact-info dl {
        grid-template-columns: 1fr;
        gap: 0.35rem 0.5rem;
        text-align: left;
    }
    .contact-info dt {
        font-size: 0.9rem;
    }
    .contact-info dd {
        font-size: 0.95rem;
    }
}

/* Very small screens adjustments */
@media (max-width: 420px) {
    .staff-image {
        width: 160px;
        height: 200px;
    }
    .staff-info h1 {
        font-size: 1.25rem;
    }
    .staff-card-content {
        padding: 1rem;
    }
    .staff-content {
        padding: 1rem;
    }
    .tab-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.925rem;
    }
}

/* Desktop density tweaks */
@media (min-width: 1200px) {
    .staff-card {
        border-radius: 18px;
    }
    .staff-card-content {
        padding: 2.5rem;
    }
}

/* Breadcrumbs */
.staff-breadcrumbs {
    max-width: 100%;
    margin: 1.5rem 0 0 0;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    background: linear-gradient(90deg, rgba(230, 243, 240, 0.5), rgba(230, 243, 240, 0.3));
    border-bottom: 1px solid var(--mint-border);
    margin-bottom: 2rem;
}

.staff-breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.staff-breadcrumbs a:hover {
    color: var(--primary-color);
    background: rgba(0, 135, 90, 0.08);
}

.staff-breadcrumbs .divider {
    margin: 0 0.25rem;
    color: #D1D5DB;
    font-weight: 300;
    opacity: 0.6;
}

.staff-breadcrumbs .current {
    color: var(--primary-color);
    font-weight: 700;
    padding: 0.5rem 0.75rem;
}

/* Responsive breadcrumbs */
@media (max-width: 768px) {
    .staff-breadcrumbs {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
        gap: 0.2rem;
        margin-bottom: 1.5rem;
    }
    .staff-breadcrumbs a,
    .staff-breadcrumbs .current {
        padding: 0.35rem 0.5rem;
    }
    .staff-breadcrumbs .divider {
        margin: 0 0.15rem;
    }
}