/*
Theme Name: Researcher Profile Theme
Description: A professional WordPress theme for academic researcher profiles with modern design, responsive layout, and extended academic links.
Version: 2.0
Author: Custom Theme
*/

:root {
    --primary-dark: #1a2e5a;
    --primary: #2C4672;
    --primary-light: #3a5a8a;
    --light-beige: #E7E3D7;
    --light-bg: #f5f2e9;
    --white: #FFFFFF;
    --gold: #D4AF37;
    --dark-gold: #B8860B;
    --text-dark: #222222;
    --text-light: #666666;
    --shadow: 0 5px 20px rgba(0,0,0,0.09);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.15);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: linear-gradient(135deg, #f5f2e9 0%, #e7e3d7 100%);
    color: var(--text-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.researcher-profile-container { max-width: 1150px; margin: 0 auto; }

.profile-header { text-align: center; margin-bottom: 30px; padding-top: 20px; }

.profile-header h1 {
    font-size: 2.6rem; color: var(--primary-dark); margin-bottom: 10px;
    display: inline-block; position: relative;
}
.profile-header h1:after {
    content:''; position:absolute; bottom:-10px; left:50%; transform:translateX(-50%);
    width:80px; height:4px; background:var(--gold); border-radius:2px;
}
.profile-header p { color:var(--primary); font-size:1.1rem; max-width:600px; margin:15px auto 0; }

/* PROFILE CARD */
.rp-profile-card {
    background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow);
    margin-bottom:30px; overflow:hidden; border-top:5px solid var(--gold); position:relative;
}
.gold-decoration {
    position:absolute; top:-5px; left:0; width:100%; height:5px;
    background:linear-gradient(90deg,var(--gold) 0%,var(--dark-gold) 30%,var(--gold) 70%,var(--dark-gold) 100%);
}
.rp-profile-header-content { display:flex; padding:40px; gap:35px; align-items:flex-start; }

.rp-profile-image-placeholder {
    width:170px; height:170px;
    background:linear-gradient(135deg,var(--primary-dark) 0%,var(--primary) 100%);
    border-radius:50%; display:flex; align-items:center; justify-content:center;
    flex-shrink:0; border:4px solid var(--gold); box-shadow:0 6px 20px rgba(0,0,0,0.18);
    overflow:hidden; position:relative;
}
.rp-profile-image-placeholder svg { width:80px; height:80px; color:var(--gold); }
.rp-profile-image-placeholder .profile-image,
.rp-profile-image-placeholder img,
.rp-profile-image-placeholder .wp-post-image {
    width:100%!important; height:100%!important; object-fit:cover!important;
    border-radius:50%!important; position:absolute!important; top:0!important; left:0!important; max-width:none!important;
}

.rp-profile-info { flex:1; min-width:0; }
.rp-profile-name { color:var(--primary-dark); font-size:2.2rem; margin-bottom:6px; font-weight:700; }
.rp-profile-title {
    color:var(--primary); font-size:1.3rem; margin-bottom:10px; font-weight:600;
    position:relative; display:inline-block; padding-left:28px;
}
.rp-profile-title:before {
    content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
    width:18px; height:3px; background:var(--gold); border-radius:2px;
}
.rp-profile-affiliation { color:var(--text-light); margin-bottom:20px; font-size:1.05rem; line-height:1.7; max-width:600px; }

.rp-email-link {
    display:inline-flex; align-items:center; margin-bottom:22px;
    background:var(--light-bg); padding:8px 16px; border-radius:30px; border:1px solid var(--light-beige);
}
.rp-email-link svg { margin-right:8px; width:20px; height:20px; color:var(--gold); flex-shrink:0; }
.rp-email-link a { color:var(--primary-dark); text-decoration:none; font-weight:600; font-size:1rem; transition:var(--transition); }
.rp-email-link a:hover { color:var(--gold); }

/* ACADEMIC LINKS */
.rp-academic-links { display:grid; grid-template-columns:repeat(auto-fill,minmax(185px,1fr)); gap:12px; margin-top:20px; }

.rp-academic-link-button {
    display:flex; align-items:center; gap:10px;
    background:linear-gradient(135deg,var(--primary-dark),var(--primary));
    color:var(--white); padding:11px 16px; border-radius:var(--radius-sm);
    text-decoration:none; font-size:0.92rem; font-weight:600; transition:var(--transition);
    box-shadow:0 3px 8px rgba(0,0,0,0.12); border:2px solid transparent; white-space:nowrap; overflow:hidden;
}
.rp-academic-link-button:hover {
    background:transparent; color:var(--primary-dark);
    transform:translateY(-3px); box-shadow:var(--shadow-hover); border-color:var(--gold);
}
.rp-academic-link-button .link-icon { width:20px; height:20px; flex-shrink:0; transition:var(--transition); }

.rp-academic-link-button.link-scopus:hover      { border-color:#E9711C; color:#E9711C; }
.rp-academic-link-button.link-scholar:hover     { border-color:#4285F4; color:#4285F4; }
.rp-academic-link-button.link-orcid:hover       { border-color:#A6CE39; color:#A6CE39; }
.rp-academic-link-button.link-researchgate:hover{ border-color:#00CCBB; color:#00CCBB; }
.rp-academic-link-button.link-wos:hover         { border-color:#E11D48; color:#E11D48; }
.rp-academic-link-button.link-linkedin:hover    { border-color:#0A66C2; color:#0A66C2; }
.rp-academic-link-button.link-community:hover   { border-color:var(--gold); color:var(--dark-gold); }

/* NAV TABS */
.rp-nav-tabs {
    margin-bottom:30px; background:var(--white);
    border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; position:relative;
}
.rp-nav-tabs-wrapper { overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.rp-nav-tabs-wrapper::-webkit-scrollbar { display:none; }
.rp-nav-tabs-content { display:flex; min-width:max-content; }

.rp-nav-tab-button {
    padding:15px 18px; background:none; border:none; cursor:pointer;
    font-size:0.88rem; color:var(--text-light); position:relative; font-weight:600;
    transition:var(--transition); white-space:nowrap; letter-spacing:0.02em;
    border-bottom:3px solid transparent;
}
.rp-nav-tab-button:hover { color:var(--primary-dark); background:var(--light-bg); }
.rp-nav-tab-button.rp-active-tab {
    color:var(--white);
    background:linear-gradient(135deg,var(--primary-dark),var(--primary));
    border-bottom:3px solid var(--gold);
}
.rp-nav-tab-button i { margin-right:5px; font-size:0.82rem; }

/* SECTION CARDS */
.rp-section-card {
    background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow);
    padding:38px 40px; margin-bottom:30px; animation:fadeIn 0.4s ease-out; border-left:4px solid var(--gold);
}
.rp-hidden { display:none!important; }

.rp-section-header { display:flex; align-items:center; margin-bottom:28px; padding-bottom:16px; border-bottom:2px solid var(--light-beige); }

.rp-section-icon {
    width:42px; height:42px; background:var(--primary-dark); border-radius:10px;
    display:flex; align-items:center; justify-content:center; margin-right:15px; flex-shrink:0;
}
.rp-section-icon i { color:var(--gold); font-size:18px; }
.rp-section-icon svg { width:22px; height:22px; color:var(--gold); }

.rp-section-title { color:var(--primary-dark); font-size:1.6rem; margin:0; position:relative; }
.rp-section-title:after {
    content:''; position:absolute; bottom:-10px; left:0;
    width:50px; height:3px; background:var(--gold); border-radius:2px;
}

.rp-prose { line-height:1.85; font-size:1.05rem; color:var(--text-dark); }
.rp-prose p { margin-bottom:18px; }

/* List Items */
.rp-list-items { list-style:none; padding:0; margin-top:10px; }
.rp-list-item { display:flex; margin-bottom:16px; align-items:flex-start; padding-left:32px; position:relative; }
.rp-list-item:before {
    content:''; position:absolute; left:0; top:10px;
    width:16px; height:16px; background:var(--gold);
    border-radius:50%; border:3px solid var(--primary-dark); flex-shrink:0;
}
.rp-list-item span { flex:1; font-size:1.05rem; padding-left:12px; line-height:1.7; }
.rp-list-items.two-col { display:grid; grid-template-columns:1fr 1fr; gap:0 30px; }

/* Publications */
.rp-pub-list { list-style:none; padding:0; counter-reset:pub-counter; }
.rp-pub-item {
    display:flex; gap:14px; margin-bottom:16px; padding:16px 18px;
    background:var(--light-bg); border-radius:var(--radius-sm); border-left:3px solid var(--gold);
    counter-increment:pub-counter; align-items:flex-start;
}
.rp-pub-item:before {
    content:counter(pub-counter);
    background:var(--primary-dark); color:var(--gold); font-weight:700; font-size:0.85rem;
    min-width:28px; height:28px; border-radius:50%;
    display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px;
}
.rp-pub-item span { font-size:1rem; line-height:1.7; color:var(--text-dark); }

/* FOOTER */
.profile-footer { text-align:center; padding:24px; color:var(--primary); font-size:0.95rem; border-top:1px solid var(--light-beige); margin-top:20px; }

@keyframes fadeIn {
    from { opacity:0; transform:translateY(14px); }
    to   { opacity:1; transform:translateY(0); }
}

/* RESPONSIVE */
@media(max-width:900px){
    .rp-profile-header-content { flex-direction:column; align-items:center; text-align:center; padding:30px 25px; }
    .rp-profile-title { padding-left:0; }
    .rp-profile-title:before { display:none; }
    .rp-email-link { justify-content:center; }
    .rp-academic-links { grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); }
    .rp-section-card { padding:28px 22px; }
    .rp-list-items.two-col { grid-template-columns:1fr; }
}
@media(max-width:600px){
    body { padding:12px; }
    .profile-header h1 { font-size:2rem; }
    .rp-profile-name { font-size:1.8rem; }
    .rp-academic-links { grid-template-columns:1fr 1fr; }
    .rp-section-card { padding:22px 16px; }
    .rp-nav-tab-button { padding:13px 14px; font-size:0.82rem; }
    .rp-pub-item { flex-direction:column; }
    .rp-pub-item:before { margin-bottom:4px; }
}
@media(max-width:380px){ .rp-academic-links { grid-template-columns:1fr; } }
